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

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: Rebased 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 361 }
362 362
363 TreeElements resolveField(VariableElement element) { 363 TreeElements resolveField(VariableElement element) {
364 Node tree = element.parseNode(compiler); 364 Node tree = element.parseNode(compiler);
365 if(element.modifiers.isStatic() && element.variables.isTopLevel()) { 365 if(element.modifiers.isStatic() && element.variables.isTopLevel()) {
366 error(element.modifiers.getStatic(), 366 error(element.modifiers.getStatic(),
367 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC); 367 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC);
368 } 368 }
369 ResolverVisitor visitor = visitorFor(element); 369 ResolverVisitor visitor = visitorFor(element);
370 initializerDo(tree, visitor.visit); 370 initializerDo(tree, visitor.visit);
371
372 // Perform various checks as side effect of "computing" the type.
373 element.computeType(compiler);
374
371 return visitor.mapping; 375 return visitor.mapping;
372 } 376 }
373 377
374 TreeElements resolveParameter(Element element) { 378 TreeElements resolveParameter(Element element) {
375 Node tree = element.parseNode(compiler); 379 Node tree = element.parseNode(compiler);
376 ResolverVisitor visitor = visitorFor(element.enclosingElement); 380 ResolverVisitor visitor = visitorFor(element.enclosingElement);
377 initializerDo(tree, visitor.visit); 381 initializerDo(tree, visitor.visit);
378 return visitor.mapping; 382 return visitor.mapping;
379 } 383 }
380 384
(...skipping 3214 matching lines...) Expand 10 before | Expand all | Expand 10 after
3595 return e; 3599 return e;
3596 } 3600 }
3597 3601
3598 /// Assumed to be called by [resolveRedirectingFactory]. 3602 /// Assumed to be called by [resolveRedirectingFactory].
3599 Element visitReturn(Return node) { 3603 Element visitReturn(Return node) {
3600 Node expression = node.expression; 3604 Node expression = node.expression;
3601 return finishConstructorReference(visit(expression), 3605 return finishConstructorReference(visit(expression),
3602 expression, expression); 3606 expression, expression);
3603 } 3607 }
3604 } 3608 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/dart2js.dart ('k') | tests/compiler/dart2js/analyze_only_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698