OLD | NEW |
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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 } | 321 } |
322 | 322 |
323 void makeElementPlaceholder(Node node, Element element) { | 323 void makeElementPlaceholder(Node node, Element element) { |
324 assert(node != null); | 324 assert(node != null); |
325 assert(element != null); | 325 assert(element != null); |
326 if (identical(element, entryFunction)) return; | 326 if (identical(element, entryFunction)) return; |
327 if (identical(element.library, coreLibrary)) return; | 327 if (identical(element.library, coreLibrary)) return; |
328 if (element.library.isPlatformLibrary && !element.isTopLevel) { | 328 if (element.library.isPlatformLibrary && !element.isTopLevel) { |
329 return; | 329 return; |
330 } | 330 } |
331 if (element == compiler.dynamicClass) { | |
332 return; | |
333 } | |
334 elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node); | 331 elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node); |
335 } | 332 } |
336 | 333 |
337 void makePrivateIdentifier(Identifier node) { | 334 void makePrivateIdentifier(Identifier node) { |
338 assert(node != null); | 335 assert(node != null); |
339 privateNodes.putIfAbsent( | 336 privateNodes.putIfAbsent( |
340 currentElement.library, () => new Set<Identifier>()).add(node); | 337 currentElement.library, () => new Set<Identifier>()).add(node); |
341 } | 338 } |
342 | 339 |
343 void makeUnresolvedPlaceholder(Node node) { | 340 void makeUnresolvedPlaceholder(Node node) { |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 | 593 |
597 visitBlock(Block node) { | 594 visitBlock(Block node) { |
598 for (Node statement in node.statements.nodes) { | 595 for (Node statement in node.statements.nodes) { |
599 if (statement is VariableDefinitions) { | 596 if (statement is VariableDefinitions) { |
600 makeVarDeclarationTypePlaceholder(statement); | 597 makeVarDeclarationTypePlaceholder(statement); |
601 } | 598 } |
602 } | 599 } |
603 node.visitChildren(this); | 600 node.visitChildren(this); |
604 } | 601 } |
605 } | 602 } |
OLD | NEW |