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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 23825007: Reapply r27285: "Support dynamic as type literal." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 3 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/namer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 } 307 }
308 308
309 void makeElementPlaceholder(Node node, Element element) { 309 void makeElementPlaceholder(Node node, Element element) {
310 assert(element != null); 310 assert(element != null);
311 if (identical(element, entryFunction)) return; 311 if (identical(element, entryFunction)) return;
312 if (identical(element.getLibrary(), coreLibrary)) return; 312 if (identical(element.getLibrary(), coreLibrary)) return;
313 if (element.getLibrary().isPlatformLibrary && !element.isTopLevel()) { 313 if (element.getLibrary().isPlatformLibrary && !element.isTopLevel()) {
314 return; 314 return;
315 } 315 }
316 if (element == compiler.dynamicClass) { 316 if (element == compiler.dynamicClass) {
317 internalError( 317 return;
318 'Should never make element placeholder for dynamic type element',
319 node: node);
320 } 318 }
321 elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node); 319 elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node);
322 } 320 }
323 321
324 void makePrivateIdentifier(Identifier node) { 322 void makePrivateIdentifier(Identifier node) {
325 assert(node != null); 323 assert(node != null);
326 privateNodes.putIfAbsent( 324 privateNodes.putIfAbsent(
327 currentElement.getLibrary(), () => new Set<Identifier>()).add(node); 325 currentElement.getLibrary(), () => new Set<Identifier>()).add(node);
328 } 326 }
329 327
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 622
625 visitBlock(Block node) { 623 visitBlock(Block node) {
626 for (Node statement in node.statements.nodes) { 624 for (Node statement in node.statements.nodes) {
627 if (statement is VariableDefinitions) { 625 if (statement is VariableDefinitions) {
628 makeVarDeclarationTypePlaceholder(statement); 626 makeVarDeclarationTypePlaceholder(statement);
629 } 627 }
630 } 628 }
631 node.visitChildren(this); 629 node.visitChildren(this);
632 } 630 }
633 } 631 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698