mirror of
https://github.com/kanaka/mal.git
synced 2024-10-27 06:40:14 +03:00
.. | ||
build.zig | ||
core.zig | ||
Dockerfile | ||
env.zig | ||
error.zig | ||
hmap.zig | ||
linked_list.zig | ||
Makefile | ||
printer.zig | ||
reader.zig | ||
readline.zig | ||
README | ||
run | ||
step0_repl.zig | ||
step1_read_print.zig | ||
step2_eval.zig | ||
step3_env.zig | ||
step4_if_fn_do.zig | ||
step5_tco.zig | ||
step6_file.zig | ||
step7_quote.zig | ||
step8_macros.zig | ||
step9_try.zig | ||
stepA_mal.zig | ||
types.zig |
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)