-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lowering and interpreter support for :latestworld
#56523
Conversation
Split out from #56509 to facilitate adjusting downstream packages.
:worldinc
:latestworld
@vtjnash requested a rename to |
macro latestworld() Expr(:latestworld) end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be highly unsound and unsafe for this to appear anywhere in user code, so I don't know why we should have a macro and AST form of this IR effect. It is only something that should appear post-lowering in toplevel code (illegal in AST forms prelowering).
Also, eventually we need to add this to the verifier, so toplevel code doesn't cause that to error in debug mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a lowering error to but this anywhere but toplevel code - I don't see the unsoundness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay, yes that seems okay then. I guess I can see why you would want some macros to produce this in some circumstances (although :toplevel
may be preferred, sometimes it wants to use local variables that prevent using that form)
These were added in JuliaLang/julia#56523. This simply adds tracking for the world age to the interpreter, but does not use it for anything. JuliaInterpreter's current model of world age does not match Base anyway. We should fix that eventually, but it's probably easier to do that once JuliaLang/julia#56509 and binding partitions are merged.
* Handle `:latestworld` expr These were added in JuliaLang/julia#56523. This simply adds tracking for the world age to the interpreter, but does not use it for anything. JuliaInterpreter's current model of world age does not match Base anyway. We should fix that eventually, but it's probably easier to do that once JuliaLang/julia#56509 and binding partitions are merged. * 1.6 compat
Split out from #56509 to facilitate adjusting downstream packages.