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

Unified Diff: src/frames.cc

Issue 1684073002: [Interpreter] Save and restore dispatch table pointer during calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_assm
Patch Set: Address review comments 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 a57d28bde6c454562dd07e2df0ca6095a36c9940..6c73e21285417ed9901d8a50bb6fb0bd6db1d644 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1142,7 +1142,6 @@ int InterpretedFrame::LookupExceptionHandlerInTable(
return table->LookupRange(pc_offset, context_register, prediction);
}
-
int InterpretedFrame::GetBytecodeOffset() const {
const int index = InterpreterFrameConstants::kBytecodeOffsetExpressionIndex;
DCHECK_EQ(InterpreterFrameConstants::kBytecodeOffsetFromFp,
@@ -1151,7 +1150,6 @@ int InterpretedFrame::GetBytecodeOffset() const {
return raw_offset - BytecodeArray::kHeaderSize + kHeapObjectTag;
}
-
void InterpretedFrame::PatchBytecodeOffset(int new_offset) {
const int index = InterpreterFrameConstants::kBytecodeOffsetExpressionIndex;
DCHECK_EQ(InterpreterFrameConstants::kBytecodeOffsetFromFp,
@@ -1167,6 +1165,17 @@ Object* InterpretedFrame::GetInterpreterRegister(int register_index) const {
return GetExpression(index + register_index);
}
+Address InterpretedFrame::GetDispatchTable() const {
+ return Memory::Address_at(
+ fp() + InterpreterFrameConstants::kDispatchTableFromFp);
+}
+
+void InterpretedFrame::PatchDispatchTable(Address dispatch_table) {
+ Address* dispatch_table_address = reinterpret_cast<Address*>(
+ fp() + InterpreterFrameConstants::kDispatchTableFromFp);
+ *dispatch_table_address = dispatch_table;
+}
+
void InterpretedFrame::Summarize(List<FrameSummary>* functions) {
DCHECK(functions->length() == 0);
AbstractCode* abstract_code =
@@ -1418,6 +1427,22 @@ 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
« 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