Revision: 18928
Author:   [email protected]
Date:     Wed Jan 29 17:20:15 2014 UTC
Log: A64: Call ProfileEntryHook in JSEntryStub and do not use real aborts in ProfileEntryHook.

TEST=cctest/test-api/SetFunctionEntryHook
[email protected]

Review URL: https://codereview.chromium.org/148933002
http://code.google.com/p/v8/source/detail?r=18928

Modified:
 /branches/experimental/a64/src/a64/code-stubs-a64.cc
 /branches/experimental/a64/src/a64/macro-assembler-a64.h

=======================================
--- /branches/experimental/a64/src/a64/code-stubs-a64.cc Wed Jan 29 14:32:54 2014 UTC +++ /branches/experimental/a64/src/a64/code-stubs-a64.cc Wed Jan 29 17:20:15 2014 UTC
@@ -2566,7 +2566,7 @@
   // fall-back Abort mechanism.
   //
   // Note that this stub must be generated before any use of Abort.
-  masm->set_use_real_aborts(false);
+  MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm);

   ASM_LOCATION("CEntryStub::Generate entry");
   ProfileEntryHookStub::MaybeCallEntryHook(masm);
@@ -2709,8 +2709,6 @@
   __ Mov(argc, 0);
   __ Mov(target, 0);
   __ Throw(x0, x10, x11, x12, x13);
-
-  masm->set_use_real_aborts(true);
 }


@@ -2744,6 +2742,8 @@
   __ Mov(jssp, csp);
   __ SetStackPointer(jssp);

+  ProfileEntryHookStub::MaybeCallEntryHook(masm);
+
   // Build an entry frame (see layout below).
   Isolate* isolate = masm->isolate();

@@ -6456,6 +6456,7 @@


 void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
+  MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm);
// The entry hook is a "BumpSystemStackPointer" instruction (sub), followed by
   // a "Push lr" instruction, followed by a call.
   // TODO(jbramley): Verify that this call is always made with relocation.
@@ -6930,7 +6931,7 @@

     // In type_info_cell, we expect either undefined or a valid Cell.
     Label okay_here;
- Handle<Map> cell_map(masm->isolate()->heap()->global_property_cell_map());
+    Handle<Map> cell_map = masm->isolate()->factory()->cell_map();
__ JumpIfRoot(type_info_cell, Heap::kUndefinedValueRootIndex, &okay_here);
     __ Ldr(x10, FieldMemOperand(type_info_cell, Cell::kMapOffset));
     __ Cmp(x10, Operand(cell_map));
=======================================
--- /branches/experimental/a64/src/a64/macro-assembler-a64.h Wed Jan 29 15:00:37 2014 UTC +++ /branches/experimental/a64/src/a64/macro-assembler-a64.h Wed Jan 29 17:20:15 2014 UTC
@@ -1121,12 +1121,25 @@
   }
bool allow_macro_instructions() const { return allow_macro_instructions_; }
 #endif
-  void set_use_real_aborts(bool value) { use_real_aborts_ = value; }
   bool use_real_aborts() const { return use_real_aborts_; }
   void set_has_frame(bool value) { has_frame_ = value; }
   bool has_frame() const { return has_frame_; }
   bool AllowThisStubCall(CodeStub* stub);

+  class NoUseRealAbortsScope {
+   public:
+    explicit NoUseRealAbortsScope(MacroAssembler* masm) :
+        saved_(masm->use_real_aborts_), masm_(masm) {
+      masm_->use_real_aborts_ = false;
+    }
+    ~NoUseRealAbortsScope() {
+      masm_->use_real_aborts_ = saved_;
+    }
+   private:
+    bool saved_;
+    MacroAssembler* masm_;
+  };
+
 #ifdef ENABLE_DEBUGGER_SUPPORT
// ---------------------------------------------------------------------------
   // Debugger Support

--
--
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/groups/opt_out.

Reply via email to