IssueRaiser

Having implemented a threaded Forth with WASM, the most annoying problem is that WASM doesn't support jumps to arbitrary memory locations.

Having implemented a threaded Forth with WASM, the most annoying problem is that WASM doesn't support jumps to arbitrary memory locations. You can either call functions (and you don't have access to the call stack), jump backward to a previously defined block entry point or jump forward to the end of a previously defined block. Threading then requires a double indirection in the core loop, and you have to use an explicit IP "register" in a global variable.

Posted by stefano on Nov 23, 2020, 5:38 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

support (Other)

Having implemented a threaded Forth with WASM, the most annoying problem is that WASM doesn't support jumps to arbitrary memory locations.

stefanoNov 23, 2020, 5:38 PM

Having implemented a threaded Forth with WASM, the most annoying problem is that WASM doesn't support jumps to arbitrary memory locations. You can either call functions (and you don't have access to the call stack), jump backward to a previously defined block entry point or jump forward to the end of a previously defined block. Threading then requires a double indirection in the core loop, and you have to use an explicit IP "register" in a global variable.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue