| 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 // TODO(ahe): This class is simply wrong. This backend should use | 7 // TODO(ahe): This class is simply wrong. This backend should use |
| 8 // elements when it can, not AST nodes. Perhaps a [Map<Element, | 8 // elements when it can, not AST nodes. Perhaps a [Map<Element, |
| 9 // TreeElements>] is what is needed. | 9 // TreeElements>] is what is needed. |
| 10 class ElementAst { | 10 class ElementAst { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 return false; | 354 return false; |
| 355 } | 355 } |
| 356 } | 356 } |
| 357 | 357 |
| 358 class DartResolutionCallbacks extends ResolutionCallbacks { | 358 class DartResolutionCallbacks extends ResolutionCallbacks { |
| 359 final DartBackend backend; | 359 final DartBackend backend; |
| 360 | 360 |
| 361 DartResolutionCallbacks(this.backend); | 361 DartResolutionCallbacks(this.backend); |
| 362 | 362 |
| 363 @override | 363 @override |
| 364 WorldImpact transformImpact(ResolutionWorldImpact worldImpact) { | 364 WorldImpact transformImpact(ResolutionImpact worldImpact) { |
| 365 TransformedWorldImpact transformed = | 365 TransformedWorldImpact transformed = |
| 366 new TransformedWorldImpact(worldImpact); | 366 new TransformedWorldImpact(worldImpact); |
| 367 for (DartType typeLiteral in worldImpact.typeLiterals) { | 367 for (DartType typeLiteral in worldImpact.typeLiterals) { |
| 368 if (typeLiteral.isInterfaceType) { | 368 if (typeLiteral.isInterfaceType) { |
| 369 backend.usedTypeLiterals.add(typeLiteral.element); | 369 backend.usedTypeLiterals.add(typeLiteral.element); |
| 370 } | 370 } |
| 371 } | 371 } |
| 372 for (InterfaceType instantiatedType in worldImpact.instantiatedTypes) { | 372 for (InterfaceType instantiatedType in worldImpact.instantiatedTypes) { |
| 373 // TODO(johnniwinther): Remove this when dependency tracking is done on | 373 // TODO(johnniwinther): Remove this when dependency tracking is done on |
| 374 // the world impact itself. | 374 // the world impact itself. |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 } | 556 } |
| 557 | 557 |
| 558 // TODO(johnniwinther): Remove this when values are computed from the | 558 // TODO(johnniwinther): Remove this when values are computed from the |
| 559 // expressions. | 559 // expressions. |
| 560 @override | 560 @override |
| 561 void copyConstantValues(DartConstantTask task) { | 561 void copyConstantValues(DartConstantTask task) { |
| 562 constantCompiler.constantValueMap.addAll( | 562 constantCompiler.constantValueMap.addAll( |
| 563 task.constantCompiler.constantValueMap); | 563 task.constantCompiler.constantValueMap); |
| 564 } | 564 } |
| 565 } | 565 } |
| OLD | NEW |