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

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: 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 // 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 '../compiler.dart' show 7 import '../compiler.dart' show
8 Compiler; 8 Compiler;
9 import '../core_types.dart' show
10 CoreTypes;
9 import '../dart_types.dart' show 11 import '../dart_types.dart' show
10 DartType; 12 DartType;
13 import '../diagnostics/diagnostic_listener.dart' show
14 DiagnosticListener;
11 import '../elements/elements.dart' show 15 import '../elements/elements.dart' show
12 AstElement, 16 AstElement,
17 ClassElement,
18 Element,
13 ErroneousElement, 19 ErroneousElement,
20 FunctionElement,
21 FunctionSignature,
22 MetadataAnnotation,
23 TypedefElement,
14 TypeVariableElement; 24 TypeVariableElement;
15 import '../enqueue.dart' show 25 import '../enqueue.dart' show
16 ResolutionEnqueuer, 26 ResolutionEnqueuer,
17 WorldImpact; 27 WorldImpact;
18 import '../tree/tree.dart' show 28 import '../tree/tree.dart' show
19 AsyncForIn, 29 AsyncForIn,
20 Send; 30 Send,
31 TypeAnnotation;
21 import 'registry.dart' show 32 import 'registry.dart' show
22 Registry; 33 Registry;
23 import 'work.dart' show 34 import 'work.dart' show
24 ItemCompilationContext, 35 ItemCompilationContext,
25 WorkItem; 36 WorkItem;
26 37
27 /// [WorkItem] used exclusively by the [ResolutionEnqueuer]. 38 /// [WorkItem] used exclusively by the [ResolutionEnqueuer].
28 class ResolutionWorkItem extends WorkItem { 39 class ResolutionWorkItem extends WorkItem {
29 bool _isAnalyzed = false; 40 bool _isAnalyzed = false;
30 41
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 124
114 /// Register that the application creates a constant map. 125 /// Register that the application creates a constant map.
115 void onMapLiteral(Registry registry, DartType type, bool isConstant) {} 126 void onMapLiteral(Registry registry, DartType type, bool isConstant) {}
116 127
117 /// Called when resolving the `Symbol` constructor. 128 /// Called when resolving the `Symbol` constructor.
118 void onSymbolConstructor(Registry registry) {} 129 void onSymbolConstructor(Registry registry) {}
119 130
120 /// Called when resolving a prefix or postfix expression. 131 /// Called when resolving a prefix or postfix expression.
121 void onIncDecOperation(Registry registry) {} 132 void onIncDecOperation(Registry registry) {}
122 } 133 }
134
135 abstract class Resolution {
sigurdm 2015/10/01 08:54:13 Perhaps `Resolver`
Johnni Winther 2015/10/01 09:33:52 Added a TODO.
136 Parsing get parsing;
137 DiagnosticListener get listener;
138 CoreTypes get coreTypes;
139
140 void resolveTypedef(TypedefElement typdef);
141 void resolveClass(ClassElement cls);
142 void registerClass(ClassElement cls);
143 void resolveMetadataAnnotation(MetadataAnnotation metadataAnnotation);
144 FunctionSignature resolveSignature(FunctionElement function);
145 DartType resolveTypeAnnotation(Element element, TypeAnnotation node);
146 }
147
148 abstract class Parsing {
sigurdm 2015/10/01 08:54:13 Perhaps `ParsingContext`
Johnni Winther 2015/10/01 09:33:53 Added a TODO.
149 DiagnosticListener get listener;
150 void parsePatchClass(ClassElement cls);
151 measure(f());
152 }
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