Revision: 20387
Author:   [email protected]
Date:     Tue Apr  1 10:49:44 2014 UTC
Log: Only allow automatic FrameScope types for FrameAndConstantPoolScope

In certain situations the PP register would be invalid in a FrameScope::Manual FrameAndConstantPoolScope

[email protected]

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

Modified:
 /branches/bleeding_edge/src/arm/code-stubs-arm.cc
 /branches/bleeding_edge/src/arm/macro-assembler-arm.cc
 /branches/bleeding_edge/src/arm/macro-assembler-arm.h

=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Fri Mar 28 10:07:23 2014 UTC +++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Tue Apr 1 10:49:44 2014 UTC
@@ -1648,7 +1648,7 @@
   __ sub(r6, r6, Operand(kPointerSize));

   // Enter the exit frame that transitions from JavaScript to C++.
-  FrameAndConstantPoolScope scope(masm, StackFrame::MANUAL);
+  FrameScope scope(masm, StackFrame::MANUAL);
   __ EnterExitFrame(save_doubles_);

   // Set up argc and the builtin function in callee-saved registers.
@@ -5377,7 +5377,7 @@
   // it's not controlled by GC.
   const int kApiStackSpace = 4;

-  FrameAndConstantPoolScope frame_scope(masm, StackFrame::MANUAL);
+  FrameScope frame_scope(masm, StackFrame::MANUAL);
   __ EnterExitFrame(false, kApiStackSpace);

   ASSERT(!api_function_address.is(r0) && !scratch.is(r0));
@@ -5437,7 +5437,7 @@
   __ add(r1, r0, Operand(1 * kPointerSize));  // r1 = PCA

   const int kApiStackSpace = 1;
-  FrameAndConstantPoolScope frame_scope(masm, StackFrame::MANUAL);
+  FrameScope frame_scope(masm, StackFrame::MANUAL);
   __ EnterExitFrame(false, kApiStackSpace);

// Create PropertyAccessorInfo instance on the stack above the exit frame with
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Wed Mar 26 15:51:48 2014 UTC +++ /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Tue Apr 1 10:49:44 2014 UTC
@@ -989,7 +989,6 @@
   }
   if (FLAG_enable_ool_constant_pool) {
     str(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset));
-    LoadConstantPoolPointerRegister();
   }
   mov(ip, Operand(CodeObject()));
   str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset));
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.h Wed Mar 19 07:01:08 2014 UTC +++ /branches/bleeding_edge/src/arm/macro-assembler-arm.h Tue Apr 1 10:49:44 2014 UTC
@@ -1524,11 +1524,12 @@
         type_(type),
         old_has_frame_(masm->has_frame()),
         old_constant_pool_available_(masm->is_constant_pool_available())  {
+ // We only want to enable constant pool access for non-manual frame scopes
+    // to ensure the constant pool pointer is valid throughout the scope.
+    ASSERT(type_ != StackFrame::MANUAL && type_ != StackFrame::NONE);
     masm->set_has_frame(true);
     masm->set_constant_pool_available(true);
-    if (type_ != StackFrame::MANUAL && type_ != StackFrame::NONE) {
-      masm->EnterFrame(type, !old_constant_pool_available_);
-    }
+    masm->EnterFrame(type, !old_constant_pool_available_);
   }

   ~FrameAndConstantPoolScope() {

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