@@ -256,12 +256,12 @@ function sptypes(sparams)
256256 end
257257end
258258
259- function transform ! (ci, meth, nargs, sparams, N)
259+ function diffract_transform ! (ci, meth, nargs, sparams, N)
260260 code = ci. code
261261 cfg = compute_basic_blocks (code)
262- slotnames = Symbol[Symbol (" #self#" ), :args , ci. slotnames... ]
263- slotflags = UInt8[( 0x00 for i = 1 : 2 ) . .. , ci. slotflags... ]
264- slottypes = ci. slottypes === nothing ? nothing : UInt8[( Any for i = 1 : 2 ) . .. , ci. slottypes... ]
262+ ci . slotnames = Symbol[Symbol (" #self#" ), :args , ci. slotnames... ]
263+ ci . slotflags = UInt8[0x00 , 0x00 , ci. slotflags... ]
264+ ci . slottypes = ci. slottypes === nothing ? Any[ Any for _ in 1 : length (ci . slotflags)] : Any[Any, Any , ci. slottypes... ]
265265
266266 meta = Expr[]
267267 ir = IRCode (Core. Compiler. InstructionStream (code, Any[],
@@ -273,19 +273,19 @@ function transform!(ci, meth, nargs, sparams, N)
273273 domtree = construct_domtree (ir. cfg. blocks)
274274 defuse_insts = scan_slot_def_use (Int (meth. nargs), ci, ir. stmts. inst)
275275 ci. ssavaluetypes = Any[Any for i = 1 : ci. ssavaluetypes]
276- ir = construct_ssa! (ci, ir, domtree, defuse_insts, Any[Any for i = 1 : length (slotnames)] , Core. Compiler. OptimizerLattice ())
276+ ir = construct_ssa! (ci, ir, domtree, defuse_insts, ci . slottypes , Core. Compiler. OptimizerLattice ())
277277 ir = compact! (ir)
278278
279279 nfixedargs = meth. isva ? meth. nargs - 1 : meth. nargs
280280 meth. isva || @assert nfixedargs == nargs+ 1
281281
282282 ir = diffract_ir! (ir, ci, meth, sparams, nargs, N)
283283
284- Core. Compiler. replace_code_newstyle! (ci, ir, nargs+ 1 )
284+ Core. Compiler. replace_code_newstyle! (ci, ir)
285+
285286 ci. ssavaluetypes = length (ci. code)
286- ci. slotnames = slotnames
287- ci. slotflags = slotflags
288- ci. slottypes = slottypes
287+ ci. ssaflags = UInt8[0x00 for i= 1 : length (ci. code)]
288+ ci. method_for_inference_limit_heuristics = meth
289289
290- ci
290+ return ci
291291end
0 commit comments