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
This commit is contained in:
parent
15dbd973de
commit
eaca5be9d6
22 changed files with 188 additions and 85 deletions
|
|
@ -118,13 +118,13 @@ when defined(memProfiler):
|
|||
var
|
||||
gTicker {.threadvar.}: int
|
||||
|
||||
proc requestedHook(): bool {.nimcall.} =
|
||||
proc requestedHook(): bool {.nimcall, locks: 0.} =
|
||||
if gTicker == 0:
|
||||
gTicker = SamplingInterval
|
||||
result = true
|
||||
dec gTicker
|
||||
|
||||
proc hook(st: StackTrace, size: int) {.nimcall.} =
|
||||
proc hook(st: StackTrace, size: int) {.nimcall, locks: 0.} =
|
||||
when defined(ignoreAllocationSize):
|
||||
hookAux(st, 1)
|
||||
else:
|
||||
|
|
@ -136,7 +136,7 @@ else:
|
|||
gTicker: int # we use an additional counter to
|
||||
# avoid calling 'getTicks' too frequently
|
||||
|
||||
proc requestedHook(): bool {.nimcall.} =
|
||||
proc requestedHook(): bool {.nimcall, locks: 0.} =
|
||||
if interval == 0: result = true
|
||||
elif gTicker == 0:
|
||||
gTicker = 500
|
||||
|
|
@ -145,7 +145,7 @@ else:
|
|||
else:
|
||||
dec gTicker
|
||||
|
||||
proc hook(st: StackTrace) {.nimcall.} =
|
||||
proc hook(st: StackTrace) {.nimcall locks: 0.} =
|
||||
#echo "profiling! ", interval
|
||||
if interval == 0:
|
||||
hookAux(st, 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue