-
-
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
Split reflection into compiler-dependent and compiler-independent pieces #56185
Conversation
32773ea
to
c6d5c28
Compare
base/reflection2.jl
Outdated
!!! compat "Julia 1.10" | ||
The additional syntax is supported as of Julia 1.10. | ||
""" | ||
macro invoke(ex) |
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.
@invoke
and @invokelatest
should probably live in base/reflection.jl
?
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.
Currently calls into Compiler for spurious reasons. Could be changed, but let's do that in a separate commit.
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.
Ok👌
base/Base.jl
Outdated
@@ -174,6 +174,7 @@ include("ctypes.jl") | |||
include("gcutils.jl") | |||
include("generator.jl") | |||
include("reflection.jl") | |||
include("reflection2.jl") |
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.
@aviatesk proposed renaming to compiler_reflection.jl, which seems reasonable to me.
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.
Perhaps we should instead rename reflection.jl
to internals.jl
. I think that would be a better description of what it actually does: Provide accessors to various internal julia data structures.
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.
internals.jl
sounds reasonable to me.
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.
Will rename accordingly.
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.
Something compiler_internals.jl
would be better imo.
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 not compiler internals though, it's internals of like method tables and other runtime datastructures.
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.
Right, this is more runtime_internals.jl
or cache_internals.jl
?
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.
Ok, my point was mostly xxx_internals.jl
.
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.
I'm ok with runtime_internals.jl
40d3835
to
98a4af0
Compare
The `reflection.jl` file provides a large amount of functionality covering everything from helpers for access to core runtime data structures to setting up particular inference problems. It is included by both Base and Core.Compiler, but the functions that use the compiler, don't really make sense in the latter. In preparation for #56128, and stop including the compiler-dependent pieces in Core.Compiler.
98a4af0
to
9d6fb2b
Compare
…ces (#56185) The `reflection.jl` file provides a large amount of functionality covering everything from helpers for access to core runtime data structures to setting up particular inference problems. It is included by both Base and Core.Compiler, but the functions that use the compiler, don't really make sense in the latter. In preparation for #56128, and stop including the compiler-dependent pieces in Core.Compiler. While we're here, also move a few generically useful reflection functions out of Core.Compiler, so users that access them don't have to load the compiler. Split out from #56128, but doesn't make any semantic changes by itself, so should be quick/easy to merge.
The
reflection.jl
file provides a large amount of functionality covering everything from helpers for access to core runtime data structures to setting up particular inference problems. It is included by both Base and Core.Compiler, but the functions that use the compiler, don't really make sense in the latter. In preparation for #56128, and stop including the compiler-dependent pieces in Core.Compiler.While we're here, also move a few generically useful reflection functions out of Core.Compiler, so users that access
them don't have to load the compiler.
Split out from #56128, but doesn't make any semantic changes by itself, so should be quick/easy to merge.