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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 11882017: Add --analyze-only flag to dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add analyze_only_test Created 7 years, 11 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 | Annotate | Revision Log
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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element operator[](Node node); 8 Element operator[](Node node);
9 Selector getSelector(Send send); 9 Selector getSelector(Send send);
10 DartType getType(Node node); 10 DartType getType(Node node);
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 346
347 TreeElements resolveField(VariableElement element) { 347 TreeElements resolveField(VariableElement element) {
348 Node tree = element.parseNode(compiler); 348 Node tree = element.parseNode(compiler);
349 if(element.modifiers.isStatic() && element.variables.isTopLevel()) { 349 if(element.modifiers.isStatic() && element.variables.isTopLevel()) {
350 error(element.modifiers.getStatic(), 350 error(element.modifiers.getStatic(),
351 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC); 351 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC);
352 } 352 }
353 ResolverVisitor visitor = visitorFor(element); 353 ResolverVisitor visitor = visitorFor(element);
354 initializerDo(tree, visitor.visit); 354 initializerDo(tree, visitor.visit);
355
356 // Perform various checks as side effect of "computing" the type.
357 element.computeType(compiler);
358
355 return visitor.mapping; 359 return visitor.mapping;
356 } 360 }
357 361
358 TreeElements resolveParameter(Element element) { 362 TreeElements resolveParameter(Element element) {
359 Node tree = element.parseNode(compiler); 363 Node tree = element.parseNode(compiler);
360 ResolverVisitor visitor = visitorFor(element.enclosingElement); 364 ResolverVisitor visitor = visitorFor(element.enclosingElement);
361 initializerDo(tree, visitor.visit); 365 initializerDo(tree, visitor.visit);
362 return visitor.mapping; 366 return visitor.mapping;
363 } 367 }
364 368
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after
3538 return e; 3542 return e;
3539 } 3543 }
3540 3544
3541 /// Assumed to be called by [resolveRedirectingFactory]. 3545 /// Assumed to be called by [resolveRedirectingFactory].
3542 Element visitReturn(Return node) { 3546 Element visitReturn(Return node) {
3543 Node expression = node.expression; 3547 Node expression = node.expression;
3544 return finishConstructorReference(visit(expression), 3548 return finishConstructorReference(visit(expression),
3545 expression, expression); 3549 expression, expression);
3546 } 3550 }
3547 } 3551 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698