Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1169)

Side by Side Diff: pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart

Issue 1011403003: cps-ir: Set runtime type information for new objects that require it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update comment. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 Expression visitSuperInitializer(tree.SuperInitializer node, 930 Expression visitSuperInitializer(tree.SuperInitializer node,
931 BuilderContext<Statement> context) { 931 BuilderContext<Statement> context) {
932 List<Argument> arguments = node.arguments.map((tree.Statement argument) { 932 List<Argument> arguments = node.arguments.map((tree.Statement argument) {
933 return ensureExpression(buildInInitializerContext(argument, context)); 933 return ensureExpression(buildInInitializerContext(argument, context));
934 }).toList(); 934 }).toList();
935 return new SuperInitializer(node.target, 935 return new SuperInitializer(node.target,
936 emitArguments(arguments, node.selector)); 936 emitArguments(arguments, node.selector));
937 } 937 }
938 938
939 @override 939 @override
940 Expression visitTypeExpression(tree.TypeExpression node, arg) {
941 throw '$node not supported by dart backend';
942 }
943
944 @override
940 visitGetField(tree.GetField node, arg) => errorUnsupportedNode(node); 945 visitGetField(tree.GetField node, arg) => errorUnsupportedNode(node);
941 946
942 @override 947 @override
943 visitSetField(tree.SetField node, arg) => errorUnsupportedNode(node); 948 visitSetField(tree.SetField node, arg) => errorUnsupportedNode(node);
944 949
945 @override 950 @override
946 visitCreateBox(tree.CreateBox node, arg) => errorUnsupportedNode(node); 951 visitCreateBox(tree.CreateBox node, arg) => errorUnsupportedNode(node);
947 952
948 @override 953 @override
949 visitCreateInstance(tree.CreateInstance node, arg) { 954 visitCreateInstance(tree.CreateInstance node, arg) {
950 return errorUnsupportedNode(node); 955 return errorUnsupportedNode(node);
951 } 956 }
952 957
953 @override 958 @override
954 Expression visitReadTypeVariable(tree.ReadTypeVariable node, arg) { 959 Expression visitReadTypeVariable(tree.ReadTypeVariable node, arg) {
955 return errorUnsupportedNode(node); 960 return errorUnsupportedNode(node);
956 } 961 }
957 962
958 @override 963 @override
959 Expression visitReifyRuntimeType(tree.ReifyRuntimeType node, arg) { 964 Expression visitReifyRuntimeType(tree.ReifyRuntimeType node, arg) {
960 return errorUnsupportedNode(node); 965 return errorUnsupportedNode(node);
961 } 966 }
962 967
963 errorUnsupportedNode(tree.JsSpecificNode node) { 968 errorUnsupportedNode(tree.JsSpecificNode node) {
964 throw '$node not supported by dart backend'; 969 throw '$node not supported by dart backend';
965 } 970 }
971
966 } 972 }
967 973
968 class TypeGenerator { 974 class TypeGenerator {
969 975
970 /// TODO(johnniwinther): Remove this when issue 21283 has been resolved. 976 /// TODO(johnniwinther): Remove this when issue 21283 has been resolved.
971 static int pseudoNameCounter = 0; 977 static int pseudoNameCounter = 0;
972 978
973 static Parameter emitParameter(DartType type, 979 static Parameter emitParameter(DartType type,
974 BuilderContext<Statement> context, 980 BuilderContext<Statement> context,
975 {String name, 981 {String name,
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null); 1314 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null);
1309 1315
1310 ExecutableElement get executableContext => enclosingElement; 1316 ExecutableElement get executableContext => enclosingElement;
1311 1317
1312 ExecutableElement get memberContext => executableContext.memberContext; 1318 ExecutableElement get memberContext => executableContext.memberContext;
1313 1319
1314 bool get isLocal => true; 1320 bool get isLocal => true;
1315 1321
1316 LibraryElement get implementationLibrary => enclosingElement.library; 1322 LibraryElement get implementationLibrary => enclosingElement.library;
1317 } 1323 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698