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 backend_ast_emitter; | 5 library backend_ast_emitter; |
6 | 6 |
7 import '../tree_ir/tree_ir_nodes.dart' as tree; | 7 import '../tree_ir/tree_ir_nodes.dart' as tree; |
8 import 'backend_ast_nodes.dart'; | 8 import 'backend_ast_nodes.dart'; |
9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 | 887 |
888 @override | 888 @override |
889 Expression visitSuperInitializer(tree.SuperInitializer node, | 889 Expression visitSuperInitializer(tree.SuperInitializer node, |
890 BuilderContext<Statement> context) { | 890 BuilderContext<Statement> context) { |
891 List<Argument> arguments = node.arguments.map((tree.Statement argument) { | 891 List<Argument> arguments = node.arguments.map((tree.Statement argument) { |
892 return ensureExpression(buildInInitializerContext(argument, context)); | 892 return ensureExpression(buildInInitializerContext(argument, context)); |
893 }).toList(); | 893 }).toList(); |
894 return new SuperInitializer(node.target, | 894 return new SuperInitializer(node.target, |
895 emitArguments(arguments, node.selector)); | 895 emitArguments(arguments, node.selector)); |
896 } | 896 } |
| 897 |
| 898 @override |
| 899 visitGetField(tree.GetField node, arg) => errorUnsupportedNode(node); |
| 900 |
| 901 @override |
| 902 visitSetField(tree.SetField node, arg) => errorUnsupportedNode(node); |
| 903 |
| 904 @override |
| 905 visitCreateBox(tree.CreateBox node, arg) => errorUnsupportedNode(node); |
| 906 |
| 907 @override |
| 908 visitCreateClosureClass(tree.CreateClosureClass node, arg) { |
| 909 return errorUnsupportedNode(node); |
| 910 } |
| 911 |
| 912 errorUnsupportedNode(tree.JsSpecificNode node) { |
| 913 throw '$node not supported by dart backend'; |
| 914 } |
897 } | 915 } |
898 | 916 |
899 class TypeGenerator { | 917 class TypeGenerator { |
900 | 918 |
901 /// TODO(johnniwinther): Remove this when issue 21283 has been resolved. | 919 /// TODO(johnniwinther): Remove this when issue 21283 has been resolved. |
902 static int pseudoNameCounter = 0; | 920 static int pseudoNameCounter = 0; |
903 | 921 |
904 static Parameter emitParameter(DartType type, | 922 static Parameter emitParameter(DartType type, |
905 BuilderContext<Statement> context, | 923 BuilderContext<Statement> context, |
906 {String name, | 924 {String name, |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null); | 1254 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null); |
1237 | 1255 |
1238 ExecutableElement get executableContext => enclosingElement; | 1256 ExecutableElement get executableContext => enclosingElement; |
1239 | 1257 |
1240 ExecutableElement get memberContext => executableContext.memberContext; | 1258 ExecutableElement get memberContext => executableContext.memberContext; |
1241 | 1259 |
1242 bool get isLocal => true; | 1260 bool get isLocal => true; |
1243 | 1261 |
1244 LibraryElement get implementationLibrary => enclosingElement.library; | 1262 LibraryElement get implementationLibrary => enclosingElement.library; |
1245 } | 1263 } |
OLD | NEW |