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

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

Issue 1192103002: Support serialization of the compiler backbone. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 part of resolution; 5 part of resolution;
6 6
7 class InitializerResolver { 7 class InitializerResolver {
8 final ResolverVisitor visitor; 8 final ResolverVisitor visitor;
9 final Map<Element, Node> initialized; 9 final Map<Element, Node> initialized;
10 Link<Node> initializers; 10 Link<Node> initializers;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 || !lookedupConstructor.isGenerativeConstructor) { 175 || !lookedupConstructor.isGenerativeConstructor) {
176 String fullConstructorName = Elements.constructorNameForDiagnostics( 176 String fullConstructorName = Elements.constructorNameForDiagnostics(
177 className, 177 className,
178 constructorSelector.name); 178 constructorSelector.name);
179 MessageKind kind = isImplicitSuperCall 179 MessageKind kind = isImplicitSuperCall
180 ? MessageKind.CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT 180 ? MessageKind.CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT
181 : MessageKind.CANNOT_RESOLVE_CONSTRUCTOR; 181 : MessageKind.CANNOT_RESOLVE_CONSTRUCTOR;
182 visitor.compiler.reportError( 182 visitor.compiler.reportError(
183 diagnosticNode, kind, {'constructorName': fullConstructorName}); 183 diagnosticNode, kind, {'constructorName': fullConstructorName});
184 } else { 184 } else {
185 lookedupConstructor.computeSignature(visitor.compiler); 185 lookedupConstructor.computeType(visitor.compiler);
186 if (!call.signatureApplies(lookedupConstructor)) { 186 if (!call.signatureApplies(lookedupConstructor)) {
187 MessageKind kind = isImplicitSuperCall 187 MessageKind kind = isImplicitSuperCall
188 ? MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT 188 ? MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT
189 : MessageKind.NO_MATCHING_CONSTRUCTOR; 189 : MessageKind.NO_MATCHING_CONSTRUCTOR;
190 visitor.compiler.reportError(diagnosticNode, kind); 190 visitor.compiler.reportError(diagnosticNode, kind);
191 } else if (caller.isConst 191 } else if (caller.isConst
192 && !lookedupConstructor.isConst) { 192 && !lookedupConstructor.isConst) {
193 MessageKind kind = isImplicitSuperCall 193 MessageKind kind = isImplicitSuperCall
194 ? MessageKind.CONST_CALLS_NON_CONST_FOR_IMPLICIT 194 ? MessageKind.CONST_CALLS_NON_CONST_FOR_IMPLICIT
195 : MessageKind.CONST_CALLS_NON_CONST; 195 : MessageKind.CONST_CALLS_NON_CONST;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 return element; 468 return element;
469 } 469 }
470 470
471 /// Assumed to be called by [resolveRedirectingFactory]. 471 /// Assumed to be called by [resolveRedirectingFactory].
472 Element visitRedirectingFactoryBody(RedirectingFactoryBody node) { 472 Element visitRedirectingFactoryBody(RedirectingFactoryBody node) {
473 Node constructorReference = node.constructorReference; 473 Node constructorReference = node.constructorReference;
474 return finishConstructorReference(visit(constructorReference), 474 return finishConstructorReference(visit(constructorReference),
475 constructorReference, node); 475 constructorReference, node);
476 } 476 }
477 } 477 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698