| 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 library dart2js.backend_api; | 5 library dart2js.backend_api; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/codegen.dart' show CodegenImpact; | 10 import '../common/codegen.dart' show CodegenImpact; |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 } | 354 } |
| 355 | 355 |
| 356 /// Called after the queue is closed. [onQueueEmpty] may be called multiple | 356 /// Called after the queue is closed. [onQueueEmpty] may be called multiple |
| 357 /// times, but [onQueueClosed] is only called once. | 357 /// times, but [onQueueClosed] is only called once. |
| 358 void onQueueClosed() {} | 358 void onQueueClosed() {} |
| 359 | 359 |
| 360 /// Called when the compiler starts running the codegen enqueuer. | 360 /// Called when the compiler starts running the codegen enqueuer. |
| 361 void onCodegenStart() {} | 361 void onCodegenStart() {} |
| 362 | 362 |
| 363 /// Called after [element] has been resolved. | 363 /// Called after [element] has been resolved. |
| 364 // TODO(johnniwinther): Change [TreeElements] to [Registry] or a dependency | 364 void onElementResolved(Element element) {} |
| 365 // node. [elements] is currently unused by the implementation. | |
| 366 void onElementResolved(Element element, TreeElements elements) {} | |
| 367 | 365 |
| 368 // Does this element belong in the output | 366 // Does this element belong in the output |
| 369 bool shouldOutput(Element element) => true; | 367 bool shouldOutput(Element element) => true; |
| 370 | 368 |
| 371 FunctionElement helperForBadMain() => null; | 369 FunctionElement helperForBadMain() => null; |
| 372 | 370 |
| 373 FunctionElement helperForMissingMain() => null; | 371 FunctionElement helperForMissingMain() => null; |
| 374 | 372 |
| 375 FunctionElement helperForMainArity() => null; | 373 FunctionElement helperForMainArity() => null; |
| 376 | 374 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 } | 426 } |
| 429 } | 427 } |
| 430 | 428 |
| 431 /// Interface for serialization of backend specific data. | 429 /// Interface for serialization of backend specific data. |
| 432 class BackendSerialization { | 430 class BackendSerialization { |
| 433 const BackendSerialization(); | 431 const BackendSerialization(); |
| 434 | 432 |
| 435 SerializerPlugin get serializer => const SerializerPlugin(); | 433 SerializerPlugin get serializer => const SerializerPlugin(); |
| 436 DeserializerPlugin get deserializer => const DeserializerPlugin(); | 434 DeserializerPlugin get deserializer => const DeserializerPlugin(); |
| 437 } | 435 } |
| OLD | NEW |