| 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 '../js_backend.dart'; | 7 import '../js_backend.dart'; |
| 8 import '../../dart2jslib.dart'; | 8 import '../../dart2jslib.dart'; |
| 9 import '../../js_emitter/js_emitter.dart'; | 9 import '../../js_emitter/js_emitter.dart'; |
| 10 import '../../js/js.dart' as js; | 10 import '../../js/js.dart' as js; |
| 11 import '../../constants/values.dart'; | 11 import '../../constants/values.dart'; |
| 12 import '../../elements/elements.dart'; | 12 import '../../elements/elements.dart'; |
| 13 import '../../constants/expressions.dart'; | 13 import '../../constants/expressions.dart'; |
| 14 import '../../closure.dart' show ClosureClassElement; |
| 14 | 15 |
| 15 /// Encapsulates the dependencies of the function-compiler to the compiler, | 16 /// Encapsulates the dependencies of the function-compiler to the compiler, |
| 16 /// backend and emitter. | 17 /// backend and emitter. |
| 17 // TODO(sigurdm): Should be refactored when we have a better feeling for the | 18 // TODO(sigurdm): Should be refactored when we have a better feeling for the |
| 18 // interface. | 19 // interface. |
| 19 class Glue { | 20 class Glue { |
| 20 final Compiler _compiler; | 21 final Compiler _compiler; |
| 21 | 22 |
| 22 JavaScriptBackend get _backend => _compiler.backend; | 23 JavaScriptBackend get _backend => _compiler.backend; |
| 23 | 24 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 return _backend.isInterceptedSelector(selector); | 73 return _backend.isInterceptedSelector(selector); |
| 73 } | 74 } |
| 74 | 75 |
| 75 Set<ClassElement> getInterceptedClassesOn(Selector selector) { | 76 Set<ClassElement> getInterceptedClassesOn(Selector selector) { |
| 76 return _backend.getInterceptedClassesOn(selector.name); | 77 return _backend.getInterceptedClassesOn(selector.name); |
| 77 } | 78 } |
| 78 | 79 |
| 79 void registerSpecializedGetInterceptor(Set<ClassElement> classes) { | 80 void registerSpecializedGetInterceptor(Set<ClassElement> classes) { |
| 80 _backend.registerSpecializedGetInterceptor(classes); | 81 _backend.registerSpecializedGetInterceptor(classes); |
| 81 } | 82 } |
| 83 |
| 84 js.Expression closureClassConstructorAccess(ClosureClassElement element) { |
| 85 return _backend.emitter.closureClassConstructorAccess(element); |
| 86 } |
| 87 |
| 88 String instanceFieldPropertyName(Element field) { |
| 89 return _namer.instanceFieldPropertyName(field); |
| 90 } |
| 91 |
| 82 } | 92 } |
| OLD | NEW |