@@ -246,6 +246,16 @@ Base.getindex(urs::Core.Compiler.UseRef, args...) = Core.Compiler.getindex(urs,
246
246
Base. getindex (c:: Core.Compiler.IncrementalCompact , args... ) = Core. Compiler. getindex (c, args... )
247
247
Base. setindex! (c:: Core.Compiler.IncrementalCompact , args... ) = Core. Compiler. setindex! (c, args... )
248
248
Base. setindex! (urs:: Core.Compiler.UseRef , args... ) = Core. Compiler. setindex! (urs, args... )
249
+
250
+ VERSION > v " 1.10.0-DEV.571" && import Core. Compiler: VarState
251
+ function sptypes (sparams)
252
+ return if VERSION > v " 1.10.0-DEV.571"
253
+ VarState[Core. Compiler. VarState .(sparams, false )... ]
254
+ else
255
+ Any[sparams... ]
256
+ end
257
+ end
258
+
249
259
function transform! (ci, meth, nargs, sparams, N)
250
260
code = ci. code
251
261
cfg = compute_basic_blocks (code)
@@ -257,7 +267,7 @@ function transform!(ci, meth, nargs, sparams, N)
257
267
ir = IRCode (Core. Compiler. InstructionStream (code, Any[],
258
268
Any[nothing for i = 1 : length (code)],
259
269
ci. codelocs, UInt8[0 for i = 1 : length (code)]), cfg, Core. LineInfoNode[ci. linetable... ],
260
- Any[Any for i = 1 : 2 ], meta, Any[ sparams... ] )
270
+ Any[Any for i = 1 : 2 ], meta, sptypes ( sparams) )
261
271
262
272
# SSA conversion
263
273
domtree = construct_domtree (ir. cfg. blocks)
0 commit comments