has introducing Swift-implemented portions of Sema been discussed at any point? i know self-hosting as a generic goal has not been a thing that's been pushed for in the project (at least historically). i was specifically wondering if it might be feasible to introduce into the diagnostic passes a split like the SILOptimizer has where new passes are encouraged to be written in Swift. i haven't thought about it much, and maybe the 'pipeline nature' of the optimization passes may make it easier to split things off and set them up appropriately, but curious if anyone has more informed thoughts on this subject!
Yes, that's the plan. For now I think swiftc still builds without a swiftc installed, but that will no longer be possible once we switch over to swift-parser
and ASTGen
instead of the C++ parser. At that point it will make sense to rewrite mandatory passes and parts of the type checker in Swift too.
1 Like
to clarify – i'm assuming you're referring to the mandatory SILOptimizer passes; is that right? can those not be converted today for technical reasons, or is that a policy choice (or just no particular reason to do so, etc)?
I believe it's just to keep the compiler building without an existing swiftc for now. Not sure if that's policy or technical under your definition ;)
1 Like