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

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

Issue 2363333003: [turbofan] Lower StringEqual and friends in EffectControlLinearizer. (Closed)
Patch Set: Preinitialize interface descriptors and drop TODO. Created 4 years, 3 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/pipeline.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 43d260153ca4d9e56ceb570acb5c24ad349d1ef1..b8693e11db79106383dfecccc6e2ac930e01343f 100644
--- a/src/compiler/effect-control-linearizer.cc
+++ b/src/compiler/effect-control-linearizer.cc
@@ -722,6 +722,15 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node,
case IrOpcode::kStringCharCodeAt:
state = LowerStringCharCodeAt(node, *effect, *control);
break;
+ case IrOpcode::kStringEqual:
+ state = LowerStringEqual(node, *effect, *control);
+ break;
+ case IrOpcode::kStringLessThan:
+ state = LowerStringLessThan(node, *effect, *control);
+ break;
+ case IrOpcode::kStringLessThanOrEqual:
+ state = LowerStringLessThanOrEqual(node, *effect, *control);
+ break;
case IrOpcode::kCheckFloat64Hole:
state = LowerCheckFloat64Hole(node, frame_state, *effect, *control);
break;
@@ -2605,6 +2614,43 @@ EffectControlLinearizer::LowerStringFromCharCode(Node* node, Node* effect,
}
EffectControlLinearizer::ValueEffectControl
+EffectControlLinearizer::LowerStringComparison(Callable const& callable,
+ Node* node, Node* effect,
+ Node* control) {
+ Operator::Properties properties = Operator::kEliminatable;
+ CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
+ CallDescriptor* desc = Linkage::GetStubCallDescriptor(
+ isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
+ node->InsertInput(graph()->zone(), 0,
+ jsgraph()->HeapConstant(callable.code()));
+ node->AppendInput(graph()->zone(), jsgraph()->NoContextConstant());
+ node->AppendInput(graph()->zone(), effect);
+ NodeProperties::ChangeOp(node, common()->Call(desc));
+ return ValueEffectControl(node, node, control);
+}
+
+EffectControlLinearizer::ValueEffectControl
+EffectControlLinearizer::LowerStringEqual(Node* node, Node* effect,
+ Node* control) {
+ return LowerStringComparison(CodeFactory::StringEqual(isolate()), node,
+ effect, control);
+}
+
+EffectControlLinearizer::ValueEffectControl
+EffectControlLinearizer::LowerStringLessThan(Node* node, Node* effect,
+ Node* control) {
+ return LowerStringComparison(CodeFactory::StringLessThan(isolate()), node,
+ effect, control);
+}
+
+EffectControlLinearizer::ValueEffectControl
+EffectControlLinearizer::LowerStringLessThanOrEqual(Node* node, Node* effect,
+ Node* control) {
+ return LowerStringComparison(CodeFactory::StringLessThanOrEqual(isolate()),
+ node, effect, control);
+}
+
+EffectControlLinearizer::ValueEffectControl
EffectControlLinearizer::LowerCheckFloat64Hole(Node* node, Node* frame_state,
Node* effect, Node* control) {
// If we reach this point w/o eliminating the {node} that's marked
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698