Chromium Code Reviews| Index: src/frames.cc |
| diff --git a/src/frames.cc b/src/frames.cc |
| index 161d3ecfaf36af29175c77fc2735f8f965207a7f..fee8e51e4659c64bcba7b79229be7c5b34417d6b 100644 |
| --- a/src/frames.cc |
| +++ b/src/frames.cc |
| @@ -982,12 +982,10 @@ int JavaScriptFrame::LookupExceptionHandlerInTable( |
| int* stack_depth, HandlerTable::CatchPrediction* prediction) { |
| Code* code = LookupCode(); |
| DCHECK(!code->is_optimized_code()); |
| - HandlerTable* table = HandlerTable::cast(code->handler_table()); |
| int pc_offset = static_cast<int>(pc() - code->entry()); |
| - return table->LookupRange(pc_offset, stack_depth, prediction); |
| + return code->LookupRangeInHandlerTable(pc_offset, stack_depth, prediction); |
| } |
| - |
| void JavaScriptFrame::PrintFunctionAndOffset(JSFunction* function, Code* code, |
| Address pc, FILE* file, |
| bool print_line_number) { |
| @@ -1236,11 +1234,12 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames, |
| int OptimizedFrame::LookupExceptionHandlerInTable( |
| int* stack_slots, HandlerTable::CatchPrediction* prediction) { |
| + DCHECK_NULL(prediction); |
|
Michael Starzinger
2016/08/02 11:04:05
nit: Can we add a comment saying that predictions
|
| Code* code = LookupCode(); |
| HandlerTable* table = HandlerTable::cast(code->handler_table()); |
| int pc_offset = static_cast<int>(pc() - code->entry()); |
| if (stack_slots) *stack_slots = code->stack_slots(); |
| - return table->LookupReturn(pc_offset, prediction); |
| + return table->LookupReturn(pc_offset); |
| } |
| @@ -1337,9 +1336,8 @@ Object* OptimizedFrame::StackSlotAt(int index) const { |
| int InterpretedFrame::LookupExceptionHandlerInTable( |
| int* context_register, HandlerTable::CatchPrediction* prediction) { |
| BytecodeArray* bytecode = function()->shared()->bytecode_array(); |
| - HandlerTable* table = HandlerTable::cast(bytecode->handler_table()); |
| - int pc_offset = GetBytecodeOffset() + 1; // Point after current bytecode. |
| - return table->LookupRange(pc_offset, context_register, prediction); |
| + return bytecode->LookupRangeInHandlerTable(GetBytecodeOffset(), |
| + context_register, prediction); |
| } |
| int InterpretedFrame::GetBytecodeOffset() const { |