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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 } | 348 } |
349 } | 349 } |
350 | 350 |
351 @override | 351 @override |
352 bool enableDeferredLoadingIfSupported(Spannable node, Registry registry) { | 352 bool enableDeferredLoadingIfSupported(Spannable node, Registry registry) { |
353 // TODO(sigurdm): Implement deferred loading for dart2dart. | 353 // TODO(sigurdm): Implement deferred loading for dart2dart. |
354 reporter.reportWarningMessage( | 354 reporter.reportWarningMessage( |
355 node, MessageKind.DEFERRED_LIBRARY_DART_2_DART); | 355 node, MessageKind.DEFERRED_LIBRARY_DART_2_DART); |
356 return false; | 356 return false; |
357 } | 357 } |
| 358 |
| 359 @override |
| 360 Uri resolvePatchUri(String libraryName, Uri) { |
| 361 // Dart2dart does not use patches. |
| 362 return null; |
| 363 } |
358 } | 364 } |
359 | 365 |
360 class DartImpactTransformer extends ImpactTransformer { | 366 class DartImpactTransformer extends ImpactTransformer { |
361 final DartBackend backend; | 367 final DartBackend backend; |
362 | 368 |
363 DartImpactTransformer(this.backend); | 369 DartImpactTransformer(this.backend); |
364 | 370 |
365 @override | 371 @override |
366 WorldImpact transformResolutionImpact(ResolutionImpact worldImpact) { | 372 WorldImpact transformResolutionImpact(ResolutionImpact worldImpact) { |
367 TransformedWorldImpact transformed = | 373 TransformedWorldImpact transformed = |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 } | 564 } |
559 | 565 |
560 // TODO(johnniwinther): Remove this when values are computed from the | 566 // TODO(johnniwinther): Remove this when values are computed from the |
561 // expressions. | 567 // expressions. |
562 @override | 568 @override |
563 void copyConstantValues(DartConstantTask task) { | 569 void copyConstantValues(DartConstantTask task) { |
564 constantCompiler.constantValueMap.addAll( | 570 constantCompiler.constantValueMap.addAll( |
565 task.constantCompiler.constantValueMap); | 571 task.constantCompiler.constantValueMap); |
566 } | 572 } |
567 } | 573 } |
OLD | NEW |