Lower typed struct construction and field access in Whale

Aperta
#881 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 with whale/src/codegen/mod.rs and whale/src/codegen/walk.rs, then discuss the design with @LunaStev before implementation. Verify struct construction, field reads and writes, and nested structs while preserving layout, conversions, and evaluation order; keep unsupported external C ABI boundaries explicit. The issue is complete when those checks pass without weakening recursive-layout checks or duplicating upstream native aggregate ABI work.

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 non-function top-level declarations:

struct Pair { x: i32; y: i32; } fun main() -> i32 { return 0; }

Scope

Support Wave struct metadata, values and field access using frontend-resolved types/layout. Separate internal aggregate lowering from external C ABI classification. Do not weaken recursive-layout checks or duplicate upstream native aggregate ABI work. Starting points: whale/src/codegen/mod.rs and whale/src/codegen/walk.rs.

Difficulty: hard.

Completion criteria

  • Verify construction, field reads/writes and nested structs.
  • Preserve layout, field conversions and evaluation order.
  • Keep unsupported external ABI boundaries explicit.

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

Related pointer adaptation: #879; external C ABI work remains separate.

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.