Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lookup bindings in the latest world
Browse files Browse the repository at this point in the history
Post-partitioning the executing world age matters for bindings lookup.
JuliaInterpreter currently does not model world age correctly.
That's a bigger issue. However, for now, just look up bindings in the
latest world age, which mostly restores the unpartitioned behavior.
Keno committed Jan 19, 2025
1 parent 443d672 commit 7569f47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interpret.jl
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ isassign(frame::Frame) = isassign(frame, frame.pc)
isassign(frame::Frame, pc::Int) = (pc in frame.framecode.used)

lookup_var(frame::Frame, val::SSAValue) = frame.framedata.ssavalues[val.id]
lookup_var(frame::Frame, ref::GlobalRef) = getfield(ref.mod, ref.name)
lookup_var(frame::Frame, ref::GlobalRef) = invokelatest(getfield, ref.mod, ref.name)
function lookup_var(frame::Frame, slot::SlotNumber)
val = frame.framedata.locals[slot.id]
val !== nothing && return val.value

0 comments on commit 7569f47

Please sign in to comment.