From eaca5be9d6e205e8aa7055306122a6c053ef35a6 Mon Sep 17 00:00:00 2001 From: cooldome Date: Thu, 18 Oct 2018 19:21:25 +0100 Subject: Change the order of compilation passes, transformation is made lazy at code gen (#8489) * Ast no transformation * Add getImplNoTransform to the macros module * progress on delaying transf * Fix methods tranformation * Fix lazy lambdalifting * fix create thread wrapper * transform for lambda lifting * improve getImplTransformed * Fix destructor tests * try to fix nimprof for linux --- compiler/seminst.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'compiler/seminst.nim') diff --git a/compiler/seminst.nim b/compiler/seminst.nim index b6936d1be..de2e10a9b 100644 --- a/compiler/seminst.nim +++ b/compiler/seminst.nim @@ -146,9 +146,8 @@ proc instantiateBody(c: PContext, n, params: PNode, result, orig: PSym) = idTablePut(symMap, params[i].sym, result.typ.n[param.position+1].sym) freshGenSyms(b, result, orig, symMap) b = semProcBody(c, b) - b = hloBody(c, b) - n.sons[bodyPos] = transformBody(c.graph, c.module, b, result) - #echo "code instantiated ", result.name.s + result.ast[bodyPos] = hloBody(c, b) + trackProc(c.graph, result, result.ast[bodyPos]) excl(result.flags, sfForward) dec c.inGenericInst -- cgit 1.4.1-2-gfad0