Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/interpret.jl
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ function step_expr!(@nospecialize(recurse), frame::Frame, @nospecialize(node), i
error("unexpected error statement ", node)
elseif node.head === :incomplete
error("incomplete statement ", node)
elseif node.head === :latestworld
frame.world = Base.get_world_counter()
else
rhs = eval_rhs(recurse, frame, node)
end
Expand Down
8 changes: 6 additions & 2 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,11 @@ mutable struct Frame
caller::Union{Frame,Nothing}
callee::Union{Frame,Nothing}
last_codeloc::Int
# TODO: This is incompletely implemented
world::UInt
end
function Frame(framecode::FrameCode, framedata::FrameData, pc=1, caller=nothing)
function Frame(framecode::FrameCode, framedata::FrameData, pc=1, caller=nothing,
world=isdefined(Base, :tls_world_age) ? Base.tls_world_age() : Base.get_world_counter())
if length(junk_frames) > 0
frame = pop!(junk_frames)
frame.framecode = framecode
Expand All @@ -264,9 +267,10 @@ function Frame(framecode::FrameCode, framedata::FrameData, pc=1, caller=nothing)
frame.caller = caller
frame.callee = nothing
frame.last_codeloc = 0
frame.world = world
return frame
else
return Frame(framecode, framedata, pc, 1, caller, nothing, 0)
return Frame(framecode, framedata, pc, 1, caller, nothing, 0, world)
end
end
"""
Expand Down
Loading