Handle field and array-element outputs accepted in statement assembly
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 53/100
Línea de trabajo
Start at llvm/src/statement/asm.rs, especially the statement asm output-place lowering near line 259, and trace how semantic checking accepts field and index lvalues. Compare the struct-field and array-element repros with the plain variable control, then inspect existing asm tests for output storage and evaluation order. Done means supported outputs reach IR and store to the selected place with single, source-ordered address evaluation, or unsupported forms receive a source diagnostic.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Statement-form assembly accepts assignable struct fields and array elements as outputs during semantic checking, but LLVM lowering only handles a variable or a dereferenced variable. Validated programs reach E9001 instead of supported output lowering or a source diagnostic.
Starting point: statement asm output-place lowering.
Reproduction
Audited canonical master e1f8effd195b6339c3979b1e091e63c25f1da983 on Linux amd64 with checkout-built Wave 0.0.1-alpha-dev, matching std, Rust 1.89.0, Cargo jobs=2 and LLVM 21.1.8. The master SHA was rechecked before registration.
Save either example as repro.wave:
struct S { x: i64; }
fun main() {
var s: S = S { x: 0 };
asm {
"mov rax, 7"
out("rax") s.x
clobber("nostack")
};
}
Array variant:
fun main() {
var a: array<i64, 1> = [0];
asm {
"mov rax, 7"
out("rax") a[0]
clobber("nostack")
};
}
target/debug/wavec --std-root "$PWD/std" check repro.wave
target/debug/wavec --std-root "$PWD/std" --error-format=json build repro.wave --emit=ir --out-dir .tmp/asm-output-repro
Semantic checking accepts the output. IR generation exits 1 with E9001 and:
out(...) target must be variable or deref var for now: IndexAccess { ... }
compiler panic location: llvm/src/statement/asm.rs:303:18
The field variant reaches the same restricted output-place path. A plain variable output is the control case. This report establishes semantic-check/IR behavior; it does not claim execution on another architecture.
Scope
Lower the typed addresses of supported field/index output lvalues with correct storage width, source order and single evaluation. Reject any deliberately unsupported output form during semantic checking with a source diagnostic rather than an internal error. Preserve constant/mutability checks, constraints and clobbers.
Related: #512 concerns typed asm input expressions, #397 malformed asm syntax and #409 the general backend diagnostic channel. This issue is specifically the accepted output-address shape.
Completion criteria
- Both examples build through IR/object generation without E9001, or receive an intentional source diagnostic if a documented output restriction applies.
- Supported cases store the output in the selected field/element at execution.
- Side-effecting index/address computations run once in source order.
- Plain variables, supported pointer outputs, mutability checks and architecture feature gating retain coverage.
- Lenguaje dominante
- Rust
- Estrellas
- 56
- Forks
- 21
- Merge medio
- 22 h 57 min
- PR fusionados (30 d)
- 46
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de wavefnd/Wave
-
Reject unrepresentable POSIX listener descriptors before Unix-domain acceptPosiblemente ocupada @ShahadatTest la tomó hace 3 días. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
wavefnd/Wave#1082 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug help wanted
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
bug build help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
Los mantenedores suelen responder en 1 día
-
bug ci help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
Prevent compiler stack overflow on long acyclic forward type-alias chainsPosiblemente ocupada @hiyouwhatsapp la tomó hace 4 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de wavefnd/Wave
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
bug order-flow studies ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
userFRM/egui-charts#2417 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
In a plain-text message, Font, Font Size, Font Color and Text Highlight Color stay livePosiblemente ocupada @ragelfundionctrumnar la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
UCS-Care-Group/mailcraft#862 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
smoltcp-rs/smoltcp#1243 ·
Los mantenedores suelen responder en 1 día