Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Binary format bikeshed: where the `typeidx` immediate is located

オープン
#10 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
wasm
領域
compilers

調査の方向性

The issue discusses the binary format of the memarg immediate in WebAssembly proposals. Review the spec for multibyte-array-access and acquire-release-atomics to understand the current layout. Examine the parser code that handles these flags and immediates. The goal is to propose a consistent ordering of immediates based on flag bits, ensuring the change is compatible with existing and related proposals.

索引モデルが issue の本文から書いたものです。

説明

Currently this proposal specifies memarg ::= flags:u32 offset:u32 typeidx:u32 when flags has bit 5 set, but subjectively I find this a bit inconsistent with other immediates-specified-by-flags. For example bit 6, implying a memory index immediate, looks like memarg ::= flags:u32 memidx:u32 offset:u32. For the acquire-release-atomics proposal bit 4 implies memarg ::= flags:u32 ordering:u8 offset:u32 (at least I'm pretty sure given my current reading of the explainer and parser).

I opened a somewhat related issue at WebAssembly/acquire-release-atomics#28 but I think it'd be a bit nicer if the flags bits had payloads present after the flags leb in increasing order of the bits. Specifically I'd propose:

;; already specified in core wasm
memarg ::= flags:u32 offset:u32                               if (flags >> 4) == 0b000
         | flags:u32 memidx:u32 offset:u32                    if (flags >> 4) == 0b100

;; added by acquire-release-atomics
memarg ::= ...
         | flags:u32 ordering:u8 offset:u32                   if (flags >> 4) == 0b001
         | flags:u32 ordering:u8 memidx:u32 offset:u32        if (flags >> 4) == 0b101

;; added by multibyte-array-access
memarg ::= ...
         | flags:u32 typeidx:u32 offset:u32                   if (flags >> 4) == 0b010

;; added by both 
memarg ::= ...
         | flags:u32 ordering:u8 typeidx:u32 offset:u32       if (flags >> 4) == 0b011

where 0b110 and 0b111 are both parse errors with this proposal (memory index + type index). The 0b011 case might be invalid for now though while this proposal isn't extended to atomics, though.

Basically though I wanted to ask: what would others think about moving the typeidx immediate to before offset:u32?

EDIT: sorry forgot to finish writing the issue title before I hit submit so the notifications sent out have a pretty bad issue title :(

主要言語
WebAssembly
スター
4
フォーク
1
平均マージ
16時間 35分
マージ済み PR(30日)
1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WebAssembly/multibyte-array-access のほかの issue

WebAssembly/multibyte-array-access の issue をすべて見る

似ている issue

Compilers の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。