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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 } else { | 305 } else { |
306 registry.registerDynamicInvocation(selector); | 306 registry.registerDynamicInvocation(selector); |
307 } | 307 } |
308 }); | 308 }); |
309 } | 309 } |
310 } | 310 } |
311 } | 311 } |
312 } | 312 } |
313 | 313 |
314 } | 314 } |
| 315 |
| 316 @override |
| 317 bool registerDeferredLoading(Spannable node, Registry registry) { |
| 318 // TODO(sigurdm): Implement deferred loading for dart2dart. |
| 319 compiler.reportWarning(node, MessageKind.DEFERRED_LIBRARY_DART_2_DART); |
| 320 return false; |
| 321 } |
315 } | 322 } |
316 | 323 |
317 class DartResolutionCallbacks extends ResolutionCallbacks { | 324 class DartResolutionCallbacks extends ResolutionCallbacks { |
318 final DartBackend backend; | 325 final DartBackend backend; |
319 | 326 |
320 DartResolutionCallbacks(this.backend); | 327 DartResolutionCallbacks(this.backend); |
321 | 328 |
322 void onTypeLiteral(DartType type, Registry registry) { | 329 void onTypeLiteral(DartType type, Registry registry) { |
323 if (type.isInterfaceType) { | 330 if (type.isInterfaceType) { |
324 backend.usedTypeLiterals.add(type.element); | 331 backend.usedTypeLiterals.add(type.element); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 class _ElementAstCreationContext implements ElementAstCreationContext { | 517 class _ElementAstCreationContext implements ElementAstCreationContext { |
511 final Compiler compiler; | 518 final Compiler compiler; |
512 final ConstantSystem constantSystem; | 519 final ConstantSystem constantSystem; |
513 | 520 |
514 _ElementAstCreationContext(this.compiler, this.constantSystem); | 521 _ElementAstCreationContext(this.compiler, this.constantSystem); |
515 | 522 |
516 DartTypes get dartTypes => compiler.types; | 523 DartTypes get dartTypes => compiler.types; |
517 | 524 |
518 InternalErrorFunction get internalError => compiler.internalError; | 525 InternalErrorFunction get internalError => compiler.internalError; |
519 } | 526 } |
OLD | NEW |