@@ -422,17 +422,31 @@ end
422
422
423
423
using Core. Compiler:
424
424
AbstractInterpreter, InferenceResult, InferenceParams, InferenceState,
425
- OptimizationParams, MethodTableView, CachedMethodTable
425
+ OptimizationParams, MethodTableView
426
426
427
427
if isdefined (Base. Experimental, Symbol (" @overlay" ))
428
428
using Core. Compiler: OverlayMethodTable
429
- const GPUMethodTableView = CachedMethodTable{OverlayMethodTable}
430
429
const MTType = Core. MethodTable
431
- get_method_table_view (world:: UInt , mt:: MTType ) = CachedMethodTable (OverlayMethodTable (world, mt))
430
+ if isdefined (Core. Compiler, :CachedMethodTable )
431
+ using Core. Compiler: CachedMethodTable
432
+ const GPUMethodTableView = CachedMethodTable{OverlayMethodTable}
433
+ get_method_table_view (world:: UInt , mt:: MTType ) =
434
+ CachedMethodTable (OverlayMethodTable (world, mt))
435
+ else
436
+ const GPUMethodTableView = OverlayMethodTable
437
+ get_method_table_view (world:: UInt , mt:: MTType ) = OverlayMethodTable (world, mt)
438
+ end
432
439
else
433
- const GPUMethodTableView = CachedMethodTable{WorldOverlayMethodTable}
434
440
const MTType = Nothing
435
- get_method_table_view (world:: UInt , mt:: MTType ) = CachedMethodTable (WorldOverlayMethodTable (world))
441
+ if isdefined (Core. Compiler, :CachedMethodTable )
442
+ using Core. Compiler: CachedMethodTable
443
+ const GPUMethodTableView = CachedMethodTable{WorldOverlayMethodTable}
444
+ get_method_table_view (world:: UInt , mt:: MTType ) =
445
+ CachedMethodTable (WorldOverlayMethodTable (world))
446
+ else
447
+ const GPUMethodTableView = WorldOverlayMethodTable
448
+ get_method_table_view (world:: UInt , mt:: MTType ) = WorldOverlayMethodTable (world)
449
+ end
436
450
end
437
451
438
452
struct GPUInterpreter <: AbstractInterpreter
0 commit comments