Commit graph

354 commits

Author SHA1 Message Date
Remko Tronçon
344e926531 standalone: Improve test 2022-10-08 08:36:47 +02:00
Remko Tronçon
e7a45f5b0c standalone: Use fgets() instead of getline() for reading
getline() is incorrect (it can reallocate)
2022-10-08 08:36:26 +02:00
Remko Tronçon
6b417ee54d standalone: Fix offsets after code reorganization 2022-10-02 21:03:36 +02:00
Remko Tronçon
9b2e696e5e Improve documentation structure 2022-10-02 20:57:24 +02:00
Remko Tronçon
f0ceb05323 Move code around for better readability 2022-10-02 20:48:18 +02:00
Remko Tronçon
31f1405509 Simplify prompt printing 2022-10-02 20:24:22 +02:00
Remko Tronçon
83fa40a3b4 Implement BYE 2022-10-01 20:13:59 +02:00
Remko Tronçon
ebf2e1c674 Fix parsing with process script 2022-10-01 20:09:43 +02:00
Remko Tronçon
86069773e1 doc: Documentation tweaks & fixes 2022-10-01 19:39:23 +02:00
Remko Tronçon
e0cae790dc Remove waforth2c experiment
Will be superseded by `waforthc` in the future.
2022-07-11 21:02:13 +02:00
Remko Tronçon
74b4434a81 standalone: Use putchar for emit 2022-07-11 21:00:22 +02:00
Remko Tronçon
db43e9540a Fix lint errors 2022-07-06 19:53:21 +02:00
Remko Tronçon
6b2db1edd4 shell: Support passing program in query 2022-07-03 21:43:03 +02:00
Remko Tronçon
2682cbbb34 S\" 2022-07-03 21:15:51 +02:00
Remko Tronçon
b985748ef2 Work around bsd-tar corrupting archive on GitHub
See https://github.com/actions/virtual-environments/issues/2619
2022-06-10 20:21:40 +02:00
Remko Tronçon
e896b5d7bc shell: Flush output on paste 2022-06-10 20:00:18 +02:00
Remko Tronçon
48219d1dd0 shell: Buffer output 2022-06-10 14:51:03 +02:00
Remko Tronçon
c79c2f647e Shortcut if conditions 2022-06-06 21:18:21 +02:00
Remko Tronçon
40f53ee6fe TO: Fix compilation behavior 2022-06-05 23:17:35 +02:00
Remko Tronçon
6cfc439342 tests: Enable 2 disabled tests 2022-06-05 19:49:45 +02:00
Remko Tronçon
09292e9794 Implement SAVE-INPUT, RESTORE-INPUT 2022-06-05 19:18:37 +02:00
Remko Tronçon
1f5ffd1b9c Implement DEFER, DEFER!, DEFER@, IS, ACTION-OF 2022-06-05 19:05:39 +02:00
Remko Tronçon
45e99556b9 standalone: Fix export index 2022-06-04 08:42:11 +02:00
Remko Tronçon
fb25416734 UNUSED: Fix returning in cells instead of address units 2022-06-03 21:20:20 +02:00
Remko Tronçon
a8b8d6e4d3 HOLDS 2022-06-03 21:05:43 +02:00
Remko Tronçon
acfe0adfaa ROLL 2022-06-03 20:55:42 +02:00
Remko Tronçon
3ffaf71cbe MARKER 2022-06-03 20:40:31 +02:00
Remko Tronçon
e5c1124e21 BUFFER: 2022-06-03 20:40:18 +02:00
Remko Tronçon
10c5fd6b53 U> 2022-06-02 22:30:05 +02:00
Remko Tronçon
d396753de4 WITHIN 2022-06-02 22:22:07 +02:00
Remko Tronçon
80a9eea499 build: Fix benchmarks 2022-06-02 21:40:29 +02:00
Remko Tronçon
ccbad85a74 Misc small cleanups & improvements.
NIP, TUCK: Implement directly
CR: Simplify
IF/WHILE: Reduce test by 2 instructions
compileCall->compileExecute
emitICall->compileCall
Inline $setFlag & $hidden
2022-06-02 21:33:41 +02:00
Remko Tronçon
5a4efef6c8 Documentation 2022-06-01 22:08:58 +02:00
Remko Tronçon
71ec9e341a Add README.md 2022-06-01 21:49:15 +02:00
Remko Tronçon
c9ae5e0a03 COMPILE, 2022-06-01 21:21:36 +02:00
Remko Tronçon
d2fee658dd :NONAME 2022-06-01 21:14:21 +02:00
Remko Tronçon
93a58087d6 2R@ 2022-05-31 21:42:17 +02:00
Remko Tronçon
9a77665d99 0<> 2022-05-31 21:39:35 +02:00
Remko Tronçon
f4f1ed6560 tests: Load forth2012 test suite utilities + enable dependent tests 2022-05-31 21:28:16 +02:00
Remko Tronçon
3cabd72cff 2R> 2022-05-31 21:26:37 +02:00
Remko Tronçon
09f342fcf3 2>R 2022-05-31 21:18:35 +02:00
Remko Tronçon
7ffc90eca9 interpret: Update documentation 2022-05-31 21:04:19 +02:00
Remko Tronçon
caf1f31451 Simplify emit instructions 2022-05-31 20:58:23 +02:00
Remko Tronçon
f8c8cf35f7 <> 2022-05-31 20:46:53 +02:00
Remko Tronçon
b13d7fe4d7 ?DO 2022-05-31 20:45:22 +02:00
Remko Tronçon
2dbe2e00dd compileDo: Rearrange 2022-05-31 20:30:27 +02:00
Remko Tronçon
eb4423ee5d Move & resize input buffer 2022-05-30 23:47:58 +02:00
Remko Tronçon
d7018a10df Documentation 2022-05-30 23:44:38 +02:00
Remko Tronçon
fbf7f9b319 Remove UWIDTH 2022-05-30 23:24:23 +02:00
Remko Tronçon
34fe719397 Add references to standard 2022-05-30 22:12:26 +02:00
Remko Tronçon
93813185c5 .(, C", PARSE, PARSE-NAME, PAD 2022-05-30 21:29:23 +02:00
Remko Tronçon
afffcbbfb3 interpret: Remove state return argument 2022-05-30 21:15:22 +02:00
Remko Tronçon
eec7bf9be8 Report undefined word again 2022-05-29 21:43:03 +02:00
Remko Tronçon
47e0ac5bd4 Remove tos parameter from fail() 2022-05-29 21:24:42 +02:00
Remko Tronçon
b71cc87767 Fix comment 2022-05-29 20:45:33 +02:00
Remko Tronçon
0cccfcfc10 Remove wordBase function 2022-05-29 20:27:20 +02:00
Remko Tronçon
9284bc81d0 Remove redundant strings 2022-05-29 20:20:32 +02:00
Remko Tronçon
8f4c7b0999 Refactor all words that depend on parsing to use parse+parseName+skip 2022-05-29 20:17:27 +02:00
Remko Tronçon
90262751c0 Add documentation 2022-05-28 21:50:03 +02:00
Remko Tronçon
32f5c90426 Defragment function table 2022-05-28 21:43:34 +02:00
Remko Tronçon
091e2180f2 Reference to index of words using index() 2022-05-28 21:43:34 +02:00
Remko Tronçon
c055a70e01 Defragment dictionary & remove obsolete entries 2022-05-28 18:29:56 +02:00
Remko Tronçon
c267b5d1a5 Defragment strings data section 2022-05-28 14:15:07 +02:00
Remko Tronçon
810ccb90c6 Fix expressions 2022-05-28 14:11:55 +02:00
Remko Tronçon
68d8421518 Simplify escape 2022-05-28 10:11:27 +02:00
Remko Tronçon
cec3595dbf Clean up comments 2022-05-28 09:25:55 +02:00
Remko Tronçon
87e805ad9e Clean up dictionary entries 2022-05-28 09:00:59 +02:00
Remko Tronçon
c3e919cd2c Fix expression 2022-05-27 22:42:37 +02:00
Remko Tronçon
7efbba2aea Update standard testsuite 2022-05-27 20:43:35 +02:00
Remko Tronçon
4d0c67f60a Remove unused base pointers 2022-05-27 11:52:09 +02:00
Remko Tronçon
067a12301d Documentation updates 2022-05-26 21:29:23 +02:00
Remko Tronçon
534c4a3bdb WORDS: Remove accidental spaces after hidden words 2022-05-26 20:48:18 +02:00
Remko Tronçon
8c9a9426a2 Update README.md 2022-05-26 20:27:08 +02:00
Remko Tronçon
d40dcc1b4d standalone: Add wasmer to makefile 2022-05-26 19:44:26 +02:00
Remko Tronçon
e8202a153d standalone: Implement KEY 2022-05-26 14:06:15 +02:00
Remko Tronçon
7a1e7de085 github: Package standalone 2022-05-26 13:08:03 +02:00
Remko Tronçon
77a4df1609 github: Standalone build 2022-05-26 11:43:01 +02:00
Remko Tronçon
e5b1e5e892 standalone: Switch to wasmtime 2022-05-26 09:24:17 +02:00
Remko Tronçon
177c2808b7 standalone: Switch to wasm-c-api 2022-05-26 08:48:22 +02:00
Remko Tronçon
cc284482ea standalone: Initial version using wamr 2022-05-26 08:48:22 +02:00
Remko Tronçon
7a6a94d7d5 Reorder words 2022-05-25 16:12:45 +02:00
Remko Tronçon
42eeb5b377 Remove unreachable instructions 2022-05-25 15:52:25 +02:00
Remko Tronçon
13a6a612df Move standard testsuite 2022-05-25 15:50:39 +02:00
Remko Tronçon
6738aff33e interpret: Add silent mode 2022-05-24 22:50:42 +02:00
Remko Tronçon
236ad04aa5 Support reading long strings 2022-05-24 21:58:13 +02:00
Remko Tronçon
ff84035919 Update documentation 2022-05-23 21:49:57 +02:00
Remko Tronçon
ce54272eb6 Remove unused table index from loader 2022-05-23 21:42:14 +02:00
Remko Tronçon
532d9e1f34 Grow table from within WebAssembly 2022-05-23 21:37:39 +02:00
Remko Tronçon
308e7c3077 Cleanup 2022-05-23 21:27:19 +02:00
Remko Tronçon
f90b8062e1 Replace memcopy and memset by memory bulk operations 2022-05-23 20:54:43 +02:00
Remko Tronçon
c013b2493d Revert "Grow table from within WebAssembly"
It doesn't work in Node 16 (used by GitHub actions)

This reverts commit 2747458242.
2022-05-23 20:08:47 +02:00
Remko Tronçon
2747458242 Grow table from within WebAssembly 2022-05-23 20:08:39 +02:00
Remko Tronçon
fd6a03cc8d getc->read 2022-05-22 16:56:39 +02:00
Remko Tronçon
ccd49c2b12 ACCEPT: Implement in terms of KEY 2022-05-22 09:53:40 +02:00
Remko Tronçon
fca7a90869 readChar: Remove unreachable 2022-05-22 09:53:40 +02:00
Remko Tronçon
b36f236c61 QUIT: Enter interpretation state 2022-05-21 20:50:43 +02:00
Remko Tronçon
96490e1915 WORDS: Use type 2022-05-21 20:04:54 +02:00
Remko Tronçon
1a29e17a24 Print undefined word 2022-05-21 19:58:13 +02:00
Remko Tronçon
eded367819 thurtle: Refactor 2022-05-21 13:00:08 +02:00
Remko Tronçon
f2e37ba093 thurtle: Document query parameters 2022-05-21 11:16:54 +02:00