Define and implement Whale lowering for Wave integers wider than 128 bits

Đang mở
#884 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
compilers

Hướng nghiên cứu

Start by reproducing the reported whale::emit_ir failure for the u256 identity function and inspect Whale's upstream type and backend capability definitions. The issue asks for a documented representation and capability contract, then implementation and boundary tests covering wrapping, conversions, comparisons, and checked shifts; coordinate the design with @LunaStev first. Done means those behaviors are preserved and unsupported operations have explicit diagnostics.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 Uint(256):

fun identity(x: u256) -> u256 { return x; }

Scope

Decide a Wave-to-Whale representation for existing 256–1024-bit integers, then implement operations/conversions without narrowing to 128 bits. Inspect upstream types and coordinate required capabilities; use Utils and compiler-owned freestanding arithmetic where appropriate. Full-value constant shift checks in #860 are not wider runtime support.

Difficulty: very hard.

Completion criteria

  • Record the representation and backend capability contract.
  • Preserve wrapping, conversions, comparisons and checked shift semantics.
  • Provide boundary tests and explicit diagnostics for remaining operations.

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

Ngôn ngữ chính
Rust
Star
56
Fork
21
Merge trung bình
23 giờ 20 phút
Pull request đã merge (30 ngày)
45

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wavefnd/Wave

Tất cả issue của wavefnd/Wave

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.