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

Unified Diff: src/compiler/js-native-context-specialization.cc

Issue 2517543002: Merged: [turbofan] Fix deopt check for storing into constant field. (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 | « no previous file | test/mjsunit/compiler/regress-626986.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-native-context-specialization.cc
diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc
index 1881cd02bc538e8ea0a031274293e3db7b03c891..35b3c82756bee89dc6ebd8609e9827c2ec28e7bc 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -818,13 +818,14 @@ JSNativeContextSpecialization::BuildPropertyAccess(
DCHECK_EQ(AccessMode::kLoad, access_mode);
value = jsgraph()->UndefinedConstant();
} else if (access_info.IsDataConstant()) {
- value = jsgraph()->Constant(access_info.constant());
+ Node* constant_value = jsgraph()->Constant(access_info.constant());
if (access_mode == AccessMode::kStore) {
- Node* check =
- graph()->NewNode(simplified()->ReferenceEqual(), value, value);
+ Node* check = graph()->NewNode(simplified()->ReferenceEqual(), value,
+ constant_value);
effect =
graph()->NewNode(simplified()->CheckIf(), check, effect, control);
}
+ value = constant_value;
} else if (access_info.IsAccessorConstant()) {
// TODO(bmeurer): Properly rewire the IfException edge here if there's any.
Node* target = jsgraph()->Constant(access_info.constant());
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-626986.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698