Implement core Forth runtime: dictionary, codegen, outer interpreter, REPL

- Dictionary: linked-list word headers in simulated linear memory with
  create/find/reveal, case-insensitive lookup, IMMEDIATE flag support
- WASM codegen: IR-to-WASM translation via wasm-encoder with full
  validation; all stack, arithmetic, comparison, logic, memory, control
  flow, and return stack operations; wasmtime execution tests
- Outer interpreter: tokenizer, number parsing (decimal/$hex/#dec/%bin),
  interpret/compile dispatch, control structures (IF/ELSE/THEN,
  BEGIN/UNTIL, BEGIN/WHILE/REPEAT), RECURSE, comments, string output
- 40+ primitive words registered via JIT-compiled WASM modules linked
  to shared memory/globals/table
- Interactive REPL with rustyline, piped input, and file execution
- 145 tests passing across dictionary, codegen, and runtime
This commit is contained in:
2026-03-29 22:48:37 +02:00
parent 14d37c603b
commit c548f17f1e
5 changed files with 2798 additions and 33 deletions
+1389 -11
View File
File diff suppressed because it is too large Load Diff