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

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

Issue 1383503002: Add Resolution and Parsing interfaces for computeType, ensureResolved and parseNode. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add TODOs. Created 5 years, 2 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/closure.dart ('k') | pkg/compiler/lib/src/compile_time_constants.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 // 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
2 // 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
3 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
4 5
5 library dart2js.common.resolution; 6 library dart2js.common.resolution;
6 7
7 import '../compiler.dart' show 8 import '../compiler.dart' show
8 Compiler; 9 Compiler;
10 import '../core_types.dart' show
11 CoreTypes;
9 import '../dart_types.dart' show 12 import '../dart_types.dart' show
10 DartType; 13 DartType;
14 import '../diagnostics/diagnostic_listener.dart' show
15 DiagnosticListener;
11 import '../elements/elements.dart' show 16 import '../elements/elements.dart' show
12 AstElement, 17 AstElement,
18 ClassElement,
19 Element,
13 ErroneousElement, 20 ErroneousElement,
21 FunctionElement,
22 FunctionSignature,
23 MetadataAnnotation,
24 TypedefElement,
14 TypeVariableElement; 25 TypeVariableElement;
15 import '../enqueue.dart' show 26 import '../enqueue.dart' show
16 ResolutionEnqueuer, 27 ResolutionEnqueuer,
17 WorldImpact; 28 WorldImpact;
18 import '../tree/tree.dart' show 29 import '../tree/tree.dart' show
19 AsyncForIn, 30 AsyncForIn,
20 Send; 31 Send,
32 TypeAnnotation;
21 import 'registry.dart' show 33 import 'registry.dart' show
22 Registry; 34 Registry;
23 import 'work.dart' show 35 import 'work.dart' show
24 ItemCompilationContext, 36 ItemCompilationContext,
25 WorkItem; 37 WorkItem;
26 38
27 /// [WorkItem] used exclusively by the [ResolutionEnqueuer]. 39 /// [WorkItem] used exclusively by the [ResolutionEnqueuer].
28 class ResolutionWorkItem extends WorkItem { 40 class ResolutionWorkItem extends WorkItem {
29 bool _isAnalyzed = false; 41 bool _isAnalyzed = false;
30 42
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 125
114 /// Register that the application creates a constant map. 126 /// Register that the application creates a constant map.
115 void onMapLiteral(Registry registry, DartType type, bool isConstant) {} 127 void onMapLiteral(Registry registry, DartType type, bool isConstant) {}
116 128
117 /// Called when resolving the `Symbol` constructor. 129 /// Called when resolving the `Symbol` constructor.
118 void onSymbolConstructor(Registry registry) {} 130 void onSymbolConstructor(Registry registry) {}
119 131
120 /// Called when resolving a prefix or postfix expression. 132 /// Called when resolving a prefix or postfix expression.
121 void onIncDecOperation(Registry registry) {} 133 void onIncDecOperation(Registry registry) {}
122 } 134 }
135
136 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`.
137 abstract class Resolution {
138 Parsing get parsing;
139 DiagnosticListener get listener;
140 CoreTypes get coreTypes;
141
142 void resolveTypedef(TypedefElement typdef);
143 void resolveClass(ClassElement cls);
144 void registerClass(ClassElement cls);
145 void resolveMetadataAnnotation(MetadataAnnotation metadataAnnotation);
146 FunctionSignature resolveSignature(FunctionElement function);
147 DartType resolveTypeAnnotation(Element element, TypeAnnotation node);
148 }
149
150 // TODO(johnniwinther): Rename to `Parser` or `ParsingContext`.
151 abstract class Parsing {
152 DiagnosticListener get listener;
153 void parsePatchClass(ClassElement cls);
154 measure(f());
155 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/compile_time_constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698