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

Unified Diff: src/compiler/js-builtin-reducer.cc

Issue 2839873004: [turbofan] Fix buggy implicit coercion in GetMapWitness. (Closed)
Patch Set: Created 3 years, 8 months 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/regress/regress-crbug-715151.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-builtin-reducer.cc
diff --git a/src/compiler/js-builtin-reducer.cc b/src/compiler/js-builtin-reducer.cc
index f812a2cf0483d7fdd7745998132dc5a23475fc00..705735baf052864479a32c4ffb45ed4e74e777d7 100644
--- a/src/compiler/js-builtin-reducer.cc
+++ b/src/compiler/js-builtin-reducer.cc
@@ -113,8 +113,10 @@ MaybeHandle<Map> GetMapWitness(Node* node) {
ZoneHandleSet<Map> maps;
Node* receiver = NodeProperties::GetValueInput(node, 1);
Node* effect = NodeProperties::GetEffectInput(node);
- if (NodeProperties::InferReceiverMaps(receiver, effect, &maps)) {
- if (maps.size() == 1) return MaybeHandle<Map>(maps[0]);
+ NodeProperties::InferReceiverMapsResult result =
+ NodeProperties::InferReceiverMaps(receiver, effect, &maps);
+ if (result == NodeProperties::kReliableReceiverMaps && maps.size() == 1) {
+ return maps[0];
}
return MaybeHandle<Map>();
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-715151.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698