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

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

Issue 2487173002: [turbofan] Advance bytecode offset after lazy deopt. (Closed)
Patch Set: Properly restore context. Created 4 years, 1 month 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/runtime/runtime.h ('k') | test/debugger/debugger.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-interpreter.cc
diff --git a/src/runtime/runtime-interpreter.cc b/src/runtime/runtime-interpreter.cc
index ce71e2c52d5a9d5eae43f310759b3f07d4ba337f..62eee1744f57b258879bfa9e2173697cf1cafadc 100644
--- a/src/runtime/runtime-interpreter.cc
+++ b/src/runtime/runtime-interpreter.cc
@@ -171,5 +171,19 @@ RUNTIME_FUNCTION(Runtime_InterpreterSetPendingMessage) {
return isolate->heap()->undefined_value();
}
+RUNTIME_FUNCTION(Runtime_InterpreterAdvanceBytecodeOffset) {
+ SealHandleScope shs(isolate);
+ DCHECK_EQ(2, args.length());
+ CONVERT_ARG_HANDLE_CHECKED(BytecodeArray, bytecode_array, 0);
+ CONVERT_SMI_ARG_CHECKED(bytecode_offset, 1);
+ interpreter::BytecodeArrayIterator it(bytecode_array);
+ int offset = bytecode_offset - BytecodeArray::kHeaderSize + kHeapObjectTag;
+ while (it.current_offset() < offset) it.Advance();
+ DCHECK_EQ(offset, it.current_offset());
+ it.Advance(); // Advance by one bytecode.
+ offset = it.current_offset() + BytecodeArray::kHeaderSize - kHeapObjectTag;
+ return Smi::FromInt(offset);
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/runtime/runtime.h ('k') | test/debugger/debugger.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698