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

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

Issue 2503863002: [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 2aa1c2e207f7af4c6ac20beb7482e22cebc1bdc9..efe7cd623b27f9a5b6e1662b804d4cd6598adcae 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -867,13 +867,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