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

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

Issue 1173403002: dart2js: Fix hints in code base. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updated to latest revision Created 5 years, 6 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
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 dart_tree_printer; 5 library dart_tree_printer;
6 6
7 import '../constants/values.dart' as values; 7 import '../constants/values.dart' as values;
8 import '../dart_types.dart' as types; 8 import '../dart_types.dart' as types;
9 import '../dart2jslib.dart' as dart2js; 9 import '../dart2jslib.dart' as dart2js;
10 import '../elements/elements.dart' as elements; 10 import '../elements/elements.dart' as elements;
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 types.InterfaceType supertype = cls.supertype; 1206 types.InterfaceType supertype = cls.supertype;
1207 Set<types.DartType> mixinTypes = new Set<types.DartType>(); 1207 Set<types.DartType> mixinTypes = new Set<types.DartType>();
1208 Link<tree.Node> mixins = const Link<tree.Node>(); 1208 Link<tree.Node> mixins = const Link<tree.Node>();
1209 1209
1210 void addMixin(types.DartType mixinType) { 1210 void addMixin(types.DartType mixinType) {
1211 mixinTypes.add(mixinType); 1211 mixinTypes.add(mixinType);
1212 mixins = mixins.prepend(makeType(TypeGenerator.createType(mixinType))); 1212 mixins = mixins.prepend(makeType(TypeGenerator.createType(mixinType)));
1213 } 1213 }
1214 1214
1215 if (supertype != null) { 1215 if (supertype != null) {
1216 tree.Node superclass;
1217 if (supertype.element.isUnnamedMixinApplication) { 1216 if (supertype.element.isUnnamedMixinApplication) {
1218 while (supertype.element.isUnnamedMixinApplication) { 1217 while (supertype.element.isUnnamedMixinApplication) {
1219 elements.MixinApplicationElement mixinApplication = supertype.element; 1218 elements.MixinApplicationElement mixinApplication = supertype.element;
1220 addMixin(cls.asInstanceOf(mixinApplication.mixin)); 1219 addMixin(cls.asInstanceOf(mixinApplication.mixin));
1221 supertype = mixinApplication.supertype; 1220 supertype = mixinApplication.supertype;
1222 } 1221 }
1223 tree.Node superclass = makeType( 1222 tree.Node superclass = makeType(
1224 TypeGenerator.createType(cls.asInstanceOf(supertype.element))); 1223 TypeGenerator.createType(cls.asInstanceOf(supertype.element)));
1225 supernode = new tree.MixinApplication( 1224 supernode = new tree.MixinApplication(
1226 superclass, new tree.NodeList(null, mixins, null, ',')); 1225 superclass, new tree.NodeList(null, mixins, null, ','));
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 printStringChunk(chunk.previous), 1331 printStringChunk(chunk.previous),
1333 node); 1332 node);
1334 } else { 1333 } else {
1335 return node; 1334 return node;
1336 } 1335 }
1337 } 1336 }
1338 return printStringChunk(output.chunk); 1337 return printStringChunk(output.chunk);
1339 } 1338 }
1340 1339
1341 } 1340 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698