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

Unified Diff: src/compiler/effect-control-linearizer.cc

Issue 2893263002: [turbofan] Add Symbol feedback to Equal/StrictEqual. (Closed)
Patch Set: Created 3 years, 7 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 | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/effect-control-linearizer.cc
diff --git a/src/compiler/effect-control-linearizer.cc b/src/compiler/effect-control-linearizer.cc
index 6a75e8cff234aa519a7f413e4befa7f1af09e597..546a45e4f8ea8f171692421f69ade61dcfdfb312 100644
--- a/src/compiler/effect-control-linearizer.cc
+++ b/src/compiler/effect-control-linearizer.cc
@@ -641,6 +641,9 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node,
case IrOpcode::kCheckReceiver:
result = LowerCheckReceiver(node, frame_state);
break;
+ case IrOpcode::kCheckSymbol:
+ result = LowerCheckSymbol(node, frame_state);
+ break;
case IrOpcode::kCheckString:
result = LowerCheckString(node, frame_state);
break;
@@ -1300,6 +1303,17 @@ Node* EffectControlLinearizer::LowerCheckReceiver(Node* node,
return value;
}
+Node* EffectControlLinearizer::LowerCheckSymbol(Node* node, Node* frame_state) {
+ Node* value = node->InputAt(0);
+
+ Node* value_map = __ LoadField(AccessBuilder::ForMap(), value);
+
+ Node* check =
+ __ WordEqual(value_map, __ HeapConstant(factory()->symbol_map()));
+ __ DeoptimizeUnless(DeoptimizeReason::kNotASymbol, check, frame_state);
+ return value;
+}
+
Node* EffectControlLinearizer::LowerCheckString(Node* node, Node* frame_state) {
Node* value = node->InputAt(0);
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698