Reviewers: Weiliang, Yang,

Description:
X87: Unify JSEntryStub and JSConstructEntryStub, and some more code stub
cleanups.

port r23742.

original commit message:

Unify JSEntryStub and JSConstructEntryStub, and some more code stub cleanups.

BUG=

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

SVN Base: https://github.com/v8/v8.git@bleeding_edge

Affected files (+5, -7 lines):
  M src/x87/code-stubs-x87.h
  M src/x87/code-stubs-x87.cc


Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index acee4c9b8ae8e3007ef82a86916d04b5da85c2b2..f36ef80731a3c4482e3a010493393c9eebabd6e8 100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -2073,7 +2073,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
 }


-void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
+void JSEntryStub::Generate(MacroAssembler* masm) {
   Label invoke, handler_entry, exit;
   Label not_outermost_js, not_outermost_js_2;

@@ -2084,7 +2084,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
   __ mov(ebp, esp);

   // Push marker in two places.
- int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY;
+  int marker = type();
   __ push(Immediate(Smi::FromInt(marker)));  // context slot
   __ push(Immediate(Smi::FromInt(marker)));  // function slot
   // Save callee-saved registers (C calling conventions).
@@ -2135,7 +2135,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
   // pop the faked function when we return. Notice that we cannot store a
   // reference to the trampoline code directly in this stub, because the
   // builtin stubs may not have been generated yet.
-  if (is_construct) {
+  if (type() == StackFrame::ENTRY_CONSTRUCT) {
ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline,
                                       isolate());
     __ mov(edx, Immediate(construct_entry));
Index: src/x87/code-stubs-x87.h
diff --git a/src/x87/code-stubs-x87.h b/src/x87/code-stubs-x87.h
index b5003640f43a2f186d8465a42cb754e0b0e8a2ed..581d5eaa289256a256b7c97230e0bdd3870883c9 100644
--- a/src/x87/code-stubs-x87.h
+++ b/src/x87/code-stubs-x87.h
@@ -66,8 +66,6 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
IndexBits::encode(index.code()) | LookupModeBits::encode(mode);
   }

-  void Generate(MacroAssembler* masm);
-
   static void GenerateNegativeLookup(MacroAssembler* masm,
                                      Label* miss,
                                      Label* done,
@@ -116,7 +114,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
   class IndexBits: public BitField<int, 6, 3> {};
   class LookupModeBits: public BitField<LookupMode, 9, 1> {};

-  DEFINE_CODE_STUB(NameDictionaryLookup, PlatformCodeStub);
+  DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub);
 };


@@ -324,7 +322,7 @@ class RecordWriteStub: public PlatformCodeStub {

virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; }

-  void Generate(MacroAssembler* masm);
+  virtual void Generate(MacroAssembler* masm) OVERRIDE;
   void GenerateIncremental(MacroAssembler* masm, Mode mode);
   void CheckNeedsToInformIncrementalMarker(
       MacroAssembler* masm,


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to