descriptor / described type ordering constraints

Aperta
#125 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
wasm
Ambito
compilers

Direzione di ricerca

The payload names no files or tests. Start with the linked discussion in pull request 124 and the current rule that a described type must precede its descriptor. This is an open design question about whether to keep that ordering and whether descriptor types should come first, so a newcomer's first step is to read the thread and not to write code. Done means the maintainers agree on the ordering rule and the validation consequences are written down.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Currently we require a described type to appear before its descriptor type. The ordering constraint statically rules out descriptor cycles. The rationale for this ordering is that we expect described types to be referenced more frequently in the module, so it is better to give them smaller indices for smaller LEB index encoding. Also, it Just Makes Sense that you would want to see the "more concrete" type first.

However, @rossberg raised the questions of whether we need the ordering constraint at all, and if so, whether it would be nicer to have descriptor types first, matching the necessary order of construction.

There should be no runtime problem with allowing descriptor cycles; the involved types will just be uninhabitable. There might be some small extra complication in streaming type decoding and validation, since the validator would no longer be able to assume that described and descriptor types will or will not have been decoded.

Lingua principale
WebAssembly
Stelle
13
Fork
3
Merge medio
3g 3h
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WebAssembly/custom-descriptors

Tutte le issue di WebAssembly/custom-descriptors

Issue simili

Altre issue su Compilers

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.