newruntime: progress...
This commit is contained in:
parent
8e27bddb97
commit
46ce797231
2 changed files with 7 additions and 6 deletions
|
|
@ -732,11 +732,9 @@ proc p(n: PNode; c: var Con): PNode =
|
||||||
# make sure it's destroyed at the end of the proc:
|
# make sure it's destroyed at the end of the proc:
|
||||||
if not isUnpackedTuple(it[0].sym):
|
if not isUnpackedTuple(it[0].sym):
|
||||||
c.destroys.add genDestroy(c, v.typ, v)
|
c.destroys.add genDestroy(c, v.typ, v)
|
||||||
if ri.kind != nkEmpty:
|
if ri.kind != nkEmpty:
|
||||||
let r = moveOrCopy(v, ri, c)
|
let r = moveOrCopy(v, ri, c)
|
||||||
result.add r
|
result.add r
|
||||||
else:
|
|
||||||
result.add keepVar(n, it, c)
|
|
||||||
else:
|
else:
|
||||||
result.add keepVar(n, it, c)
|
result.add keepVar(n, it, c)
|
||||||
of nkCallKinds:
|
of nkCallKinds:
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ clicked!'''
|
||||||
disabled: "true"
|
disabled: "true"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import core / allocators
|
||||||
|
import system / ansi_c
|
||||||
|
|
||||||
type
|
type
|
||||||
Widget* = ref object of RootObj
|
Widget* = ref object of RootObj
|
||||||
drawImpl: owned(proc (self: Widget))
|
drawImpl: owned(proc (self: Widget))
|
||||||
|
|
@ -71,4 +74,4 @@ proc main =
|
||||||
main()
|
main()
|
||||||
|
|
||||||
let (a, d) = allocCounters()
|
let (a, d) = allocCounters()
|
||||||
discard cprintf("%ld %ld new: %ld\n", a, d, allocs)
|
discard cprintf("%ld %ld alloc/dealloc pairs: %ld\n", a, d, allocs)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue