Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/tests/compiler/progs/calls.osc # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tests / compiler / progs / calls.osc` 17 lines ยท 680 bytes Raw Blame History 1 // entry: c0 c6 call_all 2 // calls with 0..6 scalar parameters. 3 fn c0() -> i64 { return 42; } 4 fn c1(a: i64) -> i64 { return a + c0(); } 5 fn c2(a: i64, b: i32) -> i64 { return c1(a) - (b as i64); } 6 fn c3(a: i64, b: i32, c: u8) -> i64 { return c2(a, b) * (c as i64); } 7 fn c4(a: i64, b: i32, c: u8, d: bool) -> i64 { 8 if d { return c3(a, b, c); } 9 return c3(a, b, c) + 1; 10 } 11 fn c5(a: i64, b: i32, c: u8, d: bool, e: u16) -> i64 { return c4(a, b, c, d) ^ (e as i64); } 12 fn c6(a: i64, b: i32, c: u8, d: bool, e: u16, f: i8) -> i64 { return c5(a, b, c, d, e) + (f as i64); } 13 fn noop() { } 14 fn call_all(x: i32) -> i64 { 15 noop(); 16 return c6(x as i64, x, 3, x > 0, 7, -1) + c0(); 17 }