Skip to content

Commit 0d27b0e

Browse files
committed
Adjust for upstream JuliaLang/julia#53088
1 parent 78dcad1 commit 0d27b0e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/jlgen.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,13 @@ Base.Experimental.@MethodTable(GLOBAL_METHOD_TABLE)
268268

269269
## interpreter
270270

271+
@static if VERSION v"1.11.0-DEV.1498"
272+
import Core.Compiler: get_inference_world
273+
using Base: get_world_counter
274+
else
275+
import Core.Compiler: get_world_counter, get_world_counter as get_inference_world
276+
end
277+
271278
using Core.Compiler: OverlayMethodTable
272279
const MTType = Core.MethodTable
273280
if isdefined(Core.Compiler, :CachedMethodTable)
@@ -320,7 +327,7 @@ end
320327

321328
CC.InferenceParams(interp::GPUInterpreter) = interp.inf_params
322329
CC.OptimizationParams(interp::GPUInterpreter) = interp.opt_params
323-
CC.get_world_counter(interp::GPUInterpreter) = interp.world
330+
#=CC.=#get_inference_world(interp::GPUInterpreter) = interp.world
324331
CC.get_inference_cache(interp::GPUInterpreter) = interp.inf_cache
325332
CC.code_cache(interp::GPUInterpreter) = WorldView(interp.code_cache, interp.world)
326333

@@ -471,6 +478,7 @@ end
471478
# HACK: in older versions of Julia, `jl_create_native` doesn't take a world argument
472479
# but instead always generates code for the current world. note that this doesn't
473480
# actually change the world age, but just spoofs the counter `jl_create_native` reads.
481+
# XXX: Base.get_world_counter is supposed to be monotonically increasing and is runtime global.
474482
macro in_world(world, ex)
475483
quote
476484
actual_world = Base.get_world_counter()

0 commit comments

Comments
 (0)