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

Unified Diff: pkg/compiler/lib/src/resolution/constructors.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
Index: pkg/compiler/lib/src/resolution/constructors.dart
diff --git a/pkg/compiler/lib/src/resolution/constructors.dart b/pkg/compiler/lib/src/resolution/constructors.dart
index 94dcc5257ba9fd9b352f4cb3af1e87ec9345a2d4..7612b0db259867231400fe14743efd08b0f27a15 100644
--- a/pkg/compiler/lib/src/resolution/constructors.dart
+++ b/pkg/compiler/lib/src/resolution/constructors.dart
@@ -92,7 +92,7 @@ class InitializerResolver {
if (initialized.containsKey(field)) {
reportDuplicateInitializerError(field, init, initialized[field]);
} else if (field.isFinal) {
- field.parseNode(visitor.compiler);
+ field.parseNode(visitor.resolution.parsing);
Expression initializer = field.initializer;
if (initializer != null) {
reportDuplicateInitializerError(field, init, initializer);
@@ -268,7 +268,7 @@ class InitializerResolver {
diagnosticNode, kind, {'constructorName': fullConstructorName});
isValidAsConstant = false;
} else {
- lookedupConstructor.computeType(visitor.compiler);
+ lookedupConstructor.computeType(visitor.resolution);
if (!call.signatureApplies(lookedupConstructor.functionSignature)) {
MessageKind kind = isImplicitSuperCall
? MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT
@@ -481,7 +481,7 @@ class ConstructorResolver extends CommonResolverVisitor<ConstructorResult> {
Node diagnosticNode,
String constructorName) {
ClassElement cls = type.element;
- cls.ensureResolved(compiler);
+ cls.ensureResolved(resolution);
ConstructorElement constructor = findConstructor(
resolver.enclosingElement.library, cls, constructorName);
if (constructor == null) {
@@ -641,13 +641,13 @@ class ConstructorResolver extends CommonResolverVisitor<ConstructorResult> {
return constructorResultForErroneous(node, element);
} else if (element.isClass) {
ClassElement cls = element;
- cls.computeType(compiler);
+ cls.computeType(resolution);
return constructorResultForType(node, cls.rawType);
} else if (element.isPrefix) {
return new ConstructorResult.forElement(element);
} else if (element.isTypedef) {
TypedefElement typdef = element;
- typdef.ensureResolved(compiler);
+ typdef.ensureResolved(resolution);
return constructorResultForType(node, typdef.rawType);
} else if (element.isTypeVariable) {
TypeVariableElement typeVariableElement = element;
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_members.dart ('k') | pkg/compiler/lib/src/resolution/enum_creator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698