Index: src/compiler/simplified-lowering.cc |
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc |
index 0fb61a1339a67deebe818b760d31aa6a7781fd63..c690635d62bec5f7e73e5300c3b48468d0bd7c8e 100644 |
--- a/src/compiler/simplified-lowering.cc |
+++ b/src/compiler/simplified-lowering.cc |
@@ -1077,6 +1077,23 @@ class RepresentationSelector { |
} |
break; |
} |
+ case IrOpcode::kStringToNumber: { |
+ VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); |
+ if (lower()) { |
+ // StringToNumber(x) => Call(StringToNumberStub, x, no-context) |
+ Operator::Properties properties = node->op()->properties(); |
+ Callable callable = CodeFactory::StringToNumber(jsgraph_->isolate()); |
+ CallDescriptor::Flags flags = CallDescriptor::kNoFlags; |
+ CallDescriptor* desc = Linkage::GetStubCallDescriptor( |
+ jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0, |
+ flags, properties); |
+ node->InsertInput(jsgraph_->zone(), 0, |
+ jsgraph_->HeapConstant(callable.code())); |
+ node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant()); |
+ NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); |
+ } |
+ break; |
+ } |
case IrOpcode::kAllocate: { |
ProcessInput(node, 0, UseInfo::AnyTagged()); |
ProcessRemainingInputs(node, 1); |