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

The `barrier` instruction has lexical scope semantics

Open
#44 2 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
Stale
Tech stack
wasm
Domain
compilers

Research direction

Start by reviewing the barrier instruction semantics described in this issue and the stack-switching proposal context. Determine whether the lexical suspension rule or its implementation cost requires a proposal decision; done means the semantics and an accepted implementation direction are clearly resolved.

Written by the indexing model from the issue text.

Description

Hello,

As we're now looking into implementing this proposal in Wizard, we noticed that the barrier instruction introduces a scope for instructions where suspends are dynamically disallowed. This has lexical behavior in that suspension is disallowed after entering the block and then reallowed after leaving the block. Two implementation strategies are afforded: dynamically updating a state variable associated with the current continuation, or stack-frame walking. As stack-frame walking is not necessary for suspension otherwise (only walking over stacks via the parent stack), the barrier seems to add some inherent cost here.

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.