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