Skip to content
Closed
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
16 changes: 14 additions & 2 deletions src/lowered.jl
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,20 @@ function methods_by_execution!(@nospecialize(recurse), methodinfo, docexprs, fra
end
end
elseif LoweredCodeUtils.is_assignment_like(stmt)
# If we're here, either isrequired[pc] is true, or the mode forces us to eval assignments
pc = step_expr!(recurse, frame, stmt, true)
# in 1.12+ structs are Revise-able
# So if stmt is a Core._structtype call, we need to evaluate it
if VERSION >= v"1.12.0-0" &&
stmt.args[2] isa Expr &&
stmt.args[2].head === :call &&
stmt.args[2].args[1] isa QuoteNode &&
stmt.args[2].args[1].value === Core._structtype
println("evaluating $stmt")
Core.eval(mod, stmt)
pc = next_or_nothing!(frame)
else
# If we're here, either isrequired[pc] is true, or the mode forces us to eval assignments
pc = step_expr!(recurse, frame, stmt, true)
end
elseif head === :call
f = @lookup(frame, stmt.args[1])
if f === Core.eval
Expand Down