mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-08 22:30:48 +00:00
Sweep arrays in GC
This commit is contained in:
parent
86669849d9
commit
cae5cd110e
@ -105,18 +105,23 @@ def sweep_expr(expr)#0
|
||||
end
|
||||
|
||||
def sweep_used#0
|
||||
var symptr
|
||||
var symptr, i, memptr, size
|
||||
|
||||
sweep_expr(assoc_list)
|
||||
sweep_expr(build_list)
|
||||
sweep_expr(eval_last)
|
||||
symptr = sym_list
|
||||
while symptr
|
||||
if symptr=>lambda
|
||||
sweep_expr(symptr=>lambda)
|
||||
fin
|
||||
if symptr=>apval
|
||||
sweep_expr(symptr=>apval)
|
||||
elsif symptr=>lambda
|
||||
sweep_expr(symptr=>lambda)
|
||||
elsif symptr=>array
|
||||
memptr = symptr=>array=>arraymem
|
||||
size = symptr=>array=>arraysize -1
|
||||
for i = 0 to size
|
||||
sweep_expr(memptr=>[i])
|
||||
next
|
||||
fin
|
||||
symptr = symptr=>link
|
||||
loop
|
||||
@ -257,7 +262,7 @@ def new_array(dim0, dim1, dim2, dim3)
|
||||
aptr=>offset[1] = ofst1
|
||||
aptr=>offset[2] = ofst2
|
||||
aptr=>offset[3] = ofst3
|
||||
aptr=>arraysize = size
|
||||
aptr=>arraysize = size/2
|
||||
aptr=>arraymem = memptr
|
||||
return aptr
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user