400400
401401get_method_table_view (world:: UInt , mt:: CC.MethodTable ) = CC. OverlayMethodTable (world, mt)
402402
403+ # VERSION >= v"1.14.0-DEV.1691"
404+ const INFERENCE_CACHE_TYPE = isdefined (CC, :InferenceCache ) ? CC. InferenceCache : Vector{CC. InferenceResult}
405+
403406struct GPUInterpreter{MTV<: CC.MethodTableView } <: CC.AbstractInterpreter
404407 world:: UInt
405408 method_table_view:: MTV
@@ -409,7 +412,7 @@ struct GPUInterpreter{MTV<:CC.MethodTableView} <: CC.AbstractInterpreter
409412else
410413 code_cache:: CodeCache
411414end
412- inf_cache:: Vector{CC.InferenceResult}
415+ inf_cache:: INFERENCE_CACHE_TYPE
413416
414417 inf_params:: CC.InferenceParams
415418 opt_params:: CC.OptimizationParams
@@ -423,7 +426,7 @@ function GPUInterpreter(world::UInt=Base.get_world_counter();
423426 opt_params:: CC.OptimizationParams )
424427 @assert world <= Base. get_world_counter ()
425428
426- inf_cache = Vector {CC.InferenceResult} ()
429+ inf_cache = INFERENCE_CACHE_TYPE ()
427430
428431 return GPUInterpreter (world, method_table_view,
429432 token, inf_cache,
@@ -434,7 +437,7 @@ function GPUInterpreter(interp::GPUInterpreter;
434437 world:: UInt = interp. world,
435438 method_table_view:: CC.MethodTableView = interp. method_table_view,
436439 token:: Any = interp. token,
437- inf_cache:: Vector{CC.InferenceResult} = interp. inf_cache,
440+ inf_cache:: INFERENCE_CACHE_TYPE = interp. inf_cache,
438441 inf_params:: CC.InferenceParams = interp. inf_params,
439442 opt_params:: CC.OptimizationParams = interp. opt_params)
440443 return GPUInterpreter (world, method_table_view,
0 commit comments