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 '../../common.dart'; | 7 import '../../common.dart'; |
8 import '../../common/codegen.dart' show CodegenRegistry; | 8 import '../../common/codegen.dart' show CodegenRegistry; |
9 import '../../compiler.dart' show Compiler; | 9 import '../../compiler.dart' show Compiler; |
10 import '../../constants/values.dart'; | 10 import '../../constants/values.dart'; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 classElement == _helpers.jsBoolClass || | 262 classElement == _helpers.jsBoolClass || |
263 classElement == _compiler.coreClasses.boolClass; | 263 classElement == _compiler.coreClasses.boolClass; |
264 | 264 |
265 // TODO(sra,johnniwinther): Should this be part of CodegenRegistry? | 265 // TODO(sra,johnniwinther): Should this be part of CodegenRegistry? |
266 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { | 266 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { |
267 if (nativeBehavior == null) return; | 267 if (nativeBehavior == null) return; |
268 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); | 268 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); |
269 } | 269 } |
270 | 270 |
271 ConstantValue getDefaultParameterValue(ParameterElement elem) { | 271 ConstantValue getDefaultParameterValue(ParameterElement elem) { |
272 return _backend.constants.getConstantValueForVariable(elem); | 272 return _backend.constants.getConstantValue(elem.constant); |
273 } | 273 } |
274 | 274 |
275 TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) { | 275 TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) { |
276 return _compiler.world.extendMaskIfReachesAll(selector, mask); | 276 return _compiler.world.extendMaskIfReachesAll(selector, mask); |
277 } | 277 } |
278 | 278 |
279 FunctionElement get closureFromTearOff => _backend.helpers.closureFromTearOff; | 279 FunctionElement get closureFromTearOff => _backend.helpers.closureFromTearOff; |
280 | 280 |
281 js.Name registerOneShotInterceptor(Selector selector) { | 281 js.Name registerOneShotInterceptor(Selector selector) { |
282 return _backend.registerOneShotInterceptor(selector); | 282 return _backend.registerOneShotInterceptor(selector); |
283 } | 283 } |
284 | 284 |
285 bool mayGenerateInstanceofCheck(DartType type) { | 285 bool mayGenerateInstanceofCheck(DartType type) { |
286 return _backend.mayGenerateInstanceofCheck(type); | 286 return _backend.mayGenerateInstanceofCheck(type); |
287 } | 287 } |
288 | 288 |
289 bool methodUsesReceiverArgument(FunctionElement function) { | 289 bool methodUsesReceiverArgument(FunctionElement function) { |
290 assert(isInterceptedMethod(function)); | 290 assert(isInterceptedMethod(function)); |
291 ClassElement class_ = function.enclosingClass.declaration; | 291 ClassElement class_ = function.enclosingClass.declaration; |
292 return isInterceptorClass(class_) || isUsedAsMixin(class_); | 292 return isInterceptorClass(class_) || isUsedAsMixin(class_); |
293 } | 293 } |
294 } | 294 } |
OLD | NEW |