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

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

Issue 2085353005: [Interpreter] Maintain the parent frame pointer after load (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_globals
Patch Set: Fix typo Created 4 years, 6 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 cd17e4cadac333af16d527e1f3e06cedcd80f506..ee5f8be27981f19b63ddf8eb3029729cb147a7fa 100644
--- a/src/interpreter/interpreter-assembler.cc
+++ b/src/interpreter/interpreter-assembler.cc
@@ -31,6 +31,7 @@ InterpreterAssembler::InterpreterAssembler(Isolate* isolate, Zone* zone,
Bytecodes::ReturnCount(bytecode)),
bytecode_(bytecode),
operand_scale_(operand_scale),
+ interpreted_frame_pointer_(this, MachineType::PointerRepresentation()),
accumulator_(this, MachineRepresentation::kTagged),
accumulator_use_(AccumulatorUse::kNone),
made_call_(false),
@@ -50,6 +51,13 @@ InterpreterAssembler::~InterpreterAssembler() {
DCHECK_EQ(accumulator_use_, Bytecodes::GetAccumulatorUse(bytecode_));
}
+Node* InterpreterAssembler::GetInterpretedFramePointer() {
+ if (!interpreted_frame_pointer_.IsBound()) {
+ interpreted_frame_pointer_.Bind(LoadParentFramePointer());
+ }
+ return interpreted_frame_pointer_.value();
+}
+
Node* InterpreterAssembler::GetAccumulatorUnchecked() {
return accumulator_.value();
}
@@ -93,7 +101,8 @@ Node* InterpreterAssembler::DispatchTableRawPointer() {
}
Node* InterpreterAssembler::RegisterLocation(Node* reg_index) {
- return IntPtrAdd(LoadParentFramePointer(), RegisterFrameOffset(reg_index));
+ return IntPtrAdd(GetInterpretedFramePointer(),
+ RegisterFrameOffset(reg_index));
}
Node* InterpreterAssembler::RegisterFrameOffset(Node* index) {
@@ -101,24 +110,24 @@ Node* InterpreterAssembler::RegisterFrameOffset(Node* index) {
}
Node* InterpreterAssembler::LoadRegister(Register reg) {
- return Load(MachineType::AnyTagged(), LoadParentFramePointer(),
+ return Load(MachineType::AnyTagged(), GetInterpretedFramePointer(),
IntPtrConstant(reg.ToOperand() << kPointerSizeLog2));
}
Node* InterpreterAssembler::LoadRegister(Node* reg_index) {
- return Load(MachineType::AnyTagged(), LoadParentFramePointer(),
+ return Load(MachineType::AnyTagged(), GetInterpretedFramePointer(),
RegisterFrameOffset(reg_index));
}
Node* InterpreterAssembler::StoreRegister(Node* value, Register reg) {
return StoreNoWriteBarrier(
- MachineRepresentation::kTagged, LoadParentFramePointer(),
+ MachineRepresentation::kTagged, GetInterpretedFramePointer(),
IntPtrConstant(reg.ToOperand() << kPointerSizeLog2), value);
}
Node* InterpreterAssembler::StoreRegister(Node* value, Node* reg_index) {
return StoreNoWriteBarrier(MachineRepresentation::kTagged,
- LoadParentFramePointer(),
+ GetInterpretedFramePointer(),
RegisterFrameOffset(reg_index), value);
}
« 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