| Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| index fe8c5eeece7e28ffb77339d9aeaf72ba26473117..06b6576cdffe7ded824602c88cd2f35d6107d080 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| @@ -2270,6 +2270,11 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| push(new js.Binary('==', pop(), new js.LiteralNull()));
|
| }
|
|
|
| + void checkNonNull(HInstruction input) {
|
| + use(input);
|
| + push(new js.Binary('!=', pop(), new js.LiteralNull()));
|
| + }
|
| +
|
| void checkFunction(HInstruction input, DartType type) {
|
| checkTypeOf(input, '===', 'function');
|
| js.Expression functionTest = pop();
|
| @@ -2394,6 +2399,12 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| || Elements.isListSupertype(element, compiler)) {
|
| handleListOrSupertypeCheck(input, type);
|
| attachLocationToLast(node);
|
| + } else if (element.isTypedef()) {
|
| + checkNonNull(input);
|
| + js.Expression nullTest = pop();
|
| + checkType(input, type);
|
| + push(new js.Binary('&&', nullTest, pop()));
|
| + attachLocationToLast(node);
|
| } else if (types[input].canBePrimitive() || types[input].canBeNull()) {
|
| checkObject(input, '===');
|
| js.Expression objectTest = pop();
|
|
|