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

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

Issue 1438453002: Use Feature directly in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | pkg/compiler/lib/src/dart_backend/backend.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 1
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 library dart2js.common.resolution; 6 library dart2js.common.resolution;
7 7
8 import '../common.dart'; 8 import '../common.dart';
9 import '../compiler.dart' show 9 import '../compiler.dart' show
10 Compiler; 10 Compiler;
11 import '../constants/expressions.dart' show
12 ConstantExpression;
11 import '../core_types.dart' show 13 import '../core_types.dart' show
12 CoreTypes; 14 CoreTypes;
13 import '../dart_types.dart' show 15 import '../dart_types.dart' show
14 DartType, 16 DartType,
15 InterfaceType; 17 InterfaceType;
16 import '../elements/elements.dart' show 18 import '../elements/elements.dart' show
17 AstElement, 19 AstElement,
18 ClassElement, 20 ClassElement,
19 Element, 21 Element,
20 ErroneousElement, 22 ErroneousElement,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 _isAnalyzed = true; 54 _isAnalyzed = true;
53 return impact; 55 return impact;
54 } 56 }
55 57
56 bool get isAnalyzed => _isAnalyzed; 58 bool get isAnalyzed => _isAnalyzed;
57 } 59 }
58 60
59 class ResolutionImpact extends WorldImpact { 61 class ResolutionImpact extends WorldImpact {
60 const ResolutionImpact(); 62 const ResolutionImpact();
61 63
62 // TODO(johnniwinther): Remove this.
63 void registerDependency(Element element) {}
64
65 Iterable<Feature> get features => const <Feature>[]; 64 Iterable<Feature> get features => const <Feature>[];
66 Iterable<DartType> get requiredTypes => const <DartType>[];
67 Iterable<MapLiteralUse> get mapLiterals => const <MapLiteralUse>[]; 65 Iterable<MapLiteralUse> get mapLiterals => const <MapLiteralUse>[];
68 Iterable<ListLiteralUse> get listLiterals => const <ListLiteralUse>[]; 66 Iterable<ListLiteralUse> get listLiterals => const <ListLiteralUse>[];
69 Iterable<DartType> get typeLiterals => const <DartType>[];
70 Iterable<String> get constSymbolNames => const <String>[]; 67 Iterable<String> get constSymbolNames => const <String>[];
68 Iterable<ConstantExpression> get constantLiterals {
69 return const <ConstantExpression>[];
70 }
71 } 71 }
72 72
73 /// A language feature seen during resolution. 73 /// A language feature seen during resolution.
74 // TODO(johnniwinther): Should mirror usage be part of this? 74 // TODO(johnniwinther): Should mirror usage be part of this?
75 enum Feature { 75 enum Feature {
76 /// Invocation of a generative construction on an abstract class. 76 /// Invocation of a generative construction on an abstract class.
77 ABSTRACT_CLASS_INSTANTIATION, 77 ABSTRACT_CLASS_INSTANTIATION,
78 /// An assert statement with no message. 78 /// An assert statement with no message.
79 ASSERT, 79 ASSERT,
80 /// An assert statement with a message. 80 /// An assert statement with a message.
(...skipping 11 matching lines...) Expand all
92 /// A fall through in a switch case. 92 /// A fall through in a switch case.
93 FALL_THROUGH_ERROR, 93 FALL_THROUGH_ERROR,
94 /// A ++/-- operation. 94 /// A ++/-- operation.
95 INC_DEC_OPERATION, 95 INC_DEC_OPERATION,
96 /// A field whose initialization is not a constant. 96 /// A field whose initialization is not a constant.
97 LAZY_FIELD, 97 LAZY_FIELD,
98 /// A catch clause with a variable for the stack trace. 98 /// A catch clause with a variable for the stack trace.
99 STACK_TRACE_IN_CATCH, 99 STACK_TRACE_IN_CATCH,
100 /// String interpolation. 100 /// String interpolation.
101 STRING_INTERPOLATION, 101 STRING_INTERPOLATION,
102 /// String juxtaposition.
103 STRING_JUXTAPOSITION,
102 /// An implicit call to `super.noSuchMethod`, like calling an unresolved 104 /// An implicit call to `super.noSuchMethod`, like calling an unresolved
103 /// super method. 105 /// super method.
104 SUPER_NO_SUCH_METHOD, 106 SUPER_NO_SUCH_METHOD,
105 /// A redirection to the `Symbol` constructor. 107 /// A redirection to the `Symbol` constructor.
106 SYMBOL_CONSTRUCTOR, 108 SYMBOL_CONSTRUCTOR,
107 /// An synchronous for in statement, like `for (var e in i) {}`. 109 /// An synchronous for in statement, like `for (var e in i) {}`.
108 SYNC_FOR_IN, 110 SYNC_FOR_IN,
109 /// A method with a `sync*` body modifier. 111 /// A method with a `sync*` body modifier.
110 SYNC_STAR, 112 SYNC_STAR,
111 /// A throw expression. 113 /// A throw expression.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 WorldImpact computeWorldImpact(Element element); 190 WorldImpact computeWorldImpact(Element element);
189 } 191 }
190 192
191 // TODO(johnniwinther): Rename to `Parser` or `ParsingContext`. 193 // TODO(johnniwinther): Rename to `Parser` or `ParsingContext`.
192 abstract class Parsing { 194 abstract class Parsing {
193 DiagnosticReporter get reporter; 195 DiagnosticReporter get reporter;
194 void parsePatchClass(ClassElement cls); 196 void parsePatchClass(ClassElement cls);
195 measure(f()); 197 measure(f());
196 ScannerOptions getScannerOptionsFor(Element element); 198 ScannerOptions getScannerOptionsFor(Element element);
197 } 199 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698