From d2b9f4a02e2d21a7d94947321891886ee34b0da9 Mon Sep 17 00:00:00 2001 From: dzaima Date: Tue, 8 Apr 2025 18:52:58 +0300 Subject: [PATCH] a bit of src/README.md cleanup --- src/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/README.md b/src/README.md index bb425ec3..2bc4a45f 100644 --- a/src/README.md +++ b/src/README.md @@ -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