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

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

Issue 2639883002: [turbofan] Add Receiver feedback for abstract/strict equality. (Closed)
Patch Set: Created 3 years, 11 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 6173d88f09e824eb47963dd85ce7c5f047de4f16..5be185236c7d3ef13fc4163918919352ddc8a609 100644
--- a/src/compiler/effect-control-linearizer.cc
+++ b/src/compiler/effect-control-linearizer.cc
@@ -648,6 +648,9 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node,
case IrOpcode::kCheckNumber:
result = LowerCheckNumber(node, frame_state);
break;
+ case IrOpcode::kCheckReceiver:
+ result = LowerCheckReceiver(node, frame_state);
+ break;
case IrOpcode::kCheckString:
result = LowerCheckString(node, frame_state);
break;
@@ -1154,6 +1157,22 @@ Node* EffectControlLinearizer::LowerCheckNumber(Node* node, Node* frame_state) {
return value;
}
+Node* EffectControlLinearizer::LowerCheckReceiver(Node* node,
+ Node* frame_state) {
+ Node* value = node->InputAt(0);
+
+ Node* value_map = __ LoadField(AccessBuilder::ForMap(), value);
+ Node* value_instance_type =
+ __ LoadField(AccessBuilder::ForMapInstanceType(), value_map);
+
+ STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
+ Node* check = __ Uint32LessThanOrEqual(
+ __ Uint32Constant(FIRST_JS_RECEIVER_TYPE), value_instance_type);
+ __ DeoptimizeUnless(DeoptimizeReason::kNotAJavaScriptObject, 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