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

adjustment to JuliaLang/julia#55976 #605

Merged
merged 1 commit into from
Oct 4, 2024
Merged
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
18 changes: 12 additions & 6 deletions src/interpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ end
#=CC.=#get_inference_world(interp::CthulhuInterpreter) = get_inference_world(interp.native)
CC.get_inference_cache(interp::CthulhuInterpreter) = CC.get_inference_cache(interp.native)

CC.may_optimize(interp::CthulhuInterpreter) = true
CC.may_compress(interp::CthulhuInterpreter) = false
CC.may_discard_trees(interp::CthulhuInterpreter) = false
CC.verbose_stmt_info(interp::CthulhuInterpreter) = true
CC.may_optimize(::CthulhuInterpreter) = true
CC.may_compress(::CthulhuInterpreter) = false
CC.may_discard_trees(::CthulhuInterpreter) = false
@static if isdefined(CC, :verbose_stmt_info)
CC.verbose_stmt_info(::CthulhuInterpreter) = true
end

CC.method_table(interp::CthulhuInterpreter) = CC.method_table(interp.native)

Expand Down Expand Up @@ -226,13 +228,17 @@ function CC.IRInterpretationState(interp::CthulhuInterpreter,
inferred = inferred::OptimizedSource
ir = CC.copy(inferred.ir)
src = inferred.src
method_info = CC.MethodInfo(src)
@static if isdefined(CC, :SpecInfo)
spec_info = CC.SpecInfo(src)
else
spec_info = CC.MethodInfo(src)
end
if isdefined(Base, :__has_internal_change) && Base.__has_internal_change(v"1.12-alpha", :codeinfonargs)
argtypes = CC.va_process_argtypes(CC.optimizer_lattice(interp), argtypes, src.nargs, src.isva)
elseif VERSION >= v"1.12.0-DEV.341"
argtypes = CC.va_process_argtypes(CC.optimizer_lattice(interp), argtypes, mi)
end
return CC.IRInterpretationState(interp, method_info, ir, mi, argtypes, world,
return CC.IRInterpretationState(interp, spec_info, ir, mi, argtypes, world,
code.min_world, code.max_world)
end

Expand Down
Loading