diff --git a/src/waforth.wat b/src/waforth.wat index fcf4aa3..a3aa871 100644 --- a/src/waforth.wat +++ b/src/waforth.wat @@ -815,7 +815,7 @@ (!def_word "FIND" "$find") ;; 6.1.1650 - (func $here + (func $here (export "HERE") (i32.store (get_global $tos) (get_global $here)) (set_global $tos (i32.add (get_global $tos) (i32.const 4)))) (!def_word "HERE" "$here") @@ -1907,6 +1907,11 @@ EOF (call $shell_emit (i32.const 10)) (get_local $result)) + ;; Used for experiments + (func (export "set_state") (param $latest i32) (param $here i32) + (set_global $latest (get_local $latest)) + (set_global $here (get_local $here))) + (table (export "table") !tableStartIndex anyfunc) (global $latest (mut i32) (i32.const !dictionaryLatest)) (global $here (mut i32) (i32.const !dictionaryTop))