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

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

Issue 201613006: Introduces the new syntax for deferred loading (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 compiler.enqueuer.resolution.getCachedElements(element); 457 compiler.enqueuer.resolution.getCachedElements(element);
458 if (elements != null) { 458 if (elements != null) {
459 // TODO(karlklose): Remove the check for [isConstructor]. [elememts] 459 // TODO(karlklose): Remove the check for [isConstructor]. [elememts]
460 // should never be non-null, not even for constructors. 460 // should never be non-null, not even for constructors.
461 assert(invariant(element, element.isConstructor(), 461 assert(invariant(element, element.isConstructor(),
462 message: 'Non-constructor element $element ' 462 message: 'Non-constructor element $element '
463 'has already been analyzed.')); 463 'has already been analyzed.'));
464 return elements; 464 return elements;
465 } 465 }
466 if (element.isSynthesized) { 466 if (element.isSynthesized) {
467 Element target = element.targetConstructor; 467 if (isConstructor) {
468 // Ensure the signature of the synthesized element is 468 Element target = element.targetConstructor;
469 // resolved. This is the only place where the resolver is 469 // Ensure the signature of the synthesized element is
470 // seeing this element. 470 // resolved. This is the only place where the resolver is
471 element.computeSignature(compiler); 471 // seeing this element.
472 if (!target.isErroneous()) { 472 element.computeSignature(compiler);
473 compiler.enqueuer.resolution.registerStaticUse( 473 if (!target.isErroneous()) {
474 element.targetConstructor); 474 compiler.enqueuer.resolution.registerStaticUse(
475 element.targetConstructor);
476 }
477 } else {
478 assert(element.isDeferredLoaderGetter());
475 } 479 }
476 return _ensureTreeElements(element); 480 return _ensureTreeElements(element);
477 } 481 }
478 if (element.isPatched) { 482 if (element.isPatched) {
479 checkMatchingPatchSignatures(element, element.patch); 483 checkMatchingPatchSignatures(element, element.patch);
480 element = element.patch; 484 element = element.patch;
481 } 485 }
482 return compiler.withCurrentElement(element, () { 486 return compiler.withCurrentElement(element, () {
483 FunctionExpression tree = element.parseNode(compiler); 487 FunctionExpression tree = element.parseNode(compiler);
484 if (tree.modifiers.isExternal()) { 488 if (tree.modifiers.isExternal()) {
(...skipping 4201 matching lines...) Expand 10 before | Expand all | Expand 10 after
4686 TreeElements _treeElements; 4690 TreeElements _treeElements;
4687 4691
4688 bool get hasTreeElements => _treeElements != null; 4692 bool get hasTreeElements => _treeElements != null;
4689 4693
4690 TreeElements get treeElements { 4694 TreeElements get treeElements {
4691 assert(invariant(this, _treeElements !=null, 4695 assert(invariant(this, _treeElements !=null,
4692 message: "TreeElements have not been computed for $this.")); 4696 message: "TreeElements have not been computed for $this."));
4693 return _treeElements; 4697 return _treeElements;
4694 } 4698 }
4695 } 4699 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698