You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ast] Hide CapturedValue(OpaqueValueExpr *) so that it only can be used by TypeLowering.
The reason why I am doing this is before this commit despite the fact that
CapturedValue was only used by TypeLowering, this constructor was exposed to the
entire rest of the compiler. This made it so that other code (like the
AbstractClosureExpr::getIsolationCrossing() that I added in the previous series
of commits) would have to handle that API even though there was nothing to
handle just in case someone added something in the future.
Rather than create such a burden on the rest of the compiler, in this commit, we
instead hide said constructor and make it only accessible from
TypeLowering. This creates a barrier from new uses appearing in AST and make it
reasonable for code in the AST that will never see things from TypeLowering
(like the ACE API I mentioned above) just assert on that case without needing to
worry about additional uses cropping in easily by mistake.
0 commit comments