a bit of src/README.md cleanup

This commit is contained in:
dzaima 2025-04-08 18:52:58 +03:00
parent 64339466cc
commit d2b9f4a02e

View File

@ -7,12 +7,12 @@ Run `build/build clangd` to generate a `compile_commands.json` file which clangd
## Conventions
Functions starting with `m_` makes a new object (some NaN-boxed, some heap-allocated).
Functions starting with `m_` make a new object (either direct/NaN-boxed or heap-allocated).
Functions starting with `q_` are queries/predicates, and return a boolean.
Functions ending with `R` are either supposed to be called rarely, or the caller expects that a part of it happens rarely.
Functions ending with `R` are either supposed to be called rarely, or the caller expects that some condition in it happens rarely.
Functions ending with `N` are non-inlined versions of another function.
Functions ending with `F` are infrequently needed fallback parts of a function.
Functions ending with `P` (or sometimes containing `p` or `P` or `v` or `V`) take a pointer argument (as opposed to a (NaN-boxed) `B`).
Functions ending with `P` (or sometimes containing `p` or `P` or `v` or `V`) take a direct pointer argument (as opposed to a tagged `B`).
Functions ending with `U` return (or take) a non-owned object (`U` = "unincremented").
Functions ending with `_c1` are monadic implementations, `_c2` are dyadic (see [builtin implementations](#builtin-implementations))
Functions ending with `G` can only be called with some guarantee (e.g. argument is heap-allocated, or fits in some type, etc).
@ -51,7 +51,6 @@ src/
main.c main function & commandline stuff
ns.c namespaces
vm.c virtual machine interpreter
)
```
### Random example functions