Method.roots
no longer contains callees' MethodInstance
in 1.12.0-beta versions
#58693
kylincaster
started this conversation in
General
Replies: 1 comment 2 replies
-
Accessing the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, and thank you for your amazing work on Julia!
I'm currently developing a static compilation tool called
StaticLLVM
, which aims to compile Julia code ahead-of-time. A key part of this is statically analyzing the callees of each method.Previously, this was possible via the
roots
field of aCore.Method
object, which stored a list of objects, including theMethodInstance
corresponding to all callees.Here's a minimal example that used to work:
In earlier versions (e.g., 1.11.x), the above code would output something like:
Thus, it allowed us to obtain the callee
MethodInstance
foradd
, enabling us to build the call graph starting from a top-level function (likemain
).Thus, the callee of
add
is obtained, which allowing us to build the call graph from some top function (main
)However, in 1.12.0-beta4, the
mt.roots
no longer contains these calleesMethodInstance
.My questions are:
MethodInstance
orCore.Method
?roots
field (even as an internal API) or expose a similar mechanism?This functionality is crucial for static compilation analysis, and I'd love to align with the direction Julia is taking. Any advice or alternatives would be greatly appreciated.
Thanks again for your time and for all the work on Julia!
Beta Was this translation helpful? Give feedback.
All reactions