WebAssembly / WebAssembly/multibyte-array-access

Text Format

Open
#1 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
4
Forks
1
Avg merge
16h 35m
Merged PRs (30d)
1

Description

The current plan to reuse the existing load/store memory instructions for arrays will require some new WAT syntax to signal that the load/store instruction is operating on an array. Some options:

Option 1 - array Keyword
i32.load array $type_index (<array ref>) (<address>)
Option 2 - backing=array
i32.load backing=array $type_index (<array ref>) (<address>)
Option 3 - type=$type_index
i32.load type=$type_index (<array ref>) (<address>)
(Won't work) Option 4 - Use Presence Type Index to Signal Array Read
i32.load $type_index (<array ref>) (<address>)

Unfortunately, this won't work because there is no way to differentiate this from i32.load $memory_index.

Option 5 - ???

Any other proposals?

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.

Research direction

Start by reviewing the issue's proposed WAT forms for array-aware load/store instructions and compare them with the existing memory-index syntax described in the body. No files or tests are named. Done means reaching agreement on a syntax that distinguishes array access from memory access.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.