From 2df68085644a5c6ac868b74b26dc4c9dd292d344 Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:08:24 -0600 Subject: [PATCH] vault backup: 2024-07-03 11:08:24 --- notes/Copy-and-Patch Compilation.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/notes/Copy-and-Patch Compilation.md b/notes/Copy-and-Patch Compilation.md index 16b113c..e825bd4 100644 --- a/notes/Copy-and-Patch Compilation.md +++ b/notes/Copy-and-Patch Compilation.md @@ -31,8 +31,12 @@ Clang + LLVM compiler infrastructure to hide all platform-specific low-level det MetaVar can generate binary stencils of different optimization levels for every bytecode or AST node, which the generator can select from at generation time. As am example, if the instruction is for adding a constant to a literal, the generator can select from addition implementations for the most optimized variant. It can also make register allocation decisions by keeping track of register availability and picking between stack instructions and register instructions. -### Interface -MetaVar constructs the stencil library +### Stencil Library Construction +MetaVar constructs the stencil library from programmer defined *stencil generators*. One stencil generator is defined for every AST node using C++ template meta-variables to express variants, and special macros to express missing values to be patched at runtime. + +At compile time, the compiler iterates over the values of the meta-variables and creates a library entry for every valid combination. + +### # Terminology