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

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

Issue 2653203002: Use entities in CommonElements interface. (Closed)
Patch Set: Created 3 years, 11 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) 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 Resolution; 8 import '../common/resolution.dart' show Resolution;
9 import '../core_types.dart' show CommonElements; 9 import '../core_types.dart' show CommonElements;
10 import '../elements/resolution_types.dart'; 10 import '../elements/resolution_types.dart';
(...skipping 23 matching lines...) Expand all
34 TypeDeclarationElement get element => enclosingElement; 34 TypeDeclarationElement get element => enclosingElement;
35 35
36 TypeDefinitionVisitor(Resolution resolution, TypeDeclarationElement element, 36 TypeDefinitionVisitor(Resolution resolution, TypeDeclarationElement element,
37 ResolutionRegistry registry) 37 ResolutionRegistry registry)
38 : this.enclosingElement = element, 38 : this.enclosingElement = element,
39 scope = Scope.buildEnclosingScope(element), 39 scope = Scope.buildEnclosingScope(element),
40 super(resolution, registry); 40 super(resolution, registry);
41 41
42 CommonElements get commonElements => resolution.commonElements; 42 CommonElements get commonElements => resolution.commonElements;
43 43
44 ResolutionDartType get objectType => commonElements.objectType; 44 ResolutionInterfaceType get objectType => commonElements.objectType;
45 45
46 void resolveTypeVariableBounds(NodeList node) { 46 void resolveTypeVariableBounds(NodeList node) {
47 if (node == null) return; 47 if (node == null) return;
48 48
49 Setlet<String> nameSet = new Setlet<String>(); 49 Setlet<String> nameSet = new Setlet<String>();
50 // Resolve the bounds of type variables. 50 // Resolve the bounds of type variables.
51 Iterator<ResolutionDartType> types = element.typeVariables.iterator; 51 Iterator<ResolutionDartType> types = element.typeVariables.iterator;
52 Link<Node> nodeLink = node.nodes; 52 Link<Node> nodeLink = node.nodes;
53 while (!nodeLink.isEmpty) { 53 while (!nodeLink.isEmpty) {
54 types.moveNext(); 54 types.moveNext();
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 Identifier selector = node.selector.asIdentifier(); 643 Identifier selector = node.selector.asIdentifier();
644 var e = prefixElement.lookupLocalMember(selector.source); 644 var e = prefixElement.lookupLocalMember(selector.source);
645 if (e == null || !e.impliesType) { 645 if (e == null || !e.impliesType) {
646 reporter.reportErrorMessage(node.selector, 646 reporter.reportErrorMessage(node.selector,
647 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); 647 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector});
648 return; 648 return;
649 } 649 }
650 loadSupertype(e, node); 650 loadSupertype(e, node);
651 } 651 }
652 } 652 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart ('k') | pkg/compiler/lib/src/resolution/enum_creator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698