| 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 } | |
| 381 } | 373 } |
| 382 | 374 |
| 383 class DartResolutionCallbacks extends ResolutionCallbacks { | 375 class DartResolutionCallbacks extends ResolutionCallbacks { |
| 384 final DartBackend backend; | 376 final DartBackend backend; |
| 385 | 377 |
| 386 DartResolutionCallbacks(this.backend); | 378 DartResolutionCallbacks(this.backend); |
| 387 | 379 |
| 388 void onTypeLiteral(DartType type, Registry registry) { | 380 void onTypeLiteral(DartType type, Registry registry) { |
| 389 if (type.isInterfaceType) { | 381 if (type.isInterfaceType) { |
| 390 backend.usedTypeLiterals.add(type.element); | 382 backend.usedTypeLiterals.add(type.element); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 } | 541 } |
| 550 | 542 |
| 551 void traceGraph(String title, var irObject) { | 543 void traceGraph(String title, var irObject) { |
| 552 compiler.tracer.traceGraph(title, irObject); | 544 compiler.tracer.traceGraph(title, irObject); |
| 553 } | 545 } |
| 554 | 546 |
| 555 DartTypes get dartTypes => compiler.types; | 547 DartTypes get dartTypes => compiler.types; |
| 556 | 548 |
| 557 InternalErrorFunction get internalError => compiler.internalError; | 549 InternalErrorFunction get internalError => compiler.internalError; |
| 558 } | 550 } |
| OLD | NEW |