| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index ac82dcfd41eda2687d40349c382b7e7fceee8820..e0d4efba06015cf8779f3ee0871c34708d4c8382 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -365,8 +365,7 @@ bool LCodeGen::GenerateBody() {
|
|
|
|
|
| bool LCodeGen::GenerateJumpTable() {
|
| - Label needs_frame_not_call;
|
| - Label needs_frame_is_call;
|
| + Label needs_frame;
|
| if (jump_table_.length() > 0) {
|
| Comment(";;; -------------------- Jump table --------------------");
|
| }
|
| @@ -382,56 +381,32 @@ bool LCodeGen::GenerateJumpTable() {
|
| }
|
| if (jump_table_[i].needs_frame) {
|
| __ push(Immediate(ExternalReference::ForDeoptEntry(entry)));
|
| - if (type == Deoptimizer::LAZY) {
|
| - if (needs_frame_is_call.is_bound()) {
|
| - __ jmp(&needs_frame_is_call);
|
| - } else {
|
| - __ bind(&needs_frame_is_call);
|
| - __ push(MemOperand(ebp, StandardFrameConstants::kContextOffset));
|
| - // This variant of deopt can only be used with stubs. Since we don't
|
| - // have a function pointer to install in the stack frame that we're
|
| - // building, install a special marker there instead.
|
| - ASSERT(info()->IsStub());
|
| - __ push(Immediate(Smi::FromInt(StackFrame::STUB)));
|
| - // Push a PC inside the function so that the deopt code can find where
|
| - // the deopt comes from. It doesn't have to be the precise return
|
| - // address of a "calling" LAZY deopt, it only has to be somewhere
|
| - // inside the code body.
|
| - Label push_approx_pc;
|
| - __ call(&push_approx_pc);
|
| - __ bind(&push_approx_pc);
|
| - // Push the continuation which was stashed were the ebp should
|
| - // be. Replace it with the saved ebp.
|
| - __ push(MemOperand(esp, 3 * kPointerSize));
|
| - __ mov(MemOperand(esp, 4 * kPointerSize), ebp);
|
| - __ lea(ebp, MemOperand(esp, 4 * kPointerSize));
|
| - __ ret(0); // Call the continuation without clobbering registers.
|
| - }
|
| + if (needs_frame.is_bound()) {
|
| + __ jmp(&needs_frame);
|
| } else {
|
| - if (needs_frame_not_call.is_bound()) {
|
| - __ jmp(&needs_frame_not_call);
|
| - } else {
|
| - __ bind(&needs_frame_not_call);
|
| - __ push(MemOperand(ebp, StandardFrameConstants::kContextOffset));
|
| - // This variant of deopt can only be used with stubs. Since we don't
|
| - // have a function pointer to install in the stack frame that we're
|
| - // building, install a special marker there instead.
|
| - ASSERT(info()->IsStub());
|
| - __ push(Immediate(Smi::FromInt(StackFrame::STUB)));
|
| - // Push the continuation which was stashed were the ebp should
|
| - // be. Replace it with the saved ebp.
|
| - __ push(MemOperand(esp, 2 * kPointerSize));
|
| - __ mov(MemOperand(esp, 3 * kPointerSize), ebp);
|
| - __ lea(ebp, MemOperand(esp, 3 * kPointerSize));
|
| - __ ret(0); // Call the continuation without clobbering registers.
|
| - }
|
| + __ bind(&needs_frame);
|
| + __ push(MemOperand(ebp, StandardFrameConstants::kContextOffset));
|
| + // This variant of deopt can only be used with stubs. Since we don't
|
| + // have a function pointer to install in the stack frame that we're
|
| + // building, install a special marker there instead.
|
| + ASSERT(info()->IsStub());
|
| + __ push(Immediate(Smi::FromInt(StackFrame::STUB)));
|
| + // Push a PC inside the function so that the deopt code can find where
|
| + // the deopt comes from. It doesn't have to be the precise return
|
| + // address of a "calling" LAZY deopt, it only has to be somewhere
|
| + // inside the code body.
|
| + Label push_approx_pc;
|
| + __ call(&push_approx_pc);
|
| + __ bind(&push_approx_pc);
|
| + // Push the continuation which was stashed were the ebp should
|
| + // be. Replace it with the saved ebp.
|
| + __ push(MemOperand(esp, 3 * kPointerSize));
|
| + __ mov(MemOperand(esp, 4 * kPointerSize), ebp);
|
| + __ lea(ebp, MemOperand(esp, 4 * kPointerSize));
|
| + __ ret(0); // Call the continuation without clobbering registers.
|
| }
|
| } else {
|
| - if (type == Deoptimizer::LAZY) {
|
| - __ call(entry, RelocInfo::RUNTIME_ENTRY);
|
| - } else {
|
| - __ jmp(entry, RelocInfo::RUNTIME_ENTRY);
|
| - }
|
| + __ call(entry, RelocInfo::RUNTIME_ENTRY);
|
| }
|
| }
|
| return !is_aborted();
|
| @@ -885,11 +860,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
|
|
| ASSERT(info()->IsStub() || frame_is_built_);
|
| if (cc == no_condition && frame_is_built_) {
|
| - if (bailout_type == Deoptimizer::LAZY) {
|
| - __ call(entry, RelocInfo::RUNTIME_ENTRY);
|
| - } else {
|
| - __ jmp(entry, RelocInfo::RUNTIME_ENTRY);
|
| - }
|
| + __ call(entry, RelocInfo::RUNTIME_ENTRY);
|
| } else {
|
| // We often have several deopts to the same entry, reuse the last
|
| // jump entry if this is the case.
|
|
|