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:
@@ -8,10 +8,10 @@ license.workspace = true
|
||||
[dependencies]
|
||||
wasm-encoder = { workspace = true }
|
||||
wasmparser = { workspace = true }
|
||||
wasmtime = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
proptest = { workspace = true }
|
||||
insta = { workspace = true }
|
||||
wasmtime = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user