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 '../compiler.dart' show | 9 import '../compiler.dart' show |
10 Compiler; | 10 Compiler; |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 /// [recentClasses], but every class seen by the [enqueuer] will be present in | 336 /// [recentClasses], but every class seen by the [enqueuer] will be present in |
337 /// [recentClasses] at least once. | 337 /// [recentClasses] at least once. |
338 bool onQueueEmpty(Enqueuer enqueuer, Iterable<ClassElement> recentClasses) { | 338 bool onQueueEmpty(Enqueuer enqueuer, Iterable<ClassElement> recentClasses) { |
339 return true; | 339 return true; |
340 } | 340 } |
341 | 341 |
342 /// Called after the queue is closed. [onQueueEmpty] may be called multiple | 342 /// Called after the queue is closed. [onQueueEmpty] may be called multiple |
343 /// times, but [onQueueClosed] is only called once. | 343 /// times, but [onQueueClosed] is only called once. |
344 void onQueueClosed() {} | 344 void onQueueClosed() {} |
345 | 345 |
346 /// Called when the compiler starts running the codegen enqueuer. | |
347 void onCodegenStart() {} | |
348 | |
349 /// Called after [element] has been resolved. | 346 /// Called after [element] has been resolved. |
350 // TODO(johnniwinther): Change [TreeElements] to [Registry] or a dependency | 347 // TODO(johnniwinther): Change [TreeElements] to [Registry] or a dependency |
351 // node. [elements] is currently unused by the implementation. | 348 // node. [elements] is currently unused by the implementation. |
352 void onElementResolved(Element element, TreeElements elements) {} | 349 void onElementResolved(Element element, TreeElements elements) {} |
353 | 350 |
354 // Does this element belong in the output | 351 // Does this element belong in the output |
355 bool shouldOutput(Element element) => true; | 352 bool shouldOutput(Element element) => true; |
356 | 353 |
357 FunctionElement helperForBadMain() => null; | 354 FunctionElement helperForBadMain() => null; |
358 | 355 |
359 FunctionElement helperForMissingMain() => null; | 356 FunctionElement helperForMissingMain() => null; |
360 | 357 |
361 FunctionElement helperForMainArity() => null; | 358 FunctionElement helperForMainArity() => null; |
362 | 359 |
363 void forgetElement(Element element) {} | 360 void forgetElement(Element element) {} |
364 | 361 |
365 void registerMainHasArguments(Enqueuer enqueuer) {} | 362 void registerMainHasArguments(Enqueuer enqueuer) {} |
366 | 363 |
367 void registerAsyncMarker(FunctionElement element, | 364 void registerAsyncMarker(FunctionElement element, |
368 Enqueuer enqueuer, | 365 Enqueuer enqueuer, |
369 Registry registry) {} | 366 Registry registry) {} |
370 } | 367 } |
371 | 368 |
OLD | NEW |