| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 void makeElementPlaceholder(Identifier node, Element element) { | 334 void makeElementPlaceholder(Identifier node, Element element) { |
| 335 assert(element != null); | 335 assert(element != null); |
| 336 if (identical(element, entryFunction)) return; | 336 if (identical(element, entryFunction)) return; |
| 337 if (identical(element.getLibrary(), coreLibrary)) return; | 337 if (identical(element.getLibrary(), coreLibrary)) return; |
| 338 if (element.getLibrary().isPlatformLibrary && !element.isTopLevel()) { | 338 if (element.getLibrary().isPlatformLibrary && !element.isTopLevel()) { |
| 339 return; | 339 return; |
| 340 } | 340 } |
| 341 if (element == compiler.types.dynamicType.element) { | 341 if (element == compiler.types.dynamicType.element) { |
| 342 internalError( | 342 internalError( |
| 343 'Should never make element placeholder for dynamic type element', | 343 'Should never make element placeholder for dynamic type element', |
| 344 node); | 344 node: node); |
| 345 } | 345 } |
| 346 elementNodes.putIfAbsent(element, () => new Set<Identifier>()).add(node); | 346 elementNodes.putIfAbsent(element, () => new Set<Identifier>()).add(node); |
| 347 } | 347 } |
| 348 | 348 |
| 349 void makePrivateIdentifier(Identifier node) { | 349 void makePrivateIdentifier(Identifier node) { |
| 350 assert(node != null); | 350 assert(node != null); |
| 351 privateNodes.putIfAbsent( | 351 privateNodes.putIfAbsent( |
| 352 currentElement.getLibrary(), () => new Set<Identifier>()).add(node); | 352 currentElement.getLibrary(), () => new Set<Identifier>()).add(node); |
| 353 } | 353 } |
| 354 | 354 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 | 638 |
| 639 visitBlock(Block node) { | 639 visitBlock(Block node) { |
| 640 for (Node statement in node.statements.nodes) { | 640 for (Node statement in node.statements.nodes) { |
| 641 if (statement is VariableDefinitions) { | 641 if (statement is VariableDefinitions) { |
| 642 makeVarDeclarationTypePlaceholder(statement); | 642 makeVarDeclarationTypePlaceholder(statement); |
| 643 } | 643 } |
| 644 } | 644 } |
| 645 node.visitChildren(this); | 645 node.visitChildren(this); |
| 646 } | 646 } |
| 647 } | 647 } |
| OLD | NEW |