| Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| index 38b228e281a5206ce6e589584a38af61ee65b3bb..02b963eb6b3231088104bb2d22cc68af3c6c179b 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| @@ -513,6 +513,11 @@ enum CallingConvention {
|
| ///
|
| /// For example: `foo.bar$1(0, x)`
|
| DummyIntercepted,
|
| +
|
| + /// JS receiver is the Dart receiver, there are no extra arguments.
|
| + ///
|
| + /// Compiles to a one-shot interceptor, e.g: `J.bar$1(foo, x)`
|
| + OneShotIntercepted,
|
| }
|
|
|
| /// Invoke a method on an object.
|
| @@ -542,9 +547,15 @@ class InvokeMethod extends UnsafePrimitive {
|
| Primitive get dartReceiver => dartReceiverReference.definition;
|
|
|
| Reference<Primitive> dartArgumentReference(int n) {
|
| - return callingConvention == CallingConvention.Normal
|
| - ? arguments[n]
|
| - : arguments[n + 1];
|
| + switch (callingConvention) {
|
| + case CallingConvention.Normal:
|
| + case CallingConvention.OneShotIntercepted:
|
| + return arguments[n];
|
| +
|
| + case CallingConvention.Intercepted:
|
| + case CallingConvention.DummyIntercepted:
|
| + return arguments[n + 1];
|
| + }
|
| }
|
|
|
| Primitive dartArgument(int n) => dartArgumentReference(n).definition;
|
| @@ -861,7 +872,7 @@ class NullCheck extends Primitive {
|
|
|
| /// An "is" type test.
|
| ///
|
| -/// Returns `true` if [value] is an instance of [type].
|
| +/// Returns `true` if [value] is an instance of [dartType].
|
| ///
|
| /// [type] must not be the [Object], `dynamic` or [Null] types (though it might
|
| /// be a type variable containing one of these types). This design is chosen
|
|
|