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

Unified Diff: src/frames.cc

Issue 1699013002: [Interpreter] Push BytecodeArray onto interpreted stack frames. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Modify EnterBytecodeDispatch too Created 4 years, 10 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/frames.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 4cdfe39183c5252096f5a42bc07e4a1ae1502539..adf807a90a1c742137b808737fbb3fe1bd04b855 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1152,22 +1152,25 @@ void InterpretedFrame::PatchBytecodeOffset(int new_offset) {
SetExpression(index, Smi::FromInt(raw_offset));
}
-Object* InterpretedFrame::GetInterpreterRegister(int register_index) const {
- const int index = InterpreterFrameConstants::kRegisterFileExpressionIndex;
- DCHECK_EQ(InterpreterFrameConstants::kRegisterFilePointerFromFp,
+Object* InterpretedFrame::GetBytecodeArray() const {
+ const int index = InterpreterFrameConstants::kBytecodeArrayExpressionIndex;
+ DCHECK_EQ(InterpreterFrameConstants::kBytecodeArrayFromFp,
StandardFrameConstants::kExpressionsOffset - index * kPointerSize);
- return GetExpression(index + register_index);
+ return GetExpression(index);
}
-Address InterpretedFrame::GetDispatchTable() const {
- return Memory::Address_at(
- fp() + InterpreterFrameConstants::kDispatchTableFromFp);
+void InterpretedFrame::PatchBytecodeArray(Object* bytecode_array) {
+ const int index = InterpreterFrameConstants::kBytecodeArrayExpressionIndex;
+ DCHECK_EQ(InterpreterFrameConstants::kBytecodeArrayFromFp,
+ StandardFrameConstants::kExpressionsOffset - index * kPointerSize);
+ SetExpression(index, bytecode_array);
}
-void InterpretedFrame::PatchDispatchTable(Address dispatch_table) {
- Address* dispatch_table_address = reinterpret_cast<Address*>(
- fp() + InterpreterFrameConstants::kDispatchTableFromFp);
- *dispatch_table_address = dispatch_table;
+Object* InterpretedFrame::GetInterpreterRegister(int register_index) const {
+ const int index = InterpreterFrameConstants::kRegisterFileExpressionIndex;
+ DCHECK_EQ(InterpreterFrameConstants::kRegisterFilePointerFromFp,
+ StandardFrameConstants::kExpressionsOffset - index * kPointerSize);
+ return GetExpression(index + register_index);
}
void InterpretedFrame::Summarize(List<FrameSummary>* functions) {
@@ -1421,23 +1424,6 @@ void JavaScriptFrame::Iterate(ObjectVisitor* v) const {
IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
}
-void InterpretedFrame::Iterate(ObjectVisitor* v) const {
- // Visit tagged pointers in the fixed frame.
- Object** fixed_frame_base =
- &Memory::Object_at(fp() + InterpreterFrameConstants::kNewTargetFromFp);
- Object** fixed_frame_limit =
- &Memory::Object_at(fp() + StandardFrameConstants::kLastObjectOffset) + 1;
- v->VisitPointers(fixed_frame_base, fixed_frame_limit);
-
- // Visit the expressions.
- Object** expression_base = &Memory::Object_at(sp());
- Object** expression_limit = &Memory::Object_at(
- fp() + InterpreterFrameConstants::kBytecodeOffsetFromFp) + 1;
- v->VisitPointers(expression_base, expression_limit);
-
- IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
-}
-
void InternalFrame::Iterate(ObjectVisitor* v) const {
// Internal frames only have object pointers on the expression stack
// as they never have any arguments.
« no previous file with comments | « src/frames.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698