mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
For now this will only be used for HopToMainActorIfNeeded thunks. I am creating this now since in the past there has only been one option for creating thunks... to create the thunk in SILGen using SILGenThunk. This code is hard to test and there is a lot of it. By using an instruction here we get a few benefits: 1. We decouple SILGen from needing to generate new kinds of thunks. This means that SILGenThunk does not need to expand to handle more thunks. 2. All thunks implemented via ThunkInst will be easy to test in a decoupled way with SIL tests. 3. Even though this stabilizes the patient, we still have many thunks in SILGen and various parts of the compiler. Over time, we can swap to this model, allowing us to hopefully eventually delete SILGenThunk.
82 KiB
82 KiB