Chromium Code Reviews| 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..d976ae258a5e989eb7b66691844e782db7d0414c 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,44 @@ EffectControlLinearizer::LowerStringFromCharCode(Node* node, Node* effect, |
| } |
| EffectControlLinearizer::ValueEffectControl |
| +EffectControlLinearizer::LowerStringComparison(Callable const& callable, |
| + Node* node, Node* effect, |
| + Node* control) { |
| + Operator::Properties properties = |
| + Operator::kCommutative | Operator::kEliminatable; |
|
Jarin
2016/09/26 12:21:23
Nit: less-than is not commutative (actually, I do
Benedikt Meurer
2016/09/26 12:22:16
Done.
|
| + 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 |