From b13d7fe4d7a655ad01445f5767d254d233beb61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Tue, 31 May 2022 20:45:22 +0200 Subject: [PATCH] ?DO --- src/waforth.wat | 699 +++++++++--------- .../forth2012-test-suite/coreexttest.fth | 100 +-- src/web/tests/suite.js | 14 + 3 files changed, 424 insertions(+), 389 deletions(-) diff --git a/src/waforth.wat b/src/waforth.wat index f88b43b..4c73449 100644 --- a/src/waforth.wat +++ b/src/waforth.wat @@ -64,7 +64,7 @@ ;; COMPILE_CALL_INDEX := 5 ;; PUSH_INDIRECT_INDEX := 6 ;; END_DO_INDEX := 9 - (table (export "table") 0xa8 funcref) + (table (export "table") 0xa9 funcref) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -211,12 +211,20 @@ (data (i32.const 0x20094) "\00\00\00\00" "\01" "! " "\10\00\00\00") (elem (i32.const 0x10) $!) + ;; [6.2.0620](https://forth-standard.org/standard/core/qDO) + (func $?DO (param $tos i32) (result i32) + (local.get $tos) + (call $ensureCompiling) + (call $compileDo (i32.const 1))) + (data (i32.const 0x200a0) "\94\00\02\00" "\83" (; F_IMMEDIATE ;) "?DO" "\11\00\00\00") + (elem (i32.const 0x11) $?DO) + ;; [6.2.0200](https://forth-standard.org/standard/core/Dotp) (func $.p (param $tos i32) (result i32) (call $type (call $parse (i32.const 0x29 (; = ')' ;)))) (local.get $tos)) - (data (i32.const 0x200a0) "\94\00\02\00" "\82" (; F_IMMEDIATE ;) ".( " "\11\00\00\00") - (elem (i32.const 0x11) $.p) + (data (i32.const 0x200ac) "\a0\00\02\00" "\82" (; F_IMMEDIATE ;) ".( " "\12\00\00\00") + (elem (i32.const 0x12) $.p) ;; [6.1.0030](https://forth-standard.org/standard/core/num) (func $# (param $tos i32) (result i32) @@ -225,7 +233,7 @@ (local $bbtos i32) (local $m i64) (local $npo i32) - (local.set $base (i64.extend_i32_u (i32.load (i32.const 0x20364 (; = body(BASE) ;))))) + (local.set $base (i64.extend_i32_u (i32.load (i32.const 0x20370 (; = body(BASE) ;))))) (local.set $v (i64.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (local.set $m (i64.rem_u (local.get $v) (local.get $base))) (local.set $v (i64.div_u (local.get $v) (local.get $base))) @@ -234,16 +242,16 @@ (i64.store (local.get $bbtos) (local.get $v)) (global.set $po (local.get $npo)) (local.get $tos)) - (data (i32.const 0x200ac) "\a0\00\02\00" "\01" "# " "\12\00\00\00") - (elem (i32.const 0x12) $#) + (data (i32.const 0x200b8) "\ac\00\02\00" "\01" "# " "\13\00\00\00") + (elem (i32.const 0x13) $#) ;; [6.1.0040](https://forth-standard.org/standard/core/num-end) (func $#> (param $tos i32) (result i32) (i32.store (i32.sub (local.get $tos) (i32.const 8)) (global.get $po)) (i32.store (i32.sub (local.get $tos) (i32.const 4)) (i32.sub (i32.add (global.get $here) (i32.const 0x200 (; = PICTURED_OUTPUT_OFFSET ;))) (global.get $po))) (local.get $tos)) - (data (i32.const 0x200b8) "\ac\00\02\00" "\02" "#> " "\13\00\00\00") - (elem (i32.const 0x13) $#>) + (data (i32.const 0x200c4) "\b8\00\02\00" "\02" "#> " "\14\00\00\00") + (elem (i32.const 0x14) $#>) ;; [6.1.0050](https://forth-standard.org/standard/core/numS) (func $#S (param $tos i32) (result i32) @@ -252,7 +260,7 @@ (local $bbtos i32) (local $m i64) (local $po i32) - (local.set $base (i64.extend_i32_u (i32.load (i32.const 0x20364 (; = body(BASE) ;))))) + (local.set $base (i64.extend_i32_u (i32.load (i32.const 0x20370 (; = body(BASE) ;))))) (local.set $v (i64.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (local.set $po (global.get $po)) (loop $loop @@ -264,22 +272,22 @@ (i64.store (local.get $bbtos) (local.get $v)) (global.set $po (local.get $po)) (local.get $tos)) - (data (i32.const 0x200c4) "\b8\00\02\00" "\02" "#S " "\14\00\00\00") - (elem (i32.const 0x14) $#S) + (data (i32.const 0x200d0) "\c4\00\02\00" "\02" "#S " "\15\00\00\00") + (elem (i32.const 0x15) $#S) ;; [6.1.0070](https://forth-standard.org/standard/core/Tick) (func $' (param $tos i32) (result i32) (i32.store (local.get $tos) (drop (call $find! (call $parseName)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x200d0) "\c4\00\02\00" "\01" "' " "\15\00\00\00") - (elem (i32.const 0x15) $') + (data (i32.const 0x200dc) "\d0\00\02\00" "\01" "' " "\16\00\00\00") + (elem (i32.const 0x16) $') ;; [6.1.0080](https://forth-standard.org/standard/core/p) (func $paren (param $tos i32) (result i32) (drop (drop (call $parse (i32.const 0x29 (; = ')' ;))))) (local.get $tos)) - (data (i32.const 0x200dc) "\d0\00\02\00" "\81" (; F_IMMEDIATE ;) "( " "\16\00\00\00") - (elem (i32.const 0x16) $paren) + (data (i32.const 0x200e8) "\dc\00\02\00" "\81" (; F_IMMEDIATE ;) "( " "\17\00\00\00") + (elem (i32.const 0x17) $paren) ;; [6.1.0090](https://forth-standard.org/standard/core/Times) (func $* (param $tos i32) (result i32) @@ -289,8 +297,8 @@ (i32.mul (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x200e8) "\dc\00\02\00" "\01" "* " "\17\00\00\00") - (elem (i32.const 0x17) $*) + (data (i32.const 0x200f4) "\e8\00\02\00" "\01" "* " "\18\00\00\00") + (elem (i32.const 0x18) $*) ;; [6.1.0100](https://forth-standard.org/standard/core/TimesDiv) (func $*/ (param $tos i32) (result i32) @@ -303,8 +311,8 @@ (i64.extend_i32_s (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8)))))) (i64.extend_i32_s (i32.load (i32.sub (local.get $tos) (i32.const 4))))))) (local.get $bbtos)) - (data (i32.const 0x200f4) "\e8\00\02\00" "\02" "*/ " "\18\00\00\00") - (elem (i32.const 0x18) $*/) + (data (i32.const 0x20100) "\f4\00\02\00" "\02" "*/ " "\19\00\00\00") + (elem (i32.const 0x19) $*/) ;; [6.1.0110](https://forth-standard.org/standard/core/TimesDivMOD) (func $*/MOD (param $tos i32) (result i32) @@ -321,8 +329,8 @@ (local.tee $x2 (i64.extend_i32_s (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))))))))) (i32.store (local.get $bbtos) (i32.wrap_i64 (i64.div_s (local.get $x1) (local.get $x2)))) (local.get $btos)) - (data (i32.const 0x20100) "\f4\00\02\00" "\05" "*/MOD " "\19\00\00\00") - (elem (i32.const 0x19) $*/MOD) + (data (i32.const 0x2010c) "\00\01\02\00" "\05" "*/MOD " "\1a\00\00\00") + (elem (i32.const 0x1a) $*/MOD) ;; [6.1.0120](https://forth-standard.org/standard/core/Plus) (func $+ (param $tos i32) (result i32) @@ -332,8 +340,8 @@ (i32.add (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x20110) "\00\01\02\00" "\01" "+ " "\1a\00\00\00") - (elem (i32.const 0x1a) $+) + (data (i32.const 0x2011c) "\0c\01\02\00" "\01" "+ " "\1b\00\00\00") + (elem (i32.const 0x1b) $+) ;; [6.1.0130](https://forth-standard.org/standard/core/PlusStore) (func $+! (param $tos i32) (result i32) @@ -343,16 +351,16 @@ (i32.add (i32.load (local.get $addr)) (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8)))))) (local.get $bbtos)) - (data (i32.const 0x2011c) "\10\01\02\00" "\02" "+! " "\1b\00\00\00") - (elem (i32.const 0x1b) $+!) + (data (i32.const 0x20128) "\1c\01\02\00" "\02" "+! " "\1c\00\00\00") + (elem (i32.const 0x1c) $+!) ;; [6.1.0140](https://forth-standard.org/standard/core/PlusLOOP) (func $+LOOP (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compilePlusLoop)) - (data (i32.const 0x20128) "\1c\01\02\00" "\85" (; F_IMMEDIATE ;) "+LOOP " "\1c\00\00\00") - (elem (i32.const 0x1c) $+LOOP) + (data (i32.const 0x20134) "\28\01\02\00" "\85" (; F_IMMEDIATE ;) "+LOOP " "\1d\00\00\00") + (elem (i32.const 0x1d) $+LOOP) ;; [6.1.0150](https://forth-standard.org/standard/core/Comma) (func $comma (param $tos i32) (result i32) @@ -361,8 +369,8 @@ (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (global.set $here (i32.add (global.get $here) (i32.const 4))) (i32.sub (local.get $tos) (i32.const 4))) - (data (i32.const 0x20138) "\28\01\02\00" "\01" ", " "\1d\00\00\00") - (elem (i32.const 0x1d) $comma) + (data (i32.const 0x20144) "\34\01\02\00" "\01" ", " "\1e\00\00\00") + (elem (i32.const 0x1e) $comma) ;; [6.1.0160](https://forth-standard.org/standard/core/Minus) (func $- (param $tos i32) (result i32) @@ -372,8 +380,8 @@ (i32.sub (i32.load (local.get $bbtos)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $btos)) - (data (i32.const 0x20144) "\38\01\02\00" "\01" "- " "\1e\00\00\00") - (elem (i32.const 0x1e) $-) + (data (i32.const 0x20150) "\44\01\02\00" "\01" "- " "\1f\00\00\00") + (elem (i32.const 0x1f) $-) ;; [6.1.0180](https://forth-standard.org/standard/core/d) (func $. (param $tos i32) (result i32) @@ -384,19 +392,19 @@ (then (call $shell_emit (i32.const 0x2d)) (local.set $v (i32.sub (i32.const 0) (local.get $v))))) - (call $U._ (local.get $v) (i32.load (i32.const 0x20364 (; = body(BASE) ;)))) + (call $U._ (local.get $v) (i32.load (i32.const 0x20370 (; = body(BASE) ;)))) (call $shell_emit (i32.const 0x20))) - (data (i32.const 0x20150) "\44\01\02\00" "\01" ". " "\1f\00\00\00") - (elem (i32.const 0x1f) $.) + (data (i32.const 0x2015c) "\50\01\02\00" "\01" ". " "\20\00\00\00") + (elem (i32.const 0x20) $.) ;; [6.1.0190](https://forth-standard.org/standard/core/Dotq) (func $.q (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $Sq) - (call $emitICall (i32.const 0) (i32.const 0x96 (; = index("TYPE") ;)))) - (data (i32.const 0x2015c) "\50\01\02\00" "\82" (; F_IMMEDIATE ;) ".\22 " "\20\00\00\00") - (elem (i32.const 0x20) $.q) + (call $emitICall (i32.const 0) (i32.const 0x97 (; = index("TYPE") ;)))) + (data (i32.const 0x20168) "\5c\01\02\00" "\82" (; F_IMMEDIATE ;) ".\22 " "\21\00\00\00") + (elem (i32.const 0x21) $.q) ;; [15.6.1.0220](https://forth-standard.org/standard/tools/DotS) (func $.S (param $tos i32) (result i32) @@ -405,13 +413,13 @@ (block $endLoop (loop $loop (br_if $endLoop (i32.ge_u (local.get $p) (local.get $tos))) - (call $U._ (i32.load (local.get $p)) (i32.load (i32.const 0x20364 (; = body(BASE) ;)))) + (call $U._ (i32.load (local.get $p)) (i32.load (i32.const 0x20370 (; = body(BASE) ;)))) (call $shell_emit (i32.const 0x20)) (local.set $p (i32.add (local.get $p) (i32.const 4))) (br $loop))) (local.get $tos)) - (data (i32.const 0x20168) "\5c\01\02\00" "\02" ".S " "\21\00\00\00") - (elem (i32.const 0x21) $.S) + (data (i32.const 0x20174) "\68\01\02\00" "\02" ".S " "\22\00\00\00") + (elem (i32.const 0x22) $.S) ;; [6.1.0230](https://forth-standard.org/standard/core/Div) (func $/ (param $tos i32) (result i32) @@ -423,8 +431,8 @@ (i32.store (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))) (i32.div_s (i32.load (local.get $bbtos)) (local.get $divisor))) (local.get $btos)) - (data (i32.const 0x20174) "\68\01\02\00" "\01" "/ " "\22\00\00\00") - (elem (i32.const 0x22) $/) + (data (i32.const 0x20180) "\74\01\02\00" "\01" "/ " "\23\00\00\00") + (elem (i32.const 0x23) $/) ;; [6.1.0240](https://forth-standard.org/standard/core/DivMOD) (func $/MOD (param $tos i32) (result i32) @@ -438,8 +446,8 @@ (i32.const 4))))))) (i32.store (local.get $btos) (i32.div_s (local.get $n1) (local.get $n2))) (local.get $tos)) - (data (i32.const 0x20180) "\74\01\02\00" "\04" "/MOD " "\23\00\00\00") - (elem (i32.const 0x23) $/MOD) + (data (i32.const 0x2018c) "\80\01\02\00" "\04" "/MOD " "\24\00\00\00") + (elem (i32.const 0x24) $/MOD) ;; [6.1.0250](https://forth-standard.org/standard/core/Zeroless) (func $0< (param $tos i32) (result i32) @@ -450,8 +458,8 @@ (then (i32.store (local.get $btos) (i32.const -1))) (else (i32.store (local.get $btos) (i32.const 0)))) (local.get $tos)) - (data (i32.const 0x20190) "\80\01\02\00" "\02" "0< " "\24\00\00\00") - (elem (i32.const 0x24) $0<) + (data (i32.const 0x2019c) "\8c\01\02\00" "\02" "0< " "\25\00\00\00") + (elem (i32.const 0x25) $0<) ;; [6.1.0270](https://forth-standard.org/standard/core/ZeroEqual) (func $0= (param $tos i32) (result i32) @@ -461,8 +469,8 @@ (then (i32.store (local.get $btos) (i32.const -1))) (else (i32.store (local.get $btos) (i32.const 0)))) (local.get $tos)) - (data (i32.const 0x2019c) "\90\01\02\00" "\02" "0= " "\25\00\00\00") - (elem (i32.const 0x25) $0=) + (data (i32.const 0x201a8) "\9c\01\02\00" "\02" "0= " "\26\00\00\00") + (elem (i32.const 0x26) $0=) ;; [6.2.0280](https://forth-standard.org/standard/core/Zeromore) (func $0> (param $tos i32) (result i32) @@ -473,8 +481,8 @@ (then (i32.store (local.get $btos) (i32.const -1))) (else (i32.store (local.get $btos) (i32.const 0)))) (local.get $tos)) - (data (i32.const 0x201a8) "\9c\01\02\00" "\02" "0> " "\26\00\00\00") - (elem (i32.const 0x26) $0>) + (data (i32.const 0x201b4) "\a8\01\02\00" "\02" "0> " "\27\00\00\00") + (elem (i32.const 0x27) $0>) ;; [6.1.0290](https://forth-standard.org/standard/core/OnePlus) (func $1+ (param $tos i32) (result i32) @@ -482,8 +490,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.add (i32.load (local.get $btos)) (i32.const 1))) (local.get $tos)) - (data (i32.const 0x201b4) "\a8\01\02\00" "\02" "1+ " "\27\00\00\00") - (elem (i32.const 0x27) $1+) + (data (i32.const 0x201c0) "\b4\01\02\00" "\02" "1+ " "\28\00\00\00") + (elem (i32.const 0x28) $1+) ;; [6.1.0300](https://forth-standard.org/standard/core/OneMinus) (func $1- (param $tos i32) (result i32) @@ -491,15 +499,15 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.sub (i32.load (local.get $btos)) (i32.const 1))) (local.get $tos)) - (data (i32.const 0x201c0) "\b4\01\02\00" "\02" "1- " "\28\00\00\00") - (elem (i32.const 0x28) $1-) + (data (i32.const 0x201cc) "\c0\01\02\00" "\02" "1- " "\29\00\00\00") + (elem (i32.const 0x29) $1-) ;; [6.1.0310](https://forth-standard.org/standard/core/TwoStore) (func $2! (param $tos i32) (result i32) (local.get $tos) (call $SWAP) (call $OVER) (call $!) (call $CELL+) (call $!)) - (data (i32.const 0x201cc) "\c0\01\02\00" "\02" "2! " "\29\00\00\00") - (elem (i32.const 0x29) $2!) + (data (i32.const 0x201d8) "\cc\01\02\00" "\02" "2! " "\2a\00\00\00") + (elem (i32.const 0x2a) $2!) ;; [6.1.0320](https://forth-standard.org/standard/core/TwoTimes) (func $2* (param $tos i32) (result i32) @@ -507,8 +515,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.shl (i32.load (local.get $btos)) (i32.const 1))) (local.get $tos)) - (data (i32.const 0x201d8) "\cc\01\02\00" "\02" "2* " "\2a\00\00\00") - (elem (i32.const 0x2a) $2*) + (data (i32.const 0x201e4) "\d8\01\02\00" "\02" "2* " "\2b\00\00\00") + (elem (i32.const 0x2b) $2*) ;; [6.1.0330](https://forth-standard.org/standard/core/TwoDiv) (func $2/ (param $tos i32) (result i32) @@ -516,8 +524,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.shr_s (i32.load (local.get $btos)) (i32.const 1))) (local.get $tos)) - (data (i32.const 0x201e4) "\d8\01\02\00" "\02" "2/ " "\2b\00\00\00") - (elem (i32.const 0x2b) $2/) + (data (i32.const 0x201f0) "\e4\01\02\00" "\02" "2/ " "\2c\00\00\00") + (elem (i32.const 0x2c) $2/) ;; [6.1.0350](https://forth-standard.org/standard/core/TwoFetch) (func $2@ (param $tos i32) (result i32) @@ -527,14 +535,14 @@ (call $@) (call $SWAP) (call $@)) - (data (i32.const 0x201f0) "\e4\01\02\00" "\02" "2@ " "\2c\00\00\00") - (elem (i32.const 0x2c) $2@) + (data (i32.const 0x201fc) "\f0\01\02\00" "\02" "2@ " "\2d\00\00\00") + (elem (i32.const 0x2d) $2@) ;; [6.1.0370](https://forth-standard.org/standard/core/TwoDROP) (func $2DROP (param $tos i32) (result i32) (i32.sub (local.get $tos) (i32.const 8))) - (data (i32.const 0x201fc) "\f0\01\02\00" "\05" "2DROP " "\2d\00\00\00") - (elem (i32.const 0x2d) $2DROP) + (data (i32.const 0x20208) "\fc\01\02\00" "\05" "2DROP " "\2e\00\00\00") + (elem (i32.const 0x2e) $2DROP) ;; [6.1.0380](https://forth-standard.org/standard/core/TwoDUP) (func $2DUP (param $tos i32) (result i32) @@ -543,8 +551,8 @@ (i32.store (i32.add (local.get $tos) (i32.const 4)) (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (i32.add (local.get $tos) (i32.const 8))) - (data (i32.const 0x2020c) "\fc\01\02\00" "\04" "2DUP " "\2e\00\00\00") - (elem (i32.const 0x2e) $2DUP) + (data (i32.const 0x20218) "\08\02\02\00" "\04" "2DUP " "\2f\00\00\00") + (elem (i32.const 0x2f) $2DUP) ;; [6.1.0400](https://forth-standard.org/standard/core/TwoOVER) (func $2OVER (param $tos i32) (result i32) @@ -553,8 +561,8 @@ (i32.store (i32.add (local.get $tos) (i32.const 4)) (i32.load (i32.sub (local.get $tos) (i32.const 12)))) (i32.add (local.get $tos) (i32.const 8))) - (data (i32.const 0x2021c) "\0c\02\02\00" "\05" "2OVER " "\2f\00\00\00") - (elem (i32.const 0x2f) $2OVER) + (data (i32.const 0x20228) "\18\02\02\00" "\05" "2OVER " "\30\00\00\00") + (elem (i32.const 0x30) $2OVER) ;; [6.1.0430](https://forth-standard.org/standard/core/TwoSWAP) (func $2SWAP (param $tos i32) (result i32) @@ -571,8 +579,8 @@ (i32.store (i32.sub (local.get $tos) (i32.const 4)) (local.get $x2)) (local.get $tos)) - (data (i32.const 0x2022c) "\1c\02\02\00" "\05" "2SWAP " "\30\00\00\00") - (elem (i32.const 0x30) $2SWAP) + (data (i32.const 0x20238) "\28\02\02\00" "\05" "2SWAP " "\31\00\00\00") + (elem (i32.const 0x31) $2SWAP) ;; [6.1.0450](https://forth-standard.org/standard/core/Colon) (func $: (param $tos i32) (result i32) @@ -595,8 +603,8 @@ (call $startColon (i32.const 0)) (call $right-bracket)) - (data (i32.const 0x2023c) "\2c\02\02\00" "\01" ": " "\31\00\00\00") - (elem (i32.const 0x31) $:) + (data (i32.const 0x20248) "\38\02\02\00" "\01" ": " "\32\00\00\00") + (elem (i32.const 0x32) $:) ;; [6.1.0460](https://forth-standard.org/standard/core/Semi) (func $semicolon (param $tos i32) (result i32) @@ -605,8 +613,8 @@ (call $endColon) (call $hidden) (call $left-bracket)) - (data (i32.const 0x20248) "\3c\02\02\00" "\81" (; F_IMMEDIATE ;) "; " "\32\00\00\00") - (elem (i32.const 0x32) $semicolon) + (data (i32.const 0x20254) "\48\02\02\00" "\81" (; F_IMMEDIATE ;) "; " "\33\00\00\00") + (elem (i32.const 0x33) $semicolon) ;; [6.1.0480](https://forth-standard.org/standard/core/less) (func $< (param $tos i32) (result i32) @@ -617,15 +625,15 @@ (then (i32.store (local.get $bbtos) (i32.const -1))) (else (i32.store (local.get $bbtos) (i32.const 0)))) (local.get $btos)) - (data (i32.const 0x20254) "\48\02\02\00" "\01" "< " "\33\00\00\00") - (elem (i32.const 0x33) $<) + (data (i32.const 0x20260) "\54\02\02\00" "\01" "< " "\34\00\00\00") + (elem (i32.const 0x34) $<) ;; [6.1.0490](https://forth-standard.org/standard/core/num-start) (func $<# (param $tos i32) (result i32) (global.set $po (i32.add (global.get $here) (i32.const 0x200 (; = PICTURED_OUTPUT_OFFSET ;)))) (local.get $tos)) - (data (i32.const 0x20260) "\54\02\02\00" "\02" "<# " "\34\00\00\00") - (elem (i32.const 0x34) $<#) + (data (i32.const 0x2026c) "\60\02\02\00" "\02" "<# " "\35\00\00\00") + (elem (i32.const 0x35) $<#) ;; [6.1.0530](https://forth-standard.org/standard/core/Equal) (func $= (param $tos i32) (result i32) @@ -636,8 +644,8 @@ (then (i32.store (local.get $bbtos) (i32.const -1))) (else (i32.store (local.get $bbtos) (i32.const 0)))) (local.get $btos)) - (data (i32.const 0x2026c) "\60\02\02\00" "\01" "= " "\35\00\00\00") - (elem (i32.const 0x35) $=) + (data (i32.const 0x20278) "\6c\02\02\00" "\01" "= " "\36\00\00\00") + (elem (i32.const 0x36) $=) ;; [6.1.0540](https://forth-standard.org/standard/core/more) (func $> (param $tos i32) (result i32) @@ -648,8 +656,8 @@ (then (i32.store (local.get $bbtos) (i32.const -1))) (else (i32.store (local.get $bbtos) (i32.const 0)))) (local.get $btos)) - (data (i32.const 0x20278) "\6c\02\02\00" "\01" "> " "\36\00\00\00") - (elem (i32.const 0x36) $>) + (data (i32.const 0x20284) "\78\02\02\00" "\01" "> " "\37\00\00\00") + (elem (i32.const 0x37) $>) ;; [6.1.0550](https://forth-standard.org/standard/core/toBODY) (func $>BODY (param $tos i32) (result i32) @@ -657,11 +665,11 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.add (call $body (i32.load (local.get $btos))) (i32.const 4))) (local.get $tos)) - (data (i32.const 0x20284) "\78\02\02\00" "\05" ">BODY " "\37\00\00\00") - (elem (i32.const 0x37) $>BODY) + (data (i32.const 0x20290) "\84\02\02\00" "\05" ">BODY " "\38\00\00\00") + (elem (i32.const 0x38) $>BODY) ;; [6.1.0560](https://forth-standard.org/standard/core/toIN) - (data (i32.const 0x20294) "\84\02\02\00" "\43" (; F_DATA ;) ">IN" "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\00\00\00\00") + (data (i32.const 0x202a0) "\90\02\02\00" "\43" (; F_DATA ;) ">IN" "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\00\00\00\00") ;; [6.1.0570](https://forth-standard.org/standard/core/toNUMBER) (func $>NUMBER (param $tos i32) (result i32) @@ -682,16 +690,16 @@ (i32.store (local.get $bbtos) (local.get $rest)) (i64.store (local.get $bbbbtos) (local.get $value)) (local.get $tos)) - (data (i32.const 0x202a4) "\94\02\02\00" "\07" ">NUMBER" "\38\00\00\00") - (elem (i32.const 0x38) $>NUMBER) + (data (i32.const 0x202b0) "\a0\02\02\00" "\07" ">NUMBER" "\39\00\00\00") + (elem (i32.const 0x39) $>NUMBER) ;; [6.1.0580](https://forth-standard.org/standard/core/toR) (func $>R (param $tos i32) (result i32) (local.tee $tos (i32.sub (local.get $tos) (i32.const 4))) (i32.store (global.get $tors) (i32.load (local.get $tos))) (global.set $tors (i32.add (global.get $tors) (i32.const 4)))) - (data (i32.const 0x202b4) "\a4\02\02\00" "\02" ">R " "\39\00\00\00") - (elem (i32.const 0x39) $>R) + (data (i32.const 0x202c0) "\b0\02\02\00" "\02" ">R " "\3a\00\00\00") + (elem (i32.const 0x3a) $>R) ;; [6.1.0630](https://forth-standard.org/standard/core/qDUP) (func $?DUP (param $tos i32) (result i32) @@ -703,8 +711,8 @@ (i32.add (local.get $tos) (i32.const 4))) (else (local.get $tos)))) - (data (i32.const 0x202c0) "\b4\02\02\00" "\04" "?DUP " "\3a\00\00\00") - (elem (i32.const 0x3a) $?DUP) + (data (i32.const 0x202cc) "\c0\02\02\00" "\04" "?DUP " "\3b\00\00\00") + (elem (i32.const 0x3b) $?DUP) ;; [6.1.0650](https://forth-standard.org/standard/core/Fetch) (func $@ (param $tos i32) (result i32) @@ -712,26 +720,26 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.load (i32.load (local.get $btos)))) (local.get $tos)) - (data (i32.const 0x202d0) "\c0\02\02\00" "\01" "@ " "\3b\00\00\00") - (elem (i32.const 0x3b) $@) + (data (i32.const 0x202dc) "\cc\02\02\00" "\01" "@ " "\3c\00\00\00") + (elem (i32.const 0x3c) $@) ;; [6.1.0670](https://forth-standard.org/standard/core/ABORT) (func $ABORT (param $tos i32) (result i32) (global.set $error (i32.const 0x3 (; = ERR_ABORT ;))) (call $quit (i32.const 0x10000 (; = STACK_BASE ;)))) - (data (i32.const 0x202dc) "\d0\02\02\00" "\05" "ABORT " "\3c\00\00\00") - (elem (i32.const 0x3c) $ABORT) + (data (i32.const 0x202e8) "\dc\02\02\00" "\05" "ABORT " "\3d\00\00\00") + (elem (i32.const 0x3d) $ABORT) ;; [6.1.0680](https://forth-standard.org/standard/core/ABORTq) (func $ABORTq (param $tos i32) (result i32) (local.get $tos) (call $compileIf) (call $Sq) - (call $emitICall (i32.const 0) (i32.const 0x96 (; = index("TYPE") ;))) - (call $emitICall (i32.const 0) (i32.const 0x3c (; = index("ABORT") ;))) + (call $emitICall (i32.const 0) (i32.const 0x97 (; = index("TYPE") ;))) + (call $emitICall (i32.const 0) (i32.const 0x3d (; = index("ABORT") ;))) (call $compileThen)) - (data (i32.const 0x202ec) "\dc\02\02\00" "\86" (; F_IMMEDIATE ;) "ABORT\22 " "\3d\00\00\00") - (elem (i32.const 0x3d) $ABORTq) + (data (i32.const 0x202f8) "\e8\02\02\00" "\86" (; F_IMMEDIATE ;) "ABORT\22 " "\3e\00\00\00") + (elem (i32.const 0x3e) $ABORTq) ;; [6.1.0690](https://forth-standard.org/standard/core/ABS) (func $ABS (param $tos i32) (result i32) @@ -743,8 +751,8 @@ (local.tee $y (i32.shr_s (local.get $v) (i32.const 31)))) (local.get $y))) (local.get $tos)) - (data (i32.const 0x202fc) "\ec\02\02\00" "\03" "ABS" "\3e\00\00\00") - (elem (i32.const 0x3e) $ABS) + (data (i32.const 0x20308) "\f8\02\02\00" "\03" "ABS" "\3f\00\00\00") + (elem (i32.const 0x3f) $ABS) ;; [6.1.0695](https://forth-standard.org/standard/core/ACCEPT) (func $ACCEPT (param $tos i32) (result i32) @@ -768,15 +776,15 @@ (br_if $loop (i32.lt_u (local.get $p) (local.get $endp))))) (i32.store (local.get $bbtos) (i32.sub (local.get $p) (local.get $addr))) (local.get $btos)) - (data (i32.const 0x20308) "\fc\02\02\00" "\06" "ACCEPT " "\3f\00\00\00") - (elem (i32.const 0x3f) $ACCEPT) + (data (i32.const 0x20314) "\08\03\02\00" "\06" "ACCEPT " "\40\00\00\00") + (elem (i32.const 0x40) $ACCEPT) ;; [6.1.0705](https://forth-standard.org/standard/core/ALIGN) (func $ALIGN (param $tos i32) (result i32) (global.set $here (call $aligned (global.get $here))) (local.get $tos)) - (data (i32.const 0x20318) "\08\03\02\00" "\05" "ALIGN " "\40\00\00\00") - (elem (i32.const 0x40) $ALIGN) + (data (i32.const 0x20324) "\14\03\02\00" "\05" "ALIGN " "\41\00\00\00") + (elem (i32.const 0x41) $ALIGN) ;; [6.1.0706](https://forth-standard.org/standard/core/ALIGNED) (func $ALIGNED (param $tos i32) (result i32) @@ -784,8 +792,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (call $aligned (i32.load (local.get $btos)))) (local.get $tos)) - (data (i32.const 0x20328) "\18\03\02\00" "\07" "ALIGNED" "\41\00\00\00") - (elem (i32.const 0x41) $ALIGNED) + (data (i32.const 0x20334) "\24\03\02\00" "\07" "ALIGNED" "\42\00\00\00") + (elem (i32.const 0x42) $ALIGNED) ;; [6.1.0710](https://forth-standard.org/standard/core/ALLOT) (func $ALLOT (param $tos i32) (result i32) @@ -793,8 +801,8 @@ (local.get $tos) (local.set $v (call $pop)) (global.set $here (i32.add (global.get $here) (local.get $v)))) - (data (i32.const 0x20338) "\28\03\02\00" "\05" "ALLOT " "\42\00\00\00") - (elem (i32.const 0x42) $ALLOT) + (data (i32.const 0x20344) "\34\03\02\00" "\05" "ALLOT " "\43\00\00\00") + (elem (i32.const 0x43) $ALLOT) ;; [6.1.0720](https://forth-standard.org/standard/core/AND) (func $AND (param $tos i32) (result i32) @@ -804,25 +812,25 @@ (i32.and (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x20348) "\38\03\02\00" "\03" "AND" "\43\00\00\00") - (elem (i32.const 0x43) $AND) + (data (i32.const 0x20354) "\44\03\02\00" "\03" "AND" "\44\00\00\00") + (elem (i32.const 0x44) $AND) ;; [6.1.0750](https://forth-standard.org/standard/core/BASE) - (data (i32.const 0x20354) "\48\03\02\00" "\44" (; F_DATA ;) "BASE " "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\0a\00\00\00" (; = pack(10) ;)) + (data (i32.const 0x20360) "\54\03\02\00" "\44" (; F_DATA ;) "BASE " "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\0a\00\00\00" (; = pack(10) ;)) ;; [6.1.0760](https://forth-standard.org/standard/core/BEGIN) (func $BEGIN (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileBegin)) - (data (i32.const 0x20368) "\54\03\02\00" "\85" (; F_IMMEDIATE ;) "BEGIN " "\44\00\00\00") - (elem (i32.const 0x44) $BEGIN) + (data (i32.const 0x20374) "\60\03\02\00" "\85" (; F_IMMEDIATE ;) "BEGIN " "\45\00\00\00") + (elem (i32.const 0x45) $BEGIN) ;; [6.1.0770](https://forth-standard.org/standard/core/BL) (func $BL (param $tos i32) (result i32) (call $push (local.get $tos) (i32.const 32))) - (data (i32.const 0x20378) "\68\03\02\00" "\02" "BL " "\45\00\00\00") - (elem (i32.const 0x45) $BL) + (data (i32.const 0x20384) "\74\03\02\00" "\02" "BL " "\46\00\00\00") + (elem (i32.const 0x46) $BL) ;; [6.1.0850](https://forth-standard.org/standard/core/CStore) (func $C! (param $tos i32) (result i32) @@ -830,8 +838,8 @@ (i32.store8 (i32.load (i32.sub (local.get $tos) (i32.const 4))) (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (local.get $bbtos)) - (data (i32.const 0x20384) "\78\03\02\00" "\02" "C! " "\46\00\00\00") - (elem (i32.const 0x46) $C!) + (data (i32.const 0x20390) "\84\03\02\00" "\02" "C! " "\47\00\00\00") + (elem (i32.const 0x47) $C!) ;; [6.1.0860](https://forth-standard.org/standard/core/CComma) (func $Cc (param $tos i32) (result i32) @@ -839,8 +847,8 @@ (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (global.set $here (i32.add (global.get $here) (i32.const 1))) (i32.sub (local.get $tos) (i32.const 4))) - (data (i32.const 0x20390) "\84\03\02\00" "\02" "C, " "\47\00\00\00") - (elem (i32.const 0x47) $Cc) + (data (i32.const 0x2039c) "\90\03\02\00" "\02" "C, " "\48\00\00\00") + (elem (i32.const 0x48) $Cc) ;; [6.2.0855](https://forth-standard.org/standard/core/Cq) (func $Cq (param $tos i32) (result i32) @@ -858,8 +866,8 @@ (call $compilePushConst (global.get $here)) (global.set $here (call $aligned (i32.add (i32.add (global.get $here) (i32.const 1)) (local.get $len))))) - (data (i32.const 0x2039c) "\90\03\02\00" "\82" (; F_IMMEDIATE ;) "C\22 " "\48\00\00\00") - (elem (i32.const 0x48) $Cq) + (data (i32.const 0x203a8) "\9c\03\02\00" "\82" (; F_IMMEDIATE ;) "C\22 " "\49\00\00\00") + (elem (i32.const 0x49) $Cq) ;; [6.1.0870](https://forth-standard.org/standard/core/CFetch) (func $C@ (param $tos i32) (result i32) @@ -867,8 +875,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.load8_u (i32.load (local.get $btos)))) (local.get $tos)) - (data (i32.const 0x203a8) "\9c\03\02\00" "\02" "C@ " "\49\00\00\00") - (elem (i32.const 0x49) $C@) + (data (i32.const 0x203b4) "\a8\03\02\00" "\02" "C@ " "\4a\00\00\00") + (elem (i32.const 0x4a) $C@) ;; [6.1.0880](https://forth-standard.org/standard/core/CELLPlus) (func $CELL+ (param $tos i32) (result i32) @@ -876,8 +884,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.add (i32.load (local.get $btos)) (i32.const 4))) (local.get $tos)) - (data (i32.const 0x203b4) "\a8\03\02\00" "\05" "CELL+ " "\4a\00\00\00") - (elem (i32.const 0x4a) $CELL+) + (data (i32.const 0x203c0) "\b4\03\02\00" "\05" "CELL+ " "\4b\00\00\00") + (elem (i32.const 0x4b) $CELL+) ;; [6.1.0890](https://forth-standard.org/standard/core/CELLS) (func $CELLS (param $tos i32) (result i32) @@ -885,8 +893,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.shl (i32.load (local.get $btos)) (i32.const 2))) (local.get $tos)) - (data (i32.const 0x203c4) "\b4\03\02\00" "\05" "CELLS " "\4b\00\00\00") - (elem (i32.const 0x4b) $CELLS) + (data (i32.const 0x203d0) "\c0\03\02\00" "\05" "CELLS " "\4c\00\00\00") + (elem (i32.const 0x4c) $CELLS) ;; [6.1.0895](https://forth-standard.org/standard/core/CHAR) (func $CHAR (param $tos i32) (result i32) @@ -898,20 +906,20 @@ (call $fail (i32.const 0x2001d (; = str("incomplete input") ;))))) (i32.store (local.get $tos) (i32.load8_u (local.get $addr))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x203d4) "\c4\03\02\00" "\04" "CHAR " "\4c\00\00\00") - (elem (i32.const 0x4c) $CHAR) + (data (i32.const 0x203e0) "\d0\03\02\00" "\04" "CHAR " "\4d\00\00\00") + (elem (i32.const 0x4d) $CHAR) ;; [6.1.0897](https://forth-standard.org/standard/core/CHARPlus) (func $CHAR+ (param $tos i32) (result i32) (call $1+ (local.get $tos))) - (data (i32.const 0x203e4) "\d4\03\02\00" "\05" "CHAR+ " "\4d\00\00\00") - (elem (i32.const 0x4d) $CHAR+) + (data (i32.const 0x203f0) "\e0\03\02\00" "\05" "CHAR+ " "\4e\00\00\00") + (elem (i32.const 0x4e) $CHAR+) ;; [6.1.0898](https://forth-standard.org/standard/core/CHARS) (func $CHARS (param $tos i32) (result i32) (local.get $tos)) - (data (i32.const 0x203f4) "\e4\03\02\00" "\05" "CHARS " "\4e\00\00\00") - (elem (i32.const 0x4e) $CHARS) + (data (i32.const 0x20400) "\f0\03\02\00" "\05" "CHARS " "\4f\00\00\00") + (elem (i32.const 0x4f) $CHARS) ;; [6.1.0950](https://forth-standard.org/standard/core/CONSTANT) (func $CONSTANT (param $tos i32) (result i32) @@ -922,8 +930,8 @@ (local.set $v (call $pop)) (i32.store (global.get $here) (local.get $v)) (global.set $here (i32.add (global.get $here) (i32.const 4)))) - (data (i32.const 0x20404) "\f4\03\02\00" "\08" "CONSTANT " "\4f\00\00\00") - (elem (i32.const 0x4f) $CONSTANT) + (data (i32.const 0x20410) "\00\04\02\00" "\08" "CONSTANT " "\50\00\00\00") + (elem (i32.const 0x50) $CONSTANT) ;; [6.1.0980](https://forth-standard.org/standard/core/COUNT) (func $COUNT (param $tos i32) (result i32) @@ -934,14 +942,14 @@ (i32.const 4))))))) (i32.store (local.get $btos) (i32.add (local.get $addr) (i32.const 1))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20418) "\04\04\02\00" "\05" "COUNT " "\50\00\00\00") - (elem (i32.const 0x50) $COUNT) + (data (i32.const 0x20424) "\10\04\02\00" "\05" "COUNT " "\51\00\00\00") + (elem (i32.const 0x51) $COUNT) ;; [6.1.0990](https://forth-standard.org/standard/core/CR) (func $CR (param $tos i32) (result i32) (call $push (local.get $tos) (i32.const 10)) (call $EMIT)) - (data (i32.const 0x20428) "\18\04\02\00" "\02" "CR " "\51\00\00\00") - (elem (i32.const 0x51) $CR) + (data (i32.const 0x20434) "\24\04\02\00" "\02" "CR " "\52\00\00\00") + (elem (i32.const 0x52) $CR) ;; [6.1.1000](https://forth-standard.org/standard/core/CREATE) (func $CREATE (param $tos i32) (result i32) @@ -967,31 +975,31 @@ (i32.store (global.get $here) (i32.const 0)) (call $setFlag (i32.const 0x40 (; = F_DATA ;))) (local.get $tos)) - (data (i32.const 0x20434) "\28\04\02\00" "\06" "CREATE " "\52\00\00\00") - (elem (i32.const 0x52) $CREATE) + (data (i32.const 0x20440) "\34\04\02\00" "\06" "CREATE " "\53\00\00\00") + (elem (i32.const 0x53) $CREATE) ;; [6.1.1170](https://forth-standard.org/standard/core/DECIMAL) (func $DECIMAL (param $tos i32) (result i32) - (i32.store (i32.const 0x20364 (; = body(BASE) ;)) (i32.const 10)) + (i32.store (i32.const 0x20370 (; = body(BASE) ;)) (i32.const 10)) (local.get $tos)) - (data (i32.const 0x20444) "\34\04\02\00" "\07" "DECIMAL" "\53\00\00\00") - (elem (i32.const 0x53) $DECIMAL) + (data (i32.const 0x20450) "\40\04\02\00" "\07" "DECIMAL" "\54\00\00\00") + (elem (i32.const 0x54) $DECIMAL) ;; [6.1.1200](https://forth-standard.org/standard/core/DEPTH) (func $DEPTH (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.shr_u (i32.sub (local.get $tos) (i32.const 0x10000 (; = STACK_BASE ;))) (i32.const 2))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20454) "\44\04\02\00" "\05" "DEPTH " "\54\00\00\00") - (elem (i32.const 0x54) $DEPTH) + (data (i32.const 0x20460) "\50\04\02\00" "\05" "DEPTH " "\55\00\00\00") + (elem (i32.const 0x55) $DEPTH) ;; [6.1.1240](https://forth-standard.org/standard/core/DO) (func $DO (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) - (call $compileDo)) - (data (i32.const 0x20464) "\54\04\02\00" "\82" (; F_IMMEDIATE ;) "DO " "\55\00\00\00") - (elem (i32.const 0x55) $DO) + (call $compileDo (i32.const 0))) + (data (i32.const 0x20470) "\60\04\02\00" "\82" (; F_IMMEDIATE ;) "DO " "\56\00\00\00") + (elem (i32.const 0x56) $DO) ;; [6.1.1250](https://forth-standard.org/standard/core/DOES) (func $DOES> (param $tos i32) (result i32) @@ -1002,37 +1010,37 @@ (call $endColon) (call $startColon (i32.const 1)) (call $compilePushLocal (i32.const 1))) - (data (i32.const 0x20470) "\64\04\02\00" "\85" (; F_IMMEDIATE ;) "DOES> " "\56\00\00\00") - (elem (i32.const 0x56) $DOES>) + (data (i32.const 0x2047c) "\70\04\02\00" "\85" (; F_IMMEDIATE ;) "DOES> " "\57\00\00\00") + (elem (i32.const 0x57) $DOES>) ;; [6.1.1260](https://forth-standard.org/standard/core/DROP) (func $DROP (param $tos i32) (result i32) (i32.sub (local.get $tos) (i32.const 4))) - (data (i32.const 0x20480) "\70\04\02\00" "\04" "DROP " "\57\00\00\00") - (elem (i32.const 0x57) $DROP) + (data (i32.const 0x2048c) "\7c\04\02\00" "\04" "DROP " "\58\00\00\00") + (elem (i32.const 0x58) $DROP) ;; [6.1.1290](https://forth-standard.org/standard/core/DUP) (func $DUP (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20490) "\80\04\02\00" "\03" "DUP" "\58\00\00\00") - (elem (i32.const 0x58) $DUP) + (data (i32.const 0x2049c) "\8c\04\02\00" "\03" "DUP" "\59\00\00\00") + (elem (i32.const 0x59) $DUP) ;; [6.1.1310](https://forth-standard.org/standard/core/ELSE) (func $ELSE (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $emitElse)) - (data (i32.const 0x2049c) "\90\04\02\00" "\84" (; F_IMMEDIATE ;) "ELSE " "\59\00\00\00") - (elem (i32.const 0x59) $ELSE) + (data (i32.const 0x204a8) "\9c\04\02\00" "\84" (; F_IMMEDIATE ;) "ELSE " "\5a\00\00\00") + (elem (i32.const 0x5a) $ELSE) ;; [6.1.1320](https://forth-standard.org/standard/core/EMIT) (func $EMIT (param $tos i32) (result i32) (call $shell_emit (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (i32.sub (local.get $tos) (i32.const 4))) - (data (i32.const 0x204ac) "\9c\04\02\00" "\04" "EMIT " "\5a\00\00\00") - (elem (i32.const 0x5a) $EMIT) + (data (i32.const 0x204b8) "\a8\04\02\00" "\04" "EMIT " "\5b\00\00\00") + (elem (i32.const 0x5b) $EMIT) ;; [6.1.1345](https://forth-standard.org/standard/core/ENVIRONMENTq) (func $ENVIRONMENT? (param $tos i32) (result i32) @@ -1056,8 +1064,8 @@ (else (i32.store (local.get $bbtos) (i32.const 0)) (local.get $btos)))))) - (data (i32.const 0x204bc) "\ac\04\02\00" "\0c" "ENVIRONMENT? " "\5b\00\00\00") - (elem (i32.const 0x5b) $ENVIRONMENT?) + (data (i32.const 0x204c8) "\b8\04\02\00" "\0c" "ENVIRONMENT? " "\5c\00\00\00") + (elem (i32.const 0x5c) $ENVIRONMENT?) ;; [6.2.1350](https://forth-standard.org/standard/core/ERASE) (func $ERASE (param $tos i32) (result i32) @@ -1067,8 +1075,8 @@ (i32.const 0) (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (local.get $bbtos)) - (data (i32.const 0x204d4) "\bc\04\02\00" "\05" "ERASE " "\5c\00\00\00") - (elem (i32.const 0x5c) $ERASE) + (data (i32.const 0x204e0) "\c8\04\02\00" "\05" "ERASE " "\5d\00\00\00") + (elem (i32.const 0x5d) $ERASE) ;; [6.1.1360](https://forth-standard.org/standard/core/EVALUATE) (func $EVALUATE (param $tos i32) (result i32) @@ -1080,24 +1088,24 @@ ;; Save input state (local.set $prevSourceID (global.get $sourceID)) - (local.set $prevIn (i32.load (i32.const 0x202a0 (; = body(>IN) ;)))) + (local.set $prevIn (i32.load (i32.const 0x202ac (; = body(>IN) ;)))) (local.set $prevInputBufferSize (global.get $inputBufferSize)) (local.set $prevInputBufferBase (global.get $inputBufferBase)) (global.set $sourceID (i32.const -1)) (global.set $inputBufferBase (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (global.set $inputBufferSize (i32.load (i32.sub (local.get $tos) (i32.const 4)))) - (i32.store (i32.const 0x202a0 (; = body(>IN) ;)) (i32.const 0)) + (i32.store (i32.const 0x202ac (; = body(>IN) ;)) (i32.const 0)) (call $interpret (local.get $bbtos)) ;; Restore input state (global.set $sourceID (local.get $prevSourceID)) - (i32.store (i32.const 0x202a0 (; = body(>IN) ;)) (local.get $prevIn)) + (i32.store (i32.const 0x202ac (; = body(>IN) ;)) (local.get $prevIn)) (global.set $inputBufferBase (local.get $prevInputBufferBase)) (global.set $inputBufferSize (local.get $prevInputBufferSize))) - (data (i32.const 0x204e4) "\d4\04\02\00" "\08" "EVALUATE " "\5d\00\00\00") - (elem (i32.const 0x5d) $EVALUATE) + (data (i32.const 0x204f0) "\e0\04\02\00" "\08" "EVALUATE " "\5e\00\00\00") + (elem (i32.const 0x5e) $EVALUATE) ;; [6.1.1370](https://forth-standard.org/standard/core/EXECUTE) (func $EXECUTE (param $tos i32) (result i32) @@ -1112,22 +1120,22 @@ (i32.load (local.get $body)))) (else (call_indirect (type $word) (i32.load (local.get $body)))))) - (data (i32.const 0x204f8) "\e4\04\02\00" "\07" "EXECUTE" "\5e\00\00\00") - (elem (i32.const 0x5e) $EXECUTE) + (data (i32.const 0x20504) "\f0\04\02\00" "\07" "EXECUTE" "\5f\00\00\00") + (elem (i32.const 0x5f) $EXECUTE) ;; [6.1.1380](https://forth-standard.org/standard/core/EXIT) (func $EXIT (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $emitReturn)) - (data (i32.const 0x20508) "\f8\04\02\00" "\84" (; F_IMMEDIATE ;) "EXIT " "\5f\00\00\00") - (elem (i32.const 0x5f) $EXIT) + (data (i32.const 0x20514) "\04\05\02\00" "\84" (; F_IMMEDIATE ;) "EXIT " "\60\00\00\00") + (elem (i32.const 0x60) $EXIT) ;; [6.2.1485](https://forth-standard.org/standard/core/FALSE) (func $FALSE (param $tos i32) (result i32) (call $push (local.get $tos) (i32.const 0x0))) - (data (i32.const 0x20518) "\08\05\02\00" "\05" "FALSE " "\60\00\00\00") - (elem (i32.const 0x60) $FALSE) + (data (i32.const 0x20524) "\14\05\02\00" "\05" "FALSE " "\61\00\00\00") + (elem (i32.const 0x61) $FALSE) ;; [6.1.1540](https://forth-standard.org/standard/core/FILL) (func $FILL (param $tos i32) (result i32) @@ -1137,8 +1145,8 @@ (i32.load (i32.sub (local.get $tos) (i32.const 4))) (i32.load (i32.sub (local.get $tos) (i32.const 8)))) (local.get $bbbtos)) - (data (i32.const 0x20528) "\18\05\02\00" "\04" "FILL " "\61\00\00\00") - (elem (i32.const 0x61) $FILL) + (data (i32.const 0x20534) "\24\05\02\00" "\04" "FILL " "\62\00\00\00") + (elem (i32.const 0x62) $FILL) ;; [6.1.1550](https://forth-standard.org/standard/core/FIND) (func $FIND (param $tos i32) (result i32) @@ -1154,8 +1162,8 @@ (else (i32.store (i32.sub (local.get $tos) (i32.const 4)) (local.get $xt)))) (i32.store (local.get $tos) (local.get $r)) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20538) "\28\05\02\00" "\04" "FIND " "\62\00\00\00") - (elem (i32.const 0x62) $FIND) + (data (i32.const 0x20544) "\34\05\02\00" "\04" "FIND " "\63\00\00\00") + (elem (i32.const 0x63) $FIND) ;; [6.1.1561](https://forth-standard.org/standard/core/FMDivMOD) (func $FM/MOD (param $tos i32) (result i32) @@ -1182,22 +1190,22 @@ (i32.store (local.get $bbbtos) (local.get $mod)) (i32.store (i32.sub (local.get $tos) (i32.const 8)) (local.get $q)) (local.get $btos)) - (data (i32.const 0x20548) "\38\05\02\00" "\06" "FM/MOD " "\63\00\00\00") - (elem (i32.const 0x63) $FM/MOD) + (data (i32.const 0x20554) "\44\05\02\00" "\06" "FM/MOD " "\64\00\00\00") + (elem (i32.const 0x64) $FM/MOD) ;; [6.1.1650](https://forth-standard.org/standard/core/HERE) (func $HERE (param $tos i32) (result i32) (i32.store (local.get $tos) (global.get $here)) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20558) "\48\05\02\00" "\04" "HERE " "\64\00\00\00") - (elem (i32.const 0x64) $HERE) + (data (i32.const 0x20564) "\54\05\02\00" "\04" "HERE " "\65\00\00\00") + (elem (i32.const 0x65) $HERE) ;; [6.2.1660](https://forth-standard.org/standard/core/HEX) (func $HEX (param $tos i32) (result i32) - (i32.store (i32.const 0x20364 (; = body(BASE) ;)) (i32.const 16)) + (i32.store (i32.const 0x20370 (; = body(BASE) ;)) (i32.const 16)) (local.get $tos)) - (data (i32.const 0x20568) "\58\05\02\00" "\03" "HEX" "\65\00\00\00") - (elem (i32.const 0x65) $HEX) + (data (i32.const 0x20574) "\64\05\02\00" "\03" "HEX" "\66\00\00\00") + (elem (i32.const 0x66) $HEX) ;; [6.1.1670](https://forth-standard.org/standard/core/HOLD) (func $HOLD (param $tos i32) (result i32) @@ -1208,30 +1216,30 @@ (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))))) (global.set $po (local.get $npo)) (local.get $btos)) - (data (i32.const 0x20574) "\68\05\02\00" "\04" "HOLD " "\66\00\00\00") - (elem (i32.const 0x66) $HOLD) + (data (i32.const 0x20580) "\74\05\02\00" "\04" "HOLD " "\67\00\00\00") + (elem (i32.const 0x67) $HOLD) ;; [6.1.1680](https://forth-standard.org/standard/core/I) (func $I (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (global.get $tors) (i32.const 4)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20584) "\74\05\02\00" "\01" "I " "\67\00\00\00") - (elem (i32.const 0x67) $I) + (data (i32.const 0x20590) "\80\05\02\00" "\01" "I " "\68\00\00\00") + (elem (i32.const 0x68) $I) ;; [6.1.1700](https://forth-standard.org/standard/core/IF) (func $IF (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileIf)) - (data (i32.const 0x20590) "\84\05\02\00" "\82" (; F_IMMEDIATE ;) "IF " "\68\00\00\00") - (elem (i32.const 0x68) $IF) + (data (i32.const 0x2059c) "\90\05\02\00" "\82" (; F_IMMEDIATE ;) "IF " "\69\00\00\00") + (elem (i32.const 0x69) $IF) ;; [6.1.1710](https://forth-standard.org/standard/core/IMMEDIATE) (func $IMMEDIATE (param $tos i32) (result i32) (call $setFlag (i32.const 0x80 (; = F_IMMEDIATE ;))) (local.get $tos)) - (data (i32.const 0x2059c) "\90\05\02\00" "\09" "IMMEDIATE " "\69\00\00\00") - (elem (i32.const 0x69) $IMMEDIATE) + (data (i32.const 0x205a8) "\9c\05\02\00" "\09" "IMMEDIATE " "\6a\00\00\00") + (elem (i32.const 0x6a) $IMMEDIATE) ;; [6.1.1720](https://forth-standard.org/standard/core/INVERT) (func $INVERT (param $tos i32) (result i32) @@ -1239,52 +1247,52 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.xor (i32.load (local.get $btos)) (i32.const -1))) (local.get $tos)) - (data (i32.const 0x205b0) "\9c\05\02\00" "\06" "INVERT " "\6a\00\00\00") - (elem (i32.const 0x6a) $INVERT) + (data (i32.const 0x205bc) "\a8\05\02\00" "\06" "INVERT " "\6b\00\00\00") + (elem (i32.const 0x6b) $INVERT) ;; [6.1.1730](https://forth-standard.org/standard/core/J) (func $J (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (global.get $tors) (i32.const 8)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x205c0) "\b0\05\02\00" "\01" "J " "\6b\00\00\00") - (elem (i32.const 0x6b) $J) + (data (i32.const 0x205cc) "\bc\05\02\00" "\01" "J " "\6c\00\00\00") + (elem (i32.const 0x6c) $J) ;; [6.1.1750](https://forth-standard.org/standard/core/KEY) (func $KEY (param $tos i32) (result i32) (i32.store (local.get $tos) (call $shell_key)) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x205cc) "\c0\05\02\00" "\03" "KEY" "\6c\00\00\00") - (elem (i32.const 0x6c) $KEY) + (data (i32.const 0x205d8) "\cc\05\02\00" "\03" "KEY" "\6d\00\00\00") + (elem (i32.const 0x6d) $KEY) (func $LATEST (param $tos i32) (result i32) (i32.store (local.get $tos) (global.get $latest)) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x205d8) "\cc\05\02\00" "\06" "LATEST " "\6d\00\00\00") - (elem (i32.const 0x6d) $LATEST) + (data (i32.const 0x205e4) "\d8\05\02\00" "\06" "LATEST " "\6e\00\00\00") + (elem (i32.const 0x6e) $LATEST) ;; [6.1.1760](https://forth-standard.org/standard/core/LEAVE) (func $LEAVE (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileLeave)) - (data (i32.const 0x205e8) "\d8\05\02\00" "\85" (; F_IMMEDIATE ;) "LEAVE " "\6e\00\00\00") - (elem (i32.const 0x6e) $LEAVE) + (data (i32.const 0x205f4) "\e4\05\02\00" "\85" (; F_IMMEDIATE ;) "LEAVE " "\6f\00\00\00") + (elem (i32.const 0x6f) $LEAVE) ;; [6.1.1780](https://forth-standard.org/standard/core/LITERAL) (func $LITERAL (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compilePushConst (call $pop))) - (data (i32.const 0x205f8) "\e8\05\02\00" "\87" (; F_IMMEDIATE ;) "LITERAL" "\6f\00\00\00") - (elem (i32.const 0x6f) $LITERAL) + (data (i32.const 0x20604) "\f4\05\02\00" "\87" (; F_IMMEDIATE ;) "LITERAL" "\70\00\00\00") + (elem (i32.const 0x70) $LITERAL) ;; [6.1.1800](https://forth-standard.org/standard/core/LOOP) (func $LOOP (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileLoop)) - (data (i32.const 0x20608) "\f8\05\02\00" "\84" (; F_IMMEDIATE ;) "LOOP " "\70\00\00\00") - (elem (i32.const 0x70) $LOOP) + (data (i32.const 0x20614) "\04\06\02\00" "\84" (; F_IMMEDIATE ;) "LOOP " "\71\00\00\00") + (elem (i32.const 0x71) $LOOP) ;; [6.1.1805](https://forth-standard.org/standard/core/LSHIFT) (func $LSHIFT (param $tos i32) (result i32) @@ -1294,8 +1302,8 @@ (i32.shl (i32.load (local.get $bbtos)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $btos)) - (data (i32.const 0x20618) "\08\06\02\00" "\06" "LSHIFT " "\71\00\00\00") - (elem (i32.const 0x71) $LSHIFT) + (data (i32.const 0x20624) "\14\06\02\00" "\06" "LSHIFT " "\72\00\00\00") + (elem (i32.const 0x72) $LSHIFT) ;; [6.1.1810](https://forth-standard.org/standard/core/MTimes) (func $M* (param $tos i32) (result i32) @@ -1305,8 +1313,8 @@ (i64.extend_i32_s (i32.load (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $tos)) - (data (i32.const 0x20628) "\18\06\02\00" "\02" "M* " "\72\00\00\00") - (elem (i32.const 0x72) $M*) + (data (i32.const 0x20634) "\24\06\02\00" "\02" "M* " "\73\00\00\00") + (elem (i32.const 0x73) $M*) ;; [6.1.1870](https://forth-standard.org/standard/core/MAX) (func $MAX (param $tos i32) (result i32) @@ -1319,8 +1327,8 @@ (then (i32.store (local.get $bbtos) (local.get $v)))) (local.get $btos)) - (data (i32.const 0x20634) "\28\06\02\00" "\03" "MAX" "\73\00\00\00") - (elem (i32.const 0x73) $MAX) + (data (i32.const 0x20640) "\34\06\02\00" "\03" "MAX" "\74\00\00\00") + (elem (i32.const 0x74) $MAX) ;; [6.1.1880](https://forth-standard.org/standard/core/MIN) (func $MIN (param $tos i32) (result i32) @@ -1333,8 +1341,8 @@ (then (i32.store (local.get $bbtos) (local.get $v)))) (local.get $btos)) - (data (i32.const 0x20640) "\34\06\02\00" "\03" "MIN" "\74\00\00\00") - (elem (i32.const 0x74) $MIN) + (data (i32.const 0x2064c) "\40\06\02\00" "\03" "MIN" "\75\00\00\00") + (elem (i32.const 0x75) $MIN) ;; [6.1.1890](https://forth-standard.org/standard/core/MOD) (func $MOD (param $tos i32) (result i32) @@ -1344,8 +1352,8 @@ (i32.rem_s (i32.load (local.get $bbtos)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $btos)) - (data (i32.const 0x2064c) "\40\06\02\00" "\03" "MOD" "\75\00\00\00") - (elem (i32.const 0x75) $MOD) + (data (i32.const 0x20658) "\4c\06\02\00" "\03" "MOD" "\76\00\00\00") + (elem (i32.const 0x76) $MOD) ;; [6.1.1900](https://forth-standard.org/standard/core/MOVE) (func $MOVE (param $tos i32) (result i32) @@ -1355,8 +1363,8 @@ (i32.load (local.tee $bbbtos (i32.sub (local.get $tos) (i32.const 12)))) (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (local.get $bbbtos)) - (data (i32.const 0x20658) "\4c\06\02\00" "\04" "MOVE " "\76\00\00\00") - (elem (i32.const 0x76) $MOVE) + (data (i32.const 0x20664) "\58\06\02\00" "\04" "MOVE " "\77\00\00\00") + (elem (i32.const 0x77) $MOVE) ;; [6.1.1910](https://forth-standard.org/standard/core/NEGATE) (func $NEGATE (param $tos i32) (result i32) @@ -1364,15 +1372,15 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.sub (i32.const 0) (i32.load (local.get $btos)))) (local.get $tos)) - (data (i32.const 0x20668) "\58\06\02\00" "\06" "NEGATE " "\77\00\00\00") - (elem (i32.const 0x77) $NEGATE) + (data (i32.const 0x20674) "\64\06\02\00" "\06" "NEGATE " "\78\00\00\00") + (elem (i32.const 0x78) $NEGATE) ;; [6.2.1930](https://forth-standard.org/standard/core/NIP) (func $NIP (param $tos i32) (result i32) (local.get $tos) (call $SWAP) (call $DROP)) - (data (i32.const 0x20678) "\68\06\02\00" "\03" "NIP" "\78\00\00\00") - (elem (i32.const 0x78) $NIP) + (data (i32.const 0x20684) "\74\06\02\00" "\03" "NIP" "\79\00\00\00") + (elem (i32.const 0x79) $NIP) ;; [6.1.1980](https://forth-standard.org/standard/core/OR) (func $OR (param $tos i32) (result i32) @@ -1382,23 +1390,23 @@ (i32.or (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x20684) "\78\06\02\00" "\02" "OR " "\79\00\00\00") - (elem (i32.const 0x79) $OR) + (data (i32.const 0x20690) "\84\06\02\00" "\02" "OR " "\7a\00\00\00") + (elem (i32.const 0x7a) $OR) ;; [6.1.1990](https://forth-standard.org/standard/core/OVER) (func $OVER (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (local.get $tos) (i32.const 8)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20690) "\84\06\02\00" "\04" "OVER " "\7a\00\00\00") - (elem (i32.const 0x7a) $OVER) + (data (i32.const 0x2069c) "\90\06\02\00" "\04" "OVER " "\7b\00\00\00") + (elem (i32.const 0x7b) $OVER) ;; [6.2.2000](https://forth-standard.org/standard/core/PAD) (func $PAD (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.add (global.get $here) (i32.const 0x304 (; = PAD_OFFSET ;)))) (i32.add (local.get $tos) (i32.const 0x4))) - (data (i32.const 0x206a0) "\90\06\02\00" "\03" "PAD" "\7b\00\00\00") - (elem (i32.const 0x7b) $PAD) + (data (i32.const 0x206ac) "\9c\06\02\00" "\03" "PAD" "\7c\00\00\00") + (elem (i32.const 0x7c) $PAD) ;; [6.2.2008](https://forth-standard.org/standard/core/PARSE) (func $PARSE (param $tos i32) (result i32) @@ -1411,8 +1419,8 @@ (i32.store (local.get $btos) (local.get $addr)) (i32.store (local.get $tos) (local.get $len)) (i32.add (local.get $tos) (i32.const 0x4))) - (data (i32.const 0x206ac) "\a0\06\02\00" "\05" "PARSE " "\7c\00\00\00") - (elem (i32.const 0x7c) $PARSE) + (data (i32.const 0x206b8) "\ac\06\02\00" "\05" "PARSE " "\7d\00\00\00") + (elem (i32.const 0x7d) $PARSE) ;; [6.2.2020](https://forth-standard.org/standard/core/PARSE-NAME) (func $PARSE-NAME (param $tos i32) (result i32) @@ -1422,8 +1430,8 @@ (i32.store (local.get $tos) (local.get $addr)) (i32.store (i32.add (local.get $tos) (i32.const 0x4)) (local.get $len)) (i32.add (local.get $tos) (i32.const 0x8))) - (data (i32.const 0x206bc) "\ac\06\02\00" "\0a" "PARSE-NAME " "\7d\00\00\00") - (elem (i32.const 0x7d) $PARSE-NAME) + (data (i32.const 0x206c8) "\b8\06\02\00" "\0a" "PARSE-NAME " "\7e\00\00\00") + (elem (i32.const 0x7e) $PARSE-NAME) ;; [6.2.2030](https://forth-standard.org/standard/core/PICK) (func $PICK (param $tos i32) (result i32) @@ -1434,8 +1442,8 @@ (local.get $tos) (i32.shl (i32.add (i32.load (local.get $btos)) (i32.const 2)) (i32.const 2))))) (local.get $tos)) - (data (i32.const 0x206d0) "\bc\06\02\00" "\04" "PICK " "\7e\00\00\00") - (elem (i32.const 0x7e) $PICK) + (data (i32.const 0x206dc) "\c8\06\02\00" "\04" "PICK " "\7f\00\00\00") + (elem (i32.const 0x7f) $PICK) ;; [6.1.2033](https://forth-standard.org/standard/core/POSTPONE) (func $POSTPONE (param $tos i32) (result i32) @@ -1450,44 +1458,44 @@ (else (call $emitConst (local.get $FINDToken)) (call $emitICall (i32.const 1) (i32.const 0x5 (; = COMPILE_CALL_INDEX ;)))))) - (data (i32.const 0x206e0) "\d0\06\02\00" "\88" (; F_IMMEDIATE ;) "POSTPONE " "\7f\00\00\00") - (elem (i32.const 0x7f) $POSTPONE) + (data (i32.const 0x206ec) "\dc\06\02\00" "\88" (; F_IMMEDIATE ;) "POSTPONE " "\80\00\00\00") + (elem (i32.const 0x80) $POSTPONE) ;; [6.1.2050](https://forth-standard.org/standard/core/QUIT) (func $QUIT (param $tos i32) (result i32) (global.set $error (i32.const 0x2 (; = ERR_QUIT ;))) (call $quit (local.get $tos))) - (data (i32.const 0x206f4) "\e0\06\02\00" "\04" "QUIT " "\80\00\00\00") - (elem (i32.const 0x80) $QUIT) + (data (i32.const 0x20700) "\ec\06\02\00" "\04" "QUIT " "\81\00\00\00") + (elem (i32.const 0x81) $QUIT) ;; [6.1.2060](https://forth-standard.org/standard/core/Rfrom) (func $R> (param $tos i32) (result i32) (global.set $tors (i32.sub (global.get $tors) (i32.const 4))) (i32.store (local.get $tos) (i32.load (global.get $tors))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20704) "\f4\06\02\00" "\02" "R> " "\81\00\00\00") - (elem (i32.const 0x81) $R>) + (data (i32.const 0x20710) "\00\07\02\00" "\02" "R> " "\82\00\00\00") + (elem (i32.const 0x82) $R>) ;; [6.1.2070](https://forth-standard.org/standard/core/RFetch) (func $R@ (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (global.get $tors) (i32.const 4)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20710) "\04\07\02\00" "\02" "R@ " "\82\00\00\00") - (elem (i32.const 0x82) $R@) + (data (i32.const 0x2071c) "\10\07\02\00" "\02" "R@ " "\83\00\00\00") + (elem (i32.const 0x83) $R@) ;; [6.1.2120](https://forth-standard.org/standard/core/RECURSE) (func $RECURSE (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileRecurse)) - (data (i32.const 0x2071c) "\10\07\02\00" "\87" (; F_IMMEDIATE ;) "RECURSE" "\83\00\00\00") - (elem (i32.const 0x83) $RECURSE) + (data (i32.const 0x20728) "\1c\07\02\00" "\87" (; F_IMMEDIATE ;) "RECURSE" "\84\00\00\00") + (elem (i32.const 0x84) $RECURSE) ;; [6.2.2125](https://forth-standard.org/standard/core/REFILL) (func $REFILL (param $tos i32) (result i32) (local $char i32) (global.set $inputBufferSize (i32.const 0)) - (i32.store (i32.const 0x202a0 (; = body(>IN) ;)) (i32.const 0)) + (i32.store (i32.const 0x202ac (; = body(>IN) ;)) (i32.const 0)) (local.get $tos) (if (param i32) (result i32) (i32.eq (global.get $sourceID) (i32.const -1)) (then @@ -1500,16 +1508,16 @@ (if (param i32) (result i32) (i32.eqz (global.get $inputBufferSize)) (then (call $push (i32.const 0))) (else (call $push (i32.const -1))))) - (data (i32.const 0x2072c) "\1c\07\02\00" "\06" "REFILL " "\84\00\00\00") - (elem (i32.const 0x84) $REFILL) + (data (i32.const 0x20738) "\28\07\02\00" "\06" "REFILL " "\85\00\00\00") + (elem (i32.const 0x85) $REFILL) ;; [6.1.2140](https://forth-standard.org/standard/core/REPEAT) (func $REPEAT (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileRepeat)) - (data (i32.const 0x2073c) "\2c\07\02\00" "\86" (; F_IMMEDIATE ;) "REPEAT " "\85\00\00\00") - (elem (i32.const 0x85) $REPEAT) + (data (i32.const 0x20748) "\38\07\02\00" "\86" (; F_IMMEDIATE ;) "REPEAT " "\86\00\00\00") + (elem (i32.const 0x86) $REPEAT) ;; [6.1.2160](https://forth-standard.org/standard/core/ROT) (func $ROT (param $tos i32) (result i32) @@ -1524,8 +1532,8 @@ (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (i32.store (local.get $bbtos) (local.get $tmp)) (local.get $tos)) - (data (i32.const 0x2074c) "\3c\07\02\00" "\03" "ROT" "\86\00\00\00") - (elem (i32.const 0x86) $ROT) + (data (i32.const 0x20758) "\48\07\02\00" "\03" "ROT" "\87\00\00\00") + (elem (i32.const 0x87) $ROT) ;; [6.1.2162](https://forth-standard.org/standard/core/RSHIFT) (func $RSHIFT (param $tos i32) (result i32) @@ -1535,8 +1543,8 @@ (i32.shr_u (i32.load (local.get $bbtos)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $btos)) - (data (i32.const 0x20758) "\4c\07\02\00" "\06" "RSHIFT " "\87\00\00\00") - (elem (i32.const 0x87) $RSHIFT) + (data (i32.const 0x20764) "\58\07\02\00" "\06" "RSHIFT " "\88\00\00\00") + (elem (i32.const 0x88) $RSHIFT) ;; [6.1.2165](https://forth-standard.org/standard/core/Sq) (func $Sq (param $tos i32) (result i32) @@ -1551,8 +1559,8 @@ (call $compilePushConst (local.get $len)) (global.set $here (call $aligned (i32.add (global.get $here) (local.get $len))))) - (data (i32.const 0x20768) "\58\07\02\00" "\82" (; F_IMMEDIATE ;) "S\22 " "\88\00\00\00") - (elem (i32.const 0x88) $Sq) + (data (i32.const 0x20774) "\64\07\02\00" "\82" (; F_IMMEDIATE ;) "S\22 " "\89\00\00\00") + (elem (i32.const 0x89) $Sq) ;; [6.1.2170](https://forth-standard.org/standard/core/StoD) (func $S>D (param $tos i32) (result i32) @@ -1560,15 +1568,15 @@ (i64.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i64.extend_i32_s (i32.load (local.get $btos)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20774) "\68\07\02\00" "\03" "S>D" "\89\00\00\00") - (elem (i32.const 0x89) $S>D) + (data (i32.const 0x20780) "\74\07\02\00" "\03" "S>D" "\8a\00\00\00") + (elem (i32.const 0x8a) $S>D) (func $SCALL (param $tos i32) (result i32) (global.set $tos (local.get $tos)) (call $shell_call) (global.get $tos)) - (data (i32.const 0x20780) "\74\07\02\00" "\05" "SCALL " "\8a\00\00\00") - (elem (i32.const 0x8a) $SCALL) + (data (i32.const 0x2078c) "\80\07\02\00" "\05" "SCALL " "\8b\00\00\00") + (elem (i32.const 0x8b) $SCALL) ;; [6.1.2210](https://forth-standard.org/standard/core/SIGN) (func $SIGN (param $tos i32) (result i32) @@ -1579,8 +1587,8 @@ (i32.store8 (local.tee $npo (i32.sub (global.get $po) (i32.const 1))) (i32.const 0x2d (; = '-' ;))) (global.set $po (local.get $npo)))) (local.get $btos)) - (data (i32.const 0x20790) "\80\07\02\00" "\04" "SIGN " "\8b\00\00\00") - (elem (i32.const 0x8b) $SIGN) + (data (i32.const 0x2079c) "\8c\07\02\00" "\04" "SIGN " "\8c\00\00\00") + (elem (i32.const 0x8c) $SIGN) ;; [6.1.2214](https://forth-standard.org/standard/core/SMDivREM) ;; @@ -1601,29 +1609,29 @@ (i32.wrap_i64 (i64.div_s (local.get $n1) (local.get $n2)))) (local.get $btos)) - (data (i32.const 0x207a0) "\90\07\02\00" "\06" "SM/REM " "\8c\00\00\00") - (elem (i32.const 0x8c) $SM/REM) + (data (i32.const 0x207ac) "\9c\07\02\00" "\06" "SM/REM " "\8d\00\00\00") + (elem (i32.const 0x8d) $SM/REM) ;; [6.1.2216](https://forth-standard.org/standard/core/SOURCE) (func $SOURCE (param $tos i32) (result i32) (local.get $tos) (call $push (global.get $inputBufferBase)) (call $push (global.get $inputBufferSize))) - (data (i32.const 0x207b0) "\a0\07\02\00" "\06" "SOURCE " "\8d\00\00\00") - (elem (i32.const 0x8d) $SOURCE) + (data (i32.const 0x207bc) "\ac\07\02\00" "\06" "SOURCE " "\8e\00\00\00") + (elem (i32.const 0x8e) $SOURCE) ;; [6.2.2218](https://forth-standard.org/standard/core/SOURCE-ID) (func $SOURCE-ID (param $tos i32) (result i32) (call $push (local.get $tos) (global.get $sourceID))) - (data (i32.const 0x207c0) "\b0\07\02\00" "\09" "SOURCE-ID " "\8e\00\00\00") - (elem (i32.const 0x8e) $SOURCE-ID) + (data (i32.const 0x207cc) "\bc\07\02\00" "\09" "SOURCE-ID " "\8f\00\00\00") + (elem (i32.const 0x8f) $SOURCE-ID) ;; [6.1.2220](https://forth-standard.org/standard/core/SPACE) (func $SPACE (param $tos i32) (result i32) (local.get $tos) (call $BL) (call $EMIT)) - (data (i32.const 0x207d4) "\c0\07\02\00" "\05" "SPACE " "\8f\00\00\00") - (elem (i32.const 0x8f) $SPACE) + (data (i32.const 0x207e0) "\cc\07\02\00" "\05" "SPACE " "\90\00\00\00") + (elem (i32.const 0x90) $SPACE) ;; [6.1.2230](https://forth-standard.org/standard/core/SPACES) (func $SPACES (param $tos i32) (result i32) @@ -1636,11 +1644,11 @@ (call $SPACE) (local.set $i (i32.sub (local.get $i) (i32.const 1))) (br $loop)))) - (data (i32.const 0x207e4) "\d4\07\02\00" "\06" "SPACES " "\90\00\00\00") - (elem (i32.const 0x90) $SPACES) + (data (i32.const 0x207f0) "\e0\07\02\00" "\06" "SPACES " "\91\00\00\00") + (elem (i32.const 0x91) $SPACES) ;; [6.1.2250](https://forth-standard.org/standard/core/STATE) - (data (i32.const 0x207f4) "\e4\07\02\00" "\45" (; F_DATA ;) "STATE " "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\00\00\00\00" (; = pack(0) ;)) + (data (i32.const 0x20800) "\f0\07\02\00" "\45" (; F_DATA ;) "STATE " "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\00\00\00\00" (; = pack(0) ;)) ;; [6.1.2260](https://forth-standard.org/standard/core/SWAP) (func $SWAP (param $tos i32) (result i32) @@ -1652,16 +1660,16 @@ (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))))) (i32.store (local.get $btos) (local.get $tmp)) (local.get $tos)) - (data (i32.const 0x20808) "\f4\07\02\00" "\04" "SWAP " "\91\00\00\00") - (elem (i32.const 0x91) $SWAP) + (data (i32.const 0x20814) "\00\08\02\00" "\04" "SWAP " "\92\00\00\00") + (elem (i32.const 0x92) $SWAP) ;; [6.1.2270](https://forth-standard.org/standard/core/THEN) (func $THEN (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileThen)) - (data (i32.const 0x20818) "\08\08\02\00" "\84" (; F_IMMEDIATE ;) "THEN " "\92\00\00\00") - (elem (i32.const 0x92) $THEN) + (data (i32.const 0x20824) "\14\08\02\00" "\84" (; F_IMMEDIATE ;) "THEN " "\93\00\00\00") + (elem (i32.const 0x93) $THEN) ;; [6.2.2295](https://forth-standard.org/standard/core/TO) (func $TO (param $tos i32) (result i32) @@ -1672,21 +1680,21 @@ (i32.store (i32.add (call $body (local.get $xt)) (i32.const 4)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))))) (local.get $btos)) - (data (i32.const 0x20828) "\18\08\02\00" "\02" "TO " "\93\00\00\00") - (elem (i32.const 0x93) $TO) + (data (i32.const 0x20834) "\24\08\02\00" "\02" "TO " "\94\00\00\00") + (elem (i32.const 0x94) $TO) ;; [6.2.2298](https://forth-standard.org/standard/core/TRUE) (func $TRUE (param $tos i32) (result i32) (call $push (local.get $tos) (i32.const 0xffffffff))) - (data (i32.const 0x20834) "\28\08\02\00" "\04" "TRUE " "\94\00\00\00") - (elem (i32.const 0x94) $TRUE) + (data (i32.const 0x20840) "\34\08\02\00" "\04" "TRUE " "\95\00\00\00") + (elem (i32.const 0x95) $TRUE) ;; [6.2.2300](https://forth-standard.org/standard/core/TUCK) (func $TUCK (param $tos i32) (result i32) (local.get $tos) (call $SWAP) (call $OVER)) - (data (i32.const 0x20844) "\34\08\02\00" "\04" "TUCK " "\95\00\00\00") - (elem (i32.const 0x95) $TUCK) + (data (i32.const 0x20850) "\40\08\02\00" "\04" "TUCK " "\96\00\00\00") + (elem (i32.const 0x96) $TUCK) ;; [6.1.2310](https://forth-standard.org/standard/core/TYPE) (func $TYPE (param $tos i32) (result i32) @@ -1696,16 +1704,16 @@ (local.set $len (call $pop)) (local.set $p (call $pop)) (call $type (local.get $p) (local.get $len))) - (data (i32.const 0x20854) "\44\08\02\00" "\04" "TYPE " "\96\00\00\00") - (elem (i32.const 0x96) $TYPE) + (data (i32.const 0x20860) "\50\08\02\00" "\04" "TYPE " "\97\00\00\00") + (elem (i32.const 0x97) $TYPE) ;; [6.1.2320](https://forth-standard.org/standard/core/Ud) (func $U. (param $tos i32) (result i32) (local.get $tos) - (call $U._ (call $pop) (i32.load (i32.const 0x20364 (; = body(BASE) ;)))) + (call $U._ (call $pop) (i32.load (i32.const 0x20370 (; = body(BASE) ;)))) (call $shell_emit (i32.const 0x20))) - (data (i32.const 0x20864) "\54\08\02\00" "\02" "U. " "\97\00\00\00") - (elem (i32.const 0x97) $U.) + (data (i32.const 0x20870) "\60\08\02\00" "\02" "U. " "\98\00\00\00") + (elem (i32.const 0x98) $U.) ;; [6.1.2340](https://forth-standard.org/standard/core/Uless) (func $U< (param $tos i32) (result i32) @@ -1716,8 +1724,8 @@ (then (i32.store (local.get $bbtos) (i32.const -1))) (else (i32.store (local.get $bbtos) (i32.const 0)))) (local.get $btos)) - (data (i32.const 0x20870) "\64\08\02\00" "\02" "U< " "\98\00\00\00") - (elem (i32.const 0x98) $U<) + (data (i32.const 0x2087c) "\70\08\02\00" "\02" "U< " "\99\00\00\00") + (elem (i32.const 0x99) $U<) ;; [6.1.2360](https://forth-standard.org/standard/core/UMTimes) (func $UM* (param $tos i32) (result i32) @@ -1727,8 +1735,8 @@ (i64.extend_i32_u (i32.load (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $tos)) - (data (i32.const 0x2087c) "\70\08\02\00" "\03" "UM*" "\99\00\00\00") - (elem (i32.const 0x99) $UM*) + (data (i32.const 0x20888) "\7c\08\02\00" "\03" "UM*" "\9a\00\00\00") + (elem (i32.const 0x9a) $UM*) ;; [6.1.2370](https://forth-standard.org/standard/core/UMDivMOD) (func $UM/MOD (param $tos i32) (result i32) @@ -1747,50 +1755,50 @@ (i32.wrap_i64 (i64.div_u (local.get $n1) (local.get $n2)))) (local.get $btos)) - (data (i32.const 0x20888) "\7c\08\02\00" "\06" "UM/MOD " "\9a\00\00\00") - (elem (i32.const 0x9a) $UM/MOD) + (data (i32.const 0x20894) "\88\08\02\00" "\06" "UM/MOD " "\9b\00\00\00") + (elem (i32.const 0x9b) $UM/MOD) ;; [6.1.2380](https://forth-standard.org/standard/core/UNLOOP) (func $UNLOOP (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $emitICall (i32.const 0) (i32.const 0x9 (; = END_DO_INDEX ;)))) - (data (i32.const 0x20898) "\88\08\02\00" "\86" (; F_IMMEDIATE ;) "UNLOOP " "\9b\00\00\00") - (elem (i32.const 0x9b) $UNLOOP) + (data (i32.const 0x208a4) "\94\08\02\00" "\86" (; F_IMMEDIATE ;) "UNLOOP " "\9c\00\00\00") + (elem (i32.const 0x9c) $UNLOOP) ;; [6.1.2390](https://forth-standard.org/standard/core/UNTIL) (func $UNTIL (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileUntil)) - (data (i32.const 0x208a8) "\98\08\02\00" "\85" (; F_IMMEDIATE ;) "UNTIL " "\9c\00\00\00") - (elem (i32.const 0x9c) $UNTIL) + (data (i32.const 0x208b4) "\a4\08\02\00" "\85" (; F_IMMEDIATE ;) "UNTIL " "\9d\00\00\00") + (elem (i32.const 0x9d) $UNTIL) ;; [6.2.2395](https://forth-standard.org/standard/core/UNUSED) (func $UNUSED (param $tos i32) (result i32) (local.get $tos) (call $push (i32.shr_s (i32.sub (i32.const 0x6400000 (; = MEMORY_SIZE ;)) (global.get $here)) (i32.const 2)))) - (data (i32.const 0x208b8) "\a8\08\02\00" "\06" "UNUSED " "\9d\00\00\00") - (elem (i32.const 0x9d) $UNUSED) + (data (i32.const 0x208c4) "\b4\08\02\00" "\06" "UNUSED " "\9e\00\00\00") + (elem (i32.const 0x9e) $UNUSED) ;; [6.2.2405](https://forth-standard.org/standard/core/VALUE) - (data (i32.const 0x208c8) "\b8\08\02\00" "\05" "VALUE " "\4f\00\00\00" (; = pack(index("CONSTANT")) ;)) + (data (i32.const 0x208d4) "\c4\08\02\00" "\05" "VALUE " "\50\00\00\00" (; = pack(index("CONSTANT")) ;)) ;; [6.1.2410](https://forth-standard.org/standard/core/VARIABLE) (func $VARIABLE (param $tos i32) (result i32) (local.get $tos) (call $CREATE) (global.set $here (i32.add (global.get $here) (i32.const 4)))) - (data (i32.const 0x208d8) "\c8\08\02\00" "\08" "VARIABLE " "\9e\00\00\00") - (elem (i32.const 0x9e) $VARIABLE) + (data (i32.const 0x208e4) "\d4\08\02\00" "\08" "VARIABLE " "\9f\00\00\00") + (elem (i32.const 0x9f) $VARIABLE) ;; [6.1.2430](https://forth-standard.org/standard/core/WHILE) (func $WHILE (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileWhile)) - (data (i32.const 0x208ec) "\d8\08\02\00" "\85" (; F_IMMEDIATE ;) "WHILE " "\9f\00\00\00") - (elem (i32.const 0x9f) $WHILE) + (data (i32.const 0x208f8) "\e4\08\02\00" "\85" (; F_IMMEDIATE ;) "WHILE " "\a0\00\00\00") + (elem (i32.const 0xa0) $WHILE) ;; [6.1.2450](https://forth-standard.org/standard/core/WORD) (func $WORD (param $tos i32) (result i32) @@ -1810,8 +1818,8 @@ (local.get $len)) (i32.store8 (local.get $wordBase) (local.get $len)) (call $push (local.get $wordBase))) - (data (i32.const 0x208fc) "\ec\08\02\00" "\04" "WORD " "\a0\00\00\00") - (elem (i32.const 0xa0) $WORD) + (data (i32.const 0x20908) "\f8\08\02\00" "\04" "WORD " "\a1\00\00\00") + (elem (i32.const 0xa1) $WORD) ;; 15.6.1.2465 (func $WORDS (param $tos i32) (result i32) @@ -1832,8 +1840,8 @@ (local.set $entryP (i32.load (local.get $entryP))) (br_if $loop (local.get $entryP))) (local.get $tos)) - (data (i32.const 0x2090c) "\fc\08\02\00" "\05" "WORDS " "\a1\00\00\00") - (elem (i32.const 0xa1) $WORDS) + (data (i32.const 0x20918) "\08\09\02\00" "\05" "WORDS " "\a2\00\00\00") + (elem (i32.const 0xa2) $WORDS) ;; [6.1.2490](https://forth-standard.org/standard/core/XOR) (func $XOR (param $tos i32) (result i32) @@ -1843,16 +1851,16 @@ (i32.xor (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x2091c) "\0c\09\02\00" "\03" "XOR" "\a2\00\00\00") - (elem (i32.const 0xa2) $XOR) + (data (i32.const 0x20928) "\18\09\02\00" "\03" "XOR" "\a3\00\00\00") + (elem (i32.const 0xa3) $XOR) ;; [6.1.2500](https://forth-standard.org/standard/core/Bracket) (func $left-bracket (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) - (i32.store (i32.const 0x20804 (; = body(STATE) ;)) (i32.const 0))) - (data (i32.const 0x20928) "\1c\09\02\00" "\81" (; F_IMMEDIATE ;) "[ " "\a3\00\00\00") - (elem (i32.const 0xa3) $left-bracket) + (i32.store (i32.const 0x20810 (; = body(STATE) ;)) (i32.const 0))) + (data (i32.const 0x20934) "\28\09\02\00" "\81" (; F_IMMEDIATE ;) "[ " "\a4\00\00\00") + (elem (i32.const 0xa4) $left-bracket) ;; [6.1.2510](https://forth-standard.org/standard/core/BracketTick) (func $bracket-tick (param $tos i32) (result i32) @@ -1860,8 +1868,8 @@ (call $ensureCompiling) (call $') (call $compilePushConst (call $pop))) - (data (i32.const 0x20934) "\28\09\02\00" "\83" (; F_IMMEDIATE ;) "[']" "\a4\00\00\00") - (elem (i32.const 0xa4) $bracket-tick) + (data (i32.const 0x20940) "\34\09\02\00" "\83" (; F_IMMEDIATE ;) "[']" "\a5\00\00\00") + (elem (i32.const 0xa5) $bracket-tick) ;; [6.1.2520](https://forth-standard.org/standard/core/BracketCHAR) (func $bracket-char (param $tos i32) (result i32) @@ -1869,22 +1877,22 @@ (call $ensureCompiling) (call $CHAR) (call $compilePushConst (call $pop))) - (data (i32.const 0x20940) "\34\09\02\00" "\86" (; F_IMMEDIATE ;) "[CHAR] " "\a5\00\00\00") - (elem (i32.const 0xa5) $bracket-char) + (data (i32.const 0x2094c) "\40\09\02\00" "\86" (; F_IMMEDIATE ;) "[CHAR] " "\a6\00\00\00") + (elem (i32.const 0xa6) $bracket-char) ;; [6.2.2535](https://forth-standard.org/standard/core/bs) (func $\ (param $tos i32) (result i32) (drop (drop (call $parse (i32.const 0x0a (; '\n' ;))))) (local.get $tos)) - (data (i32.const 0x20950) "\40\09\02\00" "\81" (; F_IMMEDIATE ;) "\5c " "\a6\00\00\00") - (elem (i32.const 0xa6) $\) + (data (i32.const 0x2095c) "\4c\09\02\00" "\81" (; F_IMMEDIATE ;) "\5c " "\a7\00\00\00") + (elem (i32.const 0xa7) $\) ;; [6.1.2540](https://forth-standard.org/standard/right-bracket) (func $right-bracket (param $tos i32) (result i32) - (i32.store (i32.const 0x20804 (; = body(STATE) ;)) (i32.const 1)) + (i32.store (i32.const 0x20810 (; = body(STATE) ;)) (i32.const 1)) (local.get $tos)) - (data (i32.const 0x2095c) "\50\09\02\00" "\01" "] " "\a7\00\00\00") - (elem (i32.const 0xa7) $right-bracket) + (data (i32.const 0x20968) "\5c\09\02\00" "\01" "] " "\a8\00\00\00") + (elem (i32.const 0xa8) $right-bracket) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1914,7 +1922,7 @@ (if (param i32) (i32.eqz (call $readNumber (local.get $wordAddr) (local.get $wordLen))) (then ;; It's a number. Are we compiling? (local.set $number) - (if (i32.load (i32.const 0x20804 (; = body(STATE) ;))) + (if (i32.load (i32.const 0x20810 (; = body(STATE) ;))) (then ;; We're compiling. Pop it off the stack and ;; add it to the compiled list @@ -1929,7 +1937,7 @@ ;; Are we compiling or is it immediate? (if (i32.or - (i32.eqz (i32.load (i32.const 0x20804 (; = body(STATE) ;)))) + (i32.eqz (i32.load (i32.const 0x20810 (; = body(STATE) ;)))) (i32.eq (local.get $FINDResult) (i32.const 1))) (then (local.get $tos) @@ -1965,7 +1973,7 @@ (local $n i32) (local.set $p (local.get $addr)) (local.set $end (i32.add (local.get $p) (local.get $length))) - (local.set $base (i32.load (i32.const 0x20364 (; = body(BASE) ;)))) + (local.set $base (i32.load (i32.const 0x20370 (; = body(BASE) ;)))) ;; Read first character (if (i32.eq (local.tee $char (i32.load8_u (local.get $p))) (i32.const 0x2d (; = '-' ;))) @@ -2009,7 +2017,7 @@ (global.set $tos (local.get $tos)) (global.set $tors (i32.const 0x2000 (; = RETURN_STACK_BASE ;))) (global.set $sourceID (i32.const 0)) - (i32.store (i32.const 0x20804 (; = body(STATE) ;)) (i32.const 0)) + (i32.store (i32.const 0x20810 (; = body(STATE) ;)) (i32.const 0)) (unreachable)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2030,9 +2038,9 @@ (global $sourceID (mut i32) (i32.const 0)) ;; Dictionary pointers - (global $latest (mut i32) (i32.const 0x2095c)) - (global $here (mut i32) (i32.const 0x20968)) - (global $nextTableIndex (mut i32) (i32.const 0xa8)) + (global $latest (mut i32) (i32.const 0x20968)) + (global $here (mut i32) (i32.const 0x20974)) + (global $nextTableIndex (mut i32) (i32.const 0xa9)) ;; Pictured output pointer (global $po (mut i32) (i32.const -1)) @@ -2191,7 +2199,7 @@ (call $emitEnd) (call $compileEndDests (local.get $tos))) - (func $compileDo (param $tos i32) (result i32) + (func $compileDo (param $tos i32) (param $cond i32) (result i32) ;; Save branch nesting (i32.store (local.get $tos) (global.get $branchNesting)) (local.set $tos (i32.add (local.get $tos) (i32.const 4))) @@ -2215,6 +2223,13 @@ ;; in the conditional case (call $emitBlock) + (if (local.get $cond) + (then + (call $emitGetLocal (i32.sub (global.get $currentLocal) (i32.const 0))) + (call $emitGetLocal (i32.sub (global.get $currentLocal) (i32.const 1))) + (call $emitEqual) + (call $emitBrIf (i32.const 0)))) + ;; startDo $1 (call $emitGetLocal (i32.sub (global.get $currentLocal) (i32.const 1))) (call $emitICall (i32.const 1) (i32.const 0x1 (; = START_DO_INDEX ;))) @@ -2457,13 +2472,19 @@ (func $emitXOR (i32.store8 (global.get $cp) (i32.const 0x73)) - (global.set $cp (i32.add (global.get $cp) (i32.const 1)))) + (global.set $cp (i32.add (global.get $cp) (i32.const 1))) + (global.set $lastEmitWasGetTOS (i32.const 0))) (func $emitEqualsZero (i32.store8 (global.get $cp) (i32.const 0x45)) (global.set $cp (i32.add (global.get $cp) (i32.const 1))) (global.set $lastEmitWasGetTOS (i32.const 0))) + (func $emitEqual + (i32.store8 (global.get $cp) (i32.const 0x46)) + (global.set $cp (i32.add (global.get $cp) (i32.const 1))) + (global.set $lastEmitWasGetTOS (i32.const 0))) + (func $emitNotEqual (i32.store8 (global.get $cp) (i32.const 0x47)) (global.set $cp (i32.add (global.get $cp) (i32.const 1))) @@ -2611,7 +2632,7 @@ (func $ensureCompiling (param $tos i32) (result i32) (local.get $tos) - (if (param i32) (result i32) (i32.eqz (i32.load (i32.const 0x20804 (; = body(STATE) ;)))) + (if (param i32) (result i32) (i32.eqz (i32.load (i32.const 0x20810 (; = body(STATE) ;)))) (call $fail (i32.const 0x2002e (; = str("word not supported in interpret mode") ;))))) ;; Toggle the hidden flag @@ -2701,7 +2722,7 @@ (local $delimited i32) (local.set $p (local.tee $addr (i32.add (global.get $inputBufferBase) - (i32.load (i32.const 0x202a0 (; = body(>IN) ;)))))) + (i32.load (i32.const 0x202ac (; = body(>IN) ;)))))) (local.set $end (i32.add (global.get $inputBufferBase) (global.get $inputBufferSize))) (local.set $delimited (i32.const 0)) (block $endOfInput @@ -2713,7 +2734,7 @@ (br_if $delimiter (i32.eq (local.get $c) (i32.const 0xa))) (br_if $read (i32.ne (local.get $c) (local.get $delim))))) (local.set $delimited (i32.const 1))) - (i32.store (i32.const 0x202a0 (; = body(>IN) ;)) + (i32.store (i32.const 0x202ac (; = body(>IN) ;)) (i32.sub (local.get $p) (global.get $inputBufferBase))) (local.get $addr) (i32.sub @@ -2727,7 +2748,7 @@ (local $c i32) (local.set $p (local.tee $addr (i32.add (global.get $inputBufferBase) - (i32.load (i32.const 0x202a0 (; = body(>IN) ;)))))) + (i32.load (i32.const 0x202ac (; = body(>IN) ;)))))) (local.set $end (i32.add (global.get $inputBufferBase) (global.get $inputBufferSize))) (block $endLoop (loop $loop @@ -2737,7 +2758,7 @@ (local.set $p (i32.add (local.get $p) (i32.const 1))) ;; Eat up a newline (br_if $loop (i32.ne (local.get $c) (i32.const 0xa))))) - (i32.store (i32.const 0x202a0 (; = body(>IN) ;)) + (i32.store (i32.const 0x202ac (; = body(>IN) ;)) (i32.sub (local.get $p) (global.get $inputBufferBase)))) ;; Returns xt, type (0 = not found, 1 = immediate, -1 = non-immediate) @@ -2819,7 +2840,7 @@ ;; Show prompt (if (i32.eqz (local.get $silent)) (then - (if (i32.ge_s (i32.load (i32.const 0x20804 (; = body(STATE) ;))) (i32.const 0)) + (if (i32.ge_s (i32.load (i32.const 0x20810 (; = body(STATE) ;))) (i32.const 0)) (then ;; Write ok (call $shell_emit (i32.const 111)) diff --git a/src/web/tests/forth2012-test-suite/coreexttest.fth b/src/web/tests/forth2012-test-suite/coreexttest.fth index cd80bc1..f91d59f 100644 --- a/src/web/tests/forth2012-test-suite/coreexttest.fth +++ b/src/web/tests/forth2012-test-suite/coreexttest.fth @@ -334,65 +334,65 @@ T{ BASE @ HEX BASE @ DECIMAL BASE @ - SWAP BASE ! -> 6 }T \ T{ MA0 -> }T \ T{ MA? MA0 MA? MA1 MA? MA2 -> FALSE FALSE FALSE }T -\ \ ----------------------------------------------------------------------------- -\ TESTING ?DO +\ ----------------------------------------------------------------------------- +TESTING ?DO -\ : QD ?DO I LOOP ; -\ T{ 789 789 QD -> }T -\ T{ -9876 -9876 QD -> }T -\ T{ 5 0 QD -> 0 1 2 3 4 }T +: QD ?DO I LOOP ; +T{ 789 789 QD -> }T +T{ -9876 -9876 QD -> }T +T{ 5 0 QD -> 0 1 2 3 4 }T -\ : QD1 ?DO I 10 +LOOP ; -\ T{ 50 1 QD1 -> 1 11 21 31 41 }T -\ T{ 50 0 QD1 -> 0 10 20 30 40 }T +: QD1 ?DO I 10 +LOOP ; +T{ 50 1 QD1 -> 1 11 21 31 41 }T +T{ 50 0 QD1 -> 0 10 20 30 40 }T -\ : QD2 ?DO I 3 > IF LEAVE ELSE I THEN LOOP ; -\ T{ 5 -1 QD2 -> -1 0 1 2 3 }T +: QD2 ?DO I 3 > IF LEAVE ELSE I THEN LOOP ; +T{ 5 -1 QD2 -> -1 0 1 2 3 }T -\ : QD3 ?DO I 1 +LOOP ; -\ T{ 4 4 QD3 -> }T -\ T{ 4 1 QD3 -> 1 2 3 }T -\ T{ 2 -1 QD3 -> -1 0 1 }T +: QD3 ?DO I 1 +LOOP ; +T{ 4 4 QD3 -> }T +T{ 4 1 QD3 -> 1 2 3 }T +T{ 2 -1 QD3 -> -1 0 1 }T -\ : QD4 ?DO I -1 +LOOP ; -\ T{ 4 4 QD4 -> }T -\ T{ 1 4 QD4 -> 4 3 2 1 }T -\ T{ -1 2 QD4 -> 2 1 0 -1 }T +: QD4 ?DO I -1 +LOOP ; +T{ 4 4 QD4 -> }T +T{ 1 4 QD4 -> 4 3 2 1 }T +T{ -1 2 QD4 -> 2 1 0 -1 }T -\ : QD5 ?DO I -10 +LOOP ; -\ T{ 1 50 QD5 -> 50 40 30 20 10 }T -\ T{ 0 50 QD5 -> 50 40 30 20 10 0 }T -\ T{ -25 10 QD5 -> 10 0 -10 -20 }T +: QD5 ?DO I -10 +LOOP ; +T{ 1 50 QD5 -> 50 40 30 20 10 }T +T{ 0 50 QD5 -> 50 40 30 20 10 0 }T +T{ -25 10 QD5 -> 10 0 -10 -20 }T -\ VARIABLE ITERS -\ VARIABLE INCRMNT +VARIABLE ITERS +VARIABLE INCRMNT -\ : QD6 ( limit start increment -- ) -\ INCRMNT ! -\ 0 ITERS ! -\ ?DO -\ 1 ITERS +! -\ I -\ ITERS @ 6 = IF LEAVE THEN -\ INCRMNT @ -\ +LOOP ITERS @ -\ ; +: QD6 ( limit start increment -- ) + INCRMNT ! + 0 ITERS ! + ?DO + 1 ITERS +! + I + ITERS @ 6 = IF LEAVE THEN + INCRMNT @ + +LOOP ITERS @ +; -\ T{ 4 4 -1 QD6 -> 0 }T -\ T{ 1 4 -1 QD6 -> 4 3 2 1 4 }T -\ T{ 4 1 -1 QD6 -> 1 0 -1 -2 -3 -4 6 }T -\ T{ 4 1 0 QD6 -> 1 1 1 1 1 1 6 }T -\ T{ 0 0 0 QD6 -> 0 }T -\ T{ 1 4 0 QD6 -> 4 4 4 4 4 4 6 }T -\ T{ 1 4 1 QD6 -> 4 5 6 7 8 9 6 }T -\ T{ 4 1 1 QD6 -> 1 2 3 3 }T -\ T{ 4 4 1 QD6 -> 0 }T -\ T{ 2 -1 -1 QD6 -> -1 -2 -3 -4 -5 -6 6 }T -\ T{ -1 2 -1 QD6 -> 2 1 0 -1 4 }T -\ T{ 2 -1 0 QD6 -> -1 -1 -1 -1 -1 -1 6 }T -\ T{ -1 2 0 QD6 -> 2 2 2 2 2 2 6 }T -\ T{ -1 2 1 QD6 -> 2 3 4 5 6 7 6 }T -\ T{ 2 -1 1 QD6 -> -1 0 1 3 }T +T{ 4 4 -1 QD6 -> 0 }T +T{ 1 4 -1 QD6 -> 4 3 2 1 4 }T +T{ 4 1 -1 QD6 -> 1 0 -1 -2 -3 -4 6 }T +T{ 4 1 0 QD6 -> 1 1 1 1 1 1 6 }T +T{ 0 0 0 QD6 -> 0 }T +T{ 1 4 0 QD6 -> 4 4 4 4 4 4 6 }T +T{ 1 4 1 QD6 -> 4 5 6 7 8 9 6 }T +T{ 4 1 1 QD6 -> 1 2 3 3 }T +T{ 4 4 1 QD6 -> 0 }T +T{ 2 -1 -1 QD6 -> -1 -2 -3 -4 -5 -6 6 }T +T{ -1 2 -1 QD6 -> 2 1 0 -1 4 }T +T{ 2 -1 0 QD6 -> -1 -1 -1 -1 -1 -1 6 }T +T{ -1 2 0 QD6 -> 2 2 2 2 2 2 6 }T +T{ -1 2 1 QD6 -> 2 3 4 5 6 7 6 }T +T{ 2 -1 1 QD6 -> -1 0 1 3 }T \ \ ----------------------------------------------------------------------------- \ TESTING BUFFER: diff --git a/src/web/tests/suite.js b/src/web/tests/suite.js index e3e92e1..45e1cc7 100644 --- a/src/web/tests/suite.js +++ b/src/web/tests/suite.js @@ -731,6 +731,20 @@ function loadTests() { }); }); + describe("?DO/LOOP", () => { + it("should run a loop", () => { + run(`: FOO 4 0 ?DO 3 LOOP ;`); + run("FOO"); + expect(stackValues()).to.eql([3, 3, 3, 3]); + }); + + it("should not run a loop with equal conditions", () => { + run(`: FOO 4 4 ?DO 3 LOOP ;`); + run("FOO"); + expect(stackValues()).to.eql([]); + }); + }); + describe("UNLOOP", () => { it("should work with nested loops", () => { run(