| 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 659b5e2f288f75b6f4e2d8ef46b682d026efa13b..c4b53d8e6d553afadd66d7fdf79c5a2d8619ec7b 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| @@ -18,7 +18,7 @@ export 'builtin_operator.dart';
|
| // These imports are only used for the JavaScript specific nodes. If we want to
|
| // support more than one native backend, we should probably create better
|
| // abstractions for native code and its type and effect system.
|
| -import '../js/js.dart' as js show Template;
|
| +import '../js/js.dart' as js show Template, isNullGuardOnFirstArgument;
|
| import '../native/native.dart' as native show NativeBehavior;
|
|
|
| abstract class Node {
|
| @@ -1545,6 +1545,15 @@ class ForeignCode extends UnsafePrimitive {
|
| void setParentPointers() {
|
| _setParentsOnList(arguments, this);
|
| }
|
| +
|
| + bool isNullGuardOnNullFirstArgument() {
|
| + if (arguments.length < 1) return false;
|
| + // TODO(sra): Fix NativeThrowBehavior to distinguish MAY from
|
| + // throws-nsm-on-null-followed-by-MAY and remove
|
| + // [isNullGuardForFirstArgument].
|
| + if (nativeBehavior.throwBehavior.isNullNSMGuard) return true;
|
| + return js.isNullGuardOnFirstArgument(codeTemplate);
|
| + }
|
| }
|
|
|
| class Constant extends Primitive {
|
|
|