Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(713)

Unified Diff: src/interpreter/interpreter-assembler.cc

Issue 1895063002: [Interpreter] Avoid binding bytecode_array to a variable in CallEpilogue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/interpreter-assembler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/interpreter/interpreter-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698