Chromium Code Reviews| Index: src/interpreter/interpreter-assembler.cc |
| diff --git a/src/interpreter/interpreter-assembler.cc b/src/interpreter/interpreter-assembler.cc |
| index 50894ab5e65cf072c6b7bf7a09fa340ad1b838be..a53408e882e178558be9b4f5e0e505755d9f29ed 100644 |
| --- a/src/interpreter/interpreter-assembler.cc |
| +++ b/src/interpreter/interpreter-assembler.cc |
| @@ -408,9 +408,6 @@ void InterpreterAssembler::Dispatch() { |
| } |
| void InterpreterAssembler::DispatchTo(Node* new_bytecode_offset) { |
| - if (FLAG_trace_ignition) { |
| - TraceBytecode(Runtime::kInterpreterTraceBytecodeExit); |
| - } |
| Node* target_bytecode = Load( |
| MachineType::Uint8(), BytecodeArrayTaggedPointer(), new_bytecode_offset); |
| @@ -420,24 +417,28 @@ void InterpreterAssembler::DispatchTo(Node* new_bytecode_offset) { |
| Load(MachineType::Pointer(), DispatchTableRawPointer(), |
| Word32Shl(target_bytecode, Int32Constant(kPointerSizeLog2))); |
| - InterpreterDispatchDescriptor descriptor(isolate()); |
| - Node* args[] = {GetAccumulator(), RegisterFileRawPointer(), |
| - new_bytecode_offset, BytecodeArrayTaggedPointer(), |
| - DispatchTableRawPointer(), GetContext()}; |
| - TailCall(descriptor, target_code_object, args, 0); |
| + DispatchToBytecodeHandler(target_code_object, new_bytecode_offset); |
| } |
| -void InterpreterAssembler::InterpreterReturn() { |
| +void InterpreterAssembler::DispatchToBytecodeHandler(Node* handler, |
| + Node* bytecode_offset) { |
| if (FLAG_trace_ignition) { |
| TraceBytecode(Runtime::kInterpreterTraceBytecodeExit); |
| } |
| + |
| + if (bytecode_offset == nullptr) bytecode_offset = BytecodeOffset(); |
|
rmcilroy
2016/02/19 14:47:16
Could you avoid this and the default argument type
|
| + |
| InterpreterDispatchDescriptor descriptor(isolate()); |
| - Node* exit_trampoline_code_object = |
| - HeapConstant(isolate()->builtins()->InterpreterExitTrampoline()); |
| Node* args[] = {GetAccumulator(), RegisterFileRawPointer(), |
| - BytecodeOffset(), BytecodeArrayTaggedPointer(), |
| + bytecode_offset, BytecodeArrayTaggedPointer(), |
| DispatchTableRawPointer(), GetContext()}; |
| - TailCall(descriptor, exit_trampoline_code_object, args, 0); |
| + TailCall(descriptor, handler, args, 0); |
| +} |
| + |
| +void InterpreterAssembler::InterpreterReturn() { |
| + Node* exit_trampoline_code_object = |
| + HeapConstant(isolate()->builtins()->InterpreterExitTrampoline()); |
| + DispatchToBytecodeHandler(exit_trampoline_code_object); |
| } |
| void InterpreterAssembler::StackCheck() { |