Chromium Code Reviews| Index: src/interpreter/interpreter-assembler.cc |
| diff --git a/src/interpreter/interpreter-assembler.cc b/src/interpreter/interpreter-assembler.cc |
| index 75db96a9dc16643d2ee7726b3f25b9fa7c5b8dc6..4fd943dda8ae4c865a40ba29321614f72d4824ca 100644 |
| --- a/src/interpreter/interpreter-assembler.cc |
| +++ b/src/interpreter/interpreter-assembler.cc |
| @@ -33,13 +33,11 @@ InterpreterAssembler::InterpreterAssembler(Isolate* isolate, Zone* zone, |
| operand_scale_(operand_scale), |
| accumulator_(this, MachineRepresentation::kTagged), |
| accumulator_use_(AccumulatorUse::kNone), |
| - bytecode_array_(this, MachineRepresentation::kTagged), |
| + made_call_(false), |
| disable_stack_check_across_call_(false), |
| stack_pointer_before_call_(nullptr) { |
| accumulator_.Bind( |
| Parameter(InterpreterDispatchDescriptor::kAccumulatorParameter)); |
| - bytecode_array_.Bind( |
| - Parameter(InterpreterDispatchDescriptor::kBytecodeArrayParameter)); |
| if (FLAG_trace_ignition) { |
| TraceBytecode(Runtime::kInterpreterTraceBytecodeEntry); |
| } |
| @@ -85,7 +83,14 @@ Node* InterpreterAssembler::RegisterFileRawPointer() { |
| } |
| Node* InterpreterAssembler::BytecodeArrayTaggedPointer() { |
| - return bytecode_array_.value(); |
| + if (made_call_) { |
| + // If we have made a call, restore bytecode array from stack frame in case |
| + // the debugger has swapped us to the patched debugger bytecode array. |
| + return LoadRegister( |
|
epertoso
2016/04/18 14:23:27
You probably want to reset made_call_ to false her
rmcilroy
2016/04/18 14:59:15
No I don't think so, if we did that then if there
|
| + InterpreterFrameConstants::kBytecodeArrayFromRegisterPointer); |
| + } else { |
| + return Parameter(InterpreterDispatchDescriptor::kBytecodeArrayParameter); |
| + } |
| } |
| Node* InterpreterAssembler::DispatchTableRawPointer() { |
| @@ -424,6 +429,7 @@ void InterpreterAssembler::CallPrologue() { |
| DCHECK(stack_pointer_before_call_ == nullptr); |
| stack_pointer_before_call_ = LoadStackPointer(); |
| } |
| + made_call_ = true; |
| } |
| void InterpreterAssembler::CallEpilogue() { |
| @@ -434,11 +440,6 @@ void InterpreterAssembler::CallEpilogue() { |
| AbortIfWordNotEqual(stack_pointer_before_call, stack_pointer_after_call, |
| kUnexpectedStackPointer); |
| } |
| - |
| - // Restore bytecode array from stack frame in case the debugger has swapped us |
| - // to the patched debugger bytecode array. |
| - bytecode_array_.Bind(LoadRegister( |
| - InterpreterFrameConstants::kBytecodeArrayFromRegisterPointer)); |
| } |
| Node* InterpreterAssembler::CallJS(Node* function, Node* context, |