Fix deopt reason printing to print stub failure reason with --trace-stub-failures --code-comments

R=jarin@chromium.org

Review URL: https://codereview.chromium.org/369843002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6574f33d
......@@ -758,7 +758,8 @@ void Deoptimizer::DoComputeOutputFrames() {
input_data->OptimizationId()->value(),
bailout_id_,
fp_to_sp_delta_);
if (bailout_type_ == EAGER || bailout_type_ == SOFT) {
if (bailout_type_ == EAGER || bailout_type_ == SOFT ||
(compiled_code_->is_hydrogen_stub())) {
compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_);
}
}
......@@ -1548,8 +1549,7 @@ void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator,
// reg = JSFunction context
//
CHECK(compiled_code_->is_crankshafted() &&
compiled_code_->kind() != Code::OPTIMIZED_FUNCTION);
CHECK(compiled_code_->is_hydrogen_stub());
int major_key = compiled_code_->major_key();
CodeStubInterfaceDescriptor* descriptor =
isolate_->code_stub_interface_descriptor(major_key);
......
......@@ -4571,6 +4571,11 @@ inline bool Code::is_crankshafted() {
}
inline bool Code::is_hydrogen_stub() {
return is_crankshafted() && kind() != OPTIMIZED_FUNCTION;
}
inline void Code::set_is_crankshafted(bool value) {
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
int updated = IsCrankshaftedField::update(previous, value);
......
......@@ -11163,7 +11163,9 @@ void Code::PrintDeoptLocation(FILE* out, int bailout_id) {
if ((bailout_id == Deoptimizer::GetDeoptimizationId(
GetIsolate(), info->target_address(), Deoptimizer::EAGER)) ||
(bailout_id == Deoptimizer::GetDeoptimizationId(
GetIsolate(), info->target_address(), Deoptimizer::SOFT))) {
GetIsolate(), info->target_address(), Deoptimizer::SOFT)) ||
(bailout_id == Deoptimizer::GetDeoptimizationId(
GetIsolate(), info->target_address(), Deoptimizer::LAZY))) {
CHECK(RelocInfo::IsRuntimeEntry(info->rmode()));
PrintF(out, " %s\n", last_comment);
return;
......
......@@ -5557,6 +5557,7 @@ class Code: public HeapObject {
// For kind STUB or ICs, tells whether or not a code object was generated by
// the optimizing compiler (but it may not be an optimized function).
bool is_crankshafted();
bool is_hydrogen_stub(); // Crankshafted, but not a function.
inline void set_is_crankshafted(bool value);
// [optimizable]: For FUNCTION kind, tells if it is optimizable.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment