Commit 6850e1a
c.2: hashmaps, vectors, hide MAL struct, reduce duplications, fix 62d1ed3
Makefile:
Compute the build flags with pkg-config.
Make more settings available on the command line.
Enable the -fanalyzer warning (and close the issue found in slurp).
core:
Simplify the argument parsing and return value constructor in ".".
env:
Implement with hashmaps. Allow printing by DEBUG-EVAL.
error (new):
Format most error messages consistently.
When an error is detected, show all arguments instead of only the
remaining ones (this was not informative when the rest was empty).
Restore the previous error prefix (the MAL function, not the C function).
Use a global variables instead of a type, simplifying functions
returning non-MAL types.
hashmap (rewritten, moved to ./):
Replace binary trees with hashed maps.
linked_list (moved to ./):
Return a signed count in order to spare a later conversion.
printer:
Allow a width specifier (for DEBUG-EVAL).
Print MAL type sets (for bad_type) and hashmaps (for DEBUG-EVAL).
Shorten name for functions (else REPL fills the screen).
Move commands outside of assert (they didn’t survive NDEBUG).
Inverse the meaning of " " so that list *are* spaced by default.
readline (new):
Avoid duplication in steps and core (core was incorrect).
steps:
Properly report reader errors (this was dealt with by the null case in EVAL,
but not documented and removed by 62d1ed3).
Stop preventing TCO when if returns nil (the benefit is dubious).
Add a quasiquote_folder used by lists and vectors.
Stop calling quasiquote twice on each list/vector element (error in 62d1ed3).
types:
Hide the struct into the .c file.
Compute the hash of each string at creation.
Allocate common symbols once at startup.
Remove metadata from most types.
Use the same "pattern-matching" function to test the type and extract the contents.
Add metadata as an optional argument to some constructor.
vectors (new):
Provide an iterator common with lists.
global
Move equality from core to types, use it in steps and hashmaps.
In closures, store the raw fn* arguments (The &more syntax without
space is lost but could be restored if this seems important).1 parent e2263b7 commit 6850e1a
File tree
33 files changed
+3517
-2792
lines changed- impls/c.2
- libs/hashmap
33 files changed
+3517
-2792
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
9 | 43 | | |
10 | 44 | | |
11 | 45 | | |
| |||
23 | 57 | | |
24 | 58 | | |
25 | 59 | | |
26 | | - | |
27 | | - | |
28 | 60 | | |
29 | 61 | | |
30 | 62 | | |
31 | 63 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 64 | + | |
| 65 | + | |
38 | 66 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 67 | | |
43 | | - | |
44 | | - | |
45 | 68 | | |
46 | 69 | | |
47 | 70 | | |
48 | | - | |
| 71 | + | |
49 | 72 | | |
50 | 73 | | |
51 | 74 | | |
| |||
0 commit comments