| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 } else { | 363 } else { |
| 364 registry.registerDynamicInvocation(selector); | 364 registry.registerDynamicInvocation(selector); |
| 365 } | 365 } |
| 366 }); | 366 }); |
| 367 } | 367 } |
| 368 } | 368 } |
| 369 } | 369 } |
| 370 } | 370 } |
| 371 | 371 |
| 372 } | 372 } |
| 373 |
| 374 void registerMainHasArguments(Enqueuer enqueuer) { |
| 375 // The first argument could be a list of strings. |
| 376 enqueuer.registerInstantiatedClass( |
| 377 listImplementation, compiler.globalDependencies); |
| 378 enqueuer.registerInstantiatedClass( |
| 379 stringImplementation, compiler.globalDependencies); |
| 380 } |
| 373 } | 381 } |
| 374 | 382 |
| 375 class DartResolutionCallbacks extends ResolutionCallbacks { | 383 class DartResolutionCallbacks extends ResolutionCallbacks { |
| 376 final DartBackend backend; | 384 final DartBackend backend; |
| 377 | 385 |
| 378 DartResolutionCallbacks(this.backend); | 386 DartResolutionCallbacks(this.backend); |
| 379 | 387 |
| 380 void onTypeLiteral(DartType type, Registry registry) { | 388 void onTypeLiteral(DartType type, Registry registry) { |
| 381 if (type.isInterfaceType) { | 389 if (type.isInterfaceType) { |
| 382 backend.usedTypeLiterals.add(type.element); | 390 backend.usedTypeLiterals.add(type.element); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 } | 549 } |
| 542 | 550 |
| 543 void traceGraph(String title, var irObject) { | 551 void traceGraph(String title, var irObject) { |
| 544 compiler.tracer.traceGraph(title, irObject); | 552 compiler.tracer.traceGraph(title, irObject); |
| 545 } | 553 } |
| 546 | 554 |
| 547 DartTypes get dartTypes => compiler.types; | 555 DartTypes get dartTypes => compiler.types; |
| 548 | 556 |
| 549 InternalErrorFunction get internalError => compiler.internalError; | 557 InternalErrorFunction get internalError => compiler.internalError; |
| 550 } | 558 } |
| OLD | NEW |