From 08c39a2bd89e6ef9ebc4b249368ab1282ab4f5fc Mon Sep 17 00:00:00 2001 From: andromeda Date: Tue, 10 Mar 2026 16:32:06 +0100 Subject: add get_opcode and its test, fix a couple bugs + semantics things --- twasm/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'twasm/README.md') diff --git a/twasm/README.md b/twasm/README.md index ce6beec..d6d2ec5 100644 --- a/twasm/README.md +++ b/twasm/README.md @@ -144,6 +144,20 @@ type metadata for the different types is as follows: 11b ; 64 bit ``` +#### `opcodes.by_id` + +entries are as follows: + +``` ++----------+--------+----------+ +| 31 24 | 23 16 | 15 0 | ++----------+--------+----------+ +| reserved | opcode | token ID | ++----------+--------+----------+ +``` + +note the lack of support for multiple-byte opcodes or multiple opcodes for one token ID; these features will likely be added at some point after the parser accumulates too much jank. + ### token IDs supported tokens are listed below -- cgit v1.3.1