From e6e3c0faa4a20802ab8426dd294d1deb7686f560 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 23 Oct 2025 16:22:27 +0800 Subject: [PATCH 01/15] feat(decode): runtime decoding for one element structure. --- .../kmir/kdist/mir-semantics/rt/decoding.md | 14 ++++ .../newtype-pubkey/newtype-pubkey.rs | 24 +++++++ .../newtype-pubkey/newtype-pubkey.smir.json | 1 + .../newtype-pubkey/newtype-pubkey.state | 71 +++++++++++++++++++ .../src/tests/integration/test_integration.py | 6 ++ 5 files changed, 116 insertions(+) create mode 100644 kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index ffef14c2b..8bcfd0050 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -72,6 +72,20 @@ rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, noTyConst)) => #decodeSliceAllocation(BYTES, lookupTy(ELEMTY)) ``` +### Struct decoding (newtype) + +Decode `StructType` with exactly one field (newtype/transparent wrapper) by delegating to the +inner field type and wrapping the result in a single-field `Aggregate`. +This is enough for cases like `solana_pubkey::Pubkey([u8; 32])` where layout is trivial +and the field offset is zero. + +```k +rule #decodeValue(BYTES, typeInfoStructType(_, _, TY .Tys)) + => Aggregate(variantIdx(0), ListItem(#decodeValue(BYTES, lookupTy(TY))) .List) + requires lengthBytes(BYTES) ==Int #elemSize(lookupTy(TY)) + [preserves-definedness] +``` + ### Error marker (becomes thunk) for other (unimplemented) cases All unimplemented cases will become thunks by way of this default rule: diff --git a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs new file mode 100644 index 000000000..0b698676a --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs @@ -0,0 +1,24 @@ +#![allow(dead_code)] + +#[derive(Copy, Clone)] +pub struct Pubkey(pub [u8; 32]); + +const KEY: Pubkey = Pubkey([ + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, +]); + +#[inline(never)] +fn use_inner(arr: &[u8; 32]) -> usize { + // Touch the array so MIR keeps the projection + if arr[0] == 0 { 32 } else { 0 } +} + +fn main() { + let pk = KEY; // forces constant decoding of StructType(newtype) + let len = use_inner(&pk.0); // field projection .0; needs StructType decode to Aggregate + core::hint::black_box(len); +} + diff --git a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.smir.json b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.smir.json new file mode 100644 index 000000000..de7e60566 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.smir.json @@ -0,0 +1 @@ +{"name":"newtype_pubkey","crate_id":5420632119300128232,"allocs":[],"functions":[[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h217ebc8958a2e0f7E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he9bdea485b0b8eefE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h0314312c7330f16dE"}],[20,{"IntrinsicSym":"black_box"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h3fd1a6eedf751fe2E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h51527ef46083cf19E"}],[25,{"IntrinsicSym":"black_box"}],[29,{"NormalSym":"_ZN14newtype_pubkey9use_inner17h230c2bffb6728494E"}],[32,{"NormalSym":"_ZN4core4hint9black_box17hbacba317dc8c2f63E"}],[36,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN14newtype_pubkey4main17h8f945f52f3914dbdE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":65,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}},"ty":30,"id":13}}}}]},"span":65},{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":1,"projection":[{"Field":[0,31]}]}]}]},"span":66}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":63,"user_ty":null,"const_":{"kind":"ZeroSized","ty":29,"id":12}}},"args":[{"Copy":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":14}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Continue"}},"span":68}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":30,"span":71,"mutability":"Not"},{"ty":26,"span":72,"mutability":"Not"},{"ty":27,"span":66,"mutability":"Not"},{"ty":26,"span":68,"mutability":"Not"}],"arg_count":0,"var_debug_info":[{"name":"pk","source_info":{"span":71,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"len","source_info":{"span":72,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":73}}},"details":null},{"symbol_name":"_ZN14newtype_pubkey9use_inner17h230c2bffb6728494E","mono_item_kind":{"MonoItemFn":{"name":"use_inner","id":7,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":54,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":10}}}}]},"span":54},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[32,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":11}}}}]},"span":53},{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":3,"projection":[]}},{"Copy":{"local":4,"projection":[]}}]}]},"span":53}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":5,"projection":[]}},"expected":true,"msg":{"BoundsCheck":{"len":{"Move":{"local":4,"projection":[]}},"index":{"Copy":{"local":3,"projection":[]}}}},"target":1,"unwind":"Continue"}},"span":53}},{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Index":3}]}}}]},"span":53}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":3}}},"span":55}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":57,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[32,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":11}}}}]},"span":57}],"terminator":{"kind":{"Goto":{"target":4}},"span":56}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":10}}}}]},"span":58}],"terminator":{"kind":{"Goto":{"target":4}},"span":56}},{"statements":[],"terminator":{"kind":"Return","span":59}}],"locals":[{"ty":26,"span":60,"mutability":"Mut"},{"ty":27,"span":61,"mutability":"Not"},{"ty":9,"span":53,"mutability":"Mut"},{"ty":26,"span":54,"mutability":"Not"},{"ty":26,"span":53,"mutability":"Mut"},{"ty":28,"span":53,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"arr","source_info":{"span":61,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":62}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h40b075be88868699E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h51527ef46083cf19E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h217ebc8958a2e0f7E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0ce30afb4ab9b6e9E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h0314312c7330f16dE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h3fd1a6eedf751fe2E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hcda3c7cfa27e5721E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}}},"details":null},{"symbol_name":"_ZN4core4hint9black_box17hbacba317dc8c2f63E","mono_item_kind":{"MonoItemFn":{"name":"std::hint::black_box::","id":5,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Move":{"local":1,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":26,"span":46,"mutability":"Mut"},{"ty":26,"span":41,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"dummy","source_info":{"span":41,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":47}}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he9bdea485b0b8eefE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":6,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":49,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":9}}}}]},"span":49}],"terminator":{"kind":"Return","span":48}}],"locals":[{"ty":17,"span":50,"mutability":"Mut"},{"ty":1,"span":51,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":52}}},"details":null}],"types":[[1,{"TupleType":{"types":[],"layout":{"fields":{"Arbitrary":{"offsets":[]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":0}}}}],[5,{"RefType":{"pointee_type":33,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[6,{"PrimitiveType":{"Int":"Isize"}}],[8,{"PtrType":{"pointee_type":34,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[9,{"PrimitiveType":{"Uint":"U8"}}],[10,{"EnumType":{"name":"std::result::Result","adt_def":17,"discriminants":[0,1],"fields":[[6],[35]],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I64","signed":true}},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[11,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[15,{"StructType":{"name":"std::sys::pal::unix::process::process_common::ExitCode","adt_def":23,"fields":[9],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[16,{"PrimitiveType":{"Int":"I32"}}],[17,{"StructType":{"name":"std::process::ExitCode","adt_def":21,"fields":[15],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[18,{"RefType":{"pointee_type":15,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[22,{"PtrType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[24,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[26,{"PrimitiveType":{"Uint":"Usize"}}],[27,{"RefType":{"pointee_type":31,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[28,{"PrimitiveType":"Bool"}],[30,{"StructType":{"name":"Pubkey","adt_def":9,"fields":[31],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":256}}}}],[31,{"ArrayType":{"elem_type":9,"size":{"kind":{"Value":[26,{"bytes":[32,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}]},"id":0},"layout":{"fields":{"Array":{"stride":{"num_bits":8},"count":32}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":256}}}}],[34,{"PtrType":{"pointee_type":9,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[35,"VoidType"]],"spans":[[0,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,194,36]],[1,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,199,6]],[2,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,9,195,93]],[3,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,10,195,93]],[4,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",201,2,201,2]],[5,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,5,199,6]],[6,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,12,194,13]],[7,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,6,199,7]],[9,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",189,5,189,9]],[10,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",190,5,190,9]],[11,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",191,5,191,9]],[12,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",192,5,192,12]],[13,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",188,1,201,2]],[14,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,69]],[15,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,75]],[16,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,84]],[17,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,70,195,74]],[18,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,76,195,82]],[19,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,74,195,75]],[20,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,93,195,93]],[21,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,83,195,84]],[22,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,9,2053,15]],[23,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,15]],[24,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,22]],[25,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,21,636,22]],[26,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,23,2053,24]],[27,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,92,195,93]],[29,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2052,19,2052,23]],[30,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",635,19,635,24]],[31,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,19]],[32,["no-location",0,0,0,0]],[33,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,21]],[34,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,33]],[35,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,40]],[36,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",160,2,160,2]],[38,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,43,150,44]],[40,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,9,154,15]],[41,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,27,388,32]],[42,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,1,160,2]],[43,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs",250,5,250,71]],[44,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs",521,1,521,56]],[45,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",390,2,390,2]],[47,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,1,390,2]],[48,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2424,6,2424,6]],[49,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2423,9,2423,26]],[51,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,15,2422,19]],[52,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,5,2424,6]],[53,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,8,16,14]],[54,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,12,16,13]],[55,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,8,16,19]],[56,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,5,16,37]],[57,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,22,16,24]],[58,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,34,16,35]],[59,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",17,2,17,2]],[61,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",14,14,14,17]],[62,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",14,1,17,2]],[63,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",21,15,21,24]],[64,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",21,15,21,31]],[65,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",20,14,20,17]],[66,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",21,25,21,30]],[67,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",22,5,22,26]],[68,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",22,5,22,31]],[69,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",23,2,23,2]],[71,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",20,9,20,11]],[72,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",21,9,21,12]],[73,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",19,1,23,2]]],"debug":null,"machine":{"endian":"Little","pointer_width":{"num_bits":64}}} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state new file mode 100644 index 000000000..aac41ccec --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state @@ -0,0 +1,71 @@ + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityNot ) ) , ty: ty ( 30 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 31 ) ) .ProjectionElems ) ) ) , span: span ( 66 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 29 ) , id: mirConstId ( 12 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 67 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 14 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 68 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 0 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + unwindActionContinue + + + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( Integer ( 1 , 8 , false ) ) + ListItem ( Integer ( 2 , 8 , false ) ) + ListItem ( Integer ( 3 , 8 , false ) ) + ListItem ( Integer ( 4 , 8 , false ) ) + ListItem ( Integer ( 5 , 8 , false ) ) + ListItem ( Integer ( 6 , 8 , false ) ) + ListItem ( Integer ( 7 , 8 , false ) ) + ListItem ( Integer ( 8 , 8 , false ) ) + ListItem ( Integer ( 9 , 8 , false ) ) + ListItem ( Integer ( 10 , 8 , false ) ) + ListItem ( Integer ( 11 , 8 , false ) ) + ListItem ( Integer ( 12 , 8 , false ) ) + ListItem ( Integer ( 13 , 8 , false ) ) + ListItem ( Integer ( 14 , 8 , false ) ) + ListItem ( Integer ( 15 , 8 , false ) ) + ListItem ( Integer ( 16 , 8 , false ) ) + ListItem ( Integer ( 17 , 8 , false ) ) + ListItem ( Integer ( 18 , 8 , false ) ) + ListItem ( Integer ( 19 , 8 , false ) ) + ListItem ( Integer ( 20 , 8 , false ) ) + ListItem ( Integer ( 21 , 8 , false ) ) + ListItem ( Integer ( 22 , 8 , false ) ) + ListItem ( Integer ( 23 , 8 , false ) ) + ListItem ( Integer ( 24 , 8 , false ) ) + ListItem ( Integer ( 25 , 8 , false ) ) + ListItem ( Integer ( 26 , 8 , false ) ) + ListItem ( Integer ( 27 , 8 , false ) ) + ListItem ( Integer ( 28 , 8 , false ) ) + ListItem ( Integer ( 29 , 8 , false ) ) + ListItem ( Integer ( 30 , 8 , false ) ) + ListItem ( Integer ( 31 , 8 , false ) ) ) ) ) , ty ( 30 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 31 ) ) .ProjectionElems ) , mutabilityNot , staticSize ( 32 ) ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + \ No newline at end of file diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index 179c997ed..e4159f94b 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -301,6 +301,12 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo EXEC_DATA_DIR / 'niche-enum' / 'niche-enum.state', None, ), + ( + 'newtype-pubkey', + EXEC_DATA_DIR / 'newtype-pubkey' / 'newtype-pubkey.smir.json', + EXEC_DATA_DIR / 'newtype-pubkey' / 'newtype-pubkey.state', + 1000, + ), ] From 182c15692493f905b762c6f79226f59c7342385d Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 23 Oct 2025 16:39:09 +0800 Subject: [PATCH 02/15] feat(test): add UnableToDecode test for structure with multiple elements --- .../exec-smir/struct-multi/struct-multi.rs | 21 ++++++++++ .../struct-multi/struct-multi.smir.json | 1 + .../exec-smir/struct-multi/struct-multi.state | 38 +++++++++++++++++++ .../src/tests/integration/test_integration.py | 6 +++ 4 files changed, 66 insertions(+) create mode 100644 kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs new file mode 100644 index 000000000..737fbaf1c --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs @@ -0,0 +1,21 @@ +#![allow(dead_code)] + +#[derive(Copy, Clone)] +struct Pair([u8; 32], bool); + +// Force a multi-field StructType constant so decoding happens at runtime +const P: Pair = Pair([ + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, +], true); + +fn main() { + // Use the constant so MIR emits a Constant->Allocated for a StructType with 2 fields + let p = P; + // Take a reference to the first field to trigger a field projection on a value + // that is produced via constant decoding (which we haven't fully implemented for multi-field structs). + let r = &p.0; + core::hint::black_box(r); +} diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.smir.json b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.smir.json new file mode 100644 index 000000000..1d7b21018 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.smir.json @@ -0,0 +1 @@ +{"name":"struct_multi","crate_id":6604885106027647559,"allocs":[],"functions":[[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1208d731e72b93c5E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h314067c40d672c7eE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h9b52994615ddc450E"}],[20,{"IntrinsicSym":"black_box"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h1a38fb0400bcebc9E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17ha16fa5eebd646573E"}],[25,{"IntrinsicSym":"black_box"}],[27,{"NormalSym":"_ZN4core4hint9black_box17h4dbfea22906052b4E"}],[35,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN12struct_multi4main17hc99c4ca853516311E","mono_item_kind":{"MonoItemFn":{"name":"main","id":7,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}},"ty":28,"id":11}}}}]},"span":55},{"kind":{"Assign":[{"local":2,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":1,"projection":[{"Field":[0,29]}]}]}]},"span":56}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":"ZeroSized","ty":27,"id":10}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":54}},{"statements":[],"terminator":{"kind":"Return","span":57}}],"locals":[{"ty":1,"span":58,"mutability":"Mut"},{"ty":28,"span":59,"mutability":"Not"},{"ty":26,"span":60,"mutability":"Not"},{"ty":26,"span":54,"mutability":"Not"}],"arg_count":0,"var_debug_info":[{"name":"p","source_info":{"span":59,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"r","source_info":{"span":60,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":61}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h859c8851c3f39cb4E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17ha16fa5eebd646573E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1208d731e72b93c5E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ff013f58bdd567E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h1a38fb0400bcebc9E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h9b52994615ddc450E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17he20429edcdf99e41E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}}},"details":null},{"symbol_name":"_ZN4core4hint9black_box17h4dbfea22906052b4E","mono_item_kind":{"MonoItemFn":{"name":"std::hint::black_box::<&[u8; 32]>","id":5,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Move":{"local":1,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":26,"span":46,"mutability":"Mut"},{"ty":26,"span":41,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"dummy","source_info":{"span":41,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":47}}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h314067c40d672c7eE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":6,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":49,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":9}}}}]},"span":49}],"terminator":{"kind":"Return","span":48}}],"locals":[{"ty":17,"span":50,"mutability":"Mut"},{"ty":1,"span":51,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":52}}},"details":null}],"types":[[1,{"TupleType":{"types":[],"layout":{"fields":{"Arbitrary":{"offsets":[]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":0}}}}],[5,{"RefType":{"pointee_type":32,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[6,{"PrimitiveType":{"Int":"Isize"}}],[8,{"PtrType":{"pointee_type":33,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[9,{"PrimitiveType":{"Uint":"U8"}}],[10,{"EnumType":{"name":"std::result::Result","adt_def":22,"discriminants":[0,1],"fields":[[6],[34]],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I64","signed":true}},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[11,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[15,{"StructType":{"name":"std::sys::pal::unix::process::process_common::ExitCode","adt_def":12,"fields":[9],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[16,{"PrimitiveType":{"Int":"I32"}}],[17,{"StructType":{"name":"std::process::ExitCode","adt_def":10,"fields":[15],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[18,{"RefType":{"pointee_type":15,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[22,{"PtrType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[24,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[26,{"RefType":{"pointee_type":29,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[28,{"StructType":{"name":"Pair","adt_def":14,"fields":[29,31],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":8},{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":264}}}}],[29,{"ArrayType":{"elem_type":9,"size":{"kind":{"Value":[30,{"bytes":[32,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}]},"id":0},"layout":{"fields":{"Array":{"stride":{"num_bits":8},"count":32}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":256}}}}],[30,{"PrimitiveType":{"Uint":"Usize"}}],[31,{"PrimitiveType":"Bool"}],[33,{"PtrType":{"pointee_type":9,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[34,"VoidType"]],"spans":[[0,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,194,36]],[1,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,199,6]],[2,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,9,195,93]],[3,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,10,195,93]],[4,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",201,2,201,2]],[5,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,5,199,6]],[6,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,12,194,13]],[7,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,6,199,7]],[9,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",189,5,189,9]],[10,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",190,5,190,9]],[11,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",191,5,191,9]],[12,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",192,5,192,12]],[13,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",188,1,201,2]],[14,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,69]],[15,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,75]],[16,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,84]],[17,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,70,195,74]],[18,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,76,195,82]],[19,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,74,195,75]],[20,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,93,195,93]],[21,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,83,195,84]],[22,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,9,2053,15]],[23,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,15]],[24,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,22]],[25,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,21,636,22]],[26,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,23,2053,24]],[27,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,92,195,93]],[29,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2052,19,2052,23]],[30,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",635,19,635,24]],[31,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,19]],[32,["no-location",0,0,0,0]],[33,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,21]],[34,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,33]],[35,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,40]],[36,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",160,2,160,2]],[38,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,43,150,44]],[40,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,9,154,15]],[41,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,27,388,32]],[42,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,1,160,2]],[43,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs",250,5,250,71]],[44,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs",521,1,521,56]],[45,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",390,2,390,2]],[47,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,1,390,2]],[48,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2424,6,2424,6]],[49,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2423,9,2423,26]],[51,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,15,2422,19]],[52,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,5,2424,6]],[53,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",20,5,20,26]],[54,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",20,5,20,29]],[55,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",16,13,16,14]],[56,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",19,13,19,17]],[57,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",21,2,21,2]],[59,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",16,9,16,10]],[60,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",19,9,19,10]],[61,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",14,1,21,2]]],"debug":null,"machine":{"endian":"Little","pointer_width":{"num_bits":64}}} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state new file mode 100644 index 000000000..166ec3718 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state @@ -0,0 +1,38 @@ + + + #traverseProjection ( toLocal ( 1 ) , thunk ( UnableToDecode ( b"\x01\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" , typeInfoStructType ( "Pair" , adtDef ( 14 ) , ty ( 29 ) ty ( 31 ) .Tys ) ) ) , projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems , .Contexts ) ~> #forRef ( mutabilityNot , staticSize ( 32 ) ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 10 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityNot ) ) , ty: ty ( 28 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 56 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 10 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 0 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + unwindActionContinue + + + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( thunk ( UnableToDecode ( b"\x01\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" , typeInfoStructType ( "Pair" , adtDef ( 14 ) , ty ( 29 ) ty ( 31 ) .Tys ) ) ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 26 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 26 ) , mutabilityNot ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + \ No newline at end of file diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index e4159f94b..5a3cb7939 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -307,6 +307,12 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo EXEC_DATA_DIR / 'newtype-pubkey' / 'newtype-pubkey.state', 1000, ), + ( + 'struct-multi', + EXEC_DATA_DIR / 'struct-multi' / 'struct-multi.smir.json', + EXEC_DATA_DIR / 'struct-multi' / 'struct-multi.state', + 1000, + ), ] From ce4d94d6781cbd96b422a77d49292357cce41762 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 23 Oct 2025 16:55:51 +0800 Subject: [PATCH 03/15] feat(decode): runtime decoding for multi-field structure --- .../kmir/kdist/mir-semantics/rt/decoding.md | 45 +++++++++++++++---- .../exec-smir/struct-multi/struct-multi.state | 40 +++++++++++++++-- 2 files changed, 73 insertions(+), 12 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index 8bcfd0050..4762622c2 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -72,18 +72,47 @@ rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, noTyConst)) => #decodeSliceAllocation(BYTES, lookupTy(ELEMTY)) ``` -### Struct decoding (newtype) +### Struct decoding -Decode `StructType` with exactly one field (newtype/transparent wrapper) by delegating to the -inner field type and wrapping the result in a single-field `Aggregate`. -This is enough for cases like `solana_pubkey::Pubkey([u8; 32])` where layout is trivial -and the field offset is zero. +We decode structs by decoding their fields in declaration order using the element sizes implied by the +field types. This decoding is layout-agnostic and succeeds only when the byte length exactly matches the +sum of field sizes (i.e., there is no padding). This covers common transparent/newtype and simple tuple/struct +cases. For more complex layouts with padding/alignment, decoding falls back to `UnableToDecode`. + +Handle the general multi-field case by splitting the byte array sequentially according to the field sizes +and decoding each field using `#decodeValue`: ```k -rule #decodeValue(BYTES, typeInfoStructType(_, _, TY .Tys)) - => Aggregate(variantIdx(0), ListItem(#decodeValue(BYTES, lookupTy(TY))) .List) - requires lengthBytes(BYTES) ==Int #elemSize(lookupTy(TY)) +rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS)) + => Aggregate(variantIdx(0), #decodeStructFields(BYTES, TYS)) + requires lengthBytes(BYTES) ==Int #sumElemSizes(TYS) [preserves-definedness] + +syntax List ::= #decodeStructFields ( Bytes , Tys ) [function, total] + +rule #decodeStructFields(BYTES, .Tys) + => .List + requires lengthBytes(BYTES) ==Int 0 + [preserves-definedness] + +rule #decodeStructFields(BYTES, TY TYS) + => ListItem( + #decodeValue( + substrBytes(BYTES, 0, #elemSize(lookupTy(TY))), + lookupTy(TY) + ) + ) + #decodeStructFields( + substrBytes(BYTES, #elemSize(lookupTy(TY)), lengthBytes(BYTES)), + TYS + ) + requires lengthBytes(BYTES) >=Int #elemSize(lookupTy(TY)) + [preserves-definedness] + +syntax Int ::= #sumElemSizes ( Tys ) [function, total] + +rule #sumElemSizes(.Tys) => 0 +rule #sumElemSizes(TY TYS) => #elemSize(lookupTy(TY)) +Int #sumElemSizes(TYS) ``` ### Error marker (becomes thunk) for other (unimplemented) cases diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state index 166ec3718..ef45e4e18 100644 --- a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state @@ -1,6 +1,6 @@ - #traverseProjection ( toLocal ( 1 ) , thunk ( UnableToDecode ( b"\x01\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" , typeInfoStructType ( "Pair" , adtDef ( 14 ) , ty ( 29 ) ty ( 31 ) .Tys ) ) ) , projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems , .Contexts ) ~> #forRef ( mutabilityNot , staticSize ( 32 ) ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 10 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) ~> .K + #EndProgram ~> .K noReturn @@ -27,9 +27,41 @@ ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( thunk ( UnableToDecode ( b"\x01\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" , typeInfoStructType ( "Pair" , adtDef ( 14 ) , ty ( 29 ) ty ( 31 ) .Tys ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 26 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Integer ( 1 , 8 , false ) ) + ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( Integer ( 1 , 8 , false ) ) + ListItem ( Integer ( 2 , 8 , false ) ) + ListItem ( Integer ( 3 , 8 , false ) ) + ListItem ( Integer ( 4 , 8 , false ) ) + ListItem ( Integer ( 5 , 8 , false ) ) + ListItem ( Integer ( 6 , 8 , false ) ) + ListItem ( Integer ( 7 , 8 , false ) ) + ListItem ( Integer ( 8 , 8 , false ) ) + ListItem ( Integer ( 9 , 8 , false ) ) + ListItem ( Integer ( 10 , 8 , false ) ) + ListItem ( Integer ( 11 , 8 , false ) ) + ListItem ( Integer ( 12 , 8 , false ) ) + ListItem ( Integer ( 13 , 8 , false ) ) + ListItem ( Integer ( 14 , 8 , false ) ) + ListItem ( Integer ( 15 , 8 , false ) ) + ListItem ( Integer ( 16 , 8 , false ) ) + ListItem ( Integer ( 17 , 8 , false ) ) + ListItem ( Integer ( 18 , 8 , false ) ) + ListItem ( Integer ( 19 , 8 , false ) ) + ListItem ( Integer ( 20 , 8 , false ) ) + ListItem ( Integer ( 21 , 8 , false ) ) + ListItem ( Integer ( 22 , 8 , false ) ) + ListItem ( Integer ( 23 , 8 , false ) ) + ListItem ( Integer ( 24 , 8 , false ) ) + ListItem ( Integer ( 25 , 8 , false ) ) + ListItem ( Integer ( 26 , 8 , false ) ) + ListItem ( Integer ( 27 , 8 , false ) ) + ListItem ( Integer ( 28 , 8 , false ) ) + ListItem ( Integer ( 29 , 8 , false ) ) + ListItem ( Integer ( 30 , 8 , false ) ) ) ) + ListItem ( UnableToDecode ( b"\x1f" , typeInfoPrimitiveType ( primTypeBool ) ) ) ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) , mutabilityNot , staticSize ( 32 ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) , mutabilityNot , staticSize ( 32 ) ) , ty ( 26 ) , mutabilityNot ) ) From 1f7e48bf70d0b2715d27423b84c7c76dbc610de1 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 23 Oct 2025 21:19:07 +0800 Subject: [PATCH 04/15] feat: format json file automatically after generating smir.json --- scripts/generate-smir-json.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/generate-smir-json.sh b/scripts/generate-smir-json.sh index 4838c8404..3c756d9fe 100755 --- a/scripts/generate-smir-json.sh +++ b/scripts/generate-smir-json.sh @@ -72,6 +72,22 @@ if [ "$FORMAT" = "json" ]; then "$ABS_RUST_FILE") if [ -f "$OUTPUT_FILE" ]; then + # If jq is available, pretty-format the generated JSON in-place + if command -v jq >/dev/null 2>&1; then + TMP_FILE="${OUTPUT_FILE}.tmp" + if jq '.' "$OUTPUT_FILE" > "$TMP_FILE"; then + mv "$TMP_FILE" "$OUTPUT_FILE" + echo "✨ Formatted JSON with jq: $OUTPUT_FILE" + else + rm -f "$TMP_FILE" || true + echo "⚠️ jq formatting failed; keeping original JSON" >&2 + fi + else + echo "ℹ️ jq not found; skipping JSON formatting" + echo " macOS: brew install jq" + echo " Ubuntu/Debian: sudo apt-get install jq" + fi + echo "✅ Successfully generated: $OUTPUT_FILE" echo "📊 File size: $(ls -lh "$OUTPUT_FILE" | awk '{print $5}')" else From c5b71e5e06ae8a83cc121895ccda72fb56ac4593 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 23 Oct 2025 21:46:37 +0800 Subject: [PATCH 05/15] feat: udpate test file to track the unsorted offset field structin smir.json --- .../exec-smir/struct-multi/struct-multi.rs | 26 +- .../struct-multi/struct-multi.smir.json | 7021 ++++++++++++++++- .../exec-smir/struct-multi/struct-multi.state | 102 +- 3 files changed, 7091 insertions(+), 58 deletions(-) diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs index 737fbaf1c..00d04c5e3 100644 --- a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs @@ -1,21 +1,19 @@ #![allow(dead_code)] -#[derive(Copy, Clone)] -struct Pair([u8; 32], bool); +// Exercise decoding of a struct whose fields are not stored in declaration order. +// RangeInclusive is known to have such a layout on some platforms. -// Force a multi-field StructType constant so decoding happens at runtime -const P: Pair = Pair([ - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, -], true); +use std::ops::RangeInclusive; + +// Force a multi-field StructType constant so decoding happens at runtime. +// Use RangeInclusive::new in a const context to avoid evaluation at run time. +const R: RangeInclusive = RangeInclusive::new(0, 31); fn main() { // Use the constant so MIR emits a Constant->Allocated for a StructType with 2 fields - let p = P; - // Take a reference to the first field to trigger a field projection on a value - // that is produced via constant decoding (which we haven't fully implemented for multi-field structs). - let r = &p.0; - core::hint::black_box(r); + let r = R; + // Compute a boolean via public API that depends on correct internal layout decoding. + // If decoding is wrong (e.g., ignoring non-ordered offsets), this expression can differ. + let ok = r.contains(&0) && r.contains(&31) && !r.contains(&32); + assert!(ok); } diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.smir.json b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.smir.json index 1d7b21018..e54cef597 100644 --- a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.smir.json @@ -1 +1,7020 @@ -{"name":"struct_multi","crate_id":6604885106027647559,"allocs":[],"functions":[[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1208d731e72b93c5E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h314067c40d672c7eE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h9b52994615ddc450E"}],[20,{"IntrinsicSym":"black_box"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h1a38fb0400bcebc9E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17ha16fa5eebd646573E"}],[25,{"IntrinsicSym":"black_box"}],[27,{"NormalSym":"_ZN4core4hint9black_box17h4dbfea22906052b4E"}],[35,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN12struct_multi4main17hc99c4ca853516311E","mono_item_kind":{"MonoItemFn":{"name":"main","id":7,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}},"ty":28,"id":11}}}}]},"span":55},{"kind":{"Assign":[{"local":2,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":1,"projection":[{"Field":[0,29]}]}]}]},"span":56}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":"ZeroSized","ty":27,"id":10}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":54}},{"statements":[],"terminator":{"kind":"Return","span":57}}],"locals":[{"ty":1,"span":58,"mutability":"Mut"},{"ty":28,"span":59,"mutability":"Not"},{"ty":26,"span":60,"mutability":"Not"},{"ty":26,"span":54,"mutability":"Not"}],"arg_count":0,"var_debug_info":[{"name":"p","source_info":{"span":59,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"r","source_info":{"span":60,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":61}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h859c8851c3f39cb4E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17ha16fa5eebd646573E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1208d731e72b93c5E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ff013f58bdd567E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h1a38fb0400bcebc9E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h9b52994615ddc450E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17he20429edcdf99e41E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}}},"details":null},{"symbol_name":"_ZN4core4hint9black_box17h4dbfea22906052b4E","mono_item_kind":{"MonoItemFn":{"name":"std::hint::black_box::<&[u8; 32]>","id":5,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Move":{"local":1,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":26,"span":46,"mutability":"Mut"},{"ty":26,"span":41,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"dummy","source_info":{"span":41,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":47}}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h314067c40d672c7eE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":6,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":49,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":9}}}}]},"span":49}],"terminator":{"kind":"Return","span":48}}],"locals":[{"ty":17,"span":50,"mutability":"Mut"},{"ty":1,"span":51,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":52}}},"details":null}],"types":[[1,{"TupleType":{"types":[],"layout":{"fields":{"Arbitrary":{"offsets":[]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":0}}}}],[5,{"RefType":{"pointee_type":32,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[6,{"PrimitiveType":{"Int":"Isize"}}],[8,{"PtrType":{"pointee_type":33,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[9,{"PrimitiveType":{"Uint":"U8"}}],[10,{"EnumType":{"name":"std::result::Result","adt_def":22,"discriminants":[0,1],"fields":[[6],[34]],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I64","signed":true}},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[11,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[15,{"StructType":{"name":"std::sys::pal::unix::process::process_common::ExitCode","adt_def":12,"fields":[9],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[16,{"PrimitiveType":{"Int":"I32"}}],[17,{"StructType":{"name":"std::process::ExitCode","adt_def":10,"fields":[15],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[18,{"RefType":{"pointee_type":15,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[22,{"PtrType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[24,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[26,{"RefType":{"pointee_type":29,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[28,{"StructType":{"name":"Pair","adt_def":14,"fields":[29,31],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":8},{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":264}}}}],[29,{"ArrayType":{"elem_type":9,"size":{"kind":{"Value":[30,{"bytes":[32,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}]},"id":0},"layout":{"fields":{"Array":{"stride":{"num_bits":8},"count":32}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":256}}}}],[30,{"PrimitiveType":{"Uint":"Usize"}}],[31,{"PrimitiveType":"Bool"}],[33,{"PtrType":{"pointee_type":9,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[34,"VoidType"]],"spans":[[0,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,194,36]],[1,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,199,6]],[2,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,9,195,93]],[3,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,10,195,93]],[4,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",201,2,201,2]],[5,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,5,199,6]],[6,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,12,194,13]],[7,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,6,199,7]],[9,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",189,5,189,9]],[10,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",190,5,190,9]],[11,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",191,5,191,9]],[12,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",192,5,192,12]],[13,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",188,1,201,2]],[14,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,69]],[15,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,75]],[16,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,84]],[17,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,70,195,74]],[18,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,76,195,82]],[19,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,74,195,75]],[20,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,93,195,93]],[21,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,83,195,84]],[22,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,9,2053,15]],[23,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,15]],[24,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,22]],[25,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,21,636,22]],[26,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,23,2053,24]],[27,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,92,195,93]],[29,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2052,19,2052,23]],[30,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",635,19,635,24]],[31,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,19]],[32,["no-location",0,0,0,0]],[33,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,21]],[34,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,33]],[35,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,40]],[36,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",160,2,160,2]],[38,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,43,150,44]],[40,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,9,154,15]],[41,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,27,388,32]],[42,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,1,160,2]],[43,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs",250,5,250,71]],[44,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs",521,1,521,56]],[45,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",390,2,390,2]],[47,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,1,390,2]],[48,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2424,6,2424,6]],[49,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2423,9,2423,26]],[51,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,15,2422,19]],[52,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,5,2424,6]],[53,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",20,5,20,26]],[54,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",20,5,20,29]],[55,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",16,13,16,14]],[56,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",19,13,19,17]],[57,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",21,2,21,2]],[59,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",16,9,16,10]],[60,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",19,9,19,10]],[61,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs",14,1,21,2]]],"debug":null,"machine":{"endian":"Little","pointer_width":{"num_bits":64}}} \ No newline at end of file +{ + "name": "struct_multi", + "crate_id": 6604885106027647559, + "allocs": [ + { + "alloc_id": 0, + "ty": 0, + "global_alloc": { + "Memory": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + }, + { + "alloc_id": 1, + "ty": 0, + "global_alloc": { + "Memory": { + "bytes": [ + 31 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + }, + { + "alloc_id": 2, + "ty": 0, + "global_alloc": { + "Memory": { + "bytes": [ + 32 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + }, + { + "alloc_id": 4, + "ty": 41, + "global_alloc": { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 111, + 107 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + } + ], + "functions": [ + [ + 5, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 17, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1208d731e72b93c5E" + } + ], + [ + 18, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h314067c40d672c7eE" + } + ], + [ + 23, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9b52994615ddc450E" + } + ], + [ + 24, + { + "IntrinsicSym": "black_box" + } + ], + [ + 25, + { + "NormalSym": "_ZN100_$LT$core..ops..range..RangeInclusive$LT$T$GT$$u20$as$u20$core..ops..range..RangeBounds$LT$T$GT$$GT$11start_bound17h5213ada011830b1fE" + } + ], + [ + 26, + { + "NormalSym": "_ZN4core3cmp5impls54_$LT$impl$u20$core..cmp..PartialOrd$u20$for$u20$u8$GT$2lt17h625e7951e3bd689bE" + } + ], + [ + 27, + { + "NormalSym": "_ZN4core3cmp5impls54_$LT$impl$u20$core..cmp..PartialOrd$u20$for$u20$u8$GT$2le17hf970a823e2a15192E" + } + ], + [ + 28, + { + "NormalSym": "_ZN100_$LT$core..ops..range..RangeInclusive$LT$T$GT$$u20$as$u20$core..ops..range..RangeBounds$LT$T$GT$$GT$9end_bound17h03e61960c3c3acebE" + } + ], + [ + 30, + { + "NormalSym": "_ZN4core3ops5range11RangeBounds8contains17h0b953d8277a33516E" + } + ], + [ + 31, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h1a38fb0400bcebc9E" + } + ], + [ + 33, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17ha16fa5eebd646573E" + } + ], + [ + 35, + { + "NormalSym": "_ZN4core3ops5range25RangeInclusive$LT$Idx$GT$8contains17h9cbf222eb05bc29eE" + } + ], + [ + 37, + { + "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" + } + ], + [ + 44, + { + "NoOpSym": "" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN100_$LT$core..ops..range..RangeInclusive$LT$T$GT$$u20$as$u20$core..ops..range..RangeBounds$LT$T$GT$$GT$11start_bound17h5213ada011830b1fE", + "mono_item_kind": { + "MonoItemFn": { + "name": " as std::ops::RangeBounds>::start_bound", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + ] + } + ] + }, + "span": 1 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 1, + 0, + [ + { + "Type": 1 + } + ], + null, + null + ] + }, + [ + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": "Return", + "span": 0 + } + } + ], + "locals": [ + { + "ty": 2, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 3, + "span": 4, + "mutability": "Not" + }, + { + "ty": 1, + "span": 1, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 4, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 5 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN100_$LT$core..ops..range..RangeInclusive$LT$T$GT$$u20$as$u20$core..ops..range..RangeBounds$LT$T$GT$$GT$9end_bound17h03e61960c3c3acebE", + "mono_item_kind": { + "MonoItemFn": { + "name": " as std::ops::RangeBounds>::end_bound", + "id": 2, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 6 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 2, + 4 + ] + } + ] + } + } + } + ] + }, + "span": 6 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 6 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 1, + 0 + ] + } + ] + } + ] + } + ] + }, + "span": 8 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 1, + 1, + [ + { + "Type": 1 + } + ], + null, + null + ] + }, + [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 9 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 + } + }, + "span": 7 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 1, + 0 + ] + } + ] + } + ] + } + ] + }, + "span": 10 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 1, + 0, + [ + { + "Type": 1 + } + ], + null, + null + ] + }, + [ + { + "Copy": { + "local": 4, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 11 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 + } + }, + "span": 7 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 2 + }, + "span": 13 + } + ], + "terminator": { + "kind": "Return", + "span": 12 + } + } + ], + "locals": [ + { + "ty": 2, + "span": 14, + "mutability": "Mut" + }, + { + "ty": 3, + "span": 15, + "mutability": "Not" + }, + { + "ty": 4, + "span": 6, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 8, + "mutability": "Not" + }, + { + "ty": 1, + "span": 10, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 15, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 16 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN12struct_multi4main17hc99c4ca853516311E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 13, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 137, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 31 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + }, + "ty": 36, + "id": 17 + } + } + } + } + ] + }, + "span": 137 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 138 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 139, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 1, + "id": 18 + } + } + } + } + ] + }, + "span": 139 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 135, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 35, + "id": 16 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 5, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 136 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 2 + } + } + }, + "span": 136 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 142 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 143, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 1, + "id": 19 + } + } + } + } + ] + }, + "span": 143 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 140, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 35, + "id": 16 + } + } + }, + "args": [ + { + "Move": { + "local": 7, + "projection": [] + } + }, + { + "Copy": { + "local": 8, + "projection": [] + } + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": 3, + "unwind": "Continue" + } + }, + "span": 141 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 4 + } + } + }, + "span": 141 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 146 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 147, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 2 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 1, + "id": 20 + } + } + } + } + ] + }, + "span": 147 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 144, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 35, + "id": 16 + } + } + }, + "args": [ + { + "Move": { + "local": 10, + "projection": [] + } + }, + { + "Copy": { + "local": 11, + "projection": [] + } + } + ], + "destination": { + "local": 9, + "projection": [] + }, + "target": 6, + "unwind": "Continue" + } + }, + "span": 145 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 148, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 4, + "id": 10 + } + } + } + } + ] + }, + "span": 148 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 7 + } + }, + "span": 148 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Move": { + "local": 9, + "projection": [] + } + } + ] + } + ] + }, + "span": 149 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 7 + } + }, + "span": 148 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "span": 150 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 12, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 8 + ] + ], + "otherwise": 9 + } + } + }, + "span": 150 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 151, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 37, + "id": 21 + } + } + }, + "args": [ + { + "Constant": { + "span": 49, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 20, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 3 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 38, + "id": 22 + } + } + } + ], + "destination": { + "local": 13, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 151 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 152 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 153, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 154, + "mutability": "Not" + }, + { + "ty": 4, + "span": 155, + "mutability": "Not" + }, + { + "ty": 4, + "span": 136, + "mutability": "Mut" + }, + { + "ty": 3, + "span": 138, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 139, + "mutability": "Not" + }, + { + "ty": 4, + "span": 141, + "mutability": "Mut" + }, + { + "ty": 3, + "span": 142, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 143, + "mutability": "Not" + }, + { + "ty": 4, + "span": 145, + "mutability": "Mut" + }, + { + "ty": 3, + "span": 146, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 147, + "mutability": "Not" + }, + { + "ty": 4, + "span": 150, + "mutability": "Mut" + }, + { + "ty": 39, + "span": 151, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "r", + "source_info": { + "span": 154, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "ok", + "source_info": { + "span": 155, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 156 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h859c8851c3f39cb4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 18 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 19 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 20 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 4, + [ + { + "Type": 6 + }, + { + "Type": 7 + }, + { + "Type": 8 + }, + { + "Type": 9 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 20 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 19 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 10 + ] + } + ] + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 17, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 5, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 18 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 11 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 24 + } + ], + "terminator": { + "kind": "Return", + "span": 21 + } + } + ], + "locals": [ + { + "ty": 11, + "span": 25, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 26, + "mutability": "Not" + }, + { + "ty": 11, + "span": 27, + "mutability": "Not" + }, + { + "ty": 13, + "span": 28, + "mutability": "Not" + }, + { + "ty": 0, + "span": 29, + "mutability": "Not" + }, + { + "ty": 14, + "span": 18, + "mutability": "Mut" + }, + { + "ty": 10, + "span": 19, + "mutability": "Mut" + }, + { + "ty": 15, + "span": 19, + "mutability": "Not" + }, + { + "ty": 16, + "span": 20, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 26, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 27, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 28, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 29, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 23, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 30 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17ha16fa5eebd646573E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 33 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 32 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 34 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 12 + ] + } + ] + } + } + } + ] + }, + "span": 34 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 17, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 32 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 36 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 35, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 18, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 38 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 39 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 19 + ] + } + ] + } + ] + } + ] + }, + "span": 39 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 40 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 19 + ] + }, + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + }, + "span": 40 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 20 + ] + } + ] + }, + "span": 41 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 42 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 43 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 44 + } + ], + "terminator": { + "kind": "Return", + "span": 37 + } + } + ], + "locals": [ + { + "ty": 20, + "span": 45, + "mutability": "Mut" + }, + { + "ty": 15, + "span": 20, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 33, + "mutability": "Mut" + }, + { + "ty": 6, + "span": 32, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 34, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 39, + "mutability": "Mut" + }, + { + "ty": 0, + "span": 40, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 26, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 12 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 46, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 47, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 20 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1208d731e72b93c5E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 48, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 49, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 6, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 50 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 24, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 49, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 6, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 52 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 53 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 55, + "mutability": "Not" + }, + { + "ty": 6, + "span": 56, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 55, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 57, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 49, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 6, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 59 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3cmp5impls54_$LT$impl$u20$core..cmp..PartialOrd$u20$for$u20$u8$GT$2le17hf970a823e2a15192E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::cmp::impls::::le", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 61 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "Le", + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ] + } + ] + }, + "span": 63 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 64 + }, + { + "kind": { + "StorageDead": 3 + }, + "span": 64 + } + ], + "terminator": { + "kind": "Return", + "span": 60 + } + } + ], + "locals": [ + { + "ty": 4, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 66, + "mutability": "Not" + }, + { + "ty": 1, + "span": 67, + "mutability": "Not" + }, + { + "ty": 0, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 0, + "span": 62, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 66, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 67, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3cmp5impls54_$LT$impl$u20$core..cmp..PartialOrd$u20$for$u20$u8$GT$2lt17h625e7951e3bd689bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::cmp::impls::::lt", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 70 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 70 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 71 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 71 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ] + } + ] + }, + "span": 72 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 73 + }, + { + "kind": { + "StorageDead": 3 + }, + "span": 73 + } + ], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 4, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 75, + "mutability": "Not" + }, + { + "ty": 1, + "span": 76, + "mutability": "Not" + }, + { + "ty": 0, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 0, + "span": 71, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 75, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 76, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 77 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops5range11RangeBounds8contains17h0b953d8277a33516E", + "mono_item_kind": { + "MonoItemFn": { + "name": " as std::ops::RangeBounds>::contains::", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 80 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 79 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 79 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Discriminant": { + "local": 4, + "projection": [] + } + } + ] + }, + "span": 79 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ], + [ + 1, + 4 + ], + [ + 2, + 3 + ] + ], + "otherwise": 2 + } + } + }, + "span": 81 + } + }, + { + "statements": [], + "terminator": { + "kind": "Unreachable", + "span": 49 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Goto": { + "target": 7 + } + }, + "span": 82 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [ + { + "Downcast": 1 + }, + { + "Field": [ + 0, + 1 + ] + } + ] + } + } + } + ] + }, + "span": 85 + }, + { + "kind": { + "StorageLive": 11 + }, + "span": 86 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 10, + "projection": [] + } + ] + } + ] + }, + "span": 86 + }, + { + "kind": { + "StorageLive": 12 + }, + "span": 87 + }, + { + "kind": { + "StorageLive": 13 + }, + "span": 87 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "span": 87 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 13, + "projection": [] + } + ] + } + ] + }, + "span": 87 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 7 + } + } + }, + "args": [ + { + "Copy": { + "local": 10, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 15, + "unwind": "Continue" + } + }, + "span": 84 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 1 + ] + } + ] + } + } + } + ] + }, + "span": 90 + }, + { + "kind": { + "StorageLive": 7 + }, + "span": 91 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 6, + "projection": [] + } + ] + } + ] + }, + "span": 91 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 92 + }, + { + "kind": { + "StorageLive": 9 + }, + "span": 92 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "span": 92 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 9, + "projection": [] + } + ] + } + ] + }, + "span": 92 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 88, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 8 + } + } + }, + "args": [ + { + "Copy": { + "local": 6, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 16, + "unwind": "Continue" + } + }, + "span": 89 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 8 + ] + ], + "otherwise": 7 + } + } + }, + "span": 80 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 95 + }, + { + "kind": { + "StorageLive": 14 + }, + "span": 94 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 93, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 14, + "projection": [] + }, + "target": 9, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 95 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 96, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 4, + "id": 10 + } + } + } + } + ] + }, + "span": 96 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 14 + } + }, + "span": 96 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Discriminant": { + "local": 14, + "projection": [] + } + } + ] + }, + "span": 94 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 15, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 12 + ], + [ + 1, + 11 + ], + [ + 2, + 10 + ] + ], + "otherwise": 2 + } + } + }, + "span": 97 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 98, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 4, + "id": 11 + } + } + } + } + ] + }, + "span": 98 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 13 + } + }, + "span": 98 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 14, + "projection": [ + { + "Downcast": 1 + }, + { + "Field": [ + 0, + 1 + ] + } + ] + } + } + } + ] + }, + "span": 99 + }, + { + "kind": { + "StorageLive": 21 + }, + "span": 100 + }, + { + "kind": { + "Assign": [ + { + "local": 21, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [] + } + ] + } + ] + }, + "span": 100 + }, + { + "kind": { + "StorageLive": 22 + }, + "span": 101 + }, + { + "kind": { + "StorageLive": 23 + }, + "span": 101 + }, + { + "kind": { + "Assign": [ + { + "local": 23, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 20, + "projection": [] + } + } + } + ] + }, + "span": 101 + }, + { + "kind": { + "Assign": [ + { + "local": 22, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 23, + "projection": [] + } + ] + } + ] + }, + "span": 101 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 7 + } + } + }, + "args": [ + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 20, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 17, + "unwind": "Continue" + } + }, + "span": 84 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 16, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 14, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 1 + ] + } + ] + } + } + } + ] + }, + "span": 102 + }, + { + "kind": { + "StorageLive": 17 + }, + "span": 103 + }, + { + "kind": { + "Assign": [ + { + "local": 17, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [] + } + ] + } + ] + }, + "span": 103 + }, + { + "kind": { + "StorageLive": 18 + }, + "span": 104 + }, + { + "kind": { + "StorageLive": 19 + }, + "span": 104 + }, + { + "kind": { + "Assign": [ + { + "local": 19, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 16, + "projection": [] + } + } + } + ] + }, + "span": 104 + }, + { + "kind": { + "Assign": [ + { + "local": 18, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 19, + "projection": [] + } + ] + } + ] + }, + "span": 104 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 88, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 8 + } + } + }, + "args": [ + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 16, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 18, + "unwind": "Continue" + } + }, + "span": 89 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 14 + }, + "span": 105 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 14 + } + }, + "span": 96 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 105 + } + ], + "terminator": { + "kind": "Return", + "span": 106 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 12 + }, + "span": 107 + }, + { + "kind": { + "StorageDead": 11 + }, + "span": 107 + }, + { + "kind": { + "StorageDead": 13 + }, + "span": 107 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + }, + "span": 107 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 8 + }, + "span": 108 + }, + { + "kind": { + "StorageDead": 7 + }, + "span": 108 + }, + { + "kind": { + "StorageDead": 9 + }, + "span": 108 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + }, + "span": 108 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 22 + }, + "span": 109 + }, + { + "kind": { + "StorageDead": 21 + }, + "span": 109 + }, + { + "kind": { + "StorageDead": 23 + }, + "span": 109 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 13 + } + }, + "span": 109 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 18 + }, + "span": 110 + }, + { + "kind": { + "StorageDead": 17 + }, + "span": 110 + }, + { + "kind": { + "StorageDead": 19 + }, + "span": 110 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 13 + } + }, + "span": 110 + } + } + ], + "locals": [ + { + "ty": 4, + "span": 111, + "mutability": "Mut" + }, + { + "ty": 3, + "span": 112, + "mutability": "Not" + }, + { + "ty": 1, + "span": 113, + "mutability": "Not" + }, + { + "ty": 4, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 79, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 114, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 90, + "mutability": "Not" + }, + { + "ty": 29, + "span": 91, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 92, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 92, + "mutability": "Not" + }, + { + "ty": 1, + "span": 85, + "mutability": "Not" + }, + { + "ty": 29, + "span": 86, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 87, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 87, + "mutability": "Not" + }, + { + "ty": 2, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 115, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 102, + "mutability": "Not" + }, + { + "ty": 29, + "span": 103, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 104, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 104, + "mutability": "Not" + }, + { + "ty": 1, + "span": 99, + "mutability": "Not" + }, + { + "ty": 29, + "span": 100, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 101, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 101, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 112, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "item", + "source_info": { + "span": 113, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "start", + "source_info": { + "span": 90, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "start", + "source_info": { + "span": 85, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 10, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "end", + "source_info": { + "span": 102, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 16, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "end", + "source_info": { + "span": 99, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 20, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 116, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 117, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 12, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 118, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 7, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 119, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 8, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 116, + "scope": 7 + }, + "composite": null, + "value": { + "Place": { + "local": 21, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 117, + "scope": 7 + }, + "composite": null, + "value": { + "Place": { + "local": 22, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 118, + "scope": 8 + }, + "composite": null, + "value": { + "Place": { + "local": 17, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 119, + "scope": 8 + }, + "composite": null, + "value": { + "Place": { + "local": 18, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 120 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops5range25RangeInclusive$LT$Idx$GT$8contains17h9cbf222eb05bc29eE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ops::RangeInclusive::::contains::", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 121, + "user_ty": 0, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 12 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 122 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 123 + } + } + ], + "locals": [ + { + "ty": 4, + "span": 124, + "mutability": "Mut" + }, + { + "ty": 3, + "span": 125, + "mutability": "Not" + }, + { + "ty": 1, + "span": 126, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 125, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "item", + "source_info": { + "span": 126, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 127 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ff013f58bdd567E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 10, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 128, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 13 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 128 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 128 + } + } + ], + "locals": [ + { + "ty": 20, + "span": 128, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 128, + "mutability": "Not" + }, + { + "ty": 6, + "span": 128, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 128 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h1a38fb0400bcebc9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 10, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 128 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 128, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 14 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 128 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 128 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 128 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 128 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 128 + } + } + ], + "locals": [ + { + "ty": 20, + "span": 128, + "mutability": "Mut" + }, + { + "ty": 16, + "span": 128, + "mutability": "Not" + }, + { + "ty": 6, + "span": 128, + "mutability": "Not" + }, + { + "ty": 34, + "span": 128, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 128 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9b52994615ddc450E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 10, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 128 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 128 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 128, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 128, + "mutability": "Not" + }, + { + "ty": 6, + "span": 128, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 128 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17he20429edcdf99e41E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 11, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 129 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 129, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 129, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 129 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h314067c40d672c7eE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 12, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 131, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 21, + "id": 15 + } + } + } + } + ] + }, + "span": 131 + } + ], + "terminator": { + "kind": "Return", + "span": 130 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 132, + "mutability": "Mut" + }, + { + "ty": 6, + "span": 133, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 133, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 49, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 6, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 134 + } + } + }, + "details": null + } + ], + "types": [ + [ + 0, + { + "PrimitiveType": { + "Uint": "U8" + } + } + ], + [ + 1, + { + "RefType": { + "pointee_type": 0, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 2, + { + "EnumType": { + "name": "std::collections::Bound<&u8>", + "adt_def": 1, + "discriminants": [ + 0, + 1, + 2 + ], + "fields": [ + [ + 1 + ], + [ + 1 + ], + [] + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "variants": { + "Multiple": { + "tag": { + "Initialized": { + "value": { + "Int": { + "length": "I64", + "signed": false + } + }, + "valid_range": { + "start": 0, + "end": 2 + } + } + }, + "tag_encoding": "Direct", + "tag_field": 0, + "variants": [ + { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 64 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "ScalarPair": [ + { + "Initialized": { + "value": { + "Int": { + "length": "I64", + "signed": false + } + }, + "valid_range": { + "start": 0, + "end": 2 + } + } + }, + { + "Union": { + "value": { + "Pointer": 0 + } + } + } + ] + }, + "abi_align": 8, + "size": { + "num_bits": 128 + } + }, + { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 64 + } + ] + } + }, + "variants": { + "Single": { + "index": 1 + } + }, + "abi": { + "ScalarPair": [ + { + "Initialized": { + "value": { + "Int": { + "length": "I64", + "signed": false + } + }, + "valid_range": { + "start": 0, + "end": 2 + } + } + }, + { + "Union": { + "value": { + "Pointer": 0 + } + } + } + ] + }, + "abi_align": 8, + "size": { + "num_bits": 128 + } + }, + { + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "variants": { + "Single": { + "index": 2 + } + }, + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "size": { + "num_bits": 64 + } + } + ] + } + }, + "abi": { + "ScalarPair": [ + { + "Initialized": { + "value": { + "Int": { + "length": "I64", + "signed": false + } + }, + "valid_range": { + "start": 0, + "end": 2 + } + } + }, + { + "Union": { + "value": { + "Pointer": 0 + } + } + } + ] + }, + "abi_align": 8, + "size": { + "num_bits": 128 + } + } + } + } + ], + [ + 3, + { + "RefType": { + "pointee_type": 36, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 4, + { + "PrimitiveType": "Bool" + } + ], + [ + 6, + { + "TupleType": { + "types": [], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "size": { + "num_bits": 0 + } + } + } + } + ], + [ + 10, + { + "RefType": { + "pointee_type": 45, + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + }, + { + "num_bits": 64 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "ScalarPair": [ + { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + }, + { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + ] + }, + "abi_align": 8, + "size": { + "num_bits": 128 + } + } + } + } + ], + [ + 11, + { + "PrimitiveType": { + "Int": "Isize" + } + } + ], + [ + 13, + { + "PtrType": { + "pointee_type": 46, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 0, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 14, + { + "EnumType": { + "name": "std::result::Result", + "adt_def": 41, + "discriminants": [ + 0, + 1 + ], + "fields": [ + [ + 11 + ], + [ + 39 + ] + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Int": { + "length": "I64", + "signed": true + } + }, + "valid_range": { + "start": 0, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 15, + { + "RefType": { + "pointee_type": 16, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 19, + { + "StructType": { + "name": "std::sys::pal::unix::process::process_common::ExitCode", + "adt_def": 17, + "fields": [ + 0 + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Int": { + "length": "I8", + "signed": false + } + }, + "valid_range": { + "start": 0, + "end": 255 + } + } + } + }, + "abi_align": 1, + "size": { + "num_bits": 8 + } + } + } + } + ], + [ + 20, + { + "PrimitiveType": { + "Int": "I32" + } + } + ], + [ + 21, + { + "StructType": { + "name": "std::process::ExitCode", + "adt_def": 15, + "fields": [ + 19 + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Int": { + "length": "I8", + "signed": false + } + }, + "valid_range": { + "start": 0, + "end": 255 + } + } + } + }, + "abi_align": 1, + "size": { + "num_bits": 8 + } + } + } + } + ], + [ + 22, + { + "RefType": { + "pointee_type": 19, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 29, + { + "RefType": { + "pointee_type": 1, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 32, + { + "PtrType": { + "pointee_type": 16, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 0, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 34, + { + "RefType": { + "pointee_type": 16, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 36, + { + "StructType": { + "name": "std::ops::RangeInclusive", + "adt_def": 20, + "fields": [ + 0, + 0, + 4 + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 8 + }, + { + "num_bits": 16 + }, + { + "num_bits": 0 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "size": { + "num_bits": 24 + } + } + } + } + ], + [ + 38, + { + "RefType": { + "pointee_type": 41, + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + }, + { + "num_bits": 64 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "ScalarPair": [ + { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + }, + { + "Initialized": { + "value": { + "Int": { + "length": "I64", + "signed": false + } + }, + "valid_range": { + "start": 0, + "end": 18446744073709551615 + } + } + } + ] + }, + "abi_align": 8, + "size": { + "num_bits": 128 + } + } + } + } + ], + [ + 39, + "VoidType" + ], + [ + 40, + { + "RefType": { + "pointee_type": 42, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 41, + { + "PrimitiveType": "Str" + } + ], + [ + 42, + { + "StructType": { + "name": "std::panic::Location<'_>", + "adt_def": 25, + "fields": [ + 38, + 43, + 43 + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + }, + { + "num_bits": 128 + }, + { + "num_bits": 160 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 8, + "size": { + "num_bits": 192 + } + } + } + } + ], + [ + 43, + { + "PrimitiveType": { + "Uint": "U32" + } + } + ], + [ + 46, + { + "PtrType": { + "pointee_type": 0, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 0, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ] + ], + "spans": [ + [ + 0, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 880, + 6, + 880, + 6 + ] + ], + [ + 1, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 879, + 18, + 879, + 29 + ] + ], + [ + 2, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 879, + 9, + 879, + 30 + ] + ], + [ + 4, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 878, + 20, + 878, + 25 + ] + ], + [ + 5, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 878, + 5, + 880, + 6 + ] + ], + [ + 6, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 882, + 12, + 882, + 26 + ] + ], + [ + 7, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 882, + 9, + 888, + 10 + ] + ], + [ + 8, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 885, + 22, + 885, + 31 + ] + ], + [ + 9, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 885, + 13, + 885, + 32 + ] + ], + [ + 10, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 887, + 22, + 887, + 31 + ] + ], + [ + 11, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 887, + 13, + 887, + 32 + ] + ], + [ + 12, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 889, + 6, + 889, + 6 + ] + ], + [ + 13, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 888, + 9, + 888, + 10 + ] + ], + [ + 15, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 881, + 18, + 881, + 23 + ] + ], + [ + 16, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 881, + 5, + 889, + 6 + ] + ], + [ + 17, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 194, + 17, + 194, + 36 + ] + ], + [ + 18, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 194, + 17, + 199, + 6 + ] + ], + [ + 19, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 9, + 195, + 93 + ] + ], + [ + 20, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 10, + 195, + 93 + ] + ], + [ + 21, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 201, + 2, + 201, + 2 + ] + ], + [ + 22, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 199, + 5, + 199, + 6 + ] + ], + [ + 23, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 194, + 12, + 194, + 13 + ] + ], + [ + 24, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 199, + 6, + 199, + 7 + ] + ], + [ + 26, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 189, + 5, + 189, + 9 + ] + ], + [ + 27, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 190, + 5, + 190, + 9 + ] + ], + [ + 28, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 191, + 5, + 191, + 9 + ] + ], + [ + 29, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 192, + 5, + 192, + 12 + ] + ], + [ + 30, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 188, + 1, + 201, + 2 + ] + ], + [ + 31, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 18, + 195, + 69 + ] + ], + [ + 32, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 18, + 195, + 75 + ] + ], + [ + 33, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 18, + 195, + 84 + ] + ], + [ + 34, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 70, + 195, + 74 + ] + ], + [ + 35, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 76, + 195, + 82 + ] + ], + [ + 36, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 74, + 195, + 75 + ] + ], + [ + 37, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 93, + 195, + 93 + ] + ], + [ + 38, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 83, + 195, + 84 + ] + ], + [ + 39, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2053, + 9, + 2053, + 15 + ] + ], + [ + 40, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs", + 636, + 9, + 636, + 15 + ] + ], + [ + 41, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs", + 636, + 9, + 636, + 22 + ] + ], + [ + 42, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs", + 636, + 21, + 636, + 22 + ] + ], + [ + 43, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2053, + 23, + 2053, + 24 + ] + ], + [ + 44, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 92, + 195, + 93 + ] + ], + [ + 46, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2052, + 19, + 2052, + 23 + ] + ], + [ + 47, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs", + 635, + 19, + 635, + 24 + ] + ], + [ + 48, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 154, + 18, + 154, + 19 + ] + ], + [ + 49, + [ + "no-location", + 0, + 0, + 0, + 0 + ] + ], + [ + 50, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 154, + 18, + 154, + 21 + ] + ], + [ + 51, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs", + 389, + 5, + 389, + 33 + ] + ], + [ + 52, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs", + 389, + 5, + 389, + 40 + ] + ], + [ + 53, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 160, + 2, + 160, + 2 + ] + ], + [ + 55, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 150, + 43, + 150, + 44 + ] + ], + [ + 57, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 154, + 9, + 154, + 15 + ] + ], + [ + 58, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs", + 388, + 27, + 388, + 32 + ] + ], + [ + 59, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 150, + 1, + 160, + 2 + ] + ], + [ + 60, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1722, + 73, + 1722, + 73 + ] + ], + [ + 61, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1722, + 52, + 1722, + 59 + ] + ], + [ + 62, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1722, + 63, + 1722, + 71 + ] + ], + [ + 63, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1722, + 52, + 1722, + 71 + ] + ], + [ + 64, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1722, + 70, + 1722, + 71 + ] + ], + [ + 66, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1722, + 23, + 1722, + 28 + ] + ], + [ + 67, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1722, + 30, + 1722, + 35 + ] + ], + [ + 68, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1722, + 17, + 1722, + 73 + ] + ], + [ + 69, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1720, + 72, + 1720, + 72 + ] + ], + [ + 70, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1720, + 52, + 1720, + 59 + ] + ], + [ + 71, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1720, + 62, + 1720, + 70 + ] + ], + [ + 72, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1720, + 52, + 1720, + 70 + ] + ], + [ + 73, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1720, + 69, + 1720, + 70 + ] + ], + [ + 75, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1720, + 23, + 1720, + 28 + ] + ], + [ + 76, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1720, + 30, + 1720, + 35 + ] + ], + [ + 77, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1720, + 17, + 1720, + 72 + ] + ], + [ + 78, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 822, + 21, + 822, + 32 + ] + ], + [ + 79, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 822, + 16, + 822, + 34 + ] + ], + [ + 80, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 822, + 9, + 826, + 11 + ] + ], + [ + 81, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 822, + 9, + 822, + 34 + ] + ], + [ + 82, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 825, + 26, + 825, + 30 + ] + ], + [ + 83, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1836, + 13, + 1836, + 27 + ] + ], + [ + 84, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1836, + 13, + 1836, + 42 + ] + ], + [ + 85, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 824, + 22, + 824, + 27 + ] + ], + [ + 86, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 824, + 32, + 824, + 37 + ] + ], + [ + 87, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 824, + 40, + 824, + 44 + ] + ], + [ + 88, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1840, + 13, + 1840, + 27 + ] + ], + [ + 89, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1840, + 13, + 1840, + 42 + ] + ], + [ + 90, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 823, + 22, + 823, + 27 + ] + ], + [ + 91, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 823, + 32, + 823, + 37 + ] + ], + [ + 92, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 823, + 41, + 823, + 45 + ] + ], + [ + 93, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 826, + 27, + 826, + 36 + ] + ], + [ + 94, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 826, + 22, + 826, + 38 + ] + ], + [ + 95, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 826, + 10, + 826, + 11 + ] + ], + [ + 96, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 822, + 9, + 830, + 11 + ] + ], + [ + 97, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 826, + 15, + 826, + 38 + ] + ], + [ + 98, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 829, + 26, + 829, + 30 + ] + ], + [ + 99, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 828, + 22, + 828, + 25 + ] + ], + [ + 100, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 828, + 30, + 828, + 34 + ] + ], + [ + 101, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 828, + 37, + 828, + 40 + ] + ], + [ + 102, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 827, + 22, + 827, + 25 + ] + ], + [ + 103, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 827, + 30, + 827, + 34 + ] + ], + [ + 104, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 827, + 38, + 827, + 41 + ] + ], + [ + 105, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 830, + 10, + 830, + 11 + ] + ], + [ + 106, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 831, + 6, + 831, + 6 + ] + ], + [ + 107, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 824, + 43, + 824, + 44 + ] + ], + [ + 108, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 823, + 44, + 823, + 45 + ] + ], + [ + 109, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 828, + 39, + 828, + 40 + ] + ], + [ + 110, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 827, + 40, + 827, + 41 + ] + ], + [ + 112, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 817, + 20, + 817, + 25 + ] + ], + [ + 113, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 817, + 27, + 817, + 31 + ] + ], + [ + 116, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1835, + 15, + 1835, + 20 + ] + ], + [ + 117, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1835, + 22, + 1835, + 27 + ] + ], + [ + 118, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1839, + 15, + 1839, + 20 + ] + ], + [ + 119, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs", + 1839, + 22, + 1839, + 27 + ] + ], + [ + 120, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 817, + 5, + 831, + 6 + ] + ], + [ + 121, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 514, + 9, + 514, + 45 + ] + ], + [ + 122, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 514, + 9, + 514, + 57 + ] + ], + [ + 123, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 515, + 6, + 515, + 6 + ] + ], + [ + 125, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 509, + 24, + 509, + 29 + ] + ], + [ + 126, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 509, + 31, + 509, + 35 + ] + ], + [ + 127, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/range.rs", + 509, + 5, + 515, + 6 + ] + ], + [ + 128, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs", + 250, + 5, + 250, + 71 + ] + ], + [ + 129, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs", + 521, + 1, + 521, + 56 + ] + ], + [ + 130, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2424, + 6, + 2424, + 6 + ] + ], + [ + 131, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2423, + 9, + 2423, + 26 + ] + ], + [ + 133, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2422, + 15, + 2422, + 19 + ] + ], + [ + 134, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2422, + 5, + 2424, + 6 + ] + ], + [ + 135, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 16, + 17, + 24 + ] + ], + [ + 136, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 14, + 17, + 28 + ] + ], + [ + 137, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 14, + 13, + 14, + 14 + ] + ], + [ + 138, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 14, + 17, + 15 + ] + ], + [ + 139, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 25, + 17, + 27 + ] + ], + [ + 140, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 34, + 17, + 42 + ] + ], + [ + 141, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 32, + 17, + 47 + ] + ], + [ + 142, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 32, + 17, + 33 + ] + ], + [ + 143, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 43, + 17, + 46 + ] + ], + [ + 144, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 54, + 17, + 62 + ] + ], + [ + 145, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 52, + 17, + 67 + ] + ], + [ + 146, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 52, + 17, + 53 + ] + ], + [ + 147, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 63, + 17, + 66 + ] + ], + [ + 148, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 14, + 17, + 67 + ] + ], + [ + 149, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 51, + 17, + 67 + ] + ], + [ + 150, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 18, + 13, + 18, + 15 + ] + ], + [ + 151, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 18, + 5, + 18, + 16 + ] + ], + [ + 152, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 19, + 2, + 19, + 2 + ] + ], + [ + 154, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 14, + 9, + 14, + 10 + ] + ], + [ + 155, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 17, + 9, + 17, + 11 + ] + ], + [ + 156, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.rs", + 12, + 1, + 19, + 2 + ] + ] + ], + "debug": null, + "machine": { + "endian": "Little", + "pointer_width": { + "num_bits": 64 + } + } +} diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state index ef45e4e18..e2aab0d50 100644 --- a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state @@ -1,70 +1,86 @@ - #EndProgram ~> .K + #traverseProjection ( toStack ( 3 , local ( 1 ) ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( UnableToDecode ( b"\x1f" , typeInfoPrimitiveType ( primTypeBool ) ) ) ) , projectionElemField ( fieldIdx ( 2 ) , ty ( 4 ) ) .ProjectionElems , .Contexts ) ~> #readProjection ( false ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 6 ) ) ) ~> .K noReturn - ty ( -1 ) + ty ( 28 ) - ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityNot ) ) , ty: ty ( 28 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 56 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 10 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 6 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 4 ) ) .ProjectionElems ) ) ) ) , span: span ( 6 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 6 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 0 ) ) .ProjectionElems ) ) ) , span: span ( 8 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 1 ) , variantIdx ( 1 ) , genericArgKindType ( ty ( 1 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 9 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 7 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 0 ) ) .ProjectionElems ) ) ) , span: span ( 10 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 1 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 1 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 11 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 7 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 13 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 12 ) ) ) ) - ty ( -1 ) + ty ( 30 ) - place (... local: local ( 0 ) , projection: .ProjectionElems ) + place (... local: local ( 14 ) , projection: .ProjectionElems ) - noBasicBlockIdx + someBasicBlockIdx ( basicBlockIdx ( 9 ) ) unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Integer ( 1 , 8 , false ) ) - ListItem ( Integer ( 0 , 8 , false ) ) - ListItem ( Integer ( 1 , 8 , false ) ) - ListItem ( Integer ( 2 , 8 , false ) ) - ListItem ( Integer ( 3 , 8 , false ) ) - ListItem ( Integer ( 4 , 8 , false ) ) - ListItem ( Integer ( 5 , 8 , false ) ) - ListItem ( Integer ( 6 , 8 , false ) ) - ListItem ( Integer ( 7 , 8 , false ) ) - ListItem ( Integer ( 8 , 8 , false ) ) - ListItem ( Integer ( 9 , 8 , false ) ) - ListItem ( Integer ( 10 , 8 , false ) ) - ListItem ( Integer ( 11 , 8 , false ) ) - ListItem ( Integer ( 12 , 8 , false ) ) - ListItem ( Integer ( 13 , 8 , false ) ) - ListItem ( Integer ( 14 , 8 , false ) ) - ListItem ( Integer ( 15 , 8 , false ) ) - ListItem ( Integer ( 16 , 8 , false ) ) - ListItem ( Integer ( 17 , 8 , false ) ) - ListItem ( Integer ( 18 , 8 , false ) ) - ListItem ( Integer ( 19 , 8 , false ) ) - ListItem ( Integer ( 20 , 8 , false ) ) - ListItem ( Integer ( 21 , 8 , false ) ) - ListItem ( Integer ( 22 , 8 , false ) ) - ListItem ( Integer ( 23 , 8 , false ) ) - ListItem ( Integer ( 24 , 8 , false ) ) - ListItem ( Integer ( 25 , 8 , false ) ) - ListItem ( Integer ( 26 , 8 , false ) ) - ListItem ( Integer ( 27 , 8 , false ) ) - ListItem ( Integer ( 28 , 8 , false ) ) - ListItem ( Integer ( 29 , 8 , false ) ) - ListItem ( Integer ( 30 , 8 , false ) ) ) ) - ListItem ( UnableToDecode ( b"\x1f" , typeInfoPrimitiveType ( primTypeBool ) ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) , mutabilityNot , staticSize ( 32 ) ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) , mutabilityNot , staticSize ( 32 ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 3 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 3 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( StackFrame ( ty ( 35 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) + ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) + ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 2 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 0 ) ) .ProjectionElems ) , mutabilityNot , noMetadata ) ) ) , ty ( 2 ) , mutabilityMut ) ) + ListItem ( typedValue ( Moved , ty ( 11 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 2 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 0 ) ) .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 6 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 11 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 3 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) + ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) + ListItem ( typedValue ( Moved , ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( UnableToDecode ( b"\x1f" , typeInfoPrimitiveType ( primTypeBool ) ) ) ) , ty ( 36 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 4 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) + ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) + ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 3 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 3 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) \ No newline at end of file From 01963ed8fcf4d688f0e4b324ca4d0fb4df8b262f Mon Sep 17 00:00:00 2001 From: Stevengre Date: Fri, 24 Oct 2025 09:55:07 +0800 Subject: [PATCH 06/15] fix: multi-field runtime decoding support --- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 2 +- .../kmir/kdist/mir-semantics/rt/decoding.md | 55 ++++++++++-- kmir/src/kmir/kdist/mir-semantics/ty.md | 6 +- .../exec-smir/struct-multi/struct-multi.state | 90 +++++++------------ .../src/tests/integration/test_integration.py | 2 +- 5 files changed, 85 insertions(+), 70 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 5656f4a63..c54f0c2f2 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -1410,7 +1410,7 @@ Zero-sized types can be decoded trivially into their respective representation. ```k // zero-sized struct - rule #decodeConstant(constantKindZeroSized, _TY, typeInfoStructType(_, _, _)) + rule #decodeConstant(constantKindZeroSized, _TY, typeInfoStructType(_, _, _, _)) => Aggregate(variantIdx(0), .List) ... // zero-sized tuple rule #decodeConstant(constantKindZeroSized, _TY, typeInfoTupleType(_)) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index 4762622c2..9c2a0d1c9 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -74,19 +74,58 @@ rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, noTyConst)) ### Struct decoding -We decode structs by decoding their fields in declaration order using the element sizes implied by the -field types. This decoding is layout-agnostic and succeeds only when the byte length exactly matches the -sum of field sizes (i.e., there is no padding). This covers common transparent/newtype and simple tuple/struct -cases. For more complex layouts with padding/alignment, decoding falls back to `UnableToDecode`. +Structs can have non-trivial layouts where field offsets are not in declaration order and there may be padding. +We first try to decode using the provided layout offsets when available, and fall back to a simple sequential +decoding only when no layout is provided and the byte length equals the sum of field sizes (no padding). -Handle the general multi-field case by splitting the byte array sequentially according to the field sizes -and decoding each field using `#decodeValue`: +When layout is provided with arbitrary field offsets, we decode each field at its given byte offset and return +the values in declaration order within the `Aggregate`. ```k -rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS)) +// Decoding via layout offsets (preferred when available) +syntax MachineSizes ::= #structOffsets ( MaybeLayoutShape ) [function] +syntax Int ::= #msBytes ( MachineSize ) [function] +syntax Int ::= #neededBytesForOffsets ( Tys , MachineSizes ) [function] +syntax Int ::= #maxInt ( Int , Int ) [function, total] +syntax List ::= #decodeStructFieldsWithOffsets ( Bytes , Tys , MachineSizes ) [function] + +rule #structOffsets(someLayoutShape(layoutShape(fieldsShapeArbitrary(mk(OFFSETS)), _, _, _, _))) => OFFSETS +rule #structOffsets(noLayoutShape) => .MachineSizes +rule #structOffsets(_) => .MachineSizes [owise] + +rule #msBytes(machineSize(mirInt(NBITS))) => NBITS /Int 8 +rule #msBytes(machineSize(NBITS)) => NBITS /Int 8 [owise] + +rule #maxInt(A, B) => A requires A >=Int B +rule #maxInt(A, B) => B requires A 0 +rule #neededBytesForOffsets(TY TYS, OFFSET OFFSETS) + => #maxInt(#msBytes(OFFSET) +Int #elemSize(lookupTy(TY)), #neededBytesForOffsets(TYS, OFFSETS)) + +rule #decodeStructFieldsWithOffsets(_, .Tys, .MachineSizes) => .List + +rule #decodeStructFieldsWithOffsets(BYTES, TY TYS, OFFSET OFFSETS) + => ListItem( + #decodeValue( + substrBytes(BYTES, #msBytes(OFFSET), #msBytes(OFFSET) +Int #elemSize(lookupTy(TY))), + lookupTy(TY) + ) + ) + #decodeStructFieldsWithOffsets(BYTES, TYS, OFFSETS) + requires lengthBytes(BYTES) >=Int (#msBytes(OFFSET) +Int #elemSize(lookupTy(TY))) + [preserves-definedness] + +rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, LAYOUT)) + => Aggregate(variantIdx(0), #decodeStructFieldsWithOffsets(BYTES, TYS, #structOffsets(LAYOUT))) + requires lengthBytes(BYTES) >=Int #neededBytesForOffsets(TYS, #structOffsets(LAYOUT)) + [preserves-definedness, priority(50)] + +// Fallback: sequential decoding when no layout provided and there is no padding +rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, noLayoutShape)) => Aggregate(variantIdx(0), #decodeStructFields(BYTES, TYS)) requires lengthBytes(BYTES) ==Int #sumElemSizes(TYS) - [preserves-definedness] + [preserves-definedness, priority(40)] syntax List ::= #decodeStructFields ( Bytes , Tys ) [function, total] diff --git a/kmir/src/kmir/kdist/mir-semantics/ty.md b/kmir/src/kmir/kdist/mir-semantics/ty.md index dd00edb67..9defdbb6e 100644 --- a/kmir/src/kmir/kdist/mir-semantics/ty.md +++ b/kmir/src/kmir/kdist/mir-semantics/ty.md @@ -265,7 +265,11 @@ syntax ExistentialPredicateBinders ::= List {ExistentialPredicateBinder, ""} , discriminants: Discriminants , fields: Tyss , layout: MaybeLayoutShape) [symbol(TypeInfo::EnumType) , group(mir-enum---name--adt-def--discriminants--fields--layout)] - | typeInfoStructType(MIRString, AdtDef, Tys) [symbol(TypeInfo::StructType) , group(mir-enum---name--adt-def--fields)] + | typeInfoStructType( + name: MIRString + , adtDef: AdtDef + , fields: Tys + , layout: MaybeLayoutShape) [symbol(TypeInfo::StructType) , group(mir-enum---name--adt-def--fields--layout)] | typeInfoUnionType(MIRString, AdtDef) [symbol(TypeInfo::UnionType) , group(mir-enum---name--adt-def)] | typeInfoArrayType(Ty, MaybeTyConst) [symbol(TypeInfo::ArrayType) , group(mir-enum---elem-type--size)] | typeInfoPtrType(Ty) [symbol(TypeInfo::PtrType) , group(mir-enum---pointee-type)] diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state index e2aab0d50..7652ca975 100644 --- a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state @@ -1,86 +1,58 @@ - #traverseProjection ( toStack ( 3 , local ( 1 ) ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) - ListItem ( Integer ( 0 , 8 , false ) ) - ListItem ( UnableToDecode ( b"\x1f" , typeInfoPrimitiveType ( primTypeBool ) ) ) ) , projectionElemField ( fieldIdx ( 2 ) , ty ( 4 ) ) .ProjectionElems , .Contexts ) ~> #readProjection ( false ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 6 ) ) ) ~> .K + #EndProgram ~> .K noReturn - ty ( 28 ) + ty ( -1 ) - ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 6 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 4 ) ) .ProjectionElems ) ) ) ) , span: span ( 6 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 6 ) ) ) ) - ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 0 ) ) .ProjectionElems ) ) ) , span: span ( 8 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 1 ) , variantIdx ( 1 ) , genericArgKindType ( ty ( 1 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 9 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 7 ) ) ) ) - ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 0 ) ) .ProjectionElems ) ) ) , span: span ( 10 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 1 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 1 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 11 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 7 ) ) ) ) - ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 13 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 12 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 137 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x1f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityNot ) ) , ty: ty ( 36 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 137 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 138 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 139 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 1 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 139 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 135 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 35 ) , id: mirConstId ( 16 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 136 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 136 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 142 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 143 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 1 ) , id: mirConstId ( 19 ) ) ) ) ) ) , span: span ( 143 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 140 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 35 ) , id: mirConstId ( 16 ) ) ) ) , args: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 141 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 141 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 146 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 147 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 1 ) , id: mirConstId ( 20 ) ) ) ) ) ) , span: span ( 147 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 144 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 35 ) , id: mirConstId ( 16 ) ) ) ) , args: operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 9 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 6 ) ) , unwind: unwindActionContinue ) , span: span ( 145 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 148 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 4 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 148 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 7 ) ) , span: span ( 148 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 149 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 7 ) ) , span: span ( 148 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 150 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 9 ) ) ) , span: span ( 150 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 151 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 37 ) , id: mirConstId ( 21 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 49 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 38 ) , id: mirConstId ( 22 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 151 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 152 ) ) ) ) - ty ( 30 ) + ty ( -1 ) - place (... local: local ( 14 ) , projection: .ProjectionElems ) + place (... local: local ( 0 ) , projection: .ProjectionElems ) - someBasicBlockIdx ( basicBlockIdx ( 9 ) ) + noBasicBlockIdx unwindActionContinue - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 3 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( Integer ( 31 , 8 , false ) ) + ListItem ( BoolVal ( false ) ) ) , ty ( 36 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 4 ) , mutabilityNot ) ) + ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) + ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) + ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) + ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) + ListItem ( typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) + ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) + ListItem ( typedValue ( AllocRef ( allocId ( 2 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) - ListItem ( StackFrame ( ty ( 35 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 2 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 0 ) ) .ProjectionElems ) , mutabilityNot , noMetadata ) ) ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 11 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 2 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 0 ) ) .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 6 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 11 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 3 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) - ListItem ( Integer ( 0 , 8 , false ) ) - ListItem ( UnableToDecode ( b"\x1f" , typeInfoPrimitiveType ( primTypeBool ) ) ) ) , ty ( 36 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 3 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 3 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) \ No newline at end of file diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index 5a3cb7939..6d7893a38 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -311,7 +311,7 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo 'struct-multi', EXEC_DATA_DIR / 'struct-multi' / 'struct-multi.smir.json', EXEC_DATA_DIR / 'struct-multi' / 'struct-multi.state', - 1000, + 2000, ), ] From 204c6d44ff7e3d57b9a3cc3fb88916b07bc717c4 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Fri, 24 Oct 2025 14:16:41 +0800 Subject: [PATCH 07/15] refactor: better implementation for struct decoding --- .../kmir/kdist/mir-semantics/rt/decoding.md | 88 ++++++++++--------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index 9c2a0d1c9..892501720 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -16,6 +16,7 @@ requires "value.md" requires "numbers.md" module RT-DECODING + imports INT imports BOOL imports MAP @@ -74,37 +75,60 @@ rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, noTyConst)) ### Struct decoding -Structs can have non-trivial layouts where field offsets are not in declaration order and there may be padding. -We first try to decode using the provided layout offsets when available, and fall back to a simple sequential -decoding only when no layout is provided and the byte length equals the sum of field sizes (no padding). +Structs can have non-trivial layouts: field offsets may not match declaration order, and there may be padding. +The decoder follows a two-step strategy: +- Prefer explicit offsets from the struct's layout to slice each field out of the byte array. +- Fallback to a simple sequential split only when there is no layout and the total length matches the sum of field sizes (i.e., no padding). -When layout is provided with arbitrary field offsets, we decode each field at its given byte offset and return -the values in declaration order within the `Aggregate`. +When using layout offsets we always return fields in declaration order within the `Aggregate` (variant 0), regardless of the physical order in memory. ```k -// Decoding via layout offsets (preferred when available) -syntax MachineSizes ::= #structOffsets ( MaybeLayoutShape ) [function] -syntax Int ::= #msBytes ( MachineSize ) [function] -syntax Int ::= #neededBytesForOffsets ( Tys , MachineSizes ) [function] -syntax Int ::= #maxInt ( Int , Int ) [function, total] -syntax List ::= #decodeStructFieldsWithOffsets ( Bytes , Tys , MachineSizes ) [function] +// --------------------------------------------------------------------------- +// Struct decoding rules (top level) +// --------------------------------------------------------------------------- +// Case 1 (layout offsets present): use the offsets when they are provided +// and the input length is sufficient. Distinguished purely via `requires`. +rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, LAYOUT)) + => Aggregate(variantIdx(0), #decodeStructFieldsWithOffsets(BYTES, TYS, #structOffsets(LAYOUT))) + requires #structOffsets(LAYOUT) =/=K .MachineSizes + andBool lengthBytes(BYTES) >=Int #neededBytesForOffsets(TYS, #structOffsets(LAYOUT)) + [preserves-definedness] -rule #structOffsets(someLayoutShape(layoutShape(fieldsShapeArbitrary(mk(OFFSETS)), _, _, _, _))) => OFFSETS -rule #structOffsets(noLayoutShape) => .MachineSizes -rule #structOffsets(_) => .MachineSizes [owise] +// Case 2 (no layout): use sequential decoding with no padding allowed. +rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, noLayoutShape)) + => Aggregate(variantIdx(0), #decodeStructFields(BYTES, TYS)) + requires lengthBytes(BYTES) ==Int #sumElemSizes(TYS) + [preserves-definedness] +// --------------------------------------------------------------------------- +// Offsets and helpers (used by the rules above) +// --------------------------------------------------------------------------- +// MachineSize is in bits in the ABI; convert to bytes for slicing. +syntax Int ::= #msBytes ( MachineSize ) [function, total] rule #msBytes(machineSize(mirInt(NBITS))) => NBITS /Int 8 rule #msBytes(machineSize(NBITS)) => NBITS /Int 8 [owise] -rule #maxInt(A, B) => A requires A >=Int B -rule #maxInt(A, B) => B requires A OFFSETS +rule #structOffsets(noLayoutShape) => .MachineSizes +rule #structOffsets(_) => .MachineSizes [owise] +// Minimum number of input bytes required to decode all fields by the chosen offsets. +// Uses builtin maxInt to compute max(offset + size). When offsets are absent +// (empty list), this collapses to the exact sequential size (#sumElemSizes), +// which matches the semantics of our sequential decoding helper. +syntax Int ::= #neededBytesForOffsets ( Tys , MachineSizes ) [function, total] rule #neededBytesForOffsets(.Tys, .MachineSizes) => 0 rule #neededBytesForOffsets(TY TYS, OFFSET OFFSETS) - => #maxInt(#msBytes(OFFSET) +Int #elemSize(lookupTy(TY)), #neededBytesForOffsets(TYS, OFFSETS)) - -rule #decodeStructFieldsWithOffsets(_, .Tys, .MachineSizes) => .List - + => maxInt(#msBytes(OFFSET) +Int #elemSize(lookupTy(TY)), #neededBytesForOffsets(TYS, OFFSETS)) +rule #neededBytesForOffsets(TYS, .MachineSizes) => #sumElemSizes(TYS) +rule #neededBytesForOffsets(.Tys, _OFFSETS) => 0 [owise] + +// Decode each field at its byte offset and return values in declaration order. +syntax List ::= #decodeStructFieldsWithOffsets ( Bytes , Tys , MachineSizes ) [function, total] +rule #decodeStructFieldsWithOffsets(_, .Tys, _OFFSETS) => .List +rule #decodeStructFieldsWithOffsets(_, _TYS, .MachineSizes) => .List [owise] rule #decodeStructFieldsWithOffsets(BYTES, TY TYS, OFFSET OFFSETS) => ListItem( #decodeValue( @@ -116,21 +140,9 @@ rule #decodeStructFieldsWithOffsets(BYTES, TY TYS, OFFSET OFFSETS) requires lengthBytes(BYTES) >=Int (#msBytes(OFFSET) +Int #elemSize(lookupTy(TY))) [preserves-definedness] -rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, LAYOUT)) - => Aggregate(variantIdx(0), #decodeStructFieldsWithOffsets(BYTES, TYS, #structOffsets(LAYOUT))) - requires lengthBytes(BYTES) >=Int #neededBytesForOffsets(TYS, #structOffsets(LAYOUT)) - [preserves-definedness, priority(50)] - -// Fallback: sequential decoding when no layout provided and there is no padding -rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, noLayoutShape)) - => Aggregate(variantIdx(0), #decodeStructFields(BYTES, TYS)) - requires lengthBytes(BYTES) ==Int #sumElemSizes(TYS) - [preserves-definedness, priority(40)] - +// Sequential helper (used when no layout is available and there is no padding). syntax List ::= #decodeStructFields ( Bytes , Tys ) [function, total] - -rule #decodeStructFields(BYTES, .Tys) - => .List +rule #decodeStructFields(BYTES, .Tys) => .List requires lengthBytes(BYTES) ==Int 0 [preserves-definedness] @@ -141,15 +153,11 @@ rule #decodeStructFields(BYTES, TY TYS) lookupTy(TY) ) ) - #decodeStructFields( - substrBytes(BYTES, #elemSize(lookupTy(TY)), lengthBytes(BYTES)), - TYS - ) + #decodeStructFields(substrBytes(BYTES, #elemSize(lookupTy(TY)), lengthBytes(BYTES)), TYS) requires lengthBytes(BYTES) >=Int #elemSize(lookupTy(TY)) [preserves-definedness] -syntax Int ::= #sumElemSizes ( Tys ) [function, total] - +syntax Int ::= #sumElemSizes ( Tys ) [function, total] rule #sumElemSizes(.Tys) => 0 rule #sumElemSizes(TY TYS) => #elemSize(lookupTy(TY)) +Int #sumElemSizes(TYS) ``` From 536710ec265f6b478692a7ce7fa434a6c3b83564 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Fri, 24 Oct 2025 14:20:02 +0800 Subject: [PATCH 08/15] chore: format json --- .../newtype-pubkey/newtype-pubkey.smir.json | 3407 ++++++++++++++++- 1 file changed, 3406 insertions(+), 1 deletion(-) diff --git a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.smir.json b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.smir.json index de7e60566..d641b5e87 100644 --- a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.smir.json @@ -1 +1,3406 @@ -{"name":"newtype_pubkey","crate_id":5420632119300128232,"allocs":[],"functions":[[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h217ebc8958a2e0f7E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he9bdea485b0b8eefE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h0314312c7330f16dE"}],[20,{"IntrinsicSym":"black_box"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h3fd1a6eedf751fe2E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h51527ef46083cf19E"}],[25,{"IntrinsicSym":"black_box"}],[29,{"NormalSym":"_ZN14newtype_pubkey9use_inner17h230c2bffb6728494E"}],[32,{"NormalSym":"_ZN4core4hint9black_box17hbacba317dc8c2f63E"}],[36,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN14newtype_pubkey4main17h8f945f52f3914dbdE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":65,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}},"ty":30,"id":13}}}}]},"span":65},{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":1,"projection":[{"Field":[0,31]}]}]}]},"span":66}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":63,"user_ty":null,"const_":{"kind":"ZeroSized","ty":29,"id":12}}},"args":[{"Copy":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":14}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Continue"}},"span":68}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":30,"span":71,"mutability":"Not"},{"ty":26,"span":72,"mutability":"Not"},{"ty":27,"span":66,"mutability":"Not"},{"ty":26,"span":68,"mutability":"Not"}],"arg_count":0,"var_debug_info":[{"name":"pk","source_info":{"span":71,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"len","source_info":{"span":72,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":73}}},"details":null},{"symbol_name":"_ZN14newtype_pubkey9use_inner17h230c2bffb6728494E","mono_item_kind":{"MonoItemFn":{"name":"use_inner","id":7,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":54,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":10}}}}]},"span":54},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[32,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":11}}}}]},"span":53},{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":3,"projection":[]}},{"Copy":{"local":4,"projection":[]}}]}]},"span":53}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":5,"projection":[]}},"expected":true,"msg":{"BoundsCheck":{"len":{"Move":{"local":4,"projection":[]}},"index":{"Copy":{"local":3,"projection":[]}}}},"target":1,"unwind":"Continue"}},"span":53}},{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Index":3}]}}}]},"span":53}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":3}}},"span":55}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":57,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[32,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":11}}}}]},"span":57}],"terminator":{"kind":{"Goto":{"target":4}},"span":56}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":10}}}}]},"span":58}],"terminator":{"kind":{"Goto":{"target":4}},"span":56}},{"statements":[],"terminator":{"kind":"Return","span":59}}],"locals":[{"ty":26,"span":60,"mutability":"Mut"},{"ty":27,"span":61,"mutability":"Not"},{"ty":9,"span":53,"mutability":"Mut"},{"ty":26,"span":54,"mutability":"Not"},{"ty":26,"span":53,"mutability":"Mut"},{"ty":28,"span":53,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"arr","source_info":{"span":61,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":62}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h40b075be88868699E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h51527ef46083cf19E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h217ebc8958a2e0f7E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0ce30afb4ab9b6e9E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h0314312c7330f16dE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h3fd1a6eedf751fe2E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hcda3c7cfa27e5721E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}}},"details":null},{"symbol_name":"_ZN4core4hint9black_box17hbacba317dc8c2f63E","mono_item_kind":{"MonoItemFn":{"name":"std::hint::black_box::","id":5,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Move":{"local":1,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":26,"span":46,"mutability":"Mut"},{"ty":26,"span":41,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"dummy","source_info":{"span":41,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":47}}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he9bdea485b0b8eefE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":6,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":49,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":9}}}}]},"span":49}],"terminator":{"kind":"Return","span":48}}],"locals":[{"ty":17,"span":50,"mutability":"Mut"},{"ty":1,"span":51,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":52}}},"details":null}],"types":[[1,{"TupleType":{"types":[],"layout":{"fields":{"Arbitrary":{"offsets":[]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":0}}}}],[5,{"RefType":{"pointee_type":33,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[6,{"PrimitiveType":{"Int":"Isize"}}],[8,{"PtrType":{"pointee_type":34,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[9,{"PrimitiveType":{"Uint":"U8"}}],[10,{"EnumType":{"name":"std::result::Result","adt_def":17,"discriminants":[0,1],"fields":[[6],[35]],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I64","signed":true}},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[11,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[15,{"StructType":{"name":"std::sys::pal::unix::process::process_common::ExitCode","adt_def":23,"fields":[9],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[16,{"PrimitiveType":{"Int":"I32"}}],[17,{"StructType":{"name":"std::process::ExitCode","adt_def":21,"fields":[15],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[18,{"RefType":{"pointee_type":15,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[22,{"PtrType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[24,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[26,{"PrimitiveType":{"Uint":"Usize"}}],[27,{"RefType":{"pointee_type":31,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[28,{"PrimitiveType":"Bool"}],[30,{"StructType":{"name":"Pubkey","adt_def":9,"fields":[31],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":256}}}}],[31,{"ArrayType":{"elem_type":9,"size":{"kind":{"Value":[26,{"bytes":[32,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}]},"id":0},"layout":{"fields":{"Array":{"stride":{"num_bits":8},"count":32}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":256}}}}],[34,{"PtrType":{"pointee_type":9,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[35,"VoidType"]],"spans":[[0,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,194,36]],[1,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,199,6]],[2,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,9,195,93]],[3,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,10,195,93]],[4,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",201,2,201,2]],[5,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,5,199,6]],[6,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,12,194,13]],[7,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,6,199,7]],[9,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",189,5,189,9]],[10,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",190,5,190,9]],[11,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",191,5,191,9]],[12,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",192,5,192,12]],[13,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",188,1,201,2]],[14,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,69]],[15,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,75]],[16,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,84]],[17,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,70,195,74]],[18,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,76,195,82]],[19,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,74,195,75]],[20,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,93,195,93]],[21,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,83,195,84]],[22,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,9,2053,15]],[23,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,15]],[24,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,22]],[25,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,21,636,22]],[26,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,23,2053,24]],[27,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,92,195,93]],[29,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2052,19,2052,23]],[30,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",635,19,635,24]],[31,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,19]],[32,["no-location",0,0,0,0]],[33,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,21]],[34,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,33]],[35,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,40]],[36,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",160,2,160,2]],[38,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,43,150,44]],[40,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,9,154,15]],[41,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,27,388,32]],[42,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,1,160,2]],[43,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs",250,5,250,71]],[44,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs",521,1,521,56]],[45,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",390,2,390,2]],[47,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,1,390,2]],[48,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2424,6,2424,6]],[49,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2423,9,2423,26]],[51,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,15,2422,19]],[52,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,5,2424,6]],[53,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,8,16,14]],[54,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,12,16,13]],[55,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,8,16,19]],[56,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,5,16,37]],[57,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,22,16,24]],[58,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",16,34,16,35]],[59,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",17,2,17,2]],[61,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",14,14,14,17]],[62,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",14,1,17,2]],[63,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",21,15,21,24]],[64,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",21,15,21,31]],[65,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",20,14,20,17]],[66,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",21,25,21,30]],[67,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",22,5,22,26]],[68,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",22,5,22,31]],[69,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",23,2,23,2]],[71,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",20,9,20,11]],[72,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",21,9,21,12]],[73,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs",19,1,23,2]]],"debug":null,"machine":{"endian":"Little","pointer_width":{"num_bits":64}}} \ No newline at end of file +{ + "name": "newtype_pubkey", + "crate_id": 5420632119300128232, + "allocs": [], + "functions": [ + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h217ebc8958a2e0f7E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he9bdea485b0b8eefE" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h0314312c7330f16dE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3fd1a6eedf751fe2E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h51527ef46083cf19E" + } + ], + [ + 25, + { + "IntrinsicSym": "black_box" + } + ], + [ + 29, + { + "NormalSym": "_ZN14newtype_pubkey9use_inner17h230c2bffb6728494E" + } + ], + [ + 32, + { + "NormalSym": "_ZN4core4hint9black_box17hbacba317dc8c2f63E" + } + ], + [ + 33, + { + "NoOpSym": "" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN14newtype_pubkey4main17h8f945f52f3914dbdE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 65, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + }, + "ty": 30, + "id": 13 + } + } + } + } + ] + }, + "span": 65 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 31 + ] + } + ] + } + ] + } + ] + }, + "span": 66 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 29, + "id": 12 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 67, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 14 + } + } + }, + "args": [ + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 68 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 71, + "mutability": "Not" + }, + { + "ty": 26, + "span": 72, + "mutability": "Not" + }, + { + "ty": 27, + "span": 66, + "mutability": "Not" + }, + { + "ty": 26, + "span": 68, + "mutability": "Not" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "pk", + "source_info": { + "span": 71, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "len", + "source_info": { + "span": 72, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 73 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN14newtype_pubkey9use_inner17h230c2bffb6728494E", + "mono_item_kind": { + "MonoItemFn": { + "name": "use_inner", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 10 + } + } + } + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + { + "Copy": { + "local": 4, + "projection": [] + } + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 5, + "projection": [] + } + }, + "expected": true, + "msg": { + "BoundsCheck": { + "len": { + "Move": { + "local": 4, + "projection": [] + } + }, + "index": { + "Copy": { + "local": 3, + "projection": [] + } + } + } + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 53 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Index": 3 + } + ] + } + } + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 3 + } + } + }, + "span": 55 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + } + ] + }, + "span": 57 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 4 + } + }, + "span": 56 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 10 + } + } + } + } + ] + }, + "span": 58 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 4 + } + }, + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 59 + } + } + ], + "locals": [ + { + "ty": 26, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 61, + "mutability": "Not" + }, + { + "ty": 9, + "span": 53, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 54, + "mutability": "Not" + }, + { + "ty": 26, + "span": 53, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 53, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "arr", + "source_info": { + "span": 61, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 62 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h40b075be88868699E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h51527ef46083cf19E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h217ebc8958a2e0f7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0ce30afb4ab9b6e9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h0314312c7330f16dE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3fd1a6eedf751fe2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hcda3c7cfa27e5721E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core4hint9black_box17hbacba317dc8c2f63E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::hint::black_box::", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 8 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 26, + "span": 46, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 41, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 47 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he9bdea485b0b8eefE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 49, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 9 + } + } + } + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 48 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 51, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 52 + } + } + }, + "details": null + } + ], + "types": [ + [ + 1, + { + "TupleType": { + "types": [], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "size": { + "num_bits": 0 + } + } + } + } + ], + [ + 5, + { + "RefType": { + "pointee_type": 34, + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + }, + { + "num_bits": 64 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "ScalarPair": [ + { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + }, + { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + ] + }, + "abi_align": 8, + "size": { + "num_bits": 128 + } + } + } + } + ], + [ + 6, + { + "PrimitiveType": { + "Int": "Isize" + } + } + ], + [ + 8, + { + "PtrType": { + "pointee_type": 35, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 0, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 9, + { + "PrimitiveType": { + "Uint": "U8" + } + } + ], + [ + 10, + { + "EnumType": { + "name": "std::result::Result", + "adt_def": 23, + "discriminants": [ + 0, + 1 + ], + "fields": [ + [ + 6 + ], + [ + 36 + ] + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Int": { + "length": "I64", + "signed": true + } + }, + "valid_range": { + "start": 0, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 11, + { + "RefType": { + "pointee_type": 12, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 15, + { + "StructType": { + "name": "std::sys::pal::unix::process::process_common::ExitCode", + "adt_def": 12, + "fields": [ + 9 + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Int": { + "length": "I8", + "signed": false + } + }, + "valid_range": { + "start": 0, + "end": 255 + } + } + } + }, + "abi_align": 1, + "size": { + "num_bits": 8 + } + } + } + } + ], + [ + 16, + { + "PrimitiveType": { + "Int": "I32" + } + } + ], + [ + 17, + { + "StructType": { + "name": "std::process::ExitCode", + "adt_def": 10, + "fields": [ + 15 + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Int": { + "length": "I8", + "signed": false + } + }, + "valid_range": { + "start": 0, + "end": 255 + } + } + } + }, + "abi_align": 1, + "size": { + "num_bits": 8 + } + } + } + } + ], + [ + 18, + { + "RefType": { + "pointee_type": 15, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 22, + { + "PtrType": { + "pointee_type": 12, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 0, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 24, + { + "RefType": { + "pointee_type": 12, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 26, + { + "PrimitiveType": { + "Uint": "Usize" + } + } + ], + [ + 27, + { + "RefType": { + "pointee_type": 31, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 1, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 28, + { + "PrimitiveType": "Bool" + } + ], + [ + 30, + { + "StructType": { + "name": "Pubkey", + "adt_def": 14, + "fields": [ + 31 + ], + "layout": { + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "size": { + "num_bits": 256 + } + } + } + } + ], + [ + 31, + { + "ArrayType": { + "elem_type": 9, + "size": { + "kind": { + "Value": [ + 26, + { + "bytes": [ + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + ] + }, + "id": 0 + }, + "layout": { + "fields": { + "Array": { + "stride": { + "num_bits": 8 + }, + "count": 32 + } + }, + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "size": { + "num_bits": 256 + } + } + } + } + ], + [ + 35, + { + "PtrType": { + "pointee_type": 9, + "layout": { + "fields": "Primitive", + "variants": { + "Single": { + "index": 0 + } + }, + "abi": { + "Scalar": { + "Initialized": { + "value": { + "Pointer": 0 + }, + "valid_range": { + "start": 0, + "end": 18446744073709551615 + } + } + } + }, + "abi_align": 8, + "size": { + "num_bits": 64 + } + } + } + } + ], + [ + 36, + "VoidType" + ] + ], + "spans": [ + [ + 0, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 194, + 17, + 194, + 36 + ] + ], + [ + 1, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 194, + 17, + 199, + 6 + ] + ], + [ + 2, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 9, + 195, + 93 + ] + ], + [ + 3, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 10, + 195, + 93 + ] + ], + [ + 4, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 201, + 2, + 201, + 2 + ] + ], + [ + 5, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 199, + 5, + 199, + 6 + ] + ], + [ + 6, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 194, + 12, + 194, + 13 + ] + ], + [ + 7, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 199, + 6, + 199, + 7 + ] + ], + [ + 9, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 189, + 5, + 189, + 9 + ] + ], + [ + 10, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 190, + 5, + 190, + 9 + ] + ], + [ + 11, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 191, + 5, + 191, + 9 + ] + ], + [ + 12, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 192, + 5, + 192, + 12 + ] + ], + [ + 13, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 188, + 1, + 201, + 2 + ] + ], + [ + 14, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 18, + 195, + 69 + ] + ], + [ + 15, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 18, + 195, + 75 + ] + ], + [ + 16, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 18, + 195, + 84 + ] + ], + [ + 17, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 70, + 195, + 74 + ] + ], + [ + 18, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 76, + 195, + 82 + ] + ], + [ + 19, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 74, + 195, + 75 + ] + ], + [ + 20, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 93, + 195, + 93 + ] + ], + [ + 21, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 83, + 195, + 84 + ] + ], + [ + 22, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2053, + 9, + 2053, + 15 + ] + ], + [ + 23, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs", + 636, + 9, + 636, + 15 + ] + ], + [ + 24, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs", + 636, + 9, + 636, + 22 + ] + ], + [ + 25, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs", + 636, + 21, + 636, + 22 + ] + ], + [ + 26, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2053, + 23, + 2053, + 24 + ] + ], + [ + 27, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs", + 195, + 92, + 195, + 93 + ] + ], + [ + 29, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2052, + 19, + 2052, + 23 + ] + ], + [ + 30, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs", + 635, + 19, + 635, + 24 + ] + ], + [ + 31, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 154, + 18, + 154, + 19 + ] + ], + [ + 32, + [ + "no-location", + 0, + 0, + 0, + 0 + ] + ], + [ + 33, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 154, + 18, + 154, + 21 + ] + ], + [ + 34, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs", + 389, + 5, + 389, + 33 + ] + ], + [ + 35, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs", + 389, + 5, + 389, + 40 + ] + ], + [ + 36, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 160, + 2, + 160, + 2 + ] + ], + [ + 38, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 150, + 43, + 150, + 44 + ] + ], + [ + 40, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 154, + 9, + 154, + 15 + ] + ], + [ + 41, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs", + 388, + 27, + 388, + 32 + ] + ], + [ + 42, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs", + 150, + 1, + 160, + 2 + ] + ], + [ + 43, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs", + 250, + 5, + 250, + 71 + ] + ], + [ + 44, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs", + 521, + 1, + 521, + 56 + ] + ], + [ + 45, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs", + 390, + 2, + 390, + 2 + ] + ], + [ + 47, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs", + 388, + 1, + 390, + 2 + ] + ], + [ + 48, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2424, + 6, + 2424, + 6 + ] + ], + [ + 49, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2423, + 9, + 2423, + 26 + ] + ], + [ + 51, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2422, + 15, + 2422, + 19 + ] + ], + [ + 52, + [ + "/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs", + 2422, + 5, + 2424, + 6 + ] + ], + [ + 53, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 16, + 8, + 16, + 14 + ] + ], + [ + 54, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 16, + 12, + 16, + 13 + ] + ], + [ + 55, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 16, + 8, + 16, + 19 + ] + ], + [ + 56, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 16, + 5, + 16, + 37 + ] + ], + [ + 57, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 16, + 22, + 16, + 24 + ] + ], + [ + 58, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 16, + 34, + 16, + 35 + ] + ], + [ + 59, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 17, + 2, + 17, + 2 + ] + ], + [ + 61, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 14, + 14, + 14, + 17 + ] + ], + [ + 62, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 14, + 1, + 17, + 2 + ] + ], + [ + 63, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 21, + 15, + 21, + 24 + ] + ], + [ + 64, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 21, + 15, + 21, + 31 + ] + ], + [ + 65, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 20, + 14, + 20, + 17 + ] + ], + [ + 66, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 21, + 25, + 21, + 30 + ] + ], + [ + 67, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 22, + 5, + 22, + 26 + ] + ], + [ + 68, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 22, + 5, + 22, + 31 + ] + ], + [ + 69, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 23, + 2, + 23, + 2 + ] + ], + [ + 71, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 20, + 9, + 20, + 11 + ] + ], + [ + 72, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 21, + 9, + 21, + 12 + ] + ], + [ + 73, + [ + "/Users/steven/Desktop/projs/kmir/kmir1/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.rs", + 19, + 1, + 23, + 2 + ] + ] + ], + "debug": null, + "machine": { + "endian": "Little", + "pointer_width": { + "num_bits": 64 + } + } +} From 8c9736ecfbe0e40d2191b3367dc6ec38488e0a94 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Fri, 24 Oct 2025 18:45:38 +0800 Subject: [PATCH 09/15] fix: add preserve-definedness for #msBytes --- kmir/src/kmir/kdist/mir-semantics/rt/decoding.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index 892501720..a0516a330 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -105,8 +105,8 @@ rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, noLayoutShape)) // --------------------------------------------------------------------------- // MachineSize is in bits in the ABI; convert to bytes for slicing. syntax Int ::= #msBytes ( MachineSize ) [function, total] -rule #msBytes(machineSize(mirInt(NBITS))) => NBITS /Int 8 -rule #msBytes(machineSize(NBITS)) => NBITS /Int 8 [owise] +rule #msBytes(machineSize(mirInt(NBITS))) => NBITS /Int 8 [preserves-definedness] +rule #msBytes(machineSize(NBITS)) => NBITS /Int 8 [owise, preserves-definedness] // Extract field offsets from the struct layout when available (Arbitrary only). syntax MachineSizes ::= #structOffsets ( MaybeLayoutShape ) [function, total] From 60e913cf11e4cd83a10d49a23379c9b97138e2ba Mon Sep 17 00:00:00 2001 From: Stevengre Date: Fri, 24 Oct 2025 19:13:01 +0800 Subject: [PATCH 10/15] fix: apply suggestions --- .../kmir/kdist/mir-semantics/rt/decoding.md | 66 ++++++++++--------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index a0516a330..25e55d51c 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -76,9 +76,7 @@ rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, noTyConst)) ### Struct decoding Structs can have non-trivial layouts: field offsets may not match declaration order, and there may be padding. -The decoder follows a two-step strategy: -- Prefer explicit offsets from the struct's layout to slice each field out of the byte array. -- Fallback to a simple sequential split only when there is no layout and the total length matches the sum of field sizes (i.e., no padding). +Decoding is only performed when explicit layout offsets are available; otherwise we leave the term as `UnableToDecode` via the default rule. This avoids incorrectly decoding data when field reordering or padding is present. When using layout offsets we always return fields in declaration order within the `Aggregate` (variant 0), regardless of the physical order in memory. @@ -94,12 +92,6 @@ rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, LAYOUT)) andBool lengthBytes(BYTES) >=Int #neededBytesForOffsets(TYS, #structOffsets(LAYOUT)) [preserves-definedness] -// Case 2 (no layout): use sequential decoding with no padding allowed. -rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, noLayoutShape)) - => Aggregate(variantIdx(0), #decodeStructFields(BYTES, TYS)) - requires lengthBytes(BYTES) ==Int #sumElemSizes(TYS) - [preserves-definedness] - // --------------------------------------------------------------------------- // Offsets and helpers (used by the rules above) // --------------------------------------------------------------------------- @@ -117,11 +109,13 @@ rule #structOffsets(_) => .MachineSizes [owise] // Minimum number of input bytes required to decode all fields by the chosen offsets. // Uses builtin maxInt to compute max(offset + size). When offsets are absent // (empty list), this collapses to the exact sequential size (#sumElemSizes), -// which matches the semantics of our sequential decoding helper. +// i.e., the sum of the field sizes. syntax Int ::= #neededBytesForOffsets ( Tys , MachineSizes ) [function, total] rule #neededBytesForOffsets(.Tys, .MachineSizes) => 0 rule #neededBytesForOffsets(TY TYS, OFFSET OFFSETS) => maxInt(#msBytes(OFFSET) +Int #elemSize(lookupTy(TY)), #neededBytesForOffsets(TYS, OFFSETS)) + requires 0 <=Int #elemSize(lookupTy(TY)) + [preserves-definedness] rule #neededBytesForOffsets(TYS, .MachineSizes) => #sumElemSizes(TYS) rule #neededBytesForOffsets(.Tys, _OFFSETS) => 0 [owise] @@ -140,23 +134,6 @@ rule #decodeStructFieldsWithOffsets(BYTES, TY TYS, OFFSET OFFSETS) requires lengthBytes(BYTES) >=Int (#msBytes(OFFSET) +Int #elemSize(lookupTy(TY))) [preserves-definedness] -// Sequential helper (used when no layout is available and there is no padding). -syntax List ::= #decodeStructFields ( Bytes , Tys ) [function, total] -rule #decodeStructFields(BYTES, .Tys) => .List - requires lengthBytes(BYTES) ==Int 0 - [preserves-definedness] - -rule #decodeStructFields(BYTES, TY TYS) - => ListItem( - #decodeValue( - substrBytes(BYTES, 0, #elemSize(lookupTy(TY))), - lookupTy(TY) - ) - ) - #decodeStructFields(substrBytes(BYTES, #elemSize(lookupTy(TY)), lengthBytes(BYTES)), TYS) - requires lengthBytes(BYTES) >=Int #elemSize(lookupTy(TY)) - [preserves-definedness] - syntax Int ::= #sumElemSizes ( Tys ) [function, total] rule #sumElemSizes(.Tys) => 0 rule #sumElemSizes(TY TYS) => #elemSize(lookupTy(TY)) +Int #sumElemSizes(TYS) @@ -174,20 +151,33 @@ All unimplemented cases will become thunks by way of this default rule: ```k // TODO: this function should go into the rt/types.md module - syntax Int ::= #elemSize ( TypeInfo ) [function] + syntax Int ::= #elemSize ( TypeInfo ) [function, total] ``` Known element sizes for common types: ```k + // ---- Primitive types ---- rule #elemSize(typeInfoPrimitiveType(primTypeBool)) => 1 + // Rust `char` is a 32-bit Unicode scalar value + rule #elemSize(typeInfoPrimitiveType(primTypeChar)) => 4 rule #elemSize(TYPEINFO) => #bitWidth(#intTypeOf(TYPEINFO)) /Int 8 requires #isIntType(TYPEINFO) - + // Floating-point sizes + rule #elemSize(typeInfoPrimitiveType(primTypeFloat(floatTyF16))) => 2 + rule #elemSize(typeInfoPrimitiveType(primTypeFloat(floatTyF32))) => 4 + rule #elemSize(typeInfoPrimitiveType(primTypeFloat(floatTyF64))) => 8 + rule #elemSize(typeInfoPrimitiveType(primTypeFloat(floatTyF128))) => 16 + // `str` is unsized; size only known with metadata (e.g., in fat pointers) + rule #elemSize(typeInfoPrimitiveType(primTypeStr)) => 0 + + // ---- Arrays and slices ---- rule #elemSize(typeInfoArrayType(ELEM_TY, someTyConst(tyConst(LEN, _)))) => #elemSize(lookupTy(ELEM_TY)) *Int readTyConstInt(LEN) + // Slice `[T]` has dynamic size; plain value is unsized + rule #elemSize(typeInfoArrayType(_ELEM_TY, noTyConst)) => 0 - // thin and fat pointers + // ---- thin and fat pointers ---- rule #elemSize(typeInfoRefType(TY)) => #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize))) requires dynamicSize(1) ==K #metadataSize(TY) rule #elemSize(typeInfoRefType(_)) => 2 *Int #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize))) @@ -197,10 +187,22 @@ Known element sizes for common types: rule #elemSize(typeInfoPtrType(_)) => 2 *Int #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize))) [owise] + // ---- Tuples ---- + // Without layout, approximate as sum of element sizes (ignores padding). + rule #elemSize(typeInfoTupleType(TYS)) => #sumElemSizes(TYS) + + // ---- Structs and Enums with layout ---- + rule #elemSize(typeInfoStructType(_, _, _, someLayoutShape(layoutShape(_, _, _, _, SIZE)))) => #msBytes(SIZE) + rule #elemSize(typeInfoEnumType(_, _, _, _, someLayoutShape(layoutShape(_, _, _, _, SIZE)))) => #msBytes(SIZE) + + // ---- Function item types ---- + // Function items are zero-sized; function pointers are handled by PtrType + rule #elemSize(typeInfoFunType(_)) => 0 + rule #elemSize(typeInfoVoidType) => 0 - // FIXME can only use size from layout here. Requires adding layout first. - // Enum, Struct, Tuple, + // Fallback to keep the function total for any remaining cases + rule #elemSize(_) => 0 [owise] rule 0 <=Int #elemSize(_) => true [simplification, preserves-definedness] ``` From 449b7292828c210667307dea24d80083772d942f Mon Sep 17 00:00:00 2001 From: Stevengre Date: Fri, 24 Oct 2025 19:14:50 +0800 Subject: [PATCH 11/15] fix: comment --- kmir/src/kmir/kdist/mir-semantics/rt/decoding.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index 25e55d51c..8932bc61c 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -84,8 +84,7 @@ When using layout offsets we always return fields in declaration order within th // --------------------------------------------------------------------------- // Struct decoding rules (top level) // --------------------------------------------------------------------------- -// Case 1 (layout offsets present): use the offsets when they are provided -// and the input length is sufficient. Distinguished purely via `requires`. +// Use the offsets when they are provided and the input length is sufficient. rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, LAYOUT)) => Aggregate(variantIdx(0), #decodeStructFieldsWithOffsets(BYTES, TYS, #structOffsets(LAYOUT))) requires #structOffsets(LAYOUT) =/=K .MachineSizes From d4490b608628f7adb1fa357797c4c8770f8e1fc4 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Fri, 24 Oct 2025 19:17:46 +0800 Subject: [PATCH 12/15] fix: remoe useless attribute --- kmir/src/kmir/kdist/mir-semantics/rt/decoding.md | 1 - 1 file changed, 1 deletion(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index 8932bc61c..3d3a7f498 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -114,7 +114,6 @@ rule #neededBytesForOffsets(.Tys, .MachineSizes) => 0 rule #neededBytesForOffsets(TY TYS, OFFSET OFFSETS) => maxInt(#msBytes(OFFSET) +Int #elemSize(lookupTy(TY)), #neededBytesForOffsets(TYS, OFFSETS)) requires 0 <=Int #elemSize(lookupTy(TY)) - [preserves-definedness] rule #neededBytesForOffsets(TYS, .MachineSizes) => #sumElemSizes(TYS) rule #neededBytesForOffsets(.Tys, _OFFSETS) => 0 [owise] From 135ca3da99751c95a254278c0cc0a6a0b6efc6ec Mon Sep 17 00:00:00 2001 From: Stevengre Date: Fri, 24 Oct 2025 19:31:05 +0800 Subject: [PATCH 13/15] fix --- kmir/src/kmir/kdist/mir-semantics/rt/decoding.md | 7 +++++-- .../data/prove-rs/show/interior-mut-fail.main.expected | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index 3d3a7f498..a19bab429 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -113,7 +113,6 @@ syntax Int ::= #neededBytesForOffsets ( Tys , MachineSizes ) [function, total] rule #neededBytesForOffsets(.Tys, .MachineSizes) => 0 rule #neededBytesForOffsets(TY TYS, OFFSET OFFSETS) => maxInt(#msBytes(OFFSET) +Int #elemSize(lookupTy(TY)), #neededBytesForOffsets(TYS, OFFSETS)) - requires 0 <=Int #elemSize(lookupTy(TY)) rule #neededBytesForOffsets(TYS, .MachineSizes) => #sumElemSizes(TYS) rule #neededBytesForOffsets(.Tys, _OFFSETS) => 0 [owise] @@ -187,7 +186,11 @@ Known element sizes for common types: // ---- Tuples ---- // Without layout, approximate as sum of element sizes (ignores padding). - rule #elemSize(typeInfoTupleType(TYS)) => #sumElemSizes(TYS) + // Define recursively without introducing a helper to avoid cycles with + // `#sumElemSizes` (which itself uses `#elemSize`). + rule #elemSize(typeInfoTupleType(.Tys)) => 0 + rule #elemSize(typeInfoTupleType(TY TYS)) + => #elemSize(lookupTy(TY)) +Int #elemSize(typeInfoTupleType(TYS)) // ---- Structs and Enums with layout ---- rule #elemSize(typeInfoStructType(_, _, _, someLayoutShape(layoutShape(_, _, _, _, SIZE)))) => #msBytes(SIZE) diff --git a/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected index d387d0c29..7cb6831b6 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected @@ -3,10 +3,10 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (159 steps) +│ (198 steps) └─ 3 (stuck, leaf) - #traverseProjection ( toStack ( 3 , local ( 1 ) ) , thunk ( UnableToDecode ( b"\ - span: 86 + #traverseProjection ( toLocal ( 11 ) , thunk ( #cast ( PtrLocal ( 3 , place ( .. + span: 91 ┌─ 2 (root, leaf, target, terminal) From 39de7969a60cfab88f2c9a40b17d0311086e2937 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 25 Oct 2025 10:38:42 +0800 Subject: [PATCH 14/15] fix: update expected output --- .../data/exec-smir/newtype-pubkey/newtype-pubkey.state | 2 +- .../data/exec-smir/struct-multi/struct-multi.state | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state index aac41ccec..ac4b58c68 100644 --- a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state +++ b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state @@ -61,7 +61,7 @@ ListItem ( Integer ( 30 , 8 , false ) ) ListItem ( Integer ( 31 , 8 , false ) ) ) ) ) , ty ( 30 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 32 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 31 ) ) .ProjectionElems ) , mutabilityNot , staticSize ( 32 ) ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 31 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 32 ) , 0 , noMetadataSize ) ) , ty ( 27 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 32 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state index 7652ca975..17f4708f6 100644 --- a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state @@ -41,13 +41,13 @@ ListItem ( typedValue ( BoolVal ( true ) , ty ( 4 ) , mutabilityNot ) ) ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 1 ) , mutabilityNot ) ) ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 1 ) , mutabilityNot ) ) ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 2 ) , .ProjectionElems , noMetadata ) , ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( AllocRef ( allocId ( 2 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 1 ) , mutabilityNot ) ) ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) From de22f570394f918428fe21ba54954ee99593e65c Mon Sep 17 00:00:00 2001 From: Stevengre Date: Mon, 27 Oct 2025 14:11:06 +0800 Subject: [PATCH 15/15] fix: apply suggestions to assert equal TYS and OFFSET --- .../src/kmir/kdist/mir-semantics/rt/decoding.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index a19bab429..ff9654535 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -88,6 +88,7 @@ When using layout offsets we always return fields in declaration order within th rule #decodeValue(BYTES, typeInfoStructType(_, _, TYS, LAYOUT)) => Aggregate(variantIdx(0), #decodeStructFieldsWithOffsets(BYTES, TYS, #structOffsets(LAYOUT))) requires #structOffsets(LAYOUT) =/=K .MachineSizes + andBool 0 <=Int #neededBytesForOffsets(TYS, #structOffsets(LAYOUT)) andBool lengthBytes(BYTES) >=Int #neededBytesForOffsets(TYS, #structOffsets(LAYOUT)) [preserves-definedness] @@ -106,15 +107,15 @@ rule #structOffsets(noLayoutShape) => .MachineSizes rule #structOffsets(_) => .MachineSizes [owise] // Minimum number of input bytes required to decode all fields by the chosen offsets. -// Uses builtin maxInt to compute max(offset + size). When offsets are absent -// (empty list), this collapses to the exact sequential size (#sumElemSizes), -// i.e., the sum of the field sizes. +// Uses builtin maxInt to compute max(offset + size). The lists of types and +// offsets must have the same length; if not, this function returns -1 to signal +// an invalid layout for decoding. syntax Int ::= #neededBytesForOffsets ( Tys , MachineSizes ) [function, total] rule #neededBytesForOffsets(.Tys, .MachineSizes) => 0 rule #neededBytesForOffsets(TY TYS, OFFSET OFFSETS) => maxInt(#msBytes(OFFSET) +Int #elemSize(lookupTy(TY)), #neededBytesForOffsets(TYS, OFFSETS)) -rule #neededBytesForOffsets(TYS, .MachineSizes) => #sumElemSizes(TYS) -rule #neededBytesForOffsets(.Tys, _OFFSETS) => 0 [owise] +// Any remaining pattern indicates a length mismatch between types and offsets. +rule #neededBytesForOffsets(_, _) => -1 [owise] // Decode each field at its byte offset and return values in declaration order. syntax List ::= #decodeStructFieldsWithOffsets ( Bytes , Tys , MachineSizes ) [function, total] @@ -130,10 +131,6 @@ rule #decodeStructFieldsWithOffsets(BYTES, TY TYS, OFFSET OFFSETS) #decodeStructFieldsWithOffsets(BYTES, TYS, OFFSETS) requires lengthBytes(BYTES) >=Int (#msBytes(OFFSET) +Int #elemSize(lookupTy(TY))) [preserves-definedness] - -syntax Int ::= #sumElemSizes ( Tys ) [function, total] -rule #sumElemSizes(.Tys) => 0 -rule #sumElemSizes(TY TYS) => #elemSize(lookupTy(TY)) +Int #sumElemSizes(TYS) ``` ### Error marker (becomes thunk) for other (unimplemented) cases @@ -186,8 +183,6 @@ Known element sizes for common types: // ---- Tuples ---- // Without layout, approximate as sum of element sizes (ignores padding). - // Define recursively without introducing a helper to avoid cycles with - // `#sumElemSizes` (which itself uses `#elemSize`). rule #elemSize(typeInfoTupleType(.Tys)) => 0 rule #elemSize(typeInfoTupleType(TY TYS)) => #elemSize(lookupTy(TY)) +Int #elemSize(typeInfoTupleType(TYS))