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

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

Issue 1867243004: Begin refactoring compiler out of diet parser and scanner (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') | pkg/compiler/lib/src/scanner/scanner_task.dart » ('j') | 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
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("${superName}+${mixinName}",
303 element.compilationUnit, compiler.getNextFreeClassId(), node); 303 element.compilationUnit, compiler.getNextFreeId(), node);
304 // Create synthetic type variables for the mixin application. 304 // Create synthetic type variables for the mixin application.
305 List<DartType> typeVariables = <DartType>[]; 305 List<DartType> typeVariables = <DartType>[];
306 int index = 0; 306 int index = 0;
307 for (TypeVariableType type in element.typeVariables) { 307 for (TypeVariableType type in element.typeVariables) {
308 TypeVariableElementX typeVariableElement = new TypeVariableElementX( 308 TypeVariableElementX typeVariableElement = new TypeVariableElementX(
309 type.name, mixinApplication, index, type.element.node); 309 type.name, mixinApplication, index, type.element.node);
310 TypeVariableType typeVariable = new TypeVariableType(typeVariableElement); 310 TypeVariableType typeVariable = new TypeVariableType(typeVariableElement);
311 typeVariables.add(typeVariable); 311 typeVariables.add(typeVariable);
312 index++; 312 index++;
313 } 313 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 Identifier selector = node.selector.asIdentifier(); 642 Identifier selector = node.selector.asIdentifier();
643 var e = prefixElement.lookupLocalMember(selector.source); 643 var e = prefixElement.lookupLocalMember(selector.source);
644 if (e == null || !e.impliesType) { 644 if (e == null || !e.impliesType) {
645 reporter.reportErrorMessage(node.selector, 645 reporter.reportErrorMessage(node.selector,
646 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); 646 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector});
647 return; 647 return;
648 } 648 }
649 loadSupertype(e, node); 649 loadSupertype(e, node);
650 } 650 }
651 } 651 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/patch_parser.dart ('k') | pkg/compiler/lib/src/scanner/scanner_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698