Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 8d4e1cf91c7157ea8a1199312e391acbd5b30652..c11d74f11c5e66f68c8bbdb6f98bf95d75efa3c6 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -383,16 +383,18 @@ bool LCodeGen::GenerateJumpTable() { |
Comment(";;; -------------------- Jump table --------------------"); |
} |
for (int i = 0; i < jump_table_.length(); i++) { |
- __ bind(&jump_table_[i].label); |
- Address entry = jump_table_[i].address; |
- Deoptimizer::BailoutType type = jump_table_[i].bailout_type; |
+ Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i]; |
+ __ bind(&table_entry->label); |
+ Address entry = table_entry->address; |
+ Deoptimizer::BailoutType type = table_entry->bailout_type; |
int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); |
if (id == Deoptimizer::kNotDeoptimizationEntry) { |
Comment(";;; jump table entry %d.", i); |
} else { |
Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id); |
} |
- if (jump_table_[i].needs_frame) { |
+ DeoptComment(table_entry->mnemonic, table_entry->reason); |
+ if (table_entry->needs_frame) { |
DCHECK(!info()->saves_caller_doubles()); |
__ push(Immediate(ExternalReference::ForDeoptEntry(entry))); |
if (needs_frame.is_bound()) { |
@@ -826,6 +828,7 @@ void LCodeGen::RegisterEnvironmentForDeoptimization( |
void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr, |
+ const char* reason, |
Deoptimizer::BailoutType bailout_type) { |
LEnvironment* environment = instr->environment(); |
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
@@ -869,6 +872,7 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr, |
DCHECK(info()->IsStub() || frame_is_built_); |
if (cc == no_condition && frame_is_built_) { |
+ DeoptComment(instr->Mnemonic(), reason); |
__ call(entry, RelocInfo::RUNTIME_ENTRY); |
} else { |
// We often have several deopts to the same entry, reuse the last |
@@ -877,9 +881,8 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr, |
jump_table_.last().address != entry || |
jump_table_.last().needs_frame != !frame_is_built_ || |
jump_table_.last().bailout_type != bailout_type) { |
- Deoptimizer::JumpTableEntry table_entry(entry, |
- bailout_type, |
- !frame_is_built_); |
+ Deoptimizer::JumpTableEntry table_entry(entry, instr->Mnemonic(), reason, |
+ bailout_type, !frame_is_built_); |
jump_table_.Add(table_entry, zone()); |
} |
if (cc == no_condition) { |
@@ -891,11 +894,12 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr, |
} |
-void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr) { |
+void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr, |
+ const char* reason) { |
Deoptimizer::BailoutType bailout_type = info()->IsStub() |
? Deoptimizer::LAZY |
: Deoptimizer::EAGER; |
- DeoptimizeIf(cc, instr, bailout_type); |
+ DeoptimizeIf(cc, instr, reason, bailout_type); |
} |
@@ -5463,8 +5467,7 @@ void LCodeGen::DoDeoptimize(LDeoptimize* instr) { |
if (info()->IsStub() && type == Deoptimizer::EAGER) { |
type = Deoptimizer::LAZY; |
} |
- Comment(";;; deoptimize: %s", instr->hydrogen()->reason()); |
- DeoptimizeIf(no_condition, instr, type); |
+ DeoptimizeIf(no_condition, instr, instr->hydrogen()->reason(), type); |
} |