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

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) {
karlklose 2014/03/17 14:05:00 Combine the conditions.
sigurdm 2014/03/19 12:46:30 I think you look at the wrong }.
sigurdm 2014/03/20 12:26:33 As you suggested I added an assertion if it is not
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 }
475 } 477 }
476 return _ensureTreeElements(element); 478 return _ensureTreeElements(element);
477 } 479 }
478 if (element.isPatched) { 480 if (element.isPatched) {
479 checkMatchingPatchSignatures(element, element.patch); 481 checkMatchingPatchSignatures(element, element.patch);
480 element = element.patch; 482 element = element.patch;
481 } 483 }
482 return compiler.withCurrentElement(element, () { 484 return compiler.withCurrentElement(element, () {
483 FunctionExpression tree = element.parseNode(compiler); 485 FunctionExpression tree = element.parseNode(compiler);
484 if (tree.modifiers.isExternal()) { 486 if (tree.modifiers.isExternal()) {
(...skipping 4201 matching lines...) Expand 10 before | Expand all | Expand 10 after
4686 TreeElements _treeElements; 4688 TreeElements _treeElements;
4687 4689
4688 bool get hasTreeElements => _treeElements != null; 4690 bool get hasTreeElements => _treeElements != null;
4689 4691
4690 TreeElements get treeElements { 4692 TreeElements get treeElements {
4691 assert(invariant(this, _treeElements !=null, 4693 assert(invariant(this, _treeElements !=null,
4692 message: "TreeElements have not been computed for $this.")); 4694 message: "TreeElements have not been computed for $this."));
4693 return _treeElements; 4695 return _treeElements;
4694 } 4696 }
4695 } 4697 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698