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

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

Issue 2609063002: Further reduce use of Element in codegen. (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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.common.resolution; 5 library dart2js.common.resolution;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../compile_time_constants.dart'; 8 import '../compile_time_constants.dart';
9 import '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../constants/expressions.dart' show ConstantExpression; 10 import '../constants/expressions.dart' show ConstantExpression;
11 import '../constants/values.dart' show ConstantValue; 11 import '../constants/values.dart' show ConstantValue;
12 import '../core_types.dart' show CommonElements; 12 import '../core_types.dart' show CommonElements;
13 import '../dart_types.dart' show DartType, Types; 13 import '../dart_types.dart' show DartType, Types;
14 import '../elements/elements.dart' 14 import '../elements/elements.dart'
15 show 15 show
16 AstElement, 16 AstElement,
17 ClassElement, 17 ClassElement,
18 Element, 18 Element,
19 Entity,
19 ExecutableElement, 20 ExecutableElement,
20 FunctionElement, 21 FunctionElement,
21 FunctionSignature, 22 FunctionSignature,
22 LibraryElement, 23 LibraryElement,
23 MetadataAnnotation, 24 MetadataAnnotation,
24 MethodElement, 25 MethodElement,
25 ResolvedAst, 26 ResolvedAst,
26 TypedefElement; 27 TypedefElement;
27 import '../enqueue.dart' show ResolutionEnqueuer; 28 import '../enqueue.dart' show ResolutionEnqueuer;
28 import '../id_generator.dart'; 29 import '../id_generator.dart';
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 106
106 /// Returns `true` if [element] is a default implementation of `noSuchMethod` 107 /// Returns `true` if [element] is a default implementation of `noSuchMethod`
107 /// used by the target. 108 /// used by the target.
108 bool isDefaultNoSuchMethod(MethodElement element); 109 bool isDefaultNoSuchMethod(MethodElement element);
109 110
110 /// Returns the default superclass for the given [element] in this target. 111 /// Returns the default superclass for the given [element] in this target.
111 ClassElement defaultSuperclass(ClassElement element); 112 ClassElement defaultSuperclass(ClassElement element);
112 113
113 /// Returns `true` if [element] is a native element, that is, that the 114 /// Returns `true` if [element] is a native element, that is, that the
114 /// corresponding entity already exists in the target language. 115 /// corresponding entity already exists in the target language.
115 bool isNative(Element element) => false; 116 bool isNative(Entity element) => false;
116 117
117 /// Returns `true` if [element] is a foreign element, that is, that the 118 /// Returns `true` if [element] is a foreign element, that is, that the
118 /// backend has specialized handling for the element. 119 /// backend has specialized handling for the element.
119 bool isForeign(Element element) => false; 120 bool isForeign(Element element) => false;
120 121
121 /// Returns `true` if this target supports async/await. 122 /// Returns `true` if this target supports async/await.
122 bool get supportsAsyncAwait => true; 123 bool get supportsAsyncAwait => true;
123 } 124 }
124 125
125 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`. 126 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (cls.isPatch) { 250 if (cls.isPatch) {
250 patchParser.parsePatchClassNode(cls); 251 patchParser.parsePatchClassNode(cls);
251 } 252 }
252 }); 253 });
253 } 254 }
254 255
255 @override 256 @override
256 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( 257 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions(
257 canUseNative: backend.canLibraryUseNative(element.library)); 258 canUseNative: backend.canLibraryUseNative(element.library));
258 } 259 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | pkg/compiler/lib/src/universe/world_builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698