Split reflection into compiler-dependent and compiler-independent pieces#56185
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.
@invoke and @invokelatest should probably live in base/reflection.jl?
There was a problem hiding this comment.
Currently calls into Compiler for spurious reasons. Could be changed, but let's do that in a separate commit.
base/Base.jl
Outdated
| include("gcutils.jl") | ||
| include("generator.jl") | ||
| include("reflection.jl") | ||
| include("reflection2.jl") |
There was a problem hiding this comment.
@aviatesk proposed renaming to compiler_reflection.jl, which seems reasonable to me.
There was a problem hiding this comment.
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.
internals.jl sounds reasonable to me.
There was a problem hiding this comment.
Something compiler_internals.jl would be better imo.
There was a problem hiding this comment.
It's not compiler internals though, it's internals of like method tables and other runtime datastructures.
There was a problem hiding this comment.
Right, this is more runtime_internals.jl or cache_internals.jl ?
There was a problem hiding this comment.
Ok, my point was mostly xxx_internals.jl.
There was a problem hiding this comment.
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.jlfile 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.