Skip to content
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

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Conversation

Keno
Copy link
Member

@Keno Keno commented Nov 11, 2024

Split out from #56509 to facilitate adjusting downstream packages.

Split out from #56509 to facilitate adjusting downstream packages.
@Keno Keno changed the title Add lowering and interpreter support for :worldinc Add lowering and interpreter support for :latestworld Nov 12, 2024
@Keno
Copy link
Member Author

Keno commented Nov 12, 2024

@vtjnash requested a rename to :latestworld

@Keno Keno merged commit 505907b into master Nov 12, 2024
8 checks passed
@Keno Keno deleted the kf/worldincprepare branch November 12, 2024 22:35
Comment on lines +274 to +275
macro latestworld() Expr(:latestworld) end

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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)

Keno added a commit to JuliaDebug/JuliaInterpreter.jl that referenced this pull request Nov 14, 2024
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.
Keno added a commit to JuliaDebug/JuliaInterpreter.jl that referenced this pull request Nov 14, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants