Add missing ConstantPoolUnavailableScopes on JS return.

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
rmcilroy@chromium.org 2014-08-21 12:59:18 +00:00
parent dd3c097123
commit 37d886bc09
2 changed files with 21 additions and 17 deletions

View File

@ -448,10 +448,12 @@ void FullCodeGenerator::EmitReturnSequence() {
PredictableCodeSizeScope predictable(masm_, -1);
__ RecordJSReturn();
int no_frame_start = __ LeaveFrame(StackFrame::JAVA_SCRIPT);
{ ConstantPoolUnavailableScope constant_pool_unavailable(masm_);
__ add(sp, sp, Operand(sp_delta));
__ Jump(lr);
info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
}
}
#ifdef DEBUG
// Check that the size of the code used for returning is large enough

View File

@ -2956,6 +2956,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
if (NeedsEagerFrame()) {
no_frame_start = masm_->LeaveFrame(StackFrame::JAVA_SCRIPT);
}
{ ConstantPoolUnavailableScope constant_pool_unavailable(masm());
if (instr->has_constant_parameter_count()) {
int parameter_count = ToInteger32(instr->constant_parameter_count());
int32_t sp_delta = (parameter_count + 1) * kPointerSize;
@ -2975,6 +2976,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
}
}
}
void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {