Chromium Code Reviews| Index: src/frames.cc |
| diff --git a/src/frames.cc b/src/frames.cc |
| index 2d188cc97c9f8642ea56eef051c7cb9043408013..9cf6dc8ffdb088cc5e6aaa30bf7a4ad055b1fa0d 100644 |
| --- a/src/frames.cc |
| +++ b/src/frames.cc |
| @@ -947,7 +947,8 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames) { |
| bool is_constructor = IsConstructor(); |
| while (jsframe_count != 0) { |
| opcode = static_cast<Translation::Opcode>(it.Next()); |
| - if (opcode == Translation::JS_FRAME) { |
| + if (opcode == Translation::JS_FRAME || |
| + opcode == Translation::INTERPRETED_FRAME) { |
| jsframe_count--; |
| BailoutId const ast_id = BailoutId(it.Next()); |
| SharedFunctionInfo* const shared_info = |
| @@ -993,14 +994,21 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames) { |
| } |
| Code* const code = shared_info->code(); |
| - DeoptimizationOutputData* const output_data = |
| - DeoptimizationOutputData::cast(code->deoptimization_data()); |
| - unsigned const entry = |
| - Deoptimizer::GetOutputInfo(output_data, ast_id, shared_info); |
| - unsigned const pc_offset = |
| - FullCodeGenerator::PcField::decode(entry) + Code::kHeaderSize; |
| - DCHECK_NE(0U, pc_offset); |
| + unsigned pc_offset; |
| + if (opcode == Translation::JS_FRAME) { |
| + DeoptimizationOutputData* const output_data = |
| + DeoptimizationOutputData::cast(code->deoptimization_data()); |
| + unsigned const entry = |
| + Deoptimizer::GetOutputInfo(output_data, ast_id, shared_info); |
| + pc_offset = |
| + FullCodeGenerator::PcField::decode(entry) + Code::kHeaderSize; |
| + DCHECK_NE(0U, pc_offset); |
| + } else { |
| + // TODO(rmcilroy): Modify FrameSummary to enable us to summarize |
| + // based on the BytecodeArray and bytecode offset. |
|
Jarin
2015/12/17 13:35:09
How about DCHECK_EQ(opcode, Translation::INTERPRET
rmcilroy
2015/12/17 23:49:54
I had this originally, but opcode gets changed in
Jarin
2015/12/18 08:58:21
Thanks (I am actually surprised that your previous
rmcilroy
2015/12/18 15:18:10
Yeah, I think it was broken and must have always h
|
| + pc_offset = 0; |
| + } |
| FrameSummary summary(receiver, function, code, pc_offset, is_constructor); |
| frames->Add(summary); |
| is_constructor = false; |