| Index: pkg/compiler/lib/src/ssa/nodes.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
|
| index 429178ed8a93b766f1fe0b06cc7dd5fbb39de57f..2ce5fac1f0464eb374b2f48fd39685ce0b2f7581 100644
|
| --- a/pkg/compiler/lib/src/ssa/nodes.dart
|
| +++ b/pkg/compiler/lib/src/ssa/nodes.dart
|
| @@ -79,6 +79,7 @@ abstract class HVisitor<R> {
|
| R visitRangeConversion(HRangeConversion node);
|
| R visitReadModifyWrite(HReadModifyWrite node);
|
| R visitRef(HRef node);
|
| + R visitRemainder(HRemainder node);
|
| R visitReturn(HReturn node);
|
| R visitShiftLeft(HShiftLeft node);
|
| R visitShiftRight(HShiftRight node);
|
| @@ -386,6 +387,7 @@ class HBaseVisitor extends HGraphVisitor implements HVisitor {
|
| visitRangeConversion(HRangeConversion node) => visitCheck(node);
|
| visitReadModifyWrite(HReadModifyWrite node) => visitInstruction(node);
|
| visitRef(HRef node) => node.value.accept(this);
|
| + visitRemainder(HRemainder node) => visitBinaryArithmetic(node);
|
| visitReturn(HReturn node) => visitControlFlow(node);
|
| visitShiftLeft(HShiftLeft node) => visitBinaryBitOp(node);
|
| visitShiftRight(HShiftRight node) => visitBinaryBitOp(node);
|
| @@ -881,6 +883,7 @@ abstract class HInstruction implements Spannable {
|
| static const int TYPE_INFO_EXPRESSION_TYPECODE = 40;
|
|
|
| static const int FOREIGN_CODE_TYPECODE = 41;
|
| + static const int REMAINDER_TYPECODE = 42;
|
|
|
| HInstruction(this.inputs, this.instructionType)
|
| : id = idCounter++,
|
| @@ -2008,6 +2011,19 @@ class HTruncatingDivide extends HBinaryArithmetic {
|
| bool dataEquals(HInstruction other) => true;
|
| }
|
|
|
| +class HRemainder extends HBinaryArithmetic {
|
| + HRemainder(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| + accept(HVisitor visitor) => visitor.visitRemainder(this);
|
| +
|
| + BinaryOperation operation(ConstantSystem constantSystem) =>
|
| + constantSystem.remainder;
|
| + int typeCode() => HInstruction.REMAINDER_TYPECODE;
|
| + bool typeEquals(other) => other is HRemainder;
|
| + bool dataEquals(HInstruction other) => true;
|
| +}
|
| +
|
| /**
|
| * An [HSwitch] instruction has one input for the incoming
|
| * value, and one input per constant that it can switch on.
|
|
|