| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:math' as math; | 5 import 'dart:math' as math; |
| 6 import '../common.dart'; | 6 import '../common.dart'; |
| 7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 8 import '../common/tasks.dart' show CompilerTask; | 8 import '../common/tasks.dart' show CompilerTask; |
| 9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
| 10 import '../constants/constant_system.dart'; | 10 import '../constants/constant_system.dart'; |
| (...skipping 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2874 currentContainer = oldContainer; | 2874 currentContainer = oldContainer; |
| 2875 body = unwrapStatement(body); | 2875 body = unwrapStatement(body); |
| 2876 pushStatement(new js.If.noElse(test, body) | 2876 pushStatement(new js.If.noElse(test, body) |
| 2877 .withSourceInformation(node.sourceInformation)); | 2877 .withSourceInformation(node.sourceInformation)); |
| 2878 return; | 2878 return; |
| 2879 } | 2879 } |
| 2880 | 2880 |
| 2881 assert(node.isCheckedModeCheck || node.isCastTypeCheck); | 2881 assert(node.isCheckedModeCheck || node.isCastTypeCheck); |
| 2882 DartType type = node.typeExpression; | 2882 DartType type = node.typeExpression; |
| 2883 assert(!type.isTypedef); | 2883 assert(!type.isTypedef); |
| 2884 assert(!type.isDynamic); |
| 2884 if (type.isFunctionType) { | 2885 if (type.isFunctionType) { |
| 2885 // TODO(5022): We currently generate $isFunction checks for | 2886 // TODO(5022): We currently generate $isFunction checks for |
| 2886 // function types. | 2887 // function types. |
| 2887 registry.registerTypeUse( | 2888 registry.registerTypeUse( |
| 2888 new TypeUse.isCheck(compiler.commonElements.functionType)); | 2889 new TypeUse.isCheck(compiler.commonElements.functionType)); |
| 2889 } | 2890 } |
| 2890 registry.registerTypeUse(new TypeUse.isCheck(type)); | 2891 registry.registerTypeUse(new TypeUse.isCheck(type)); |
| 2891 | 2892 |
| 2892 CheckedModeHelper helper; | 2893 CheckedModeHelper helper; |
| 2893 if (node.isBooleanConversionCheck) { | 2894 if (node.isBooleanConversionCheck) { |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3120 registry.registerStaticUse(new StaticUse.staticInvoke( | 3121 registry.registerStaticUse(new StaticUse.staticInvoke( |
| 3121 helper, new CallStructure.unnamed(argumentCount))); | 3122 helper, new CallStructure.unnamed(argumentCount))); |
| 3122 return backend.emitter.staticFunctionAccess(helper); | 3123 return backend.emitter.staticFunctionAccess(helper); |
| 3123 } | 3124 } |
| 3124 | 3125 |
| 3125 @override | 3126 @override |
| 3126 void visitRef(HRef node) { | 3127 void visitRef(HRef node) { |
| 3127 visit(node.value); | 3128 visit(node.value); |
| 3128 } | 3129 } |
| 3129 } | 3130 } |
| OLD | NEW |