OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library code_generator_dependencies; | 5 library code_generator_dependencies; |
6 | 6 |
7 import '../backend_helpers.dart' show | 7 import '../backend_helpers.dart' show |
8 BackendHelpers; | 8 BackendHelpers; |
9 import '../js_backend.dart'; | 9 import '../js_backend.dart'; |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 import '../../enqueue.dart' show | 23 import '../../enqueue.dart' show |
24 CodegenEnqueuer; | 24 CodegenEnqueuer; |
25 import '../../elements/elements.dart'; | 25 import '../../elements/elements.dart'; |
26 import '../../js_emitter/js_emitter.dart'; | 26 import '../../js_emitter/js_emitter.dart'; |
27 import '../../js/js.dart' as js; | 27 import '../../js/js.dart' as js; |
28 import '../../native/native.dart' show NativeBehavior; | 28 import '../../native/native.dart' show NativeBehavior; |
29 import '../../universe/selector.dart' show | 29 import '../../universe/selector.dart' show |
30 Selector; | 30 Selector; |
31 import '../../world.dart' show | 31 import '../../world.dart' show |
32 ClassWorld; | 32 ClassWorld; |
33 | 33 import '../../types/types.dart'; |
34 | 34 |
35 /// Encapsulates the dependencies of the function-compiler to the compiler, | 35 /// Encapsulates the dependencies of the function-compiler to the compiler, |
36 /// backend and emitter. | 36 /// backend and emitter. |
37 // TODO(sigurdm): Should be refactored when we have a better feeling for the | 37 // TODO(sigurdm): Should be refactored when we have a better feeling for the |
38 // interface. | 38 // interface. |
39 class Glue { | 39 class Glue { |
40 final Compiler _compiler; | 40 final Compiler _compiler; |
41 | 41 |
42 CodegenEnqueuer get _enqueuer => _compiler.enqueuer.codegen; | 42 CodegenEnqueuer get _enqueuer => _compiler.enqueuer.codegen; |
43 | 43 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 // TODO(sra,johnniwinther): Should this be part of CodegenRegistry? | 280 // TODO(sra,johnniwinther): Should this be part of CodegenRegistry? |
281 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { | 281 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { |
282 if (nativeBehavior == null) return; | 282 if (nativeBehavior == null) return; |
283 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); | 283 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); |
284 } | 284 } |
285 | 285 |
286 ConstantValue getDefaultParameterValue(ParameterElement elem) { | 286 ConstantValue getDefaultParameterValue(ParameterElement elem) { |
287 return _backend.constants.getConstantValueForVariable(elem); | 287 return _backend.constants.getConstantValueForVariable(elem); |
288 } | 288 } |
289 | 289 |
| 290 TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) { |
| 291 return _compiler.world.extendMaskIfReachesAll(selector, mask); |
| 292 } |
| 293 |
290 FunctionElement get closureFromTearOff => _backend.helpers.closureFromTearOff; | 294 FunctionElement get closureFromTearOff => _backend.helpers.closureFromTearOff; |
291 } | 295 } |
OLD | NEW |