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

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

Issue 2518313002: [turbofan] Fix broken effect chain for instanceof. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-667689.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/js-native-context-specialization.h" 5 #include "src/compiler/js-native-context-specialization.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 // Monomorphic property access. 147 // Monomorphic property access.
148 effect = 148 effect =
149 BuildCheckMaps(constructor, effect, control, MapList{receiver_map}); 149 BuildCheckMaps(constructor, effect, control, MapList{receiver_map});
150 150
151 // Call the @@hasInstance handler. 151 // Call the @@hasInstance handler.
152 Node* target = jsgraph()->Constant(access_info.constant()); 152 Node* target = jsgraph()->Constant(access_info.constant());
153 node->InsertInput(graph()->zone(), 0, target); 153 node->InsertInput(graph()->zone(), 0, target);
154 node->ReplaceInput(1, constructor); 154 node->ReplaceInput(1, constructor);
155 node->ReplaceInput(2, object); 155 node->ReplaceInput(2, object);
156 node->ReplaceInput(5, effect);
156 NodeProperties::ChangeOp( 157 NodeProperties::ChangeOp(
157 node, 158 node,
158 javascript()->CallFunction(3, 0.0f, VectorSlotPair(), 159 javascript()->CallFunction(3, 0.0f, VectorSlotPair(),
159 ConvertReceiverMode::kNotNullOrUndefined)); 160 ConvertReceiverMode::kNotNullOrUndefined));
160 161
161 // Rewire the value uses of {node} to ToBoolean conversion of the result. 162 // Rewire the value uses of {node} to ToBoolean conversion of the result.
162 Node* value = graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny), 163 Node* value = graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
163 node, context); 164 node, context);
164 for (Edge edge : node->use_edges()) { 165 for (Edge edge : node->use_edges()) {
165 if (NodeProperties::IsValueEdge(edge) && edge.from() != value) { 166 if (NodeProperties::IsValueEdge(edge) && edge.from() != value) {
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 return jsgraph()->javascript(); 1804 return jsgraph()->javascript();
1804 } 1805 }
1805 1806
1806 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { 1807 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const {
1807 return jsgraph()->simplified(); 1808 return jsgraph()->simplified();
1808 } 1809 }
1809 1810
1810 } // namespace compiler 1811 } // namespace compiler
1811 } // namespace internal 1812 } // namespace internal
1812 } // namespace v8 1813 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-667689.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698