Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Encoding of opcodes

Open
#112 4 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WebAssembly/stack-switching

All issues in WebAssembly/stack-switching

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.