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

Side by Side Diff: pkg/compiler/lib/src/resolution/class_hierarchy.dart

Issue 1881293002: dart2js: use IdGenerator for all id generation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/patch_parser.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart2js.resolution.class_hierarchy; 5 library dart2js.resolution.class_hierarchy;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show Feature; 8 import '../common/resolution.dart' show Feature;
9 import '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../core_types.dart' show CoreClasses, CoreTypes; 10 import '../core_types.dart' show CoreClasses, CoreTypes;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 link = link.tail; 292 link = link.tail;
293 } 293 }
294 doApplyMixinTo(element, supertype, checkMixinType(link.head)); 294 doApplyMixinTo(element, supertype, checkMixinType(link.head));
295 return element.computeType(resolution); 295 return element.computeType(resolution);
296 } 296 }
297 297
298 DartType applyMixin(DartType supertype, DartType mixinType, Node node) { 298 DartType applyMixin(DartType supertype, DartType mixinType, Node node) {
299 String superName = supertype.name; 299 String superName = supertype.name;
300 String mixinName = mixinType.name; 300 String mixinName = mixinType.name;
301 MixinApplicationElementX mixinApplication = 301 MixinApplicationElementX mixinApplication =
302 new UnnamedMixinApplicationElementX("${superName}+${mixinName}", 302 new UnnamedMixinApplicationElementX(
303 element.compilationUnit, compiler.getNextFreeId(), node); 303 "${superName}+${mixinName}",
304 element.compilationUnit,
305 compiler.idGenerator.getNextFreeId(),
306 node);
304 // Create synthetic type variables for the mixin application. 307 // Create synthetic type variables for the mixin application.
305 List<DartType> typeVariables = <DartType>[]; 308 List<DartType> typeVariables = <DartType>[];
306 int index = 0; 309 int index = 0;
307 for (TypeVariableType type in element.typeVariables) { 310 for (TypeVariableType type in element.typeVariables) {
308 TypeVariableElementX typeVariableElement = new TypeVariableElementX( 311 TypeVariableElementX typeVariableElement = new TypeVariableElementX(
309 type.name, mixinApplication, index, type.element.node); 312 type.name, mixinApplication, index, type.element.node);
310 TypeVariableType typeVariable = new TypeVariableType(typeVariableElement); 313 TypeVariableType typeVariable = new TypeVariableType(typeVariableElement);
311 typeVariables.add(typeVariable); 314 typeVariables.add(typeVariable);
312 index++; 315 index++;
313 } 316 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 Identifier selector = node.selector.asIdentifier(); 645 Identifier selector = node.selector.asIdentifier();
643 var e = prefixElement.lookupLocalMember(selector.source); 646 var e = prefixElement.lookupLocalMember(selector.source);
644 if (e == null || !e.impliesType) { 647 if (e == null || !e.impliesType) {
645 reporter.reportErrorMessage(node.selector, 648 reporter.reportErrorMessage(node.selector,
646 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); 649 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector});
647 return; 650 return;
648 } 651 }
649 loadSupertype(e, node); 652 loadSupertype(e, node);
650 } 653 }
651 } 654 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/patch_parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698