Reviewers: Weiliang, mvstanton,

Message:
weiliang.
PTAL.
thanks

Description:
X87: Refactoring InterfaceDescriptors away from code-stubs.h

port r23515.

original commit message:
  Refactoring InterfaceDescriptors away from code-stubs.h

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=

Please review this at https://codereview.chromium.org/527653002/

SVN Base: https://chromium.googlesource.com/external/v8.git@bleeding_edge

Affected files (+3, -79 lines):
  M src/x87/code-stubs-x87.cc
  A + src/x87/interface-descriptors-x87.cc
  M tools/gyp/v8.gyp


Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index 15b6c99a614a5af3ed1a0f269621bad47e979162..aa4b10ead182848b81918c768a50f28fe720605c 100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -123,9 +123,6 @@ void TransitionElementsKindStub::InitializeInterfaceDescriptor(
 }


-const Register InterfaceDescriptor::ContextRegister() { return esi; }
-
-
 static void InitializeArrayConstructorDescriptor(
     Isolate* isolate, CodeStub::Major major,
     CodeStubInterfaceDescriptor* descriptor,
@@ -268,80 +265,6 @@ void StringAddStub::InitializeInterfaceDescriptor(
 }


-void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
-  {
-    CallInterfaceDescriptor* descriptor =
-        isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
-    Register registers[] = { esi,  // context
-                             edi,  // JSFunction
-                             eax,  // actual number of arguments
-                             ebx,  // 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[] = { esi,  // context
-                             ecx,  // key
-    };
-    Representation representations[] = {
-        Representation::Tagged(),     // context
-        Representation::Tagged(),     // key
-    };
- descriptor->Initialize(arraysize(registers), registers, representations);
-  }
-  {
-    CallInterfaceDescriptor* descriptor =
-        isolate->call_descriptor(Isolate::NamedCall);
-    Register registers[] = { esi,  // context
-                             ecx,  // name
-    };
-    Representation representations[] = {
-        Representation::Tagged(),     // context
-        Representation::Tagged(),     // name
-    };
- descriptor->Initialize(arraysize(registers), registers, representations);
-  }
-  {
-    CallInterfaceDescriptor* descriptor =
-        isolate->call_descriptor(Isolate::CallHandler);
-    Register registers[] = { esi,  // context
-                             edx,  // name
-    };
-    Representation representations[] = {
-        Representation::Tagged(),     // context
-        Representation::Tagged(),     // receiver
-    };
- descriptor->Initialize(arraysize(registers), registers, representations);
-  }
-  {
-    CallInterfaceDescriptor* descriptor =
-        isolate->call_descriptor(Isolate::ApiFunctionCall);
-    Register registers[] = { esi,  // context
-                             eax,  // callee
-                             ebx,  // call_data
-                             ecx,  // holder
-                             edx,  // 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)


Index: src/x87/interface-descriptors-x87.cc
diff --git a/src/ia32/interface-descriptors-ia32.cc b/src/x87/interface-descriptors-x87.cc
similarity index 98%
copy from src/ia32/interface-descriptors-ia32.cc
copy to src/x87/interface-descriptors-x87.cc
index 3d3b7a0fcb3f46fd2f63ca638606eb97837bc46d..1f30abc1b00a9f06f4fe3b14c844ad2e02b63551 100644
--- a/src/ia32/interface-descriptors-ia32.cc
+++ b/src/x87/interface-descriptors-x87.cc
@@ -4,7 +4,7 @@

 #include "src/v8.h"

-#if V8_TARGET_ARCH_IA32
+#if V8_TARGET_ARCH_X87

 #include "src/interface-descriptors.h"

@@ -94,4 +94,4 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
 }
 }  // namespace v8::internal

-#endif  // V8_TARGET_ARCH_IA32
+#endif  // V8_TARGET_ARCH_X87
Index: tools/gyp/v8.gyp
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index e1e648a9bafb1acc83b11bb7c0fae4ea35fc493a..9f8ed9ba826baedbda23ec684591d91a9c915890 100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -953,6 +953,7 @@
             '../../src/x87/frames-x87.cc',
             '../../src/x87/frames-x87.h',
             '../../src/x87/full-codegen-x87.cc',
+            '../../src/x87/interface-descriptors-x87.cc',
             '../../src/x87/lithium-codegen-x87.cc',
             '../../src/x87/lithium-codegen-x87.h',
             '../../src/x87/lithium-gap-resolver-x87.cc',


--
--
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.

Reply via email to