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

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

Issue 548253003: First end-to-end capability in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 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
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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 void makeErasePrefixPlaceholder(Node node) { 333 void makeErasePrefixPlaceholder(Node node) {
334 assert(node is Identifier || node is Send); 334 assert(node is Identifier || node is Send);
335 prefixNodesToErase.add(node); 335 prefixNodesToErase.add(node);
336 } 336 }
337 337
338 void makeElementPlaceholder(Node node, Element element) { 338 void makeElementPlaceholder(Node node, Element element) {
339 assert(node != null); 339 assert(node != null);
340 assert(element != null); 340 assert(element != null);
341 LibraryElement library = element.library; 341 LibraryElement library = element.library;
342 if (identical(element, mainFunction)) return; 342 if (identical(element, mainFunction)) return;
343 if (library.canonicalUri == Compiler.DART_CORE) return; 343 if (library.isDartCore) return;
344 344
345 if (library.isPlatformLibrary && !element.isTopLevel) { 345 if (library.isPlatformLibrary && !element.isTopLevel) {
346 return; 346 return;
347 } 347 }
348 if (element.isGetter || element.isSetter) { 348 if (element.isGetter || element.isSetter) {
349 element = (element as FunctionElement).abstractField; 349 element = (element as FunctionElement).abstractField;
350 } 350 }
351 elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node); 351 elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node);
352 } 352 }
353 353
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 692
693 visitBlock(Block node) { 693 visitBlock(Block node) {
694 for (Node statement in node.statements.nodes) { 694 for (Node statement in node.statements.nodes) {
695 if (statement is VariableDefinitions) { 695 if (statement is VariableDefinitions) {
696 makeVarDeclarationTypePlaceholder(statement); 696 makeVarDeclarationTypePlaceholder(statement);
697 } 697 }
698 } 698 }
699 node.visitChildren(this); 699 node.visitChildren(this);
700 } 700 }
701 } 701 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698