mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:20:31 +00:00
ed8e4255a4
TL;DR: Unbind canonical names doesn't do what you think it does and probably shouldn't (ever) be used. This CL stops using it in a few places. Longer version: When loading a dill file it: - First loads the table of canonical names. These have no references yet. - When a canonical name is asked for its reference it creates one if it doesn't yet have one. - When loading, for instance, a library, it asks for the reference. When unbinding a canonical name: - It removes itself (the canonical name) from the reference - It removes the reference in itself - Note: Whatever has a pointer to the reference keeps it, and the reference points to whatever node it already pointed to. This also means, that if we have a dill file that's split in two and: - Load #1 - Load #2 that works fine, but if we - Load #1 - Unbind canonical names - Binds canonical names - Load #2 stuff is not bound correctly (and an error is thrown). And - the cause of this bug: - Load #1 - Load #2 everything is fine - Unbind canonical names - Binds canonical names - Load #2' stuff is not bound correctly --- references points to stuff loaded as #2, not as #2'. On top of being weird, wrong and confusing it also caused wrong things to be but into the class hierarchy which ultimatly caused the crash. This CL fixes it by not calling unbind and force loading of dill files (at specific call sites) to create new libraries (and in the process overwriting references ".node"). Revert "[dartdevc] Retry ddc incremental compile on crash" This reverts commit |
||
---|---|---|
.. | ||
analysis_server | ||
bazel | ||
compiler | ||
dartanalyzer | ||
dartdevc | ||
dartdoc | ||
dartfmt | ||
gen_kernel | ||
kernel-service | ||
peg | ||
pub | ||
tests/peg | ||
application_snapshot.gni | ||
compile_platform.gni | ||
create_timestamp.gni | ||
generate_patch_sdk.gni |