1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 02:27:10 +03:00
mal/impls/zig
2024-09-19 14:48:19 -04:00
..
build.zig zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
core.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
Dockerfile zig: move zig unpack path from /mal to /opt 2024-09-19 14:48:19 -04:00
env.zig zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
error.zig zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
hmap.zig zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
linked_list.zig zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
Makefile zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
printer.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
reader.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
readline.zig zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
README zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
run zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
step0_repl.zig zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00
step1_read_print.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
step2_eval.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
step3_env.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
step4_if_fn_do.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
step5_tco.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
step6_file.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
step7_quote.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
step8_macros.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
step9_try.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
stepA_mal.zig zig: simplify the reader, fix a memory leak 2024-09-19 14:48:19 -04:00
types.zig zig: build with 0.13.0, merge eval_ast, fix remaining issues 2024-09-19 14:48:19 -04:00

debug_alloc in types.zig may help with reference counting.


TODO Simplify the printer with the new reader functions in the zig
library.


NOTE Before implementing any optimization or optional fix that would
increase the complexity, please take into account that someone has to
maintain the code, and the zig language evolves quickly.

Some memory leaks are probably already present, especially when an
error interrupts the normal execution flow.

Examples of things that are deliberately not implemented...
  * TCO for try*
  * preallocate integers between 0 and 100 at startup
  * use ArrayList.ensureTotalCapacityPrecise/HashMap.ensureTotalCapacity
    after most calls to new_list/vector/map.
  * store symbols in a global hash map,
  * implement lists/vectors as slices/cons cells/whatever
  * deallocate cyclic structures not detected by reference counting like
    (let* (f (fn* () nil)))
    (def! a (atom 2)) (def! v [a]) (reset! a v)