summaryrefslogtreecommitdiff
path: root/docs/roadmap.md
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-10-25 14:20:11 -0700
committerCliff Click <cliffc@acm.org>2026-10-25 14:20:11 -0700
commit2d80a348bad4b1e3165bd955ceaff3e18a96e516 (patch)
treefdb7044da1c7d30cf295c1709d11f6381aa48759 /docs/roadmap.md
parentf258c28fb4fc98e472be2e57a2504dc1a955f2eb (diff)
downloadSimple-2d80a348bad4b1e3165bd955ceaff3e18a96e516.tar.gz
Simple-2d80a348bad4b1e3165bd955ceaff3e18a96e516.zip
Retire Evalutator
Minor rounding bug in eval2
Diffstat (limited to 'docs/roadmap.md')
-rw-r--r--docs/roadmap.md20
1 files changed, 11 insertions, 9 deletions
diff --git a/docs/roadmap.md b/docs/roadmap.md
index d441abb9..62c2e509 100644
--- a/docs/roadmap.md
+++ b/docs/roadmap.md
@@ -9,11 +9,14 @@ design decisions and chapter boundaries.
## Correctness
-### Narrow stores in the ideal evaluator
+### Narrow field results after method updates
-Chapter 23's `Eval2.store` stores the raw value in its Java object array,
-without the truncation performed by a machine Store. This example still
-returns 25710 in the evaluator instead of 110:
+Chapters 25-27 can return an untruncated increment when a method updates a
+narrow field and then reads it. With evaluator stores corrected, this example
+returns 366 instead of 110. Chapter 25's generated RISC-V code also returns
+366: the method's optimized Return uses the raw Add with range `[1-256]`,
+although the Store writes a byte. Chapters 23, 24a/24b, and 28a/28b return 110
+with the corrected evaluator.
```simple
struct C { u8 x=255; val next_noInline={ -> x++; return x; }; };
@@ -23,10 +26,9 @@ val b=c.next_noInline();
return a+10*b+100*c.x;
```
-Find the earliest affected evaluator, reproduce the failure there, and carry
-the correction through affected snapshots. Check signed fields and floating
-rounding as well as unsigned bytes. Generated code must not be changed to
-match an incorrect evaluator.
+Find where the field read loses its narrowing during parsing or optimization,
+and preserve the converted result independently of the Store. Check both
+signed and unsigned fields and compare ideal evaluation with generated code.
## Compilation and optimization
@@ -282,4 +284,4 @@ Get the Parsers' structure closer to an ideal R-D parser, and matching the
grammer doc. Move TYPES to CodeGen, and generally restructure for readability.
Ponder using try-w-resources to do the keep/unkeep pairing (do NOT do any
allocation in the `try`, just bring up an object w/auto-closable which tracks
-the unkeeps) - see if that looks any cleaner. \ No newline at end of file
+the unkeeps) - see if that looks any cleaner.