Add while loops, GC mark-and-sweep, and malloc block reuse
- Lexer: add INDENT/DEDENT tokens, <, >, : operators, while keyword,
closing DEDENT emission, include guards
- Parser: add NODE_WHILE with while_loop union, parse while/cond/body
blocks, include guards
- Eval: add while loop evaluation, GC integration with roots from env,
debug and gc flags, <, > comparison operators
- GC: implement mark-and-sweep collector with 3 stages (mark roots,
sweep unmarked, join free blocks)
- Allocator: block reuse via first-fit search with splitting, exponential
heap growth, NULL check on malloc, include guards, marked field in metadata
- Object: add include guards, fix include to use allocator.h
2026-02-16 04:55:52 +01:00
|
|
|
x = 0
|
2026-02-18 02:26:44 +01:00
|
|
|
while x < 10000000:
|
Add while loops, GC mark-and-sweep, and malloc block reuse
- Lexer: add INDENT/DEDENT tokens, <, >, : operators, while keyword,
closing DEDENT emission, include guards
- Parser: add NODE_WHILE with while_loop union, parse while/cond/body
blocks, include guards
- Eval: add while loop evaluation, GC integration with roots from env,
debug and gc flags, <, > comparison operators
- GC: implement mark-and-sweep collector with 3 stages (mark roots,
sweep unmarked, join free blocks)
- Allocator: block reuse via first-fit search with splitting, exponential
heap growth, NULL check on malloc, include guards, marked field in metadata
- Object: add include guards, fix include to use allocator.h
2026-02-16 04:55:52 +01:00
|
|
|
x = x + 1
|
2026-02-18 02:26:44 +01:00
|
|
|
print(x)
|
|
|
|
|
debugHeap()
|