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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.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 dart_backend; 5 part of dart_backend;
6 6
7 class LocalPlaceholder { 7 class LocalPlaceholder {
8 final String identifier; 8 final String identifier;
9 final Set<Node> nodes; 9 final Set<Node> nodes;
10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>(); 10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 visitAssert(node) { 107 visitAssert(node) {
108 visitStaticSend(node); 108 visitStaticSend(node);
109 } 109 }
110 110
111 visitStaticSend(Send node) { 111 visitStaticSend(Send node) {
112 final element = elements[node]; 112 final element = elements[node];
113 collector.backend.registerStaticSend(element, node); 113 collector.backend.registerStaticSend(element, node);
114 114
115 if (Elements.isUnresolved(element) 115 if (Elements.isUnresolved(element)
116 || identical(element, compiler.assertMethod)) { 116 || identical(element, compiler.assertMethod)
117 || element.isDeferredLoaderGetter()) {
117 return; 118 return;
118 } 119 }
119 if (element.isConstructor() || element.isFactoryConstructor()) { 120 if (element.isConstructor() || element.isFactoryConstructor()) {
120 // Rename named constructor in redirection position: 121 // Rename named constructor in redirection position:
121 // class C { C.named(); C.redirecting() : this.named(); } 122 // class C { C.named(); C.redirecting() : this.named(); }
122 if (node.receiver is Identifier 123 if (node.receiver is Identifier
123 && node.receiver.asIdentifier().isThis()) { 124 && node.receiver.asIdentifier().isThis()) {
124 assert(node.selector is Identifier); 125 assert(node.selector is Identifier);
125 collector.makeRedirectingConstructorPlaceholder(node.selector, element); 126 collector.makeRedirectingConstructorPlaceholder(node.selector, element);
126 } 127 }
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 634
634 visitBlock(Block node) { 635 visitBlock(Block node) {
635 for (Node statement in node.statements.nodes) { 636 for (Node statement in node.statements.nodes) {
636 if (statement is VariableDefinitions) { 637 if (statement is VariableDefinitions) {
637 makeVarDeclarationTypePlaceholder(statement); 638 makeVarDeclarationTypePlaceholder(statement);
638 } 639 }
639 } 640 }
640 node.visitChildren(this); 641 node.visitChildren(this);
641 } 642 }
642 } 643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698