@@ -256,12 +256,12 @@ function sptypes(sparams)
256
256
end
257
257
end
258
258
259
- function transform ! (ci, meth, nargs, sparams, N)
259
+ function diffract_transform ! (ci, meth, nargs, sparams, N)
260
260
code = ci. code
261
261
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... ]
265
265
266
266
meta = Expr[]
267
267
ir = IRCode (Core. Compiler. InstructionStream (code, Any[],
@@ -273,19 +273,19 @@ function transform!(ci, meth, nargs, sparams, N)
273
273
domtree = construct_domtree (ir. cfg. blocks)
274
274
defuse_insts = scan_slot_def_use (Int (meth. nargs), ci, ir. stmts. inst)
275
275
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 ())
277
277
ir = compact! (ir)
278
278
279
279
nfixedargs = meth. isva ? meth. nargs - 1 : meth. nargs
280
280
meth. isva || @assert nfixedargs == nargs+ 1
281
281
282
282
ir = diffract_ir! (ir, ci, meth, sparams, nargs, N)
283
283
284
- Core. Compiler. replace_code_newstyle! (ci, ir, nargs+ 1 )
284
+ Core. Compiler. replace_code_newstyle! (ci, ir)
285
+
285
286
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
289
289
290
- ci
290
+ return ci
291
291
end
0 commit comments