| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 87fcd60e78e5e8081b24713ba2b9fa52f8a26b1c..b20f8b080bc108b0283b62c8a3cc273cae989f56 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -336,21 +336,23 @@ bool LCodeGen::GenerateDeoptJumpTable() {
|
|
|
| int length = deopt_jump_table_.length();
|
| for (int i = 0; i < length; i++) {
|
| - __ bind(&deopt_jump_table_[i].label);
|
| + Deoptimizer::JumpTableEntry* table_entry = &deopt_jump_table_[i];
|
| + __ bind(&table_entry->label);
|
|
|
| - Deoptimizer::BailoutType type = deopt_jump_table_[i].bailout_type;
|
| + Deoptimizer::BailoutType type = table_entry->bailout_type;
|
| DCHECK(type == deopt_jump_table_[0].bailout_type);
|
| - Address entry = deopt_jump_table_[i].address;
|
| + Address entry = table_entry->address;
|
| int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
|
| DCHECK(id != Deoptimizer::kNotDeoptimizationEntry);
|
| Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
|
| + DeoptComment(table_entry->mnemonic, table_entry->reason);
|
|
|
| // Second-level deopt table entries are contiguous and small, so instead
|
| // of loading the full, absolute address of each one, load an immediate
|
| // offset which will be added to the base address later.
|
| __ mov(entry_offset, Operand(entry - base));
|
|
|
| - if (deopt_jump_table_[i].needs_frame) {
|
| + if (table_entry->needs_frame) {
|
| DCHECK(!info()->saves_caller_doubles());
|
| if (needs_frame.is_bound()) {
|
| __ b(&needs_frame);
|
| @@ -847,6 +849,7 @@ void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment,
|
|
|
|
|
| void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
|
| + const char* reason,
|
| Deoptimizer::BailoutType bailout_type) {
|
| LEnvironment* environment = instr->environment();
|
| RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
| @@ -904,6 +907,7 @@ void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
|
| // restore caller doubles.
|
| if (condition == al && frame_is_built_ &&
|
| !info()->saves_caller_doubles()) {
|
| + DeoptComment(instr->Mnemonic(), reason);
|
| __ Call(entry, RelocInfo::RUNTIME_ENTRY);
|
| } else {
|
| // We often have several deopts to the same entry, reuse the last
|
| @@ -912,9 +916,8 @@ void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
|
| (deopt_jump_table_.last().address != entry) ||
|
| (deopt_jump_table_.last().bailout_type != bailout_type) ||
|
| (deopt_jump_table_.last().needs_frame != !frame_is_built_)) {
|
| - Deoptimizer::JumpTableEntry table_entry(entry,
|
| - bailout_type,
|
| - !frame_is_built_);
|
| + Deoptimizer::JumpTableEntry table_entry(entry, instr->Mnemonic(), reason,
|
| + bailout_type, !frame_is_built_);
|
| deopt_jump_table_.Add(table_entry, zone());
|
| }
|
| __ b(condition, &deopt_jump_table_.last().label);
|
| @@ -922,11 +925,12 @@ void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
|
| }
|
|
|
|
|
| -void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr) {
|
| +void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
|
| + const char* reason) {
|
| Deoptimizer::BailoutType bailout_type = info()->IsStub()
|
| ? Deoptimizer::LAZY
|
| : Deoptimizer::EAGER;
|
| - DeoptimizeIf(condition, instr, bailout_type);
|
| + DeoptimizeIf(condition, instr, reason, bailout_type);
|
| }
|
|
|
|
|
| @@ -5665,8 +5669,7 @@ void LCodeGen::DoDeoptimize(LDeoptimize* instr) {
|
| type = Deoptimizer::LAZY;
|
| }
|
|
|
| - Comment(";;; deoptimize: %s", instr->hydrogen()->reason());
|
| - DeoptimizeIf(al, instr, type);
|
| + DeoptimizeIf(al, instr, instr->hydrogen()->reason(), type);
|
| }
|
|
|
|
|
|
|