forked from dart-lang/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cfe] Track dependencies in the incremental compiler
The objective of this CL is to allow the incremental compiler to track which dill input libraries it actually used (in order to - in a modular context - be able to ignore changes to dependencies we didn't really use). This is done by: * Making the dill library builder lazy (and mark if it has been used). * Making kernels class hierarchy record which classes it has been asked questions about. * Add special handling to redirecting factory constructors as they bypass the fasta-builders and directly use the kernel ast. Please note that: * This has to be enabled, but kernels class hierarchy always records which classes it was asked about (even if disabled, or not running though the incremental compiler). There might potentially be some overhead to this (though setting a bool to true is probably comparably cheap - we did just do a map lookup). * This was designed to be used together with modules (e.g. setModulesToLoadOnNextComputeDelta) - as used via for instance api_unstable/bazel_worker.dart. It might not function the way you'd expect in other circumstances. * The incremental compiler (potentially) gives you the full kernel tree despite not having marked all of those libraries as 'used'. If a client use such libraries it is the clients responsibility to take that into account when answering any questions about this libraries/dill files was used. * This feature works on the library level. In practice it is most likely needed at the dill-filename level. A translation from library to dill-filename is up to the client. * This is a new feature, and we cannot promise that 100% of actually used libraries are marked. If you find used but un-marked libraries please report a bug. Change-Id: I01d7ff95b9baac9550b77d8e09ea772d43173641 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107280 Commit-Queue: Jens Johansen <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
- Loading branch information
1 parent
afac6b1
commit 28f95fc
Showing
17 changed files
with
830 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.