| 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 | 8 |
| 9 import '../../common.dart'; | 9 import '../../common.dart'; |
| 10 import '../../common/registry.dart' show | 10 import '../../common/registry.dart' show |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 FunctionElement get identicalFunction => _compiler.identicalFunction; | 102 FunctionElement get identicalFunction => _compiler.identicalFunction; |
| 103 | 103 |
| 104 js.Name invocationName(Selector selector) { | 104 js.Name invocationName(Selector selector) { |
| 105 return _namer.invocationName(selector); | 105 return _namer.invocationName(selector); |
| 106 } | 106 } |
| 107 | 107 |
| 108 FunctionElement get createInvocationMirrorMethod { | 108 FunctionElement get createInvocationMirrorMethod { |
| 109 return _backend.helpers.createInvocationMirror; | 109 return _backend.helpers.createInvocationMirror; |
| 110 } | 110 } |
| 111 | 111 |
| 112 void registerUseInterceptorInCodegen() { | |
| 113 _backend.registerUseInterceptor(_enqueuer); | |
| 114 } | |
| 115 | |
| 116 bool isInterceptedSelector(Selector selector) { | 112 bool isInterceptedSelector(Selector selector) { |
| 117 return _backend.isInterceptedSelector(selector); | 113 return _backend.isInterceptedSelector(selector); |
| 118 } | 114 } |
| 119 | 115 |
| 120 bool isInterceptedMethod(Element element) { | 116 bool isInterceptedMethod(Element element) { |
| 121 return _backend.isInterceptedMethod(element); | 117 return _backend.isInterceptedMethod(element); |
| 122 } | 118 } |
| 123 | 119 |
| 124 bool isInterceptorClass(ClassElement element) { | 120 bool isInterceptorClass(ClassElement element) { |
| 125 return element.isSubclassOf(_backend.jsInterceptorClass); | 121 return element.isSubclassOf(_backend.jsInterceptorClass); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 int variableIndex = 0; | 236 int variableIndex = 0; |
| 241 js.Expression representation = _backend.rtiEncoder.getTypeRepresentation( | 237 js.Expression representation = _backend.rtiEncoder.getTypeRepresentation( |
| 242 dartType, | 238 dartType, |
| 243 (_) => arguments[variableIndex++]); | 239 (_) => arguments[variableIndex++]); |
| 244 assert(variableIndex == arguments.length); | 240 assert(variableIndex == arguments.length); |
| 245 // Representation contains JavaScript Arrays. | 241 // Representation contains JavaScript Arrays. |
| 246 registry.registerInstantiatedClass(_backend.jsArrayClass); | 242 registry.registerInstantiatedClass(_backend.jsArrayClass); |
| 247 return representation; | 243 return representation; |
| 248 } | 244 } |
| 249 | 245 |
| 250 void registerIsCheck(DartType type, Registry registry) { | |
| 251 _enqueuer.registerIsCheck(type); | |
| 252 _backend.registerIsCheckForCodegen(type, _enqueuer, registry); | |
| 253 } | |
| 254 | |
| 255 js.Name getTypeTestTag(DartType type) { | 246 js.Name getTypeTestTag(DartType type) { |
| 256 return _backend.namer.operatorIsType(type); | 247 return _backend.namer.operatorIsType(type); |
| 257 } | 248 } |
| 258 | 249 |
| 259 js.Name getTypeSubstitutionTag(ClassElement element) { | 250 js.Name getTypeSubstitutionTag(ClassElement element) { |
| 260 return _backend.namer.substitutionName(element); | 251 return _backend.namer.substitutionName(element); |
| 261 } | 252 } |
| 262 | 253 |
| 263 bool operatorEqHandlesNullArgument(FunctionElement element) { | 254 bool operatorEqHandlesNullArgument(FunctionElement element) { |
| 264 return _backend.operatorEqHandlesNullArgument(element); | 255 return _backend.operatorEqHandlesNullArgument(element); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 285 // TODO(sra): Should this be part of CodegenRegistry? | 276 // TODO(sra): Should this be part of CodegenRegistry? |
| 286 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { | 277 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { |
| 287 if (nativeBehavior == null) return; | 278 if (nativeBehavior == null) return; |
| 288 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); | 279 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); |
| 289 } | 280 } |
| 290 | 281 |
| 291 ConstantValue getDefaultParameterValue(ParameterElement elem) { | 282 ConstantValue getDefaultParameterValue(ParameterElement elem) { |
| 292 return _backend.constants.getConstantValueForVariable(elem); | 283 return _backend.constants.getConstantValueForVariable(elem); |
| 293 } | 284 } |
| 294 } | 285 } |
| OLD | NEW |