Revision: 23524
Author: [email protected]
Date: Fri Aug 29 15:25:41 2014 UTC
Log: MIPS: Refactoring InterfaceDescriptors away from code-stubs.h -
internal.
Port r23515 (fe0bdbf)
Original commit message:
Clean up and create seperation between the concept of a call descriptor and
a
code stub interface descriptor. The former is just concerned with how to
call,
but the latter has many extra hints related to code generation and
deoptimization for the implementation of a particular code stub.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/516263002
https://code.google.com/p/v8/source/detail?r=23524
Added:
/branches/bleeding_edge/src/mips/interface-descriptors-mips.cc
/branches/bleeding_edge/src/mips64/interface-descriptors-mips64.cc
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
/branches/bleeding_edge/src/mips64/code-stubs-mips64.cc
=======================================
--- /dev/null
+++ /branches/bleeding_edge/src/mips/interface-descriptors-mips.cc Fri Aug
29 15:25:41 2014 UTC
@@ -0,0 +1,92 @@
+// Copyright 2012 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/v8.h"
+
+#if V8_TARGET_ARCH_MIPS
+
+#include "src/interface-descriptors.h"
+
+namespace v8 {
+namespace internal {
+
+const Register InterfaceDescriptor::ContextRegister() { return cp; }
+
+
+void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall);
+ Register registers[] = { cp, // context,
+ a1, // JSFunction
+ a0, // actual number of arguments
+ a2, // expected number of arguments
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // JSFunction
+ Representation::Integer32(), // actual number of arguments
+ Representation::Integer32(), // expected number of arguments
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::KeyedCall);
+ Register registers[] = { cp, // context
+ a2, // key
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // key
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::NamedCall);
+ Register registers[] = { cp, // context
+ a2, // name
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // name
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::CallHandler);
+ Register registers[] = { cp, // context
+ a0, // receiver
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // receiver
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::ApiFunctionCall);
+ Register registers[] = { cp, // context
+ a0, // callee
+ t0, // call_data
+ a2, // holder
+ a1, // api_function_address
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // callee
+ Representation::Tagged(), // call_data
+ Representation::Tagged(), // holder
+ Representation::External(), // api_function_address
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+}
+}
+} // namespace v8::internal
+
+#endif // V8_TARGET_ARCH_MIPS
=======================================
--- /dev/null
+++ /branches/bleeding_edge/src/mips64/interface-descriptors-mips64.cc Fri
Aug 29 15:25:41 2014 UTC
@@ -0,0 +1,92 @@
+// Copyright 2012 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/v8.h"
+
+#if V8_TARGET_ARCH_MIPS64
+
+#include "src/interface-descriptors.h"
+
+namespace v8 {
+namespace internal {
+
+const Register InterfaceDescriptor::ContextRegister() { return cp; }
+
+
+void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall);
+ Register registers[] = { cp, // context
+ a1, // JSFunction
+ a0, // actual number of arguments
+ a2, // expected number of arguments
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // JSFunction
+ Representation::Integer32(), // actual number of arguments
+ Representation::Integer32(), // expected number of arguments
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::KeyedCall);
+ Register registers[] = { cp, // context
+ a2, // key
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // key
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::NamedCall);
+ Register registers[] = { cp, // context
+ a2, // name
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // name
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::CallHandler);
+ Register registers[] = { cp, // context
+ a0, // receiver
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // receiver
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(CallDescriptorKey::ApiFunctionCall);
+ Register registers[] = { cp, // context
+ a0, // callee
+ a4, // call_data
+ a2, // holder
+ a1, // api_function_address
+ };
+ Representation representations[] = {
+ Representation::Tagged(), // context
+ Representation::Tagged(), // callee
+ Representation::Tagged(), // call_data
+ Representation::Tagged(), // holder
+ Representation::External(), // api_function_address
+ };
+ descriptor->Initialize(arraysize(registers), registers,
representations);
+ }
+}
+}
+} // namespace v8::internal
+
+#endif // V8_TARGET_ARCH_MIPS64
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Wed Aug 27 14:22:48
2014 UTC
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Fri Aug 29 15:25:41
2014 UTC
@@ -121,9 +121,6 @@
descriptor->SetMissHandler(
ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate()));
}
-
-
-const Register InterfaceDescriptor::ContextRegister() { return cp; }
static void InitializeArrayConstructorDescriptor(
@@ -258,80 +255,6 @@
descriptor->Initialize(MajorKey(), arraysize(registers), registers,
Runtime::FunctionForId(Runtime::kStringAdd)->entry);
}
-
-
-void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
- Register registers[] = { cp, // context,
- a1, // JSFunction
- a0, // actual number of arguments
- a2, // expected number of arguments
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // JSFunction
- Representation::Integer32(), // actual number of arguments
- Representation::Integer32(), // expected number of arguments
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::KeyedCall);
- Register registers[] = { cp, // context
- a2, // key
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // key
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::NamedCall);
- Register registers[] = { cp, // context
- a2, // name
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // name
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::CallHandler);
- Register registers[] = { cp, // context
- a0, // receiver
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // receiver
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::ApiFunctionCall);
- Register registers[] = { cp, // context
- a0, // callee
- t0, // call_data
- a2, // holder
- a1, // api_function_address
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // callee
- Representation::Tagged(), // call_data
- Representation::Tagged(), // holder
- Representation::External(), // api_function_address
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
-}
#define __ ACCESS_MASM(masm)
=======================================
--- /branches/bleeding_edge/src/mips64/code-stubs-mips64.cc Wed Aug 27
14:22:48 2014 UTC
+++ /branches/bleeding_edge/src/mips64/code-stubs-mips64.cc Fri Aug 29
15:25:41 2014 UTC
@@ -121,9 +121,6 @@
descriptor->SetMissHandler(
ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate()));
}
-
-
-const Register InterfaceDescriptor::ContextRegister() { return cp; }
static void InitializeArrayConstructorDescriptor(
@@ -258,80 +255,6 @@
descriptor->Initialize(MajorKey(), arraysize(registers), registers,
Runtime::FunctionForId(Runtime::kStringAdd)->entry);
}
-
-
-void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
- Register registers[] = { cp, // context
- a1, // JSFunction
- a0, // actual number of arguments
- a2, // expected number of arguments
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // JSFunction
- Representation::Integer32(), // actual number of arguments
- Representation::Integer32(), // expected number of arguments
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::KeyedCall);
- Register registers[] = { cp, // context
- a2, // key
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // key
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::NamedCall);
- Register registers[] = { cp, // context
- a2, // name
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // name
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::CallHandler);
- Register registers[] = { cp, // context
- a0, // receiver
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // receiver
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
- {
- CallInterfaceDescriptor* descriptor =
- isolate->call_descriptor(Isolate::ApiFunctionCall);
- Register registers[] = { cp, // context
- a0, // callee
- a4, // call_data
- a2, // holder
- a1, // api_function_address
- };
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // callee
- Representation::Tagged(), // call_data
- Representation::Tagged(), // holder
- Representation::External(), // api_function_address
- };
- descriptor->Initialize(arraysize(registers), registers,
representations);
- }
-}
#define __ ACCESS_MASM(masm)
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.