diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc index 4c98b84735..ff5136c301 100644 --- a/src/deoptimizer.cc +++ b/src/deoptimizer.cc @@ -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); diff --git a/src/objects-inl.h b/src/objects-inl.h index 95b2572299..abbbe91359 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -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); diff --git a/src/objects.cc b/src/objects.cc index f0c0824342..eb646e93ca 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -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; diff --git a/src/objects.h b/src/objects.h index 99580563a7..2e78413aca 100644 --- a/src/objects.h +++ b/src/objects.h @@ -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.