diff options
| author | Cliff Click <cliffc@acm.org> | 2025-05-07 11:28:33 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2025-05-07 11:28:33 -0700 |
| commit | 518d5c60f714c7d5f58c3da484368cbf26e9bfd5 (patch) | |
| tree | 0884a45436707169b72df5f8e321c0962f97275a /chapter22/README.md | |
| parent | 6852981f48f55b245fae6229c2930c3d09d9e45e (diff) | |
| download | Simple-518d5c60f714c7d5f58c3da484368cbf26e9bfd5.tar.gz Simple-518d5c60f714c7d5f58c3da484368cbf26e9bfd5.zip | |
Fix missing up/down phi peep.
Slight shuffling of sys.smp triggers different worklist order, triggers missing peep.
The pull-down phi op needs a reverse peep when more constants appear.
CodeGen driver can be called repeatedly.
Rename LogicalNode to ArithNode; use it on Add,Sub,MulDiv also.
Bugfix jump in loop that both exits on one path and enters a deeper loop on other.
Diffstat (limited to 'chapter22/README.md')
| -rw-r--r-- | chapter22/README.md | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/chapter22/README.md b/chapter22/README.md index 4cae3ee7..c7ff50f6 100644 --- a/chapter22/README.md +++ b/chapter22/README.md @@ -84,9 +84,10 @@ struct sys { }; ``` -The `sys` import itself is Just Another `struct` like any other; it has fields -and types declared internall. Note that these assignments are all final and in -the struct declaration, hence these are all *static* fields. +The `sys` import itself is Just Another `struct` like any other struct; it has +fields and assignments and types declared internally. Note that these +assignments are all final and in the struct declaration, hence these are all +*static* fields. ## Casting a Pointer to an `i64` @@ -102,9 +103,10 @@ struct base. ## Arrays of Constants and Constant Arrays The Simple type system now supports the notion of a "constant array" - an array -of fixed constants, stored in the ELF file in the RODATA section. We only -support strings at the parser level: "Hello, World!" makes a `u8[13]` array -containing ASCII bytes. +of fixed constants, stored in the ELF file in the RODATA section. Currently we +only support strings at the parser level: "Hello, World!" makes a `u8[13]` +array containing 13 ASCII bytes; like all arrays it has a length and will be +range-checked in the future. A constant version of a non-constant array can be assigned using the `u8[~]` syntax. @@ -126,5 +128,5 @@ val sum = { i32[~] is -> return sum(is); ``` -Note that this affects the deep contents of the array, and not the array +Note that this affects the deep contents of the array and not the array variable itself. |
