Commit 69f8179c authored by rmcilroy@chromium.org's avatar rmcilroy@chromium.org

Only allow automatic FrameScope types for FrameAndConstantPoolScope

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

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/214623002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20387 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ad3db5d3
......@@ -1648,7 +1648,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
__ 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 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
// 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 @@ void CallApiGetterStub::Generate(MacroAssembler* masm) {
__ 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
......
......@@ -989,7 +989,6 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) {
}
if (FLAG_enable_ool_constant_pool) {
str(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset));
LoadConstantPoolPointerRegister();
}
mov(ip, Operand(CodeObject()));
str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset));
......
......@@ -1524,11 +1524,12 @@ class FrameAndConstantPoolScope {
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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment