Encoding of opcodes
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- wasm
- Domain
- compilers
Research direction
Start by reviewing the six instructions and the 0xe0–0xe5 assignments described in the issue, then compare the available GC, Numeric, SIMD, Atomic, and proposed experimental prefix spaces. Done means the proposal has an agreed opcode-prefix strategy that accommodates current and potential additional instructions without conflicting with existing assignments.
Written by the indexing model from the issue text.
Description
The explainer introduces six instructions: cont.new, cont.bind, resume, resume_throw, suspend, switch.
While this is not a large number, it is more than 1. Furthermore, it is entirely possible that we will need to describe additional instructions.
At the moment, the opcodes 0xe0 through 0xe5 are also described.
The wasm opcode space is getting pretty crowded nowadays. (In fact, the above codes already conflict with some internal opcodes used within V8).
Also, since suspend/resume instructions are unlikely to be that frequent in the code, the code size argument does not seem pressing.
I would like to suggest using some space in one of the existing prefix groups: GC (0xfb), Numeric (0xfc), Simd (0xfd) or Atomic (0xfe).
The one with the most room is Numeric (last used sub-opcode 0x31) but maybe the one that makes most sense is GC (last used opcode is 0xb8)
Another suggestion made to me: have a specific 'experimental' prefix to be used by proposals until (just before) they reach phase 4.
- Dominant language
- WebAssembly
- Stars
- 216
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WebAssembly/stack-switching
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WebAssembly/stack-switching#156 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WebAssembly/stack-switching#145 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WebAssembly/stack-switching#144 · 4 comments ·
-
JSPI integration Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
WebAssembly/stack-switching#131 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
WebAssembly/stack-switching#128 · 6 comments ·
All issues in WebAssembly/stack-switching
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
internal.h中,漏掉了1个定义。 Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
oxc-project/oxc#26944 ·