Fix Core test suite compliance: >IN sync, RSHIFT, +LOOP, pictured output

Major compliance fixes for running Gerry Jackson's core.fr tests:
- >IN synchronization: outer interpreter reads >IN back from WASM memory
  after each word, enabling TESTING and other >IN-manipulating words
- RSHIFT changed to logical (unsigned) shift per Forth 2012 spec
- +LOOP uses boundary-crossing termination check for negative steps
- HEX/DECIMAL compile as WASM primitives (work inside definitions)
- BASE read from WASM memory for all number formatting
- Pictured numeric output: <# # #S #> HOLD SIGN
- New words: 2@ 2! .( ] ArithRshift
- Error recovery resets compile state on failure
- FIND reads counted strings from WASM memory
- Forth 2012 core.fr: 58 errors remaining (from unable-to-load)
This commit is contained in:
2026-03-30 18:17:59 +02:00
parent d9cd6f2b10
commit 84bfe5c581
3 changed files with 703 additions and 119 deletions
+2
View File
@@ -50,6 +50,8 @@ pub enum IrOp {
Invert,
Lshift,
Rshift,
/// Arithmetic (signed) right shift -- used by 2/.
ArithRshift,
// -- Memory --
/// Fetch cell from address: ( addr -- x )