Iter 2: verschachteltes if, Strings, JSON-Output, deps
- Codegen: current_block-Tracking ersetzt die Heuristik im phi-Lowering; verschachtelte if-Ausdrücke produzieren jetzt korrekte LLVM IR. examples/max3.ail.json + Test schützt gegen Regression. - Strings: Lit::Str / Type Str / io/print_str Effekt-Op; Strings sind im MVP immutable Konstanten. examples/hello.ail.json als zweiter E2E-Test. - CLI: --json für manifest und builtins; neuer deps-Subcommand listet statische Symbol-Referenzen pro Definition. Effekt-Ops mit Prefix effect: markiert. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -42,3 +42,17 @@ fn sum_1_to_10_is_55() {
|
||||
let stdout = build_and_run("sum.ail.json");
|
||||
assert_eq!(stdout.trim(), "55");
|
||||
}
|
||||
|
||||
/// Schützt das Block-Tracking im Codegen: max3 hat verschachtelte `if`s,
|
||||
/// und falsches phi-Block-Tracking würde hier zu falschem Ergebnis führen.
|
||||
#[test]
|
||||
fn max3_picks_largest() {
|
||||
let stdout = build_and_run("max3.ail.json");
|
||||
assert_eq!(stdout.trim(), "17");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hello_world_str_lit() {
|
||||
let stdout = build_and_run("hello.ail.json");
|
||||
assert_eq!(stdout.trim(), "Hallo, AILang.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user