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

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

Issue 2534143002: [deoptimizer] Fix deoptimization in {TranslatedState}. (Closed)
Patch Set: 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/deoptimizer.cc ('k') | test/mjsunit/regress/regress-crbug-668795.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 603189c4f055d76ed0a7ddbafa5c9aaa8e29abaa..c64aac5bb7fb4508477e614be0d709503d2d2588 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -377,6 +377,8 @@ std::unique_ptr<Handle<Object>[]> GetCallerArguments(Isolate* isolate,
NewArray<Handle<Object>>(*total_argc));
bool should_deoptimize = false;
for (int i = 0; i < argument_count; i++) {
+ // If we materialize any object, we should deoptimize the frame because we
+ // might alias an object that was eliminated by escape analysis.
should_deoptimize = should_deoptimize || iter->IsMaterializedObject();
Handle<Object> value = iter->GetValue();
param_data[i] = value;
@@ -384,7 +386,7 @@ std::unique_ptr<Handle<Object>[]> GetCallerArguments(Isolate* isolate,
}
if (should_deoptimize) {
- translated_values.StoreMaterializedValuesAndDeopt();
+ translated_values.StoreMaterializedValuesAndDeopt(frame);
}
return param_data;
« no previous file with comments | « src/deoptimizer.cc ('k') | test/mjsunit/regress/regress-crbug-668795.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698