diff options
Diffstat (limited to 'docs/history/49-generics/notes.md')
| -rw-r--r-- | docs/history/49-generics/notes.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/history/49-generics/notes.md b/docs/history/49-generics/notes.md new file mode 100644 index 0000000..311d82d --- /dev/null +++ b/docs/history/49-generics/notes.md @@ -0,0 +1,5 @@ +# 49 generics + +what landed: generics are monomorphized instead of erased. templates keep their tokens, each set of type arguments gets its own compiled copy named name<type ids>, with any size of type and any number of parameters (record<K, V>), plus methods in generic structs. llvm gets an inline call path. the core gets a global constant lattice pass with branch folding. o3 push and pop are inline. the default memory map is bigger (pw 0x1c5000, heap up to 0x225000) and the small preset was resized (genome 163840, ns 1280). + +what did not: register-passing direct llvm calls, loop-invariant motion and cross-block cse in the core, automatic tiering, structs by value in native calls, and a table that grows at run time (addresses are literals in the genome, so each size is its own image). a template must be written before the first call with type arguments. the js vm and windows scripts were not touched beyond the map constants. |
