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; | 5 library code_generator; |
6 | 6 |
7 import 'glue.dart'; | 7 import 'glue.dart'; |
8 | 8 |
| 9 import '../../closure.dart' show ClosureClassElement; |
| 10 import '../../common/codegen.dart' show CodegenRegistry; |
| 11 import '../../constants/values.dart'; |
| 12 import '../../dart_types.dart'; |
| 13 import '../../diagnostics/invariant.dart' show invariant; |
| 14 import '../../diagnostics/spannable.dart' show CURRENT_ELEMENT_SPANNABLE; |
| 15 import '../../elements/elements.dart'; |
| 16 import '../../io/source_information.dart' show SourceInformation; |
| 17 import '../../js/js.dart' as js; |
9 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir; | 18 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir; |
10 import '../../tree_ir/tree_ir_nodes.dart' show BuiltinOperator; | 19 import '../../tree_ir/tree_ir_nodes.dart' show BuiltinOperator; |
11 import '../../js/js.dart' as js; | |
12 import '../../elements/elements.dart'; | |
13 import '../../io/source_information.dart' show SourceInformation; | |
14 import '../../util/maplet.dart'; | |
15 import '../../constants/values.dart'; | |
16 import '../../dart2jslib.dart'; | |
17 import '../../dart_types.dart'; | |
18 import '../../types/types.dart' show TypeMask; | 20 import '../../types/types.dart' show TypeMask; |
19 import '../../universe/universe.dart' show | 21 import '../../universe/universe.dart' show |
20 Selector, | 22 Selector, |
21 UniverseSelector; | 23 UniverseSelector; |
22 import '../../util/util.dart' show CURRENT_ELEMENT_SPANNABLE; | 24 import '../../util/maplet.dart'; |
23 import '../../closure.dart' show ClosureClassElement; | |
24 | 25 |
25 class CodegenBailout { | 26 class CodegenBailout { |
26 final tree_ir.Node node; | 27 final tree_ir.Node node; |
27 final String reason; | 28 final String reason; |
28 CodegenBailout(this.node, this.reason); | 29 CodegenBailout(this.node, this.reason); |
29 String get message { | 30 String get message { |
30 return 'bailout${node != null ? " on $node" : ""}: $reason'; | 31 return 'bailout${node != null ? " on $node" : ""}: $reason'; |
31 } | 32 } |
32 } | 33 } |
33 | 34 |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 js.Expression visitAwait(tree_ir.Await node) { | 837 js.Expression visitAwait(tree_ir.Await node) { |
837 return new js.Await(visitExpression(node.input)); | 838 return new js.Await(visitExpression(node.input)); |
838 } | 839 } |
839 | 840 |
840 visitFunctionExpression(tree_ir.FunctionExpression node) { | 841 visitFunctionExpression(tree_ir.FunctionExpression node) { |
841 // FunctionExpressions are currently unused. | 842 // FunctionExpressions are currently unused. |
842 // We might need them if we want to emit raw JS nested functions. | 843 // We might need them if we want to emit raw JS nested functions. |
843 throw 'FunctionExpressions should not be used'; | 844 throw 'FunctionExpressions should not be used'; |
844 } | 845 } |
845 } | 846 } |
OLD | NEW |