| 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 575044550131e4c458ce57d17ba7733cdbf33712..d047c7cede39b237fcc44316cae91b8fdb46b21c 100644
|
| --- a/pkg/compiler/lib/src/ssa/nodes.dart
|
| +++ b/pkg/compiler/lib/src/ssa/nodes.dart
|
| @@ -1393,16 +1393,19 @@ abstract class HInvoke extends HInstruction {
|
| // We know it's a selector call if it follows the interceptor
|
| // calling convention, which adds the actual receiver as a
|
| // parameter to the call.
|
| - return (selector != null) && (inputs.length - 2 == selector.argumentCount);
|
| + return (selector != null) &&
|
| + (inputs.length - 2 == selector.argumentCount);
|
| }
|
| }
|
|
|
| abstract class HInvokeDynamic extends HInvoke {
|
| final InvokeDynamicSpecializer specializer;
|
| Selector selector;
|
| + TypeMask mask;
|
| Element element;
|
|
|
| HInvokeDynamic(Selector selector,
|
| + this.mask,
|
| this.element,
|
| List<HInstruction> inputs,
|
| TypeMask type,
|
| @@ -1412,7 +1415,7 @@ abstract class HInvokeDynamic extends HInvoke {
|
| specializer = isIntercepted
|
| ? InvokeDynamicSpecializer.lookupSpecializer(selector)
|
| : const InvokeDynamicSpecializer();
|
| - toString() => 'invoke dynamic: $selector';
|
| + toString() => 'invoke dynamic: selector=$selector, mask=$mask';
|
| HInstruction get receiver => inputs[0];
|
| HInstruction getDartReceiver(Compiler compiler) {
|
| return isCallOnInterceptor(compiler) ? inputs[1] : inputs[0];
|
| @@ -1437,8 +1440,10 @@ abstract class HInvokeDynamic extends HInvoke {
|
| }
|
|
|
| class HInvokeClosure extends HInvokeDynamic {
|
| - HInvokeClosure(Selector selector, List<HInstruction> inputs, TypeMask type)
|
| - : super(selector, null, inputs, type) {
|
| + HInvokeClosure(Selector selector,
|
| + List<HInstruction> inputs,
|
| + TypeMask type)
|
| + : super(selector, null, null, inputs, type) {
|
| assert(selector.isClosureCall);
|
| }
|
| accept(HVisitor visitor) => visitor.visitInvokeClosure(this);
|
| @@ -1446,34 +1451,38 @@ class HInvokeClosure extends HInvokeDynamic {
|
|
|
| class HInvokeDynamicMethod extends HInvokeDynamic {
|
| HInvokeDynamicMethod(Selector selector,
|
| + TypeMask mask,
|
| List<HInstruction> inputs,
|
| TypeMask type,
|
| [bool isIntercepted = false])
|
| - : super(selector, null, inputs, type, isIntercepted);
|
| + : super(selector, mask, null, inputs, type, isIntercepted);
|
|
|
| - String toString() => 'invoke dynamic method: $selector';
|
| + String toString() => 'invoke dynamic method: selector=$selector, mask=$mask';
|
| accept(HVisitor visitor) => visitor.visitInvokeDynamicMethod(this);
|
| }
|
|
|
| abstract class HInvokeDynamicField extends HInvokeDynamic {
|
| HInvokeDynamicField(
|
| - Selector selector, Element element, List<HInstruction> inputs,
|
| + Selector selector, TypeMask mask,
|
| + Element element, List<HInstruction> inputs,
|
| TypeMask type)
|
| - : super(selector, element, inputs, type);
|
| - toString() => 'invoke dynamic field: $selector';
|
| + : super(selector, mask, element, inputs, type);
|
| + toString() => 'invoke dynamic field: selector=$selector, mask=$mask';
|
| }
|
|
|
| class HInvokeDynamicGetter extends HInvokeDynamicField {
|
| - HInvokeDynamicGetter(selector, element, inputs, type)
|
| - : super(selector, element, inputs, type);
|
| - toString() => 'invoke dynamic getter: $selector';
|
| + HInvokeDynamicGetter(Selector selector, TypeMask mask,
|
| + Element element, List<HInstruction> inputs, TypeMask type)
|
| + : super(selector, mask, element, inputs, type);
|
| + toString() => 'invoke dynamic getter: selector=$selector, mask=$mask';
|
| accept(HVisitor visitor) => visitor.visitInvokeDynamicGetter(this);
|
| }
|
|
|
| class HInvokeDynamicSetter extends HInvokeDynamicField {
|
| - HInvokeDynamicSetter(selector, element, inputs, type)
|
| - : super(selector, element, inputs, type);
|
| - toString() => 'invoke dynamic setter: $selector';
|
| + HInvokeDynamicSetter(Selector selector, TypeMask mask,
|
| + Element element, List<HInstruction> inputs, TypeMask type)
|
| + : super(selector, mask, element, inputs, type);
|
| + toString() => 'invoke dynamic setter: selector=$selector, mask=$mask';
|
| accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this);
|
| }
|
|
|
| @@ -1792,7 +1801,8 @@ class HForeignNew extends HForeign {
|
|
|
| abstract class HInvokeBinary extends HInstruction {
|
| final Selector selector;
|
| - HInvokeBinary(HInstruction left, HInstruction right, this.selector, type)
|
| + HInvokeBinary(
|
| + HInstruction left, HInstruction right, this.selector, TypeMask type)
|
| : super(<HInstruction>[left, right], type) {
|
| sideEffects.clearAllSideEffects();
|
| sideEffects.clearAllDependencies();
|
| @@ -1806,13 +1816,15 @@ abstract class HInvokeBinary extends HInstruction {
|
| }
|
|
|
| abstract class HBinaryArithmetic extends HInvokeBinary {
|
| - HBinaryArithmetic(left, right, selector, type)
|
| + HBinaryArithmetic(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| : super(left, right, selector, type);
|
| BinaryOperation operation(ConstantSystem constantSystem);
|
| }
|
|
|
| class HAdd extends HBinaryArithmetic {
|
| - HAdd(left, right, selector, type) : super(left, right, selector, type);
|
| + HAdd(HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitAdd(this);
|
|
|
| BinaryOperation operation(ConstantSystem constantSystem)
|
| @@ -1823,7 +1835,9 @@ class HAdd extends HBinaryArithmetic {
|
| }
|
|
|
| class HDivide extends HBinaryArithmetic {
|
| - HDivide(left, right, selector, type) : super(left, right, selector, type);
|
| + HDivide(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitDivide(this);
|
|
|
| BinaryOperation operation(ConstantSystem constantSystem)
|
| @@ -1834,7 +1848,9 @@ class HDivide extends HBinaryArithmetic {
|
| }
|
|
|
| class HMultiply extends HBinaryArithmetic {
|
| - HMultiply(left, right, selector, type) : super(left, right, selector, type);
|
| + HMultiply(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitMultiply(this);
|
|
|
| BinaryOperation operation(ConstantSystem operations)
|
| @@ -1845,7 +1861,9 @@ class HMultiply extends HBinaryArithmetic {
|
| }
|
|
|
| class HSubtract extends HBinaryArithmetic {
|
| - HSubtract(left, right, selector, type) : super(left, right, selector, type);
|
| + HSubtract(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitSubtract(this);
|
|
|
| BinaryOperation operation(ConstantSystem constantSystem)
|
| @@ -1856,7 +1874,8 @@ class HSubtract extends HBinaryArithmetic {
|
| }
|
|
|
| class HTruncatingDivide extends HBinaryArithmetic {
|
| - HTruncatingDivide(left, right, selector, type)
|
| + HTruncatingDivide(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitTruncatingDivide(this);
|
|
|
| @@ -1891,12 +1910,15 @@ class HSwitch extends HControlFlow {
|
| }
|
|
|
| abstract class HBinaryBitOp extends HInvokeBinary {
|
| - HBinaryBitOp(left, right, selector, type)
|
| + HBinaryBitOp(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| : super(left, right, selector, type);
|
| }
|
|
|
| class HShiftLeft extends HBinaryBitOp {
|
| - HShiftLeft(left, right, selector, type) : super(left, right, selector, type);
|
| + HShiftLeft(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitShiftLeft(this);
|
|
|
| BinaryOperation operation(ConstantSystem constantSystem)
|
| @@ -1907,7 +1929,9 @@ class HShiftLeft extends HBinaryBitOp {
|
| }
|
|
|
| class HShiftRight extends HBinaryBitOp {
|
| - HShiftRight(left, right, selector, type) : super(left, right, selector, type);
|
| + HShiftRight(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitShiftRight(this);
|
|
|
| BinaryOperation operation(ConstantSystem constantSystem)
|
| @@ -1918,7 +1942,9 @@ class HShiftRight extends HBinaryBitOp {
|
| }
|
|
|
| class HBitOr extends HBinaryBitOp {
|
| - HBitOr(left, right, selector, type) : super(left, right, selector, type);
|
| + HBitOr(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitBitOr(this);
|
|
|
| BinaryOperation operation(ConstantSystem constantSystem)
|
| @@ -1929,7 +1955,9 @@ class HBitOr extends HBinaryBitOp {
|
| }
|
|
|
| class HBitAnd extends HBinaryBitOp {
|
| - HBitAnd(left, right, selector, type) : super(left, right, selector, type);
|
| + HBitAnd(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitBitAnd(this);
|
|
|
| BinaryOperation operation(ConstantSystem constantSystem)
|
| @@ -1940,7 +1968,9 @@ class HBitAnd extends HBinaryBitOp {
|
| }
|
|
|
| class HBitXor extends HBinaryBitOp {
|
| - HBitXor(left, right, selector, type) : super(left, right, selector, type);
|
| + HBitXor(
|
| + HInstruction left, HInstruction right, Selector selector, TypeMask type)
|
| + : super(left, right, selector, type);
|
| accept(HVisitor visitor) => visitor.visitBitXor(this);
|
|
|
| BinaryOperation operation(ConstantSystem constantSystem)
|
| @@ -1965,7 +1995,8 @@ abstract class HInvokeUnary extends HInstruction {
|
| }
|
|
|
| class HNegate extends HInvokeUnary {
|
| - HNegate(input, selector, type) : super(input, selector, type);
|
| + HNegate(HInstruction input, Selector selector, TypeMask type)
|
| + : super(input, selector, type);
|
| accept(HVisitor visitor) => visitor.visitNegate(this);
|
|
|
| UnaryOperation operation(ConstantSystem constantSystem)
|
| @@ -1976,7 +2007,8 @@ class HNegate extends HInvokeUnary {
|
| }
|
|
|
| class HBitNot extends HInvokeUnary {
|
| - HBitNot(input, selector, type) : super(input, selector, type);
|
| + HBitNot(HInstruction input, Selector selector, TypeMask type)
|
| + : super(input, selector, type);
|
| accept(HVisitor visitor) => visitor.visitBitNot(this);
|
|
|
| UnaryOperation operation(ConstantSystem constantSystem)
|
| @@ -2379,16 +2411,17 @@ class HInterceptor extends HInstruction {
|
| class HOneShotInterceptor extends HInvokeDynamic {
|
| Set<ClassElement> interceptedClasses;
|
| HOneShotInterceptor(Selector selector,
|
| + TypeMask mask,
|
| List<HInstruction> inputs,
|
| TypeMask type,
|
| this.interceptedClasses)
|
| - : super(selector, null, inputs, type, true) {
|
| + : super(selector, mask, null, inputs, type, true) {
|
| assert(inputs[0] is HConstant);
|
| assert(inputs[0].isNull());
|
| }
|
| bool isCallOnInterceptor(Compiler compiler) => true;
|
|
|
| - String toString() => 'one shot interceptor on $selector';
|
| + String toString() => 'one shot interceptor: selector=$selector, mask=$mask';
|
| accept(HVisitor visitor) => visitor.visitOneShotInterceptor(this);
|
| }
|
|
|
| @@ -2442,7 +2475,10 @@ class HLiteralList extends HInstruction {
|
| */
|
| class HIndex extends HInstruction {
|
| final Selector selector;
|
| - HIndex(HInstruction receiver, HInstruction index, this.selector, type)
|
| + HIndex(HInstruction receiver,
|
| + HInstruction index,
|
| + this.selector,
|
| + TypeMask type)
|
| : super(<HInstruction>[receiver, index], type) {
|
| sideEffects.clearAllSideEffects();
|
| sideEffects.clearAllDependencies();
|
|
|