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()); |