| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index b3c4bc827d8f98ca76ea6d0427167a9137271cfd..f1e6e59891460230b39685aef839360f49e27172 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -719,10 +719,21 @@ void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) {
|
| return;
|
| }
|
|
|
| + ASSERT(FLAG_deopt_every_n_times == 0); // Not yet implemented on x64.
|
| +
|
| + if (FLAG_trap_on_deopt) {
|
| + Label done;
|
| + if (cc != no_condition) {
|
| + __ j(NegateCondition(cc), &done, Label::kNear);
|
| + }
|
| + __ int3();
|
| + __ bind(&done);
|
| + }
|
| +
|
| ASSERT(info()->IsStub() || frame_is_built_);
|
| - bool lazy_deopt = info()->IsStub();
|
| - if (cc == no_condition) {
|
| - if (lazy_deopt) {
|
| + bool needs_lazy_deopt = info()->IsStub();
|
| + if (cc == no_condition && frame_is_built_) {
|
| + if (needs_lazy_deopt) {
|
| __ Call(entry, RelocInfo::RUNTIME_ENTRY);
|
| } else {
|
| __ Jump(entry, RelocInfo::RUNTIME_ENTRY);
|
| @@ -733,11 +744,15 @@ void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) {
|
| if (jump_table_.is_empty() ||
|
| jump_table_.last().address != entry ||
|
| jump_table_.last().needs_frame != !frame_is_built_ ||
|
| - jump_table_.last().is_lazy_deopt != lazy_deopt) {
|
| - JumpTableEntry table_entry(entry, !frame_is_built_, lazy_deopt);
|
| + jump_table_.last().is_lazy_deopt != needs_lazy_deopt) {
|
| + JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt);
|
| jump_table_.Add(table_entry, zone());
|
| }
|
| - __ j(cc, &jump_table_.last().label);
|
| + if (cc == no_condition) {
|
| + __ jmp(&jump_table_.last().label);
|
| + } else {
|
| + __ j(cc, &jump_table_.last().label);
|
| + }
|
| }
|
| }
|
|
|
|
|