OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart2js.ir_builder_task; | 5 library dart2js.ir_builder_task; |
6 | 6 |
7 import 'package:js_runtime/shared/embedded_names.dart' | 7 import 'package:js_runtime/shared/embedded_names.dart' |
8 show JsBuiltin, JsGetName; | 8 show JsBuiltin, JsGetName; |
9 | 9 |
10 import '../closure.dart' as closure; | 10 import '../closure.dart' as closure; |
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 ir.Primitive visitLiteralString(ast.LiteralString node) { | 1674 ir.Primitive visitLiteralString(ast.LiteralString node) { |
1675 assert(irBuilder.isOpen); | 1675 assert(irBuilder.isOpen); |
1676 return irBuilder.buildDartStringConstant(node.dartString); | 1676 return irBuilder.buildDartStringConstant(node.dartString); |
1677 } | 1677 } |
1678 | 1678 |
1679 ConstantValue getConstantForNode(ast.Node node) { | 1679 ConstantValue getConstantForNode(ast.Node node) { |
1680 return irBuilder.state.constants.getConstantValueForNode(node, elements); | 1680 return irBuilder.state.constants.getConstantValueForNode(node, elements); |
1681 } | 1681 } |
1682 | 1682 |
1683 ConstantValue getConstantForVariable(VariableElement element) { | 1683 ConstantValue getConstantForVariable(VariableElement element) { |
1684 return irBuilder.state.constants.getConstantValueForVariable(element); | 1684 return irBuilder.state.constants.getConstantValue(element.constant); |
1685 } | 1685 } |
1686 | 1686 |
1687 ir.Primitive buildConstantExpression( | 1687 ir.Primitive buildConstantExpression( |
1688 ConstantExpression expression, SourceInformation sourceInformation) { | 1688 ConstantExpression expression, SourceInformation sourceInformation) { |
1689 return irBuilder.buildConstant( | 1689 return irBuilder.buildConstant( |
1690 irBuilder.state.constants.getConstantValue(expression), | 1690 irBuilder.state.constants.getConstantValue(expression), |
1691 sourceInformation: sourceInformation); | 1691 sourceInformation: sourceInformation); |
1692 } | 1692 } |
1693 | 1693 |
1694 /// Returns the allocation site-specific type for a given allocation. | 1694 /// Returns the allocation site-specific type for a given allocation. |
(...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4014 _backend.jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass); | 4014 _backend.jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass); |
4015 | 4015 |
4016 String getJsInteropTargetPath(FunctionElement element) { | 4016 String getJsInteropTargetPath(FunctionElement element) { |
4017 return '${_backend.namer.fixedBackendPath(element)}.' | 4017 return '${_backend.namer.fixedBackendPath(element)}.' |
4018 '${_backend.nativeData.getFixedBackendName(element)}'; | 4018 '${_backend.nativeData.getFixedBackendName(element)}'; |
4019 } | 4019 } |
4020 | 4020 |
4021 DartType get jsJavascriptObjectType => | 4021 DartType get jsJavascriptObjectType => |
4022 _backend.helpers.jsJavaScriptObjectClass.thisType; | 4022 _backend.helpers.jsJavaScriptObjectClass.thisType; |
4023 } | 4023 } |
OLD | NEW |