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:
parent
dd3c097123
commit
37d886bc09
@ -448,9 +448,11 @@ void FullCodeGenerator::EmitReturnSequence() {
|
|||||||
PredictableCodeSizeScope predictable(masm_, -1);
|
PredictableCodeSizeScope predictable(masm_, -1);
|
||||||
__ RecordJSReturn();
|
__ RecordJSReturn();
|
||||||
int no_frame_start = __ LeaveFrame(StackFrame::JAVA_SCRIPT);
|
int no_frame_start = __ LeaveFrame(StackFrame::JAVA_SCRIPT);
|
||||||
__ add(sp, sp, Operand(sp_delta));
|
{ ConstantPoolUnavailableScope constant_pool_unavailable(masm_);
|
||||||
__ Jump(lr);
|
__ add(sp, sp, Operand(sp_delta));
|
||||||
info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
|
__ Jump(lr);
|
||||||
|
info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -2956,23 +2956,25 @@ void LCodeGen::DoReturn(LReturn* instr) {
|
|||||||
if (NeedsEagerFrame()) {
|
if (NeedsEagerFrame()) {
|
||||||
no_frame_start = masm_->LeaveFrame(StackFrame::JAVA_SCRIPT);
|
no_frame_start = masm_->LeaveFrame(StackFrame::JAVA_SCRIPT);
|
||||||
}
|
}
|
||||||
if (instr->has_constant_parameter_count()) {
|
{ ConstantPoolUnavailableScope constant_pool_unavailable(masm());
|
||||||
int parameter_count = ToInteger32(instr->constant_parameter_count());
|
if (instr->has_constant_parameter_count()) {
|
||||||
int32_t sp_delta = (parameter_count + 1) * kPointerSize;
|
int parameter_count = ToInteger32(instr->constant_parameter_count());
|
||||||
if (sp_delta != 0) {
|
int32_t sp_delta = (parameter_count + 1) * kPointerSize;
|
||||||
__ add(sp, sp, Operand(sp_delta));
|
if (sp_delta != 0) {
|
||||||
|
__ add(sp, sp, Operand(sp_delta));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Register reg = ToRegister(instr->parameter_count());
|
||||||
|
// The argument count parameter is a smi
|
||||||
|
__ SmiUntag(reg);
|
||||||
|
__ add(sp, sp, Operand(reg, LSL, kPointerSizeLog2));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Register reg = ToRegister(instr->parameter_count());
|
|
||||||
// The argument count parameter is a smi
|
|
||||||
__ SmiUntag(reg);
|
|
||||||
__ add(sp, sp, Operand(reg, LSL, kPointerSizeLog2));
|
|
||||||
}
|
|
||||||
|
|
||||||
__ Jump(lr);
|
__ Jump(lr);
|
||||||
|
|
||||||
if (no_frame_start != -1) {
|
if (no_frame_start != -1) {
|
||||||
info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
|
info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user