| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 9dfc972bd9bfc77bdd557f46f4d221d40efd92d4..170474e862782c0154728cc1f573cb2440340e5f 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -281,8 +281,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 --------------------");
|
| }
|
| @@ -298,47 +297,24 @@ bool LCodeGen::GenerateJumpTable() {
|
| }
|
| if (jump_table_[i].needs_frame) {
|
| __ movq(kScratchRegister, 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(rbp);
|
| - __ movq(rbp, rsp);
|
| - __ push(rsi);
|
| - // 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());
|
| - __ Move(rsi, Smi::FromInt(StackFrame::STUB));
|
| - __ push(rsi);
|
| - __ movq(rsi, MemOperand(rsp, kPointerSize));
|
| - __ call(kScratchRegister);
|
| - }
|
| + 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(rbp);
|
| - __ movq(rbp, rsp);
|
| - __ push(rsi);
|
| - // 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());
|
| - __ Move(rsi, Smi::FromInt(StackFrame::STUB));
|
| - __ push(rsi);
|
| - __ movq(rsi, MemOperand(rsp, kPointerSize));
|
| - __ jmp(kScratchRegister);
|
| - }
|
| + __ bind(&needs_frame);
|
| + __ push(rbp);
|
| + __ movq(rbp, rsp);
|
| + __ push(rsi);
|
| + // 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());
|
| + __ Move(rsi, Smi::FromInt(StackFrame::STUB));
|
| + __ push(rsi);
|
| + __ movq(rsi, MemOperand(rsp, kPointerSize));
|
| + __ call(kScratchRegister);
|
| }
|
| } else {
|
| - if (type == Deoptimizer::LAZY) {
|
| - __ call(entry, RelocInfo::RUNTIME_ENTRY);
|
| - } else {
|
| - __ jmp(entry, RelocInfo::RUNTIME_ENTRY);
|
| - }
|
| + __ call(entry, RelocInfo::RUNTIME_ENTRY);
|
| }
|
| }
|
| return !is_aborted();
|
| @@ -689,13 +665,8 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
| }
|
|
|
| ASSERT(info()->IsStub() || frame_is_built_);
|
| - bool needs_lazy_deopt = info()->IsStub();
|
| if (cc == no_condition && frame_is_built_) {
|
| - if (needs_lazy_deopt) {
|
| - __ 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.
|
|
|