| 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 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2859 return; | 2859 return; |
| 2860 } | 2860 } |
| 2861 | 2861 |
| 2862 assert(node.isCheckedModeCheck || node.isCastTypeCheck); | 2862 assert(node.isCheckedModeCheck || node.isCastTypeCheck); |
| 2863 DartType type = node.typeExpression; | 2863 DartType type = node.typeExpression; |
| 2864 assert(type.kind != TypeKind.TYPEDEF); | 2864 assert(type.kind != TypeKind.TYPEDEF); |
| 2865 if (type.isFunctionType) { | 2865 if (type.isFunctionType) { |
| 2866 // TODO(5022): We currently generate $isFunction checks for | 2866 // TODO(5022): We currently generate $isFunction checks for |
| 2867 // function types. | 2867 // function types. |
| 2868 registry.registerTypeUse( | 2868 registry.registerTypeUse( |
| 2869 new TypeUse.isCheck(compiler.coreTypes.functionType)); | 2869 new TypeUse.isCheck(compiler.commonElements.functionType)); |
| 2870 } | 2870 } |
| 2871 registry.registerTypeUse(new TypeUse.isCheck(type)); | 2871 registry.registerTypeUse(new TypeUse.isCheck(type)); |
| 2872 | 2872 |
| 2873 CheckedModeHelper helper; | 2873 CheckedModeHelper helper; |
| 2874 if (node.isBooleanConversionCheck) { | 2874 if (node.isBooleanConversionCheck) { |
| 2875 helper = const CheckedModeHelper('boolConversionCheck'); | 2875 helper = const CheckedModeHelper('boolConversionCheck'); |
| 2876 } else { | 2876 } else { |
| 2877 helper = | 2877 helper = |
| 2878 backend.getCheckedModeHelper(type, typeCast: node.isCastTypeCheck); | 2878 backend.getCheckedModeHelper(type, typeCast: node.isCastTypeCheck); |
| 2879 } | 2879 } |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3098 registry.registerStaticUse(new StaticUse.staticInvoke( | 3098 registry.registerStaticUse(new StaticUse.staticInvoke( |
| 3099 helper, new CallStructure.unnamed(argumentCount))); | 3099 helper, new CallStructure.unnamed(argumentCount))); |
| 3100 return backend.emitter.staticFunctionAccess(helper); | 3100 return backend.emitter.staticFunctionAccess(helper); |
| 3101 } | 3101 } |
| 3102 | 3102 |
| 3103 @override | 3103 @override |
| 3104 void visitRef(HRef node) { | 3104 void visitRef(HRef node) { |
| 3105 visit(node.value); | 3105 visit(node.value); |
| 3106 } | 3106 } |
| 3107 } | 3107 } |
| OLD | NEW |