fix(core): silent ABORT, and name the compile-only condition
Two reporting bugs found from the browser shell. An uncaught ABORT printed 'ABORT (throw -1)'. The standard defines ABORT as 'empty the data stack and perform the function of QUIT', and QUIT displays no message; gforth and SwiftForth are both silent. It now takes the same silent path QUIT got in 0.2.5. CATCH still reports -1 and still restores the stack depth, and ABORT" still prints its text -- different word, different code (-2). Compile-only constructs used in interpretation state claimed to be an 'unknown word', which is misleading for a word the system obviously knows: ABORT", IF, THEN, LOOP, LITERAL, RECURSE and friends. They now report 'interpreting a compile-only word: <name> (throw -14)', the standard condition both reference engines give. The check reuses the existing INTERPRETER_TOKENS table at the point where interpretation has already failed, so a genuine typo still reports 'unknown word'. Ships as v0.2.6.
This commit is contained in:
@@ -12,7 +12,7 @@ workspace = true
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
wafer-core = { path = "../core", version = "0.2.5", default-features = false, features = ["crypto"] }
|
||||
wafer-core = { path = "../core", version = "0.2.6", default-features = false, features = ["crypto"] }
|
||||
wasm-bindgen = "0.2"
|
||||
js-sys = "0.3"
|
||||
send_wrapper = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user