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

Unified Diff: src/deoptimizer.cc

Issue 1763783003: [Interpreter] Fixes translation from bailout id to code offset. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added comments Created 4 years, 9 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 | « no previous file | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 942b5284a377a811c367ce76618e3765bbc1197e..acbc662c3761dd0d074b99a41f70a9ff16c5d466 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -2492,7 +2492,9 @@ int ComputeSourcePosition(Handle<SharedFunctionInfo> shared,
BailoutId node_id) {
if (shared->HasBytecodeArray()) {
BytecodeArray* bytecodes = shared->bytecode_array();
- return bytecodes->SourcePosition(node_id.ToInt());
+ // BailoutId points to the next bytecode in the bytecode aray. Subtract
+ // 1 to get the end of current bytecode.
+ return bytecodes->SourcePosition(node_id.ToInt() - 1);
} else {
Code* non_optimized_code = shared->code();
FixedArray* raw_data = non_optimized_code->deoptimization_data();
« no previous file with comments | « no previous file | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698