| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 | 59 |
| 60 reportInternalError(String message) { | 60 reportInternalError(String message) { |
| 61 reporter.internalError(CURRENT_ELEMENT_SPANNABLE, message); | 61 reporter.internalError(CURRENT_ELEMENT_SPANNABLE, message); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool isUsedAsMixin(ClassElement classElement) { | 64 bool isUsedAsMixin(ClassElement classElement) { |
| 65 return classWorld.isUsedAsMixin(classElement); | 65 return classWorld.isUsedAsMixin(classElement); |
| 66 } | 66 } |
| 67 | 67 |
| 68 ConstantValue getConstantValueForVariable(VariableElement variable) { | |
| 69 return _backend.constants.getConstantValueForVariable(variable); | |
| 70 } | |
| 71 | |
| 72 js.Expression staticFunctionAccess(FunctionElement element) { | 68 js.Expression staticFunctionAccess(FunctionElement element) { |
| 73 return _backend.emitter.staticFunctionAccess(element); | 69 return _backend.emitter.staticFunctionAccess(element); |
| 74 } | 70 } |
| 75 | 71 |
| 76 js.Expression isolateStaticClosureAccess(FunctionElement element) { | 72 js.Expression isolateStaticClosureAccess(FunctionElement element) { |
| 77 return _backend.emitter.isolateStaticClosureAccess(element); | 73 return _backend.emitter.isolateStaticClosureAccess(element); |
| 78 } | 74 } |
| 79 | 75 |
| 80 js.Expression staticFieldAccess(FieldElement element) { | 76 js.Expression staticFieldAccess(FieldElement element) { |
| 81 return _backend.emitter.staticFieldAccess(element); | 77 return _backend.emitter.staticFieldAccess(element); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 280 |
| 285 bool isBoolClass(ClassElement classElement) => | 281 bool isBoolClass(ClassElement classElement) => |
| 286 classElement == _backend.jsBoolClass || | 282 classElement == _backend.jsBoolClass || |
| 287 classElement == _compiler.boolClass; | 283 classElement == _compiler.boolClass; |
| 288 | 284 |
| 289 // TODO(sra): Should this be part of CodegenRegistry? | 285 // TODO(sra): Should this be part of CodegenRegistry? |
| 290 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { | 286 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { |
| 291 if (nativeBehavior == null) return; | 287 if (nativeBehavior == null) return; |
| 292 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); | 288 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); |
| 293 } | 289 } |
| 290 |
| 291 ConstantValue getDefaultParameterValue(ParameterElement elem) { |
| 292 return _backend.constants.getConstantValueForVariable(elem); |
| 293 } |
| 294 } | 294 } |
| OLD | NEW |