mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 00:44:27 +00:00
Programs built by the Finch compiler free their memory
gen.fch never dropped anything (it was the bootstrap compiler); now it does what the C++ one did: owned variables are dropped when their scope ends (defers interleaved, newest first), return moves a local out, assignments drop the old value, temporaries nobody keeps are released, values an expression holds are dropped when try/or leave early, clear/resize/remove/map.clear drop what goes, free() drops the pointee. The compiler itself now frees as it goes. MEMCHECK=1 tests/run.sh: 108 passed under valgrind with --leak-check=full. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015f73FesGZGYPkmDvUcj6QX
This commit is contained in:
parent
837ad45177
commit
dc0334fa0e
3 changed files with 181140 additions and 144219 deletions
159222
bootstrap/linux-aarch64.ll
159222
bootstrap/linux-aarch64.ll
File diff suppressed because one or more lines are too long
159431
bootstrap/linux-x86_64.ll
159431
bootstrap/linux-x86_64.ll
File diff suppressed because one or more lines are too long
586
src/gen.fch
586
src/gen.fch
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue