//# print-bytecode --input=module // This module defines several public functions with complex bodies. // This can be thought of as a smoke test that tests many different aspects of bytecode generation. module 0x3d10.Example { struct Coin { value: u64 } public value(this: &Self.Coin): u64 { let value_ref: &u64; label b0: value_ref = &move(this).Coin::value; return *move(value_ref); } public deposit(this: &mut Self.Coin, check: Self.Coin) { let value_ref: &mut u64; let value: u64; let check_ref: &Self.Coin; let check_value: u64; let new_value: u64; let i: u64; label b0: value_ref = &mut move(this).Coin::value; value = *copy(value_ref); check_ref = ✓ check_value = Self.value(move(check_ref)); new_value = copy(value) + copy(check_value); *move(value_ref) = move(new_value); Coin { value: i } = move(check); return; } } //# print-bytecode --input=module // Functions may be declared with entry modifier module 0x4d10.M { public entry f() { label b0: return; } public entry g() { label b0: Self.f(); return; } }