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

WIP: Re-target IPO path to Jameson's branch #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Keno
Copy link
Contributor

@Keno Keno commented Nov 14, 2024

No description provided.

RT = Pair{Any, Tuple{Bool, Bool}}
good_effects = (true, true)
m = mi.def
if isa(invokee, Core.CodeInstance)
m = invokee.def.def
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually (including in Base) we may need to deal with the fact that going from CodeInstance back to MethodInstance may require some extra care to preserve the implied owner, world bounds, and edges information, and invoke pointer that was previously specified. I don't think we have fully specified what that means yet for reflection queries like this, since now these could be cassette like overlays, with a different behavior and ABI owner than the original MethodInstance implied

ccall(:jl_update_codeinst, Cvoid, (Any, Any, Int32, UInt, UInt, UInt32, Any, UInt8, Any, Any),
daef_ci, src, Int32(0), UInt(1)#=ci.min_world=#, old_ci.max_world, old_ci.ipo_purity_bits,
nothing, 0x0, debuginfo, CC.empty_edges)
ccall(:jl_mi_cache_insert, Cvoid, (Any, Any), old_ci.def, daef_ci)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use these as ccalls as the function is internal and likely to change often. You also need to close your engine reservation, but you probably shouldn't be making a reservation at all as this seems probably too late to acquire one. If you know that recursion is structurally unsupported by this package, just use the CodeInstance constructor?

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.

2 participants