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

Unified Diff: src/compiler/simplified-lowering.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/opcodes.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 1691f1618fc1e7b1486c856195fdfca078e7a187..658c32a5b0a67b75a2bae68db7532da44e0f0c1f 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -992,6 +992,18 @@ class RepresentationSelector {
}
}
+ void VisitCheck(Node* node, Type* type, SimplifiedLowering* lowering) {
+ if (InputIs(node, type)) {
+ VisitUnop(node, UseInfo::AnyTagged(),
+ MachineRepresentation::kTaggedPointer);
+ if (lower()) DeferReplacement(node, node->InputAt(0));
+ } else {
+ VisitUnop(node, UseInfo::CheckedHeapObjectAsTaggedPointer(),
+ MachineRepresentation::kTaggedPointer);
+ }
+ return;
+ }
+
void VisitCall(Node* node, SimplifiedLowering* lowering) {
const CallDescriptor* desc = CallDescriptorOf(node->op());
int params = static_cast<int>(desc->ParameterCount());
@@ -2390,14 +2402,7 @@ class RepresentationSelector {
return;
}
case IrOpcode::kCheckInternalizedString: {
- if (InputIs(node, Type::InternalizedString())) {
- VisitUnop(node, UseInfo::AnyTagged(),
- MachineRepresentation::kTaggedPointer);
- if (lower()) DeferReplacement(node, node->InputAt(0));
- } else {
- VisitUnop(node, UseInfo::CheckedHeapObjectAsTaggedPointer(),
- MachineRepresentation::kTaggedPointer);
- }
+ VisitCheck(node, Type::InternalizedString(), lowering);
return;
}
case IrOpcode::kCheckNumber: {
@@ -2410,14 +2415,7 @@ class RepresentationSelector {
return;
}
case IrOpcode::kCheckReceiver: {
- if (InputIs(node, Type::Receiver())) {
- VisitUnop(node, UseInfo::AnyTagged(),
- MachineRepresentation::kTaggedPointer);
- if (lower()) DeferReplacement(node, node->InputAt(0));
- } else {
- VisitUnop(node, UseInfo::CheckedHeapObjectAsTaggedPointer(),
- MachineRepresentation::kTaggedPointer);
- }
+ VisitCheck(node, Type::Receiver(), lowering);
return;
}
case IrOpcode::kCheckSmi: {
@@ -2433,14 +2431,11 @@ class RepresentationSelector {
return;
}
case IrOpcode::kCheckString: {
- if (InputIs(node, Type::String())) {
- VisitUnop(node, UseInfo::AnyTagged(),
- MachineRepresentation::kTaggedPointer);
- if (lower()) DeferReplacement(node, node->InputAt(0));
- } else {
- VisitUnop(node, UseInfo::CheckedHeapObjectAsTaggedPointer(),
- MachineRepresentation::kTaggedPointer);
- }
+ VisitCheck(node, Type::String(), lowering);
+ return;
+ }
+ case IrOpcode::kCheckSymbol: {
+ VisitCheck(node, Type::Symbol(), lowering);
return;
}
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698