mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Just as with conformances, we can detect that a delayed function needs to be added to the queue from 'first principles' rather than walking the ExternalDefinitions list. This completely eliminates the ExternalDefinitions walk from SILGen, which has several advantages: - It fixes a source of quadratic behavior. In batch mode, type checking produces a list of external definitions shared across all primary files. Then, SILGen runs once per primary file, building a delayed emission map every time. - It allows SILGen to emit external definitions which only come into existence as a result of lazy conformance checking. Previously, anything that was added after SILGen performed its walk over the external definitions list would not be emitted.
64 KiB
64 KiB