From f5df37a12f79830732259db75433423cf5de37b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sun, 1 May 2022 16:58:33 +0200 Subject: [PATCH] Remove obsolete environment queries --- src/waforth.wat | 18 ++---------------- src/web/tests/suite.js | 6 ------ 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/waforth.wat b/src/waforth.wat index 8982bee..1a0d0fb 100644 --- a/src/waforth.wat +++ b/src/waforth.wat @@ -176,8 +176,6 @@ (data (i32.const 0x20084) "\0F" "not implemented") (data (i32.const 0x20090) "\11" "ADDRESS-UNIT-BITS") (data (i32.const 0x200A2) "\0F" "/COUNTED-STRING") -(data (i32.const 0x200B2) "\04" "CORE") -(data (i32.const 0x200B7) "\08" "CORE-EXT") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Built-in words @@ -997,20 +995,8 @@ (i32.store (local.get $btos) (i32.const -1)) (return (local.get $tos))) (else - (if (call $stringEqual (local.get $addr) (local.get $len) (i32.const 0x200B3) (i32.const 0x04) (; "CORE" ;)) - (then - (i32.store (local.get $bbtos) (i32.const 0)) - (i32.store (local.get $btos) (i32.const -1)) - (return (local.get $tos))) - (else - (if (call $stringEqual (local.get $addr) (local.get $len) (i32.const 0x200B8) (i32.const 0x08) (; "CORE-EXT" ;)) - (then - (i32.store (local.get $bbtos) (i32.const 0)) - (i32.store (local.get $btos) (i32.const -1)) - (return (local.get $tos))) - (else - (i32.store (local.get $bbtos) (i32.const 0)) - (return (local.get $btos)))))))))) + (i32.store (local.get $bbtos) (i32.const 0)) + (return (local.get $btos)))))) (unreachable)) (data (i32.const 0x218ac) "\9c\18\02\00" "\0c" "ENVIRONMENT?000" "\a9\00\00\00") (elem (i32.const 0xa9) $ENVIRONMENT?) diff --git a/src/web/tests/suite.js b/src/web/tests/suite.js index c8d78b9..bec0661 100644 --- a/src/web/tests/suite.js +++ b/src/web/tests/suite.js @@ -1509,12 +1509,6 @@ function loadTests() { expect(stackValues()).to.eql([255, -1]); }); - it("should return CORE", () => { - run(': FOO S" CORE" ENVIRONMENT? ;'); - run("FOO"); - expect(stackValues()).to.eql([0, -1]); - }); - it("should work for unsupported queries", () => { run(': FOO S" UNSUPPORTED" ENVIRONMENT? ;'); run("FOO");