__ stop("trap_on_deopt", condition);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to handle condition, build frame, or
// restore caller doubles.
__ Bind(&dont_trap);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to build frame, or restore caller doubles.
if (branch_type == always &&
static const int kBailoutTypesWithCodeEntry = SOFT + 1;
struct Reason {
- Reason(const char* m, const char* d) : mnemonic(m), detail(d) {}
+ Reason(int r, const char* m, const char* d)
+ : raw_position(r), mnemonic(m), detail(d) {}
+ int raw_position;
const char* mnemonic;
const char* detail;
};
// Offset from the start of the inlined function.
typedef BitField<int, 9, 23> PositionField;
- // On HPositionInfo can use this constructor.
explicit HSourcePosition(int value) : value_(value) { }
friend class HPositionInfo;
+ friend class LCodeGenBase;
// If FLAG_hydrogen_track_positions is set contains bitfields InliningIdField
// and PositionField.
__ bind(&done);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
if (cc == no_condition && frame_is_built_) {
DeoptComment(reason);
void LCodeGenBase::DeoptComment(const Deoptimizer::Reason& reason) {
- Comment(";;; deoptimize %s: %s", reason.mnemonic,
- reason.detail == NULL ? "unknown reason" : reason.detail);
+ OStringStream os;
+ os << ";;; deoptimize at " << HSourcePosition(reason.raw_position) << " "
+ << reason.mnemonic;
+ if (reason.detail != NULL) os << ": " << reason.detail;
+ Comment("%s", os.c_str());
}
__ bind(&skip);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to handle condition, build frame, or
// restore caller doubles.
__ bind(&skip);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to handle condition, build frame, or
// restore caller doubles.
__ bind(&done);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to handle condition, build frame, or
// restore caller doubles.
__ bind(&done);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
if (cc == no_condition && frame_is_built_) {
DeoptComment(reason);