Lower fixed arrays and checked indexing in Whale

Aperta
#880 0 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
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
compilers

Direzione di ricerca

Start by reading related issue #879 and the compiler’s HIR, typed-pointer lowering, and existing indexing/conversion paths; the payload does not name specific files or tests. Discuss the design with @LunaStev before implementation. Done means fixed-array construction, reads and writes, and nested arrays are verified, existing indexing and conversion semantics are preserved, and unsupported element types remain clear.

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

Descrizione

discussion enhancement help wanted

Motivation

At fd07427f4a976de05e38eff3ee1760db97fbb761 on Linux amd64 with Rust 1.89 and locked Whale 020d2a4, lexing, parsing and TypedProgram lowering succeed, but calling whale::emit_ir on this source returns Whale backend does not yet support type Array(Int(32), 2):

fun main() -> i32 { var x: array<i32, 2> = [1, 2]; return x[0]; }

Scope

Add Wave fixed-array construction/indexing using verified HIR element type, length and layout. Coordinate with typed-pointer lowering. Preserve existing Wave index behavior; no dynamic-array API or new bounds policy. This is Wave adaptation, separate from upstream frontend #157.

Difficulty: hard.

Completion criteria

  • Verify construction, element reads/writes and nested fixed arrays.
  • Match established indexing and conversion semantics.
  • Keep unsupported element types clear.

Please mention @LunaStev to discuss the design before starting implementation.

Related pointer adaptation: #879.

Lingua principale
Rust
Stelle
56
Fork
21
Merge medio
23h 20m
PR unite (30g)
45

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 wavefnd/Wave

Tutte le issue di wavefnd/Wave

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.