Lower typed struct construction and field access in Whale

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
compilers

調査の方向性

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.

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

説明

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.

主要言語
Rust
スター
56
フォーク
21
平均マージ
23時間 20分
マージ済み PR(30日)
45

環境構築

はじめの一歩

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

wavefnd/Wave のほかの issue

wavefnd/Wave の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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