Index: src/compiler/effect-control-linearizer.cc |
diff --git a/src/compiler/effect-control-linearizer.cc b/src/compiler/effect-control-linearizer.cc |
index 1c882517970b89d03d8bf4a4e2fd978b2dc8705b..bc24a30968f5671c31d38fb928a128e77153c93d 100644 |
--- a/src/compiler/effect-control-linearizer.cc |
+++ b/src/compiler/effect-control-linearizer.cc |
@@ -750,6 +750,9 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node, |
case IrOpcode::kStringFromCodePoint: |
result = LowerStringFromCodePoint(node); |
break; |
+ case IrOpcode::kStringIndexOf: |
+ result = LowerStringIndexOf(node); |
+ break; |
case IrOpcode::kStringCharAt: |
result = LowerStringCharAt(node); |
break; |
@@ -2056,6 +2059,20 @@ Node* EffectControlLinearizer::LowerStringFromCodePoint(Node* node) { |
return done.PhiAt(0); |
} |
+Node* EffectControlLinearizer::LowerStringIndexOf(Node* node) { |
+ Node* subject = node->InputAt(0); |
+ Node* search_string = node->InputAt(1); |
+ Node* position = node->InputAt(2); |
+ |
+ Callable callable = CodeFactory::StringIndexOf(isolate()); |
+ Operator::Properties properties = Operator::kEliminatable; |
+ CallDescriptor::Flags flags = CallDescriptor::kNoFlags; |
+ CallDescriptor* desc = Linkage::GetStubCallDescriptor( |
+ isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties); |
+ return __ Call(desc, __ HeapConstant(callable.code()), subject, search_string, |
+ position, __ NoContextConstant()); |
+} |
+ |
Node* EffectControlLinearizer::LowerStringComparison(Callable const& callable, |
Node* node) { |
Node* lhs = node->InputAt(0); |