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

Unified Diff: pkg/compiler/lib/src/closure.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 | « no previous file | pkg/compiler/lib/src/common/resolution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/closure.dart
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index 0f8f218349210af203eaacf058fd2c03c3d5a11f..63c15f1e92d07ff8b3e313423bbf25f7a244f5a0 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -6,6 +6,9 @@ library closureToClassMapper;
import 'common/names.dart' show
Identifiers;
+import 'common/resolution.dart' show
+ Parsing,
+ Resolution;
import 'common/tasks.dart' show
CompilerTask;
import 'compiler.dart' show
@@ -140,7 +143,7 @@ class ClosureFieldElement extends ElementX
bool get isInstanceMember => true;
bool get isAssignable => false;
- DartType computeType(Compiler compiler) => type;
+ DartType computeType(Resolution resolution) => type;
DartType get type {
if (local is LocalElement) {
@@ -197,7 +200,7 @@ class ClosureClassElement extends ClassElementX {
ClassElement superclass = methodElement.isInstanceMember
? backend.boundClosureClass
: backend.closureClass;
- superclass.ensureResolved(compiler);
+ superclass.ensureResolved(compiler.resolution);
supertype = superclass.thisType;
interfaces = const Link<DartType>();
thisType = rawType = new InterfaceType(this);
@@ -219,7 +222,7 @@ class ClosureClassElement extends ClassElementX {
Token get position => node.getBeginToken();
- Node parseNode(DiagnosticListener listener) => node;
+ Node parseNode(Parsing parsing) => node;
// A [ClosureClassElement] is nested inside a function or initializer in terms
// of [enclosingElement], but still has to be treated as a top-level
@@ -252,7 +255,7 @@ class BoxFieldElement extends ElementX
: this.box = box,
super(name, ElementKind.FIELD, box.executableContext);
- DartType computeType(Compiler compiler) => type;
+ DartType computeType(Resolution resolution) => type;
DartType get type => variableElement.type;
@@ -332,7 +335,7 @@ class SynthesizedCallMethodElementX extends BaseFunctionElementX
FunctionExpression get node => expression.node;
- FunctionExpression parseNode(DiagnosticListener listener) => node;
+ FunctionExpression parseNode(Parsing parsing) => node;
ResolvedAst get resolvedAst {
return new ResolvedAst(this, node, treeElements);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698