| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../compiler.dart'; | 9 import '../compiler.dart'; |
| 10 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
| 11 import '../constants/values.dart'; | 11 import '../constants/values.dart'; |
| 12 import '../common_elements.dart'; | 12 import '../common_elements.dart'; |
| 13 import '../elements/elements.dart'; | 13 import '../elements/elements.dart'; |
| 14 import '../elements/entities.dart'; | 14 import '../elements/entities.dart'; |
| 15 import '../elements/jumps.dart'; | 15 import '../elements/jumps.dart'; |
| 16 import '../elements/modelx.dart'; | 16 import '../elements/modelx.dart'; |
| 17 import '../elements/resolution_types.dart'; | 17 import '../elements/resolution_types.dart'; |
| 18 import '../elements/types.dart'; | 18 import '../elements/types.dart'; |
| 19 import '../js_backend/js_backend.dart'; | 19 import '../js_backend/js_backend.dart'; |
| 20 import '../js_backend/native_data.dart'; |
| 20 import '../kernel/element_map.dart'; | 21 import '../kernel/element_map.dart'; |
| 21 import '../kernel/element_map_mixins.dart'; | 22 import '../kernel/element_map_mixins.dart'; |
| 22 import '../kernel/kernel.dart'; | 23 import '../kernel/kernel.dart'; |
| 23 import '../native/native.dart' as native; | 24 import '../native/native.dart' as native; |
| 24 import '../resolution/tree_elements.dart'; | 25 import '../resolution/tree_elements.dart'; |
| 25 import '../tree/tree.dart' as ast; | 26 import '../tree/tree.dart' as ast; |
| 26 import '../types/masks.dart'; | 27 import '../types/masks.dart'; |
| 27 import '../types/types.dart'; | 28 import '../types/types.dart'; |
| 28 import '../universe/selector.dart'; | 29 import '../universe/selector.dart'; |
| 29 import '../world.dart'; | 30 import '../world.dart'; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 81 } |
| 81 for (LocalFunctionElement localFunction in kernel.localFunctions.keys) { | 82 for (LocalFunctionElement localFunction in kernel.localFunctions.keys) { |
| 82 _nodeToElement[kernel.localFunctions[localFunction]] = localFunction; | 83 _nodeToElement[kernel.localFunctions[localFunction]] = localFunction; |
| 83 } | 84 } |
| 84 for (TypeVariableElement typeVariable in kernel.typeParameters.keys) { | 85 for (TypeVariableElement typeVariable in kernel.typeParameters.keys) { |
| 85 _nodeToElement[kernel.typeParameters[typeVariable]] = typeVariable; | 86 _nodeToElement[kernel.typeParameters[typeVariable]] = typeVariable; |
| 86 } | 87 } |
| 87 _typeConverter = new DartTypeConverter(this); | 88 _typeConverter = new DartTypeConverter(this); |
| 88 } | 89 } |
| 89 | 90 |
| 91 @override |
| 92 NativeBasicData get nativeBasicData => |
| 93 _backend.frontendStrategy.nativeBasicData; |
| 94 |
| 90 void addProgram(ir.Program node) { | 95 void addProgram(ir.Program node) { |
| 91 throw new UnsupportedError('KernelAstAdapter.addProgram'); | 96 throw new UnsupportedError('KernelAstAdapter.addProgram'); |
| 92 } | 97 } |
| 93 | 98 |
| 94 @override | 99 @override |
| 95 ConstantValue computeConstantValue(ConstantExpression constant, | 100 ConstantValue computeConstantValue(ConstantExpression constant, |
| 96 {bool requireConstant: true}) { | 101 {bool requireConstant: true}) { |
| 97 _compiler.backend.constants.evaluate(constant); | 102 _compiler.backend.constants.evaluate(constant); |
| 98 ConstantValue value = | 103 ConstantValue value = |
| 99 _compiler.backend.constants.getConstantValue(constant); | 104 _compiler.backend.constants.getConstantValue(constant); |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { | 715 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { |
| 711 return TypeMaskFactory.inferredTypeForSelector( | 716 return TypeMaskFactory.inferredTypeForSelector( |
| 712 selector, mask, _globalInferenceResults); | 717 selector, mask, _globalInferenceResults); |
| 713 } | 718 } |
| 714 | 719 |
| 715 TypeMask typeFromNativeBehavior( | 720 TypeMask typeFromNativeBehavior( |
| 716 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { | 721 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { |
| 717 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); | 722 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); |
| 718 } | 723 } |
| 719 } | 724 } |
| OLD | NEW |