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

Unified 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, 3 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/resolution.dart
diff --git a/pkg/compiler/lib/src/common/resolution.dart b/pkg/compiler/lib/src/common/resolution.dart
index 86a21bd10afd65ab064488a894d3c5613006af02..1a998f3f04faff5b36b083c2e4d131722ee93cd0 100644
--- a/pkg/compiler/lib/src/common/resolution.dart
+++ b/pkg/compiler/lib/src/common/resolution.dart
@@ -1,3 +1,4 @@
+
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -6,18 +7,29 @@ library dart2js.common.resolution;
import '../compiler.dart' show
Compiler;
+import '../core_types.dart' show
+ CoreTypes;
import '../dart_types.dart' show
DartType;
+import '../diagnostics/diagnostic_listener.dart' show
+ DiagnosticListener;
import '../elements/elements.dart' show
AstElement,
+ ClassElement,
+ Element,
ErroneousElement,
+ FunctionElement,
+ FunctionSignature,
+ MetadataAnnotation,
+ TypedefElement,
TypeVariableElement;
import '../enqueue.dart' show
ResolutionEnqueuer,
WorldImpact;
import '../tree/tree.dart' show
AsyncForIn,
- Send;
+ Send,
+ TypeAnnotation;
import 'registry.dart' show
Registry;
import 'work.dart' show
@@ -120,3 +132,24 @@ class ResolutionCallbacks {
/// Called when resolving a prefix or postfix expression.
void onIncDecOperation(Registry registry) {}
}
+
+// TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`.
+abstract class Resolution {
+ Parsing get parsing;
+ DiagnosticListener get listener;
+ CoreTypes get coreTypes;
+
+ void resolveTypedef(TypedefElement typdef);
+ void resolveClass(ClassElement cls);
+ void registerClass(ClassElement cls);
+ void resolveMetadataAnnotation(MetadataAnnotation metadataAnnotation);
+ FunctionSignature resolveSignature(FunctionElement function);
+ DartType resolveTypeAnnotation(Element element, TypeAnnotation node);
+}
+
+// TODO(johnniwinther): Rename to `Parser` or `ParsingContext`.
+abstract class Parsing {
+ DiagnosticListener get listener;
+ void parsePatchClass(ClassElement cls);
+ measure(f());
+}
« 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