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

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

Issue 430913002: Better dependency tracking (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixed final critiques Created 6 years, 4 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 get currentElement; 8 Element get currentElement;
9 Setlet<Node> get superUses; 9 Setlet<Node> get superUses;
10 10
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 } 1856 }
1857 1857
1858 // Try to construct the type from the element. 1858 // Try to construct the type from the element.
1859 if (element == null) { 1859 if (element == null) {
1860 type = reportFailureAndCreateType( 1860 type = reportFailureAndCreateType(
1861 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.typeName}); 1861 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.typeName});
1862 } else if (element.isAmbiguous) { 1862 } else if (element.isAmbiguous) {
1863 AmbiguousElement ambiguous = element; 1863 AmbiguousElement ambiguous = element;
1864 type = reportFailureAndCreateType( 1864 type = reportFailureAndCreateType(
1865 ambiguous.messageKind, ambiguous.messageArguments); 1865 ambiguous.messageKind, ambiguous.messageArguments);
1866 ambiguous.diagnose(registry.currentElement, compiler); 1866 ambiguous.diagnose(registry.mapping.currentElement, compiler);
1867 } else if (element.isErroneous) { 1867 } else if (element.isErroneous) {
1868 ErroneousElement erroneousElement = element; 1868 ErroneousElement erroneousElement = element;
1869 type = reportFailureAndCreateType( 1869 type = reportFailureAndCreateType(
1870 erroneousElement.messageKind, erroneousElement.messageArguments, 1870 erroneousElement.messageKind, erroneousElement.messageArguments,
1871 erroneousElement: erroneousElement); 1871 erroneousElement: erroneousElement);
1872 } else if (!element.impliesType) { 1872 } else if (!element.impliesType) {
1873 type = reportFailureAndCreateType( 1873 type = reportFailureAndCreateType(
1874 MessageKind.NOT_A_TYPE, {'node': node.typeName}); 1874 MessageKind.NOT_A_TYPE, {'node': node.typeName});
1875 } else { 1875 } else {
1876 bool addTypeVariableBoundsCheck = false; 1876 bool addTypeVariableBoundsCheck = false;
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
2434 2434
2435 visitIf(If node) { 2435 visitIf(If node) {
2436 doInPromotionScope(node.condition.expression, () => visit(node.condition)); 2436 doInPromotionScope(node.condition.expression, () => visit(node.condition));
2437 doInPromotionScope(node.thenPart, 2437 doInPromotionScope(node.thenPart,
2438 () => visitIn(node.thenPart, new BlockScope(scope))); 2438 () => visitIn(node.thenPart, new BlockScope(scope)));
2439 visitIn(node.elsePart, new BlockScope(scope)); 2439 visitIn(node.elsePart, new BlockScope(scope));
2440 } 2440 }
2441 2441
2442 ResolutionResult resolveSend(Send node) { 2442 ResolutionResult resolveSend(Send node) {
2443 Selector selector = resolveSelector(node, null); 2443 Selector selector = resolveSelector(node, null);
2444 if (selector != null) {
2445 compiler.enqueuer.resolution.compilationInfo.registerCallSite(
2446 registry.mapping, node);
2447 }
2448
2449 if (node.isSuperCall) registry.registerSuperUse(node); 2444 if (node.isSuperCall) registry.registerSuperUse(node);
2450 2445
2451 if (node.receiver == null) { 2446 if (node.receiver == null) {
2452 // If this send is of the form "assert(expr);", then 2447 // If this send is of the form "assert(expr);", then
2453 // this is an assertion. 2448 // this is an assertion.
2454 if (selector.isAssert) { 2449 if (selector.isAssert) {
2455 if (selector.argumentCount != 1) { 2450 if (selector.argumentCount != 1) {
2456 error(node.selector, 2451 error(node.selector,
2457 MessageKind.WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT, 2452 MessageKind.WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT,
2458 {'argumentCount': selector.argumentCount}); 2453 {'argumentCount': selector.argumentCount});
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
4833 } 4828 }
4834 4829
4835 /// The result for the resolution of the `assert` method. 4830 /// The result for the resolution of the `assert` method.
4836 class AssertResult implements ResolutionResult { 4831 class AssertResult implements ResolutionResult {
4837 const AssertResult(); 4832 const AssertResult();
4838 4833
4839 Element get element => null; 4834 Element get element => null;
4840 4835
4841 String toString() => 'AssertResult()'; 4836 String toString() => 'AssertResult()';
4842 } 4837 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698