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

Should `cont.new` be constant?

Open
#145 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
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
wasm
Domain
compilers

Research direction

Start by reviewing the stack-switching explainer, which currently leaves cont.new's constant status unspecified, and compare its treatment with ref.func, struct.new, and array.new. Done means resolving whether cont.new is allowed in global initializers and element segment items, then documenting that decision in the explainer.

Written by the indexing model from the issue text.

Description

Should cont.new be allowed to appear in global initializers, element segment items, etc.? The explainer does not currently say either way. For comparison, ref.func, struct.new, and array.new are all constant. I think it would make sense to allow cont.new to be constant, too. That would allow globals and tables to be initialized with continuations. Other new instructions should not be constant because they have observable side effects.

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.