diff options
| author | Cliff Click <cliffc@acm.org> | 2026-10-18 22:09:58 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-10-18 22:09:58 -0700 |
| commit | 300d2a9c3672acacc8bdd8d5370a424651a00571 (patch) | |
| tree | f33d895f6ec4e08692efa4c090c681257553097d /chapter22/README.md | |
| parent | 0be52f8dd82f70d4c557fe916d47dc425401f848 (diff) | |
| download | Simple-300d2a9c3672acacc8bdd8d5370a424651a00571.tar.gz Simple-300d2a9c3672acacc8bdd8d5370a424651a00571.zip | |
Cleanup & backportclinit
The phase rework, made new phases explicit and add them to the CodeGen driver. Fix the flag-spilling on X86 and ARM. Fix the GCM conservative anti-deps and backport.
Diffstat (limited to 'chapter22/README.md')
| -rw-r--r-- | chapter22/README.md | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/chapter22/README.md b/chapter22/README.md index 00ae6183..f5560aa1 100644 --- a/chapter22/README.md +++ b/chapter22/README.md @@ -34,17 +34,24 @@ Let's break it down. pool*, and from there in an ELF file's RODATA section. -Chapter 11's lazy memory partitioning continues here: the parser carries one -`$mem`, and BulkMemPhi/MemPhi discover field aliases during optimization. -Allocations consume a partial MemMerge and produce `{ptr, $mem}`; calls carry -whole memory. The loop Load search follows every arm of a memory merge, so -BrainFuck's invariant program length folds out of its main loop. - You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter22) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter21...linear-chapter22) it to the previous chapter. Here is the [complete language grammar](docs/22-grammar.md) for this chapter. +## Finalizing the ideal graph + +Library functions introduce a distinction between an externally callable entry +and an unused internal function. After `Iter` settles function pointers, +`FinalizeIR` removes unknown-caller hooks from internal functions with no callers +or exposed function address, then runs the resulting peephole cleanup. Public +entries retain their calling assumptions. Type checking examines the surviving +graph afterward. + +The ideal pipeline is `Parse -> Iter -> FinalizeIR -> TypeCheck`; use +`code.driver(CodeGen.Phase.TypeCheck)` when all of it is needed. + + ## Nested Types and Static Fields Simple now supports nested types - this is a name-space only change, so no new |
