diff --git a/kmir/src/kmir/__main__.py b/kmir/src/kmir/__main__.py index e12133ab9..888744462 100644 --- a/kmir/src/kmir/__main__.py +++ b/kmir/src/kmir/__main__.py @@ -2,6 +2,7 @@ import logging import sys +import tempfile from argparse import ArgumentParser from pathlib import Path from typing import TYPE_CHECKING @@ -57,13 +58,14 @@ def _kmir_run(opts: RunOpts) -> None: # target = opts.bin if opts.bin else cargo.default_target smir_info = cargo.smir_for_project(clean=False) - result = kmir.run_smir(smir_info, start_symbol=opts.start_symbol, depth=opts.depth) - print(kmir.kore_to_pretty(result)) + with tempfile.TemporaryDirectory() as work_dir: + kmir = KMIR.from_kompiled_kore(smir_info, symbolic=opts.haskell_backend, target_dir=work_dir) + result = kmir.run_smir(smir_info, start_symbol=opts.start_symbol, depth=opts.depth) + print(kmir.kore_to_pretty(result)) def _kmir_prove_rs(opts: ProveRSOpts) -> None: - kmir = KMIR(HASKELL_DEF_DIR, LLVM_LIB_DIR, bug_report=opts.bug_report) - proof = kmir.prove_rs(opts) + proof = KMIR.prove_rs(opts) print(str(proof.summary)) if not proof.passed: sys.exit(1) diff --git a/kmir/src/kmir/build.py b/kmir/src/kmir/build.py index 8cfccaa96..4a3d629a1 100644 --- a/kmir/src/kmir/build.py +++ b/kmir/src/kmir/build.py @@ -10,3 +10,4 @@ LLVM_DEF_DIR: Final = kdist.which('mir-semantics.llvm') LLVM_LIB_DIR: Final = kdist.which('mir-semantics.llvm-library') HASKELL_DEF_DIR: Final = kdist.which('mir-semantics.haskell') +KMIR_SOURCE_DIR: Final = kdist.which('mir-semantics.source') diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 85ae06c4e..05c7fd500 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -43,21 +43,20 @@ Execution of a program begins by creating a stack frame for the `main` function and executing its function body. Before execution begins, the function map and the initial memory have to be set up. -```k +All of this is done in the client code so we omit the initialisation code which was historically placed here. + +``` // #init step, assuming a singleton in the K cell - rule #init(_NAME:Symbol _ALLOCS:GlobalAllocs FUNCTIONS:FunctionNames ITEMS:MonoItems TYPES:TypeMappings _MACHINE:MachineInfo) + rule #init(_NAME:Symbol _ALLOCS:GlobalAllocs FUNCTIONS:FunctionNames _ITEMS:MonoItems _TYPES:TypeMappings _MACHINE:MachineInfo) => #execFunction(#findItem(ITEMS, FUNCNAME), FUNCTIONS) - _ => #mkFunctionMap(FUNCTIONS, ITEMS) - FUNCNAME - _ => #mkTypeMap(.Map, TYPES) ``` The `Map` of types is static information used for decoding constants and allocated data into `Value`s. It maps `Ty` IDs to `TypeInfo` that can be supplied to decoding and casting functions as well as operations involving `Aggregate` values (related to `struct`s and `enum`s). -```k +``` syntax Map ::= #mkTypeMap ( Map, TypeMappings ) [function, total, symbol("mkTypeMap")] rule #mkTypeMap(ACC, .TypeMappings) => ACC @@ -83,7 +82,7 @@ they are callee in a `Call` terminator within an `Item`). The function _names_ and _ids_ are not relevant for calls and therefore dropped. -```k +``` syntax Map ::= #mkFunctionMap ( FunctionNames, MonoItems ) [ function, total, symbol("mkFunctionMap") ] | #accumFunctions ( Map, Map, FunctionNames ) [ function, total ] | #accumItems ( Map, MonoItems ) [ function, total ] @@ -138,7 +137,7 @@ structure from its function body and then execute the first basic block of the body. The function's `Ty` index in the `functions` map must be known to populate the `currentFunc` field. -```k +``` // find function through its MonoItemFn.name syntax MonoItem ::= #findItem ( MonoItems, Symbol ) [ function ] @@ -185,20 +184,9 @@ be known to populate the `currentFunc` field. [owise] rule #tyFromName(_, .List) => ty(-1) // HACK see #mainIsMinusOne above - - syntax List ::= toKList(BasicBlocks) [function, total] - - rule toKList( .BasicBlocks ) => .List - rule toKList(B:BasicBlock REST:BasicBlocks) => ListItem(B) toKList(REST) - - syntax List ::= #reserveFor( LocalDecls ) [function, total] - - rule #reserveFor(.LocalDecls) => .List - - rule #reserveFor(localDecl(TY, _, MUT) REST:LocalDecls) - => - ListItem(newLocal(TY, MUT)) #reserveFor(REST) ``` +#### Function Execution + Executing a function body consists of repeated calls to `#execBlock` for the basic blocks that, together, constitute the function body. The @@ -345,7 +333,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f _ => CALLER // - _ => #getBlocks(FUNCS, CALLER) + _ => #getBlocks(CALLER) CALLER => NEWCALLER DEST => NEWDEST someBasicBlockIdx(TARGET) => NEWTARGET @@ -354,9 +342,6 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f // // remaining call stack (without top frame) ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK - FUNCS - requires CALLER in_keys(FUNCS) - [preserves-definedness] // CALLER lookup defined // no value to return, skip writing rule #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ @@ -365,7 +350,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f _ => CALLER // - _ => #getBlocks(FUNCS, CALLER) + _ => #getBlocks(CALLER) CALLER => NEWCALLER _ => NEWDEST someBasicBlockIdx(TARGET) => NEWTARGET @@ -374,15 +359,11 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f // // remaining call stack (without top frame) ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK - FUNCS - requires CALLER in_keys(FUNCS) - [preserves-definedness] // CALLER lookup defined - syntax List ::= #getBlocks(Map, Ty) [function] - | #getBlocksAux(MonoItemKind) [function, total] + syntax List ::= #getBlocks( Ty ) [function, total] + | #getBlocksAux( MonoItemKind ) [function, total] - rule #getBlocks(FUNCS, ID) => #getBlocksAux({FUNCS[ID]}:>MonoItemKind) - requires ID in_keys(FUNCS) + rule #getBlocks(TY) => #getBlocksAux(lookupFunction(TY)) // returns blocks from the body rule #getBlocksAux(monoItemFn(_, _, noBody)) => .List @@ -391,6 +372,11 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f rule #getBlocksAux(monoItemStatic(_, _, _)) => .List // should not occur in calls rule #getBlocksAux(monoItemGlobalAsm(_)) => .List // not supported rule #getBlocksAux(IntrinsicFunction(_)) => .List // intrinsics have no body + + syntax List ::= toKList(BasicBlocks) [function, total] + // --------------------------------------------------- + rule toKList( .BasicBlocks ) => .List + rule toKList(B:BasicBlock REST:BasicBlocks) => ListItem(B) toKList(REST) ``` When a `terminatorKindReturn` is executed but the optional target is empty @@ -434,18 +420,14 @@ where the returned result should go. // Intrinsic function call - execute directly without state switching rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, _UNWIND), _SPAN)) ~> _ => - #execIntrinsic({FUNCTIONS[#tyOfCall(FUNC)]}:>MonoItemKind, ARGS, DEST) ~> #continueAt(TARGET) + #execIntrinsic(lookupFunction(#tyOfCall(FUNC)), ARGS, DEST) ~> #continueAt(TARGET) - FUNCTIONS - requires #tyOfCall(FUNC) in_keys(FUNCTIONS) - andBool isMonoItemKind(FUNCTIONS[#tyOfCall(FUNC)]) - andBool isIntrinsicFunction({FUNCTIONS[#tyOfCall(FUNC)]}:>MonoItemKind) - [preserves-definedness] // callee lookup defined + requires isIntrinsicFunction(lookupFunction(#tyOfCall(FUNC))) // Regular function call - full state switching and stack setup rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) ~> _ => - #setUpCalleeData({FUNCTIONS[#tyOfCall(FUNC)]}:>MonoItemKind, ARGS) + #setUpCalleeData(lookupFunction(#tyOfCall(FUNC)), ARGS) CALLER => #tyOfCall(FUNC) @@ -457,11 +439,7 @@ where the returned result should go. LOCALS STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK - FUNCTIONS - requires #tyOfCall(FUNC) in_keys(FUNCTIONS) - andBool isMonoItemKind(FUNCTIONS[#tyOfCall(FUNC)]) - andBool notBool isIntrinsicFunction({FUNCTIONS[#tyOfCall(FUNC)]}:>MonoItemKind) - [preserves-definedness] // callee lookup defined + requires notBool isIntrinsicFunction(lookupFunction(#tyOfCall(FUNC))) syntax Bool ::= isIntrinsicFunction(MonoItemKind) [function] rule isIntrinsicFunction(IntrinsicFunction(_)) => true @@ -506,6 +484,14 @@ An operand may be a `Reference` (the only way a function could access another fu // TODO: Haven't handled "noBody" case + syntax List ::= #reserveFor( LocalDecls ) [function, total] + + rule #reserveFor(.LocalDecls) => .List + + rule #reserveFor(localDecl(TY, _, MUT) REST:LocalDecls) + => + ListItem(newLocal(TY, MUT)) #reserveFor(REST) + syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) @@ -631,11 +617,10 @@ Execution gets stuck (no matching rule) when operands have different types or un ```k // Raw eq: dereference operands, extract types, and delegate to typed comparison rule #execIntrinsic(IntrinsicFunction(symbol("raw_eq")), ARG1:Operand ARG2:Operand .Operands, PLACE) - => #execRawEqTyped(PLACE, #withDeref(ARG1), #extractOperandType(#withDeref(ARG1), LOCALS, TYPEMAP), - #withDeref(ARG2), #extractOperandType(#withDeref(ARG2), LOCALS, TYPEMAP)) + => #execRawEqTyped(PLACE, #withDeref(ARG1), #extractOperandType(#withDeref(ARG1), LOCALS), + #withDeref(ARG2), #extractOperandType(#withDeref(ARG2), LOCALS)) ... LOCALS - TYPEMAP // Compare values only if types are identical syntax KItem ::= #execRawEqTyped(Place, Evaluation, MaybeTy, Evaluation, MaybeTy) [seqstrict(2,4)] @@ -655,17 +640,17 @@ Execution gets stuck (no matching rule) when operands have different types or un rule #withDeref(OP) => OP [owise] // Extract type from operands (locals with projections, constants, fallback to unknown) - syntax MaybeTy ::= #extractOperandType(Operand, List, Map) [function, total] - rule #extractOperandType(operandCopy(place(local(I), PROJS)), LOCALS, TYPEMAP) - => getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP) + syntax MaybeTy ::= #extractOperandType(Operand, List) [function, total] + rule #extractOperandType(operandCopy(place(local(I), PROJS)), LOCALS) + => getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS) requires 0 <=Int I andBool I getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP) + rule #extractOperandType(operandMove(place(local(I), PROJS)), LOCALS) + => getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS) requires 0 <=Int I andBool I TY - rule #extractOperandType(_, _, _) => TyUnknown [owise] + rule #extractOperandType(operandConstant(constOperand(_, _, mirConst(_, TY, _))), _) => TY + rule #extractOperandType(_, _) => TyUnknown [owise] ``` ### Stopping on Program Errors @@ -694,6 +679,6 @@ The top-level module `KMIR` includes both the control flow constructs (and trans module KMIR imports KMIR-CONTROL-FLOW imports KMIR-LEMMAS - imports KMIR-SYMBOLIC-LOCALS +// imports KMIR-SYMBOLIC-LOCALS endmodule diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/configuration.md b/kmir/src/kmir/kdist/mir-semantics/rt/configuration.md index c1ef30a7e..c49ebc0c5 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/configuration.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/configuration.md @@ -46,15 +46,21 @@ module KMIR-CONFIGURATION // remaining call stack (without top frame) .List - // static and dynamic allocations: AllocId -> Value - .Map - // ============ static information ============ - // function store, Ty -> MonoItemFn - .Map - symbol($STARTSYM:String) - // static information about the base type interning in the MIR - .Map +``` + +Additional fields of the configuration contain _static_ information. + +* The function store mapping `Ty` to `MonoItemFn` (and `IntrinsicFn`). This is essentially the entire program. +* The allocation store, mapping `AllocId` to `Value` (or error markers if undecoded) +* The type metadata map, associating `Ty` with a `TypeInfo` (which may contain more `Ty`s) +* The mapping from `AdtDef` ID to `Ty` +For better performance, this information is reified to K functions, +rather than carrying static `Map` structures with the configuration. + +The functions are defined in the `RT-VALUE` module for now but should have their own module. + +```k endmodule ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 71878a74a..27a5857aa 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -124,13 +124,10 @@ Constant operands are simply decoded according to their type. ```k rule operandConstant(constOperand(_, _, mirConst(KIND, TY, _))) - => #decodeConstant(KIND, TY, {TYPEMAP[TY]}:>TypeInfo) + => #decodeConstant(KIND, TY, lookupTy(TY)) ... - TYPEMAP - requires TY in_keys(TYPEMAP) - andBool isTypeInfo(TYPEMAP[TY]) - [preserves-definedness] // valid Map lookup checked + requires typeInfoVoidType =/=K lookupTy(TY) ``` ### Copying and Moving @@ -293,13 +290,7 @@ A `Deref` projection in the projections list changes the target of the write ope andBool isStackFrame(STACK[FRAME -Int 1]) [preserves-definedness] // valid context ensured upon context construction - rule #traverseProjection(toAlloc(ALLOC_ID), _ORIGINAL, .ProjectionElems, CONTEXTS) - ~> #writeMoved - => .K - ... - - MEMORY => MEMORY[ALLOC_ID <- #buildUpdate(Moved, CONTEXTS)] - [preserves-definedness] // valid ALLOC_ID ensured when destination set + // allocations should not be written to, therefore no rule for `toAlloc` ``` These helpers mark down, as we traverse the projection, what `Place` we are currently looking up in the traversal. @@ -703,17 +694,15 @@ even though this could be supported. ) => #traverseProjection( toAlloc(ALLOC_ID), - {MEMORYMAP[ALLOC_ID]}:>Value, + {lookupAlloc(ALLOC_ID)}:>Value, ALLOC_PROJS, // alloc projections .Contexts // previous contexts obsolete ) ~> #derefTruncate(META, PROJS) // then truncate, then continue with remaining projections ... - MEMORYMAP - requires ALLOC_ID in_keys(MEMORYMAP) - andBool isValue(MEMORYMAP[ALLOC_ID]) - [preserves-definedness] + requires isValue(lookupAlloc(ALLOC_ID)) + [preserves-definedness] // sort projection checked ``` ## Evaluation of R-Values (`Rvalue` sort) @@ -747,24 +736,21 @@ The most basic ones are simply accessing an operand, either directly or by way o rule rvalueUse(OPERAND) => OPERAND ... rule rvalueCast(CASTKIND, operandCopy(place(local(I), PROJS)) #as OPERAND, TY) - => #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP), TY) ... + => #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS), TY) ... LOCALS - TYPEMAP requires 0 <=Int I andBool I rvalueCast(CASTKIND, operandMove(place(local(I), PROJS)) #as OPERAND, TY) - => #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP), TY) ... + => #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS), TY) ... LOCALS - TYPEMAP requires 0 <=Int I andBool I rvalueCast(CASTKIND, operandConstant(constOperand(_, _, mirConst(_, CONST_TY, _))) #as OPERAND, TY) => #cast(OPERAND, CASTKIND, CONST_TY, TY) ... - [preserves-definedness] // valid list indexing checked ``` A number of unary and binary operations exist, (which are dependent on the operand types). @@ -782,9 +768,8 @@ The `RValue::Repeat` creates and array of (statically) fixed length by repeating ```k syntax Evaluation ::= #mkArray ( Evaluation , Int ) [strict(1)] - rule rvalueRepeat(ELEM, tyConst(KIND, _)) => #mkArray(ELEM, readTyConstInt(KIND, TYPES)) ... - TYPES - requires isInt(readTyConstInt(KIND, TYPES)) + rule rvalueRepeat(ELEM, tyConst(KIND, _)) => #mkArray(ELEM, readTyConstInt(KIND)) ... + requires isInt(readTyConstInt(KIND)) [preserves-definedness] rule #mkArray(ELEMENT:Value, N) => Range(makeList(N, ELEMENT)) ... @@ -802,7 +787,6 @@ The `RValue::Repeat` creates and array of (statically) fixed length by repeating Integer(size(LIST), 64, false) // returns usize ... - ``` ### Aggregates @@ -891,9 +875,8 @@ The `getTyOf` helper applies the projections from the `Place` to determine the ` ```k rule rvalueDiscriminant(place(local(I), PROJS) #as PLACE) - => #discriminant(operandCopy(PLACE), getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP)) ... + => #discriminant(operandCopy(PLACE), getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS)) ... LOCALS - TYPEMAP requires 0 <=Int I andBool I #discriminant(Aggregate(IDX, _), TY:Ty) - => Integer(#lookupDiscriminant({TYPEMAP[TY]}:>TypeInfo, IDX), 128, false) // parameters for stored u128 + => Integer(#lookupDiscriminant(lookupTy(TY), IDX), 128, false) // parameters for stored u128 ... - TYPEMAP - requires TY in_keys(TYPEMAP) - andBool isTypeInfo(TYPEMAP[TY]) - [preserves-definedness] // valid map lookup and sort coercion syntax Int ::= #lookupDiscriminant ( TypeInfo , VariantIdx ) [function, total] | #lookupDiscrAux ( Discriminants , Int ) [function] @@ -956,11 +935,10 @@ This eliminates any `Deref` projections from the place, and also resolves `Index rule rvalueRef(_REGION, KIND, place(local(I), PROJS)) => #traverseProjection(toLocal(I), getValue(LOCALS, I), PROJS, .Contexts) - ~> #forRef(#mutabilityOf(KIND), #metadata(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP)) + ~> #forRef(#mutabilityOf(KIND), #metadata(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS)) ... LOCALS - TYPEMAP requires 0 <=Int I andBool I rvalueAddressOf(MUT, place(local(I), PROJS)) => #traverseProjection(toLocal(I), getValue(LOCALS, I), PROJS, .Contexts) - ~> #forPtr(MUT, #metadata(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP)) + ~> #forPtr(MUT, #metadata(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS)) // we should use #alignOf to emulate the address ... LOCALS - TYPEMAP requires 0 <=Int I andBool I #cast(Integer(VAL, WIDTH, _SIGNEDNESS), castKindIntToInt, _, TY) => - #intAsType(VAL, WIDTH, #numTypeOf({TYPEMAP[TY]}:>TypeInfo)) + #intAsType(VAL, WIDTH, #numTypeOf(lookupTy(TY))) ... - TYPEMAP - requires #isIntType({TYPEMAP[TY]}:>TypeInfo) + requires #isIntType(lookupTy(TY)) [preserves-definedness] // ensures #numTypeOf is defined ``` @@ -1101,21 +1077,19 @@ Boolean values can also be cast to Integers (encoding `true` as `1`). ```k rule #cast(BoolVal(VAL), castKindIntToInt, _, TY) => - #intAsType(1, 8, #numTypeOf({TYPEMAP[TY]}:>TypeInfo)) + #intAsType(1, 8, #numTypeOf(lookupTy(TY))) ... - TYPEMAP - requires #isIntType({TYPEMAP[TY]}:>TypeInfo) + requires #isIntType(lookupTy(TY)) andBool VAL [preserves-definedness] // ensures #numTypeOf is defined rule #cast(BoolVal(VAL), castKindIntToInt, _, TY) => - #intAsType(0, 8, #numTypeOf({TYPEMAP[TY]}:>TypeInfo)) + #intAsType(0, 8, #numTypeOf(lookupTy(TY))) ... - TYPEMAP - requires #isIntType({TYPEMAP[TY]}:>TypeInfo) + requires #isIntType(lookupTy(TY)) andBool notBool VAL [preserves-definedness] // ensures #numTypeOf is defined ``` @@ -1139,27 +1113,22 @@ which have the same representation `Value::Range`. ```k rule #cast(PtrLocal(OFFSET, PLACE, MUT, EMUL), castKindPtrToPtr, TY_SOURCE, TY_TARGET) => - PtrLocal(OFFSET, PLACE, MUT, #convertPtrEmul(EMUL, {TYPEMAP[TY_TARGET]}:>TypeInfo, TYPEMAP)) + PtrLocal(OFFSET, PLACE, MUT, #convertPtrEmul(EMUL, lookupTy(TY_TARGET))) ... - TYPEMAP - requires TY_SOURCE in_keys(TYPEMAP) - andBool TY_TARGET in_keys(TYPEMAP) - andBool isTypeInfo(TYPEMAP[TY_SOURCE]) - andBool isTypeInfo(TYPEMAP[TY_TARGET]) - andBool #typesCompatible({TYPEMAP[TY_SOURCE]}:>TypeInfo, {TYPEMAP[TY_TARGET]}:>TypeInfo, TYPEMAP) + requires #typesCompatible(lookupTy(TY_SOURCE), lookupTy(TY_TARGET)) [preserves-definedness] // valid map lookups checked - syntax PtrEmulation ::= #convertPtrEmul ( PtrEmulation , TypeInfo , Map ) [function, total] + syntax PtrEmulation ::= #convertPtrEmul ( PtrEmulation , TypeInfo ) [function, total] // ---------------------------------------------------------------------------------- ``` Pointers to slices can be converted to pointers to single elements, _losing_ their metadata. ```k - rule #convertPtrEmul( ptrEmulation(_) , typeInfoRefType(POINTEE_TY), TYPEMAP) => ptrEmulation(noMetadata) - requires #metadata(POINTEE_TY, TYPEMAP) ==K noMetadata [priority(60)] - rule #convertPtrEmul( ptrEmulation(_) , typeInfoPtrType(POINTEE_TY), TYPEMAP) => ptrEmulation(noMetadata) - requires #metadata(POINTEE_TY, TYPEMAP) ==K noMetadata [priority(60)] + rule #convertPtrEmul( ptrEmulation(_) , typeInfoRefType(POINTEE_TY)) => ptrEmulation(noMetadata) + requires #metadata(POINTEE_TY) ==K noMetadata [priority(60)] + rule #convertPtrEmul( ptrEmulation(_) , typeInfoPtrType(POINTEE_TY)) => ptrEmulation(noMetadata) + requires #metadata(POINTEE_TY) ==K noMetadata [priority(60)] ``` Conversely, when casting a pointer to an element to a pointer to a slice or array, @@ -1169,17 +1138,17 @@ the original allocation size must be checked to be sufficient. ```k // no metadata to begin with, fill it in from target type (NB dynamicSize(1) if dynamic) - rule #convertPtrEmul( ptrEmulation(noMetadata) , typeInfoRefType(POINTEE_TY), TYPEMAP) => ptrEmulation(#metadata(POINTEE_TY, TYPEMAP)) - rule #convertPtrEmul( ptrEmulation(noMetadata) , typeInfoPtrType(POINTEE_TY), TYPEMAP) => ptrEmulation(#metadata(POINTEE_TY, TYPEMAP)) + rule #convertPtrEmul( ptrEmulation(noMetadata) , typeInfoRefType(POINTEE_TY)) => ptrEmulation(#metadata(POINTEE_TY)) + rule #convertPtrEmul( ptrEmulation(noMetadata) , typeInfoPtrType(POINTEE_TY)) => ptrEmulation(#metadata(POINTEE_TY)) ``` Conversion from an array to a slice pointer requires adding metadata (`dynamicSize`) with the previously-static length. ```k // convert static length to dynamic length - rule #convertPtrEmul(ptrEmulation(staticSize(SIZE)), typeInfoRefType(POINTEE_TY), TYPEMAP) => ptrEmulation(dynamicSize(SIZE)) - requires #metadata(POINTEE_TY, TYPEMAP) ==K dynamicSize(1) - rule #convertPtrEmul(ptrEmulation(staticSize(SIZE)), typeInfoPtrType(POINTEE_TY), TYPEMAP) => ptrEmulation(dynamicSize(SIZE)) - requires #metadata(POINTEE_TY, TYPEMAP) ==K dynamicSize(1) + rule #convertPtrEmul(ptrEmulation(staticSize(SIZE)), typeInfoRefType(POINTEE_TY)) => ptrEmulation(dynamicSize(SIZE)) + requires #metadata(POINTEE_TY) ==K dynamicSize(1) + rule #convertPtrEmul(ptrEmulation(staticSize(SIZE)), typeInfoPtrType(POINTEE_TY)) => ptrEmulation(dynamicSize(SIZE)) + requires #metadata(POINTEE_TY) ==K dynamicSize(1) ``` Conversion from a slice to an array pointer, or between different static length array pointers, is allowed in all cases. @@ -1188,29 +1157,29 @@ It may however be illegal to _dereference_ (i.e., access) the created pointer, d **TODO** we can mark cases of insufficient original length as "InvalidCast" in the future, similar to the above future work. ```k - rule #convertPtrEmul(ptrEmulation(staticSize(_)), typeInfoRefType(POINTEE_TY), TYPEMAP ) => ptrEmulation(#metadata(POINTEE_TY, TYPEMAP)) - requires #metadata(POINTEE_TY, TYPEMAP) =/=K dynamicSize(1) - rule #convertPtrEmul(ptrEmulation(staticSize(_)), typeInfoPtrType(POINTEE_TY), TYPEMAP ) => ptrEmulation(#metadata(POINTEE_TY, TYPEMAP)) - requires #metadata(POINTEE_TY, TYPEMAP) =/=K dynamicSize(1) - - rule #convertPtrEmul(ptrEmulation(dynamicSize(_)), typeInfoRefType(POINTEE_TY), TYPEMAP ) => ptrEmulation(#metadata(POINTEE_TY, TYPEMAP)) - requires #metadata(POINTEE_TY, TYPEMAP) =/=K dynamicSize(1) - rule #convertPtrEmul(ptrEmulation(dynamicSize(_)), typeInfoPtrType(POINTEE_TY), TYPEMAP ) => ptrEmulation(#metadata(POINTEE_TY, TYPEMAP)) - requires #metadata(POINTEE_TY, TYPEMAP) =/=K dynamicSize(1) + rule #convertPtrEmul(ptrEmulation(staticSize(_)), typeInfoRefType(POINTEE_TY)) => ptrEmulation(#metadata(POINTEE_TY)) + requires #metadata(POINTEE_TY) =/=K dynamicSize(1) + rule #convertPtrEmul(ptrEmulation(staticSize(_)), typeInfoPtrType(POINTEE_TY)) => ptrEmulation(#metadata(POINTEE_TY)) + requires #metadata(POINTEE_TY) =/=K dynamicSize(1) + + rule #convertPtrEmul(ptrEmulation(dynamicSize(_)), typeInfoRefType(POINTEE_TY)) => ptrEmulation(#metadata(POINTEE_TY)) + requires #metadata(POINTEE_TY) =/=K dynamicSize(1) + rule #convertPtrEmul(ptrEmulation(dynamicSize(_)), typeInfoPtrType(POINTEE_TY)) => ptrEmulation(#metadata(POINTEE_TY)) + requires #metadata(POINTEE_TY) =/=K dynamicSize(1) ``` For a cast bwetween two pointer types with `dynamicSize` metadata (unlikely to occur), the dynamic size value is retained. ```k - rule #convertPtrEmul(ptrEmulation(dynamicSize(SIZE)), typeInfoRefType(POINTEE_TY), TYPEMAP) => ptrEmulation(dynamicSize(SIZE)) - requires #metadata(POINTEE_TY, TYPEMAP) ==K dynamicSize(1) - rule #convertPtrEmul(ptrEmulation(dynamicSize(SIZE)), typeInfoPtrType(POINTEE_TY), TYPEMAP) => ptrEmulation(dynamicSize(SIZE)) - requires #metadata(POINTEE_TY, TYPEMAP) ==K dynamicSize(1) + rule #convertPtrEmul(ptrEmulation(dynamicSize(SIZE)), typeInfoRefType(POINTEE_TY)) => ptrEmulation(dynamicSize(SIZE)) + requires #metadata(POINTEE_TY) ==K dynamicSize(1) + rule #convertPtrEmul(ptrEmulation(dynamicSize(SIZE)), typeInfoPtrType(POINTEE_TY)) => ptrEmulation(dynamicSize(SIZE)) + requires #metadata(POINTEE_TY) ==K dynamicSize(1) ``` ```k // non-pointer and non-ref target type (should not happen!) - rule #convertPtrEmul( _ , _OTHER_INFO , _ ) => ptrEmulation(noMetadata) [priority(100)] + rule #convertPtrEmul( _ , _OTHER_INFO ) => ptrEmulation(noMetadata) [priority(100)] ``` `PointerCoercion` may achieve a simmilar effect, or deal with function and closure pointers, depending on the coercion type: @@ -1260,25 +1229,13 @@ What can be supported without additional layout consideration is trivial casts b ```k rule #cast(Reference(_, _, _, _) #as REF, castKindTransmute, TY_SOURCE, TY_TARGET) => REF ... - TYPEMAP - requires TY_SOURCE in_keys(TYPEMAP) - andBool TY_TARGET in_keys(TYPEMAP) - andBool TYPEMAP[TY_SOURCE] ==K TYPEMAP[TY_TARGET] - [preserves-definedness] // valid map lookups checked + requires lookupTy(TY_SOURCE) ==K lookupTy(TY_TARGET) rule #cast(AllocRef(_, _, _) #as REF, castKindTransmute, TY_SOURCE, TY_TARGET) => REF ... - TYPEMAP - requires TY_SOURCE in_keys(TYPEMAP) - andBool TY_TARGET in_keys(TYPEMAP) - andBool TYPEMAP[TY_SOURCE] ==K TYPEMAP[TY_TARGET] - [preserves-definedness] // valid map lookups checked + requires lookupTy(TY_SOURCE) ==K lookupTy(TY_TARGET) rule #cast(PtrLocal(_, _, _, _) #as PTR, castKindTransmute, TY_SOURCE, TY_TARGET) => PTR ... - TYPEMAP - requires TY_SOURCE in_keys(TYPEMAP) - andBool TY_TARGET in_keys(TYPEMAP) - andBool TYPEMAP[TY_SOURCE] ==K TYPEMAP[TY_TARGET] - [preserves-definedness] // valid map lookups checked + requires lookupTy(TY_SOURCE) ==K lookupTy(TY_TARGET) ``` ### Other casts involving pointers @@ -1306,10 +1263,9 @@ For allocated constants without provenance, the decoder works directly with the _TY, TYPEINFO ) - => #decodeValue(BYTES, TYPEINFO, TYPEMAP) + => #decodeValue(BYTES, TYPEINFO) ... - TYPEMAP ``` Zero-sized types can be decoded trivially into their respective representation. @@ -1340,12 +1296,10 @@ into the `` heap where all allocated constants have been decoded at prog _TY, typeInfoRefType(POINTEE_TY) ) - => AllocRef(ALLOC_ID, .ProjectionElems, #metadata(POINTEE_TY, TYPEMAP)) + => AllocRef(ALLOC_ID, .ProjectionElems, #metadata(POINTEE_TY)) ... - ALLOCMAP - TYPEMAP - requires ALLOC_ID in_keys(ALLOCMAP) + requires isValue(lookupAlloc(ALLOC_ID)) andBool lengthBytes(BYTES) ==Int 8 // no dynamic metadata rule #decodeConstant( @@ -1362,9 +1316,8 @@ into the `` heap where all allocated constants have been decoded at prog // assumes usize == u64 ... - ALLOCMAP - requires ALLOC_ID in_keys(ALLOCMAP) - andBool lengthBytes(BYTES) ==Int 16 // fat pointer (assumes usize == u64) + requires isValue(lookupAlloc(ALLOC_ID)) + andBool lengthBytes(BYTES) ==Int 16 // fat pointer (assumes usize == u64) [preserves-definedness] // Byte length checked to be sufficient ``` @@ -1741,12 +1694,10 @@ Since our arithmetic operations signal undefined behaviour on overflow independe // FIXME: 64 is hardcoded since usize not supported rule rvalueNullaryOp(nullOpAlignOf, TY) => - Integer(#alignOf({TYPEMAP[TY]}:>TypeInfo), 64, false) + Integer(#alignOf(lookupTy(TY)), 64, false) ... - TYPEMAP - requires TY in_keys(TYPEMAP) - andBool isTypeInfo(TYPEMAP[TY]) + requires lookupTy(TY) =/=K typeInfoVoidType ``` #### Other operations diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md index 62960e83b..a37b2c72c 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/decoding.md @@ -35,20 +35,20 @@ and arrays (where layout is trivial). ### Decoding `PrimitiveType`s ```k - syntax Evaluation ::= #decodeValue ( Bytes , TypeInfo , Map ) [function, total, symbol(decodeValue)] + syntax Evaluation ::= #decodeValue ( Bytes , TypeInfo ) [function, total, symbol(decodeValue)] | UnableToDecode ( Bytes , TypeInfo ) [symbol(Evaluation::UnableToDecode)] | UnableToDecodePy ( msg: String ) [symbol(Evaluation::UnableToDecodePy)] // Boolean: should be one byte with value one or zero - rule #decodeValue(BYTES, typeInfoPrimitiveType(primTypeBool), _TYPEMAP) => BoolVal(false) + rule #decodeValue(BYTES, typeInfoPrimitiveType(primTypeBool)) => BoolVal(false) requires 0 ==Int Bytes2Int(BYTES, LE, Unsigned) andBool lengthBytes(BYTES) ==Int 1 - rule #decodeValue(BYTES, typeInfoPrimitiveType(primTypeBool), _TYPEMAP) => BoolVal(true) + rule #decodeValue(BYTES, typeInfoPrimitiveType(primTypeBool)) => BoolVal(true) requires 1 ==Int Bytes2Int(BYTES, LE, Unsigned) andBool lengthBytes(BYTES) ==Int 1 // Integer: handled in separate module for numeric operation_s - rule #decodeValue(BYTES, TYPEINFO, TYPEMAP) => #decodeInteger(BYTES, #intTypeOf(TYPEINFO)) - requires #isIntType(TYPEINFO) andBool lengthBytes(BYTES) ==Int #elemSize(TYPEINFO, TYPEMAP) + rule #decodeValue(BYTES, TYPEINFO) => #decodeInteger(BYTES, #intTypeOf(TYPEINFO)) + requires #isIntType(TYPEINFO) andBool lengthBytes(BYTES) ==Int #elemSize(TYPEINFO) [preserves-definedness] // TODO Char type @@ -63,17 +63,13 @@ and arrays (where layout is trivial). Arrays are decoded iteratively, using a known (expected) length or the length of the byte array. ```k -rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, someTyConst(tyConst(LEN, _))), TYPEMAP) - => #decodeArrayAllocation(BYTES, {TYPEMAP[ELEMTY]}:>TypeInfo, readTyConstInt(LEN, TYPEMAP), TYPEMAP) - requires ELEMTY in_keys(TYPEMAP) - andBool isTypeInfo(TYPEMAP[ELEMTY]) - andBool isInt(readTyConstInt(LEN, TYPEMAP)) +rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, someTyConst(tyConst(LEN, _)))) + => #decodeArrayAllocation(BYTES, lookupTy(ELEMTY), readTyConstInt(LEN)) + requires isInt(readTyConstInt(LEN)) [preserves-definedness] -rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, noTyConst), TYPEMAP) - => #decodeSliceAllocation(BYTES, {TYPEMAP[ELEMTY]}:>TypeInfo, TYPEMAP) - requires ELEMTY in_keys(TYPEMAP) - andBool isTypeInfo(TYPEMAP[ELEMTY]) +rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, noTyConst)) + => #decodeSliceAllocation(BYTES, lookupTy(ELEMTY)) ``` ### Error marker (becomes thunk) for other (unimplemented) cases @@ -81,43 +77,42 @@ rule #decodeValue(BYTES, typeInfoArrayType(ELEMTY, noTyConst), TYPEMAP) All unimplemented cases will become thunks by way of this default rule: ```k - rule #decodeValue(BYTES, TYPEINFO, _TYPEMAP) => UnableToDecode(BYTES, TYPEINFO) [owise] + rule #decodeValue(BYTES, TYPEINFO) => UnableToDecode(BYTES, TYPEINFO) [owise] ``` ## Helper function to determine the expected byte length for a type ```k // TODO: this function should go into the rt/types.md module - syntax Int ::= #elemSize ( TypeInfo , Map ) [function] + syntax Int ::= #elemSize ( TypeInfo ) [function] ``` Known element sizes for common types: ```k - rule #elemSize(typeInfoPrimitiveType(primTypeBool), _) => 1 - rule #elemSize(TYPEINFO, _) => #bitWidth(#intTypeOf(TYPEINFO)) /Int 8 + rule #elemSize(typeInfoPrimitiveType(primTypeBool)) => 1 + rule #elemSize(TYPEINFO) => #bitWidth(#intTypeOf(TYPEINFO)) /Int 8 requires #isIntType(TYPEINFO) - rule #elemSize(typeInfoArrayType(ELEM_TY, someTyConst(tyConst(LEN, _))), TYPEMAP) - => #elemSize({TYPEMAP[ELEM_TY]}:>TypeInfo, TYPEMAP) *Int readTyConstInt(LEN, TYPEMAP) - requires ELEM_TY in_keys(TYPEMAP) + rule #elemSize(typeInfoArrayType(ELEM_TY, someTyConst(tyConst(LEN, _)))) + => #elemSize(lookupTy(ELEM_TY)) *Int readTyConstInt(LEN) // thin and fat pointers - rule #elemSize(typeInfoRefType(TY), TYPEMAP) => #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize)), .Map) - requires dynamicSize(1) ==K #metadata(TY, TYPEMAP) - rule #elemSize(typeInfoRefType(_), _TYPEMAP) => 2 *Int #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize)), .Map) + rule #elemSize(typeInfoRefType(TY)) => #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize))) + requires dynamicSize(1) ==K #metadata(TY) + rule #elemSize(typeInfoRefType(_)) => 2 *Int #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize))) [owise] - rule #elemSize(typeInfoPtrType(TY), TYPEMAP) => #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize)), .Map) - requires dynamicSize(1) ==K #metadata(TY, TYPEMAP) - rule #elemSize(typeInfoPtrType(_), _TYPEMAP) => 2 *Int #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize)), .Map) + rule #elemSize(typeInfoPtrType(TY)) => #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize))) + requires dynamicSize(1) ==K #metadata(TY) + rule #elemSize(typeInfoPtrType(_)) => 2 *Int #elemSize(typeInfoPrimitiveType(primTypeUint(uintTyUsize))) [owise] - rule #elemSize(typeInfoVoidType, _) => 0 + rule #elemSize(typeInfoVoidType) => 0 // FIXME can only use size from layout here. Requires adding layout first. // Enum, Struct, Tuple, - rule 0 <=Int #elemSize(_, _) => true [simplification, preserves-definedness] + rule 0 <=Int #elemSize(_) => true [simplification, preserves-definedness] ``` @@ -135,7 +130,6 @@ Enum decoding is for now restricted to enums wihout any fields. , fields: FIELD_TYPESS , layout: _LAYOUT ) - , _TYPES ) => Aggregate(#findVariantIdx(Bytes2Int(BYTES, LE, Unsigned), DISCRIMINANTS), .List) requires #noFields(FIELD_TYPESS) @@ -226,35 +220,33 @@ bytes for the declared array length, the function will get stuck rather than pro results. ```k - syntax Value ::= #decodeArrayAllocation ( Bytes, TypeInfo, Int , Map ) [function] + syntax Value ::= #decodeArrayAllocation ( Bytes, TypeInfo, Int ) [function] // bytes, element type info, array length, type map (for recursion) - rule #decodeArrayAllocation(BYTES, ELEMTYPEINFO, LEN, TYPEMAP) - => Range(#decodeArrayElements(BYTES, ELEMTYPEINFO, LEN, TYPEMAP, .List)) + rule #decodeArrayAllocation(BYTES, ELEMTYPEINFO, LEN) + => Range(#decodeArrayElements(BYTES, ELEMTYPEINFO, LEN, .List)) - syntax List ::= #decodeArrayElements ( Bytes, TypeInfo, Int, Map, List ) [function] + syntax List ::= #decodeArrayElements ( Bytes, TypeInfo, Int, List ) [function] // bytes, elem type info, remaining length, accumulated list - rule #decodeArrayElements(BYTES, _ELEMTYPEINFO, LEN, _TYPEMAP, ACC) + rule #decodeArrayElements(BYTES, _ELEMTYPEINFO, LEN, ACC) => ACC requires LEN <=Int 0 andBool lengthBytes(BYTES) ==Int 0 // exact match - no surplus bytes [preserves-definedness] - rule #decodeArrayElements(BYTES, ELEMTYPEINFO, LEN, TYPEMAP, ACC) + rule #decodeArrayElements(BYTES, ELEMTYPEINFO, LEN, ACC) => #decodeArrayElements( - substrBytes(BYTES, #elemSize(ELEMTYPEINFO, TYPEMAP), lengthBytes(BYTES)), + substrBytes(BYTES, #elemSize(ELEMTYPEINFO), lengthBytes(BYTES)), ELEMTYPEINFO, LEN -Int 1, - TYPEMAP, ACC ListItem(#decodeValue( - substrBytes(BYTES, 0, #elemSize(ELEMTYPEINFO, TYPEMAP)), - ELEMTYPEINFO, - TYPEMAP + substrBytes(BYTES, 0, #elemSize(ELEMTYPEINFO)), + ELEMTYPEINFO )) ) requires LEN >Int 0 - andBool lengthBytes(BYTES) >=Int #elemSize(ELEMTYPEINFO, TYPEMAP) // enough bytes remaining + andBool lengthBytes(BYTES) >=Int #elemSize(ELEMTYPEINFO) // enough bytes remaining [preserves-definedness] ``` @@ -265,19 +257,18 @@ The `#decodeSliceAllocation` function computes the array length by dividing the by the element size, then uses the same element-by-element decoding approach as arrays. ```k - syntax Value ::= #decodeSliceAllocation ( Bytes, TypeInfo , Map ) [function] + syntax Value ::= #decodeSliceAllocation ( Bytes, TypeInfo ) [function] // ------------------------------------------------------------------- - rule #decodeSliceAllocation(BYTES, ELEMTYPEINFO, TYPEMAP) + rule #decodeSliceAllocation(BYTES, ELEMTYPEINFO) => Range(#decodeArrayElements( BYTES, ELEMTYPEINFO, - lengthBytes(BYTES) /Int #elemSize(ELEMTYPEINFO, TYPEMAP), - TYPEMAP, + lengthBytes(BYTES) /Int #elemSize(ELEMTYPEINFO), .List ) ) - requires lengthBytes(BYTES) %Int #elemSize(ELEMTYPEINFO, TYPEMAP) ==Int 0 // element size divides cleanly - andBool 0 true [priority(60)] - rule #typesCompatible ( _ , _ , _ ) => false [owise] + rule #typesCompatible ( T , T ) => true [priority(60)] + rule #typesCompatible ( _ , _ ) => false [owise] ``` Arrays and slices are compatible if their element type is (ignoring length) ```k - rule #typesCompatible ( typeInfoArrayType(TY1, _), typeInfoArrayType(TY2, _), TYPEMAP) => #typesCompatible({TYPEMAP[TY1]}:>TypeInfo, {TYPEMAP[TY2]}:>TypeInfo, TYPEMAP) - requires isTypeInfo(TYPEMAP[TY1]) - andBool isTypeInfo(TYPEMAP[TY2]) + rule #typesCompatible ( typeInfoArrayType(TY1, _), typeInfoArrayType(TY2, _)) => #typesCompatible(lookupTy(TY1), lookupTy(TY2)) ``` Pointers are compatible if their pointee types are ```k - rule #typesCompatible ( typeInfoPtrType(TY1) , typeInfoPtrType(TY2) , TYPEMAP) => true - requires isTypeInfo(TYPEMAP[TY1]) - andBool isTypeInfo(TYPEMAP[TY2]) - andBool #typesCompatible({TYPEMAP[TY1]}:>TypeInfo, {TYPEMAP[TY2]}:>TypeInfo, TYPEMAP) + rule #typesCompatible ( typeInfoPtrType(TY1) , typeInfoPtrType(TY2) ) => true + requires #typesCompatible(lookupTy(TY1), lookupTy(TY2)) [priority(59)] ``` Pointers to arrays/slices are compatible with pointers to the element type ```k - rule #typesCompatible ( typeInfoPtrType(TY1) , typeInfoPtrType(TY2) , TYPEMAP) => true - requires isTypeInfo(TYPEMAP[TY1]) - andBool #isArrayOf({TYPEMAP[TY1]}:>TypeInfo, TY2) + rule #typesCompatible ( typeInfoPtrType(TY1) , typeInfoPtrType(TY2) ) => true + requires #isArrayOf(lookupTy(TY1), TY2) - rule #typesCompatible ( typeInfoPtrType(TY1) , typeInfoPtrType(TY2) , TYPEMAP) => true - requires isTypeInfo(TYPEMAP[TY2]) - andBool #isArrayOf({TYPEMAP[TY2]}:>TypeInfo, TY1) + rule #typesCompatible ( typeInfoPtrType(TY1) , typeInfoPtrType(TY2) ) => true + requires #isArrayOf(lookupTy(TY2), TY1) syntax Bool ::= #isArrayOf ( TypeInfo , Ty ) [function, total] @@ -76,28 +70,25 @@ To make this function total, an optional `MaybeTy` is used. syntax MaybeTy ::= Ty | "TyUnknown" - syntax MaybeTy ::= getTyOf( MaybeTy , ProjectionElems , Map ) [function, total] + syntax MaybeTy ::= getTyOf( MaybeTy , ProjectionElems ) [function, total] // ----------------------------------------------------------- - rule getTyOf(TyUnknown, _ , _ ) => TyUnknown - rule getTyOf(TY, .ProjectionElems , _ ) => TY + rule getTyOf(TyUnknown, _ ) => TyUnknown + rule getTyOf(TY, .ProjectionElems ) => TY - rule getTyOf(TY, projectionElemDeref PROJS, TYPEMAP ) => getTyOf(pointeeTy({TYPEMAP[TY]}:>TypeInfo), PROJS, TYPEMAP) - requires TY in_keys(TYPEMAP) andBool isTypeInfo(TYPEMAP[TY]) - rule getTyOf( _, projectionElemField(_, TY) PROJS, TYPEMAP ) => getTyOf(TY, PROJS, TYPEMAP) // could also look it up + rule getTyOf(TY, projectionElemDeref PROJS ) => getTyOf(pointeeTy(lookupTy(TY)), PROJS) + rule getTyOf( _, projectionElemField(_, TY) PROJS ) => getTyOf(TY, PROJS) // could also look it up - rule getTyOf(TY, projectionElemIndex(_) PROJS, TYPEMAP ) => getTyOf(elemTy({TYPEMAP[TY]}:>TypeInfo), PROJS, TYPEMAP) - requires TY in_keys(TYPEMAP) andBool isTypeInfo(TYPEMAP[TY]) - rule getTyOf(TY, projectionElemConstantIndex(_, _, _) PROJS, TYPEMAP ) => getTyOf(elemTy({TYPEMAP[TY]}:>TypeInfo), PROJS, TYPEMAP) - requires TY in_keys(TYPEMAP) andBool isTypeInfo(TYPEMAP[TY]) - rule getTyOf(TY, projectionElemSubslice(_, _, _) PROJS, TYPEMAP ) => getTyOf(TY, PROJS, TYPEMAP) // TODO assumes TY is already a slice type + rule getTyOf(TY, projectionElemIndex(_) PROJS) => getTyOf(elemTy(lookupTy(TY)), PROJS) + rule getTyOf(TY, projectionElemConstantIndex(_, _, _) PROJS) => getTyOf(elemTy(lookupTy(TY)), PROJS) + rule getTyOf(TY, projectionElemSubslice(_, _, _) PROJS) => getTyOf(TY, PROJS) // TODO assumes TY is already a slice type - rule getTyOf(TY, projectionElemDowncast(_) PROJS, TYPEMAP ) => getTyOf(TY, PROJS, TYPEMAP) // unchanged type, just setting variantIdx + rule getTyOf(TY, projectionElemDowncast(_) PROJS) => getTyOf(TY, PROJS) // unchanged type, just setting variantIdx - rule getTyOf( _, projectionElemOpaqueCast(TY) PROJS, TYPEMAP ) => getTyOf(TY, PROJS, TYPEMAP) + rule getTyOf( _, projectionElemOpaqueCast(TY) PROJS) => getTyOf(TY, PROJS) - rule getTyOf( _, projectionElemSubtype(TY) PROJS, TYPEMAP ) => getTyOf(TY, PROJS, TYPEMAP) + rule getTyOf( _, projectionElemSubtype(TY) PROJS) => getTyOf(TY, PROJS) // ----------------------------------------------------------- - rule getTyOf(_, _, _) => TyUnknown [owise] + rule getTyOf(_, _) => TyUnknown [owise] syntax MaybeTy ::= pointeeTy ( TypeInfo ) [function, total] @@ -122,34 +113,33 @@ A [similar function exists in `rustc`](https://doc.rust-lang.org/nightly/nightly Slices, `str`s and dynamic types require it, and any `Ty` that `is_sized` does not. ```k - syntax Metadata ::= #metadata ( Ty , ProjectionElems , Map ) [function, total] - | #metadata ( MaybeTy , Map ) [function, total] - | #metadataAux ( TypeInfo , Map ) [function, total] + syntax Metadata ::= #metadata ( Ty , ProjectionElems ) [function, total] + | #metadata ( MaybeTy ) [function, total] + | #metadataAux ( TypeInfo ) [function, total] // ------------------------------------------------------------ - rule #metadata(TY, PROJS, TYPEMAP) => #metadata(getTyOf(TY, PROJS, TYPEMAP), TYPEMAP) + rule #metadata(TY, PROJS) => #metadata(getTyOf(TY, PROJS)) - rule #metadata(TY, TYPEMAP) => #metadataAux({TYPEMAP[TY]}:>TypeInfo, TYPEMAP) - requires TY in_keys(TYPEMAP) andBool isTypeInfo(TYPEMAP[TY]) [preserves-definedness] // valid map key and sort coercion - rule #metadata( _, _) => noMetadata [owise, preserves-definedness] // if the type is not known, assume no metadata is required + rule #metadata(TyUnknown) => noMetadata + rule #metadata(TY) => #metadataAux(lookupTy(TY)) - rule #metadataAux(typeInfoArrayType(_, noTyConst ), _ ) => dynamicSize(1) - rule #metadataAux(typeInfoArrayType(_, someTyConst(tyConst(CONST, _))), TYPEMAP) => staticSize(readTyConstInt(CONST, TYPEMAP)) - rule #metadataAux( _OTHER , _ ) => noMetadata [owise] + rule #metadataAux(typeInfoArrayType(_, noTyConst )) => dynamicSize(1) + rule #metadataAux(typeInfoArrayType(_, someTyConst(tyConst(CONST, _)))) => staticSize(readTyConstInt(CONST)) + rule #metadataAux( _OTHER ) => noMetadata [owise] ``` ```k // reading Int-valued TyConsts from allocated bytes - syntax Int ::= readTyConstInt ( TyConstKind , Map ) [function] + syntax Int ::= readTyConstInt ( TyConstKind ) [function] // ----------------------------------------------------------- - rule readTyConstInt( tyConstKindValue(TY, allocation(BYTES, _, _, _)), TYPEMAP) => Bytes2Int(BYTES, LE, Unsigned) - requires isUintTy(#numTypeOf({TYPEMAP[TY]}:>TypeInfo)) - andBool lengthBytes(BYTES) ==Int #bitWidth(#numTypeOf({TYPEMAP[TY]}:>TypeInfo)) /Int 8 + rule readTyConstInt( tyConstKindValue(TY, allocation(BYTES, _, _, _))) => Bytes2Int(BYTES, LE, Unsigned) + requires isUintTy(#numTypeOf(lookupTy(TY))) + andBool lengthBytes(BYTES) ==Int #bitWidth(#numTypeOf(lookupTy(TY))) /Int 8 [preserves-definedness] - rule readTyConstInt( tyConstKindValue(TY, allocation(BYTES, _, _, _)), TYPEMAP) => Bytes2Int(BYTES, LE, Signed ) - requires isIntTy(#numTypeOf({TYPEMAP[TY]}:>TypeInfo)) - andBool lengthBytes(BYTES) ==Int #bitWidth(#numTypeOf({TYPEMAP[TY]}:>TypeInfo)) /Int 8 + rule readTyConstInt( tyConstKindValue(TY, allocation(BYTES, _, _, _))) => Bytes2Int(BYTES, LE, Signed ) + requires isIntTy(#numTypeOf(lookupTy(TY))) + andBool lengthBytes(BYTES) ==Int #bitWidth(#numTypeOf(lookupTy(TY))) /Int 8 [preserves-definedness] ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/value.md b/kmir/src/kmir/kdist/mir-semantics/rt/value.md index b68fb1a13..22c4e4220 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/value.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/value.md @@ -5,10 +5,14 @@ This is the base module for all data in KMIR at runtime. It defines how values a ```k requires "../ty.md" requires "../body.md" +requires "../lib.md" +requires "../mono.md" module RT-VALUE-SYNTAX imports TYPES imports BODY + imports LIB + imports MONO ``` ## Values in MIR @@ -128,6 +132,32 @@ The basic operations of reading and writing those values can use K's "heating" a ``` +# Static data + +These functions are global static data accessed from many places, and will be extended for the particular program. + +**TODO find a better home for these definitions.** + +```k + // // function store, Ty -> MonoItemFn + syntax MonoItemKind ::= lookupFunction ( Ty ) [function, total, symbol(lookupFunction)] + // ------------------------------------------------------------ + rule lookupFunction(ty(TY)) => monoItemFn(symbol("** UNKNOWN FUNCTION **"), defId(TY), noBody) [owise] // HACK + // cannot be total without a default "error" element. `Ty` is key for both functions and data. + + // // static allocations: AllocId -> AllocData (Value or error) + syntax Evaluation ::= lookupAlloc ( AllocId ) [function, total, symbol(lookupAlloc)] + // ----------------------------------------------------------- + rule lookupAlloc(ID) => InvalidAlloc(ID) [owise] + + syntax Evaluation ::= InvalidAlloc ( AllocId ) + + // // static information about the base type interning in the MIR: Ty -> TypeInfo + syntax TypeInfo ::= lookupTy ( Ty ) [function, total, symbol(lookupTy)] + // ----------------------------------------------------- + rule lookupTy(_TY) => typeInfoVoidType [owise] // HACK +``` + ```k endmodule ``` diff --git a/kmir/src/kmir/kmir.py b/kmir/src/kmir/kmir.py index 00d947cde..99529189d 100644 --- a/kmir/src/kmir/kmir.py +++ b/kmir/src/kmir/kmir.py @@ -1,15 +1,18 @@ from __future__ import annotations import logging +import shutil +import tempfile from contextlib import contextmanager from functools import cached_property +from pathlib import Path from typing import TYPE_CHECKING from pyk.cli.utils import bug_report_arg from pyk.cterm import CTerm, cterm_symbolic from pyk.kast.inner import KApply, KSequence, KSort, KToken, KVariable, Subst from pyk.kast.manip import abstract_term_safely, free_vars, split_config_from -from pyk.kast.prelude.collections import list_empty, list_of, map_of +from pyk.kast.prelude.collections import list_empty, list_of from pyk.kast.prelude.kint import intToken from pyk.kast.prelude.utils import token from pyk.kcfg import KCFG @@ -21,6 +24,7 @@ from pyk.proof.reachability import APRProof, APRProver from pyk.proof.show import APRProofNodePrinter +from .build import HASKELL_DEF_DIR, LLVM_DEF_DIR, LLVM_LIB_DIR from .cargo import cargo_get_smir_json from .kast import mk_call_terminator, symbolic_locals from .kparse import KParse @@ -29,7 +33,6 @@ if TYPE_CHECKING: from collections.abc import Iterator - from pathlib import Path from typing import Any, Final from pyk.cterm.show import CTermShow @@ -55,6 +58,132 @@ def __init__( KParse.__init__(self, definition_dir) self.llvm_library_dir = llvm_library_dir + @staticmethod + def from_kompiled_kore( + smir_info: SMIRInfo, target_dir: str, bug_report: Path | None = None, symbolic: bool = True + ) -> KMIR: + kmir = KMIR(HASKELL_DEF_DIR) + + def _insert_rules_and_write(input_file: Path, rules: list[str], output_file: Path) -> None: + with open(input_file, 'r') as f: + lines = f.readlines() + + # last line must start with 'endmodule' + last_line = lines[-1] + assert last_line.startswith('endmodule') + new_lines = lines[:-1] + + # Insert rules before the endmodule line + new_lines.append(f'\n// Generated from file {input_file}\n\n') + new_lines.extend(rules) + new_lines.append('\n' + last_line) + + # Write to output file + with open(output_file, 'w') as f: + f.writelines(new_lines) + + target_path = Path(target_dir) + # TODO if target dir exists and contains files, check file dates (definition files and interpreter) + # to decide whether or not to recompile. For now we always recompile. + target_path.mkdir(parents=True, exist_ok=True) + + rules = kmir.make_kore_rules(smir_info) + _LOGGER.info(f'Generated {len(rules)} function equations to add to `definition.kore') + + if symbolic: + # Create output directories + target_llvm_path = target_path / 'llvm-library' + target_llvmdt_path = target_llvm_path / 'dt' + target_hs_path = target_path / 'haskell' + + _LOGGER.info(f'Creating directories {target_llvmdt_path} and {target_hs_path}') + target_llvmdt_path.mkdir(parents=True, exist_ok=True) + target_hs_path.mkdir(parents=True, exist_ok=True) + + # Process LLVM definition + _LOGGER.info('Writing LLVM definition file') + llvm_def_file = LLVM_LIB_DIR / 'definition.kore' + llvm_def_output = target_llvm_path / 'definition.kore' + _insert_rules_and_write(llvm_def_file, rules, llvm_def_output) + + # Run llvm-kompile-matching and llvm-kompile for LLVM + # TODO use pyk to do this if possible (subprocess wrapper, maybe llvm-kompile itself?) + # TODO align compilation options to what we use in plugin.py + import subprocess + + _LOGGER.info('Running llvm-kompile-matching') + subprocess.run( + ['llvm-kompile-matching', str(llvm_def_output), 'qbaL', str(target_llvmdt_path), '1/2'], check=True + ) + _LOGGER.info('Running llvm-kompile') + subprocess.run( + [ + 'llvm-kompile', + str(llvm_def_output), + str(target_llvmdt_path), + 'c', + '-O2', + '--', + '-o', + target_llvm_path / 'interpreter', + ], + check=True, + ) + + # Process Haskell definition + _LOGGER.info('Writing Haskell definition file') + hs_def_file = HASKELL_DEF_DIR / 'definition.kore' + _insert_rules_and_write(hs_def_file, rules, target_hs_path / 'definition.kore') + + # Copy all files except definition.kore and binary from HASKELL_DEF_DIR to out/hs + _LOGGER.info('Copying other artefacts into HS output directory') + for file_path in HASKELL_DEF_DIR.iterdir(): + if file_path.name != 'definition.kore' and file_path.name != 'haskellDefinition.bin': + if file_path.is_file(): + shutil.copy2(file_path, target_hs_path / file_path.name) + elif file_path.is_dir(): + shutil.copytree(file_path, target_hs_path / file_path.name, dirs_exist_ok=True) + return KMIR(target_hs_path, target_llvm_path, bug_report=bug_report) + else: + + target_llvm_path = target_path / 'llvm' + target_llvmdt_path = target_llvm_path / 'dt' + _LOGGER.info(f'Creating directory {target_llvmdt_path}') + target_llvmdt_path.mkdir(parents=True, exist_ok=True) + + # Process LLVM definition + _LOGGER.info('Writing LLVM definition file') + llvm_def_file = LLVM_LIB_DIR / 'definition.kore' + llvm_def_output = target_llvm_path / 'definition.kore' + _insert_rules_and_write(llvm_def_file, rules, llvm_def_output) + + import subprocess + + _LOGGER.info('Running llvm-kompile-matching') + subprocess.run( + ['llvm-kompile-matching', str(llvm_def_output), 'qbaL', str(target_llvmdt_path), '1/2'], check=True + ) + _LOGGER.info('Running llvm-kompile') + subprocess.run( + [ + 'llvm-kompile', + str(llvm_def_output), + str(target_llvmdt_path), + 'main', + '-O2', + '--', + '-o', + target_llvm_path / 'interpreter', + ], + check=True, + ) + blacklist = ['definition.kore', 'interpreter', 'dt'] + to_copy = [file.name for file in LLVM_DEF_DIR.iterdir() if file.name not in blacklist] + for file in to_copy: + _LOGGER.info(f'Copying file {file}') + shutil.copy2(LLVM_DEF_DIR / file, target_llvm_path / file) + return KMIR(target_llvm_path, None, bug_report=bug_report) + class Symbols: END_PROGRAM: Final = KApply('#EndProgram_KMIR-CONTROL-FLOW_KItem') @@ -101,6 +230,69 @@ def functions(self, smir_info: SMIRInfo) -> dict[int, KInner]: return functions + def make_kore_rules(self, smir_info: SMIRInfo) -> list[str]: # generates kore syntax directly as string + equations = [] + + # kprint tool is too chatty + kprint_logger = logging.getLogger('pyk.ktool.kprint') + kprint_logger.setLevel(logging.WARNING) + + for fty, kind in self.functions(smir_info).items(): + equations.append( + self._mk_equation('lookupFunction', KApply('ty', (token(fty),)), 'Ty', kind, 'MonoItemKind') + ) + + types: set[KInner] = set() + for type in smir_info._smir['types']: + parse_result = self.parser.parse_mir_json(type, 'TypeMapping') + assert parse_result is not None + type_mapping, _ = parse_result + assert isinstance(type_mapping, KApply) and len(type_mapping.args) == 2 + ty, tyinfo = type_mapping.args + if ty in types: + raise ValueError(f'Key collision in type map: {ty}') + types.add(ty) + equations.append(self._mk_equation('lookupTy', ty, 'Ty', tyinfo, 'TypeInfo')) + + for alloc in smir_info._smir['allocs']: + alloc_id, value = self._decode_alloc(smir_info=smir_info, raw_alloc=alloc) + equations.append(self._mk_equation('lookupAlloc', alloc_id, 'AllocId', value, 'Evaluation')) + + return equations + + def _mk_equation(self, fun: str, arg: KInner, arg_sort: str, result: KInner, result_sort: str) -> str: + from pyk.kore.rule import FunctionRule + from pyk.kore.syntax import App, SortApp + + arg_kore = self.kast_to_kore(arg, KSort(arg_sort)) + fun_app = App('Lbl' + fun, (), (arg_kore,)) + result_kore = self.kast_to_kore(result, KSort(result_sort)) + + assert isinstance(fun_app, App) + rule = FunctionRule( + lhs=fun_app, + rhs=result_kore, + req=None, + ens=None, + sort=SortApp('Sort' + result_sort), + arg_sorts=(SortApp('Sort' + arg_sort),), + anti_left=None, + priority=50, + uid='fubar', + label='fubaz', + ) + return '\n'.join( + [ + '', + '', + ( + f'// {fun}({self.pretty_print(arg)})' + + (f' => {self.pretty_print(result)}' if len(self.pretty_print(result)) < 1000 else '') + ), + rule.to_axiom().text, + ] + ) + def make_call_config( self, smir_info: SMIRInfo, @@ -114,16 +306,11 @@ def make_call_config( args_info = smir_info.function_arguments[start_symbol] locals, constraints = symbolic_locals(smir_info, args_info) - types = self._make_type_map(smir_info) _subst = { 'K_CELL': mk_call_terminator(smir_info.function_tys[start_symbol], len(args_info)), - 'STARTSYMBOL_CELL': KApply('symbol(_)_LIB_Symbol_String', (token(start_symbol),)), 'STACK_CELL': list_empty(), # FIXME see #560, problems matching a symbolic stack 'LOCALS_CELL': list_of(locals), - 'MEMORY_CELL': self._make_memory_map(smir_info, types), - 'FUNCTIONS_CELL': self._make_function_map(smir_info), - 'TYPES_CELL': types, } _init_subst: dict[str, KInner] = {} @@ -140,16 +327,6 @@ def make_call_config( config = self.definition.empty_config(KSort(sort)) return (subst.apply(config), constraints) - def _make_memory_map(self, smir_info: SMIRInfo, types: KInner) -> KInner: - raw_allocs = smir_info._smir['allocs'] - return map_of( - self._decode_alloc( - smir_info=smir_info, - raw_alloc=raw_alloc, - ) - for raw_alloc in raw_allocs - ) - def _decode_alloc(self, smir_info: SMIRInfo, raw_alloc: Any) -> tuple[KInner, KInner]: from .decoding import UnableToDecodeValue, decode_alloc_or_unable @@ -166,25 +343,6 @@ def _decode_alloc(self, smir_info: SMIRInfo, raw_alloc: Any) -> tuple[KInner, KI alloc_id_term = KApply('allocId', intToken(alloc_id)) return alloc_id_term, value.to_kast() - def _make_function_map(self, smir_info: SMIRInfo) -> KInner: - parsed_terms: dict[KInner, KInner] = {} - for ty, body in self.functions(smir_info).items(): - parsed_terms[KApply('ty', [token(ty)])] = body - return map_of(parsed_terms) - - def _make_type_map(self, smir_info: SMIRInfo) -> KInner: - types: dict[KInner, KInner] = {} - for type in smir_info._smir['types']: - parse_result = self.parser.parse_mir_json(type, 'TypeMapping') - assert parse_result is not None - type_mapping, _ = parse_result - assert isinstance(type_mapping, KApply) and len(type_mapping.args) == 2 - ty, tyinfo = type_mapping.args - if ty in types: - raise ValueError(f'Key collision in type map: {ty}') - types[ty] = tyinfo - return map_of(types) - def run_smir(self, smir_info: SMIRInfo, start_symbol: str = 'main', depth: int | None = None) -> Pattern: smir_info = smir_info.reduce_to(start_symbol) init_config, init_constraints = self.make_call_config(smir_info, start_symbol=start_symbol, init=True) @@ -216,35 +374,54 @@ def apr_proof_from_smir( target_node = kcfg.create_node(rhs) return APRProof(id, kcfg, [], init_node.id, target_node.id, {}, proof_dir=proof_dir) - def prove_rs(self, opts: ProveRSOpts) -> APRProof: + @staticmethod + def prove_rs(opts: ProveRSOpts) -> APRProof: if not opts.rs_file.is_file(): - raise ValueError(f'Rust spec file does not exist: {opts.rs_file}') + raise ValueError(f'Input file does not exist: {opts.rs_file}') label = str(opts.rs_file.stem) + '.' + opts.start_symbol - if not opts.reload and opts.proof_dir is not None and APRProof.proof_data_exists(label, opts.proof_dir): - _LOGGER.info(f'Reading proof from disc: {opts.proof_dir}, {label}') - apr_proof = APRProof.read_proof_data(opts.proof_dir, label) - else: - _LOGGER.info(f'Constructing initial proof: {label}') - if opts.smir: - smir_info = SMIRInfo.from_file(opts.rs_file) + + with tempfile.TemporaryDirectory() as tmp_dir: + target_path = opts.proof_dir / label if opts.proof_dir is not None else Path(tmp_dir) + + if not opts.reload and opts.proof_dir is not None and APRProof.proof_data_exists(label, opts.proof_dir): + _LOGGER.info(f'Reading proof from disc: {opts.proof_dir}, {label}') + apr_proof = APRProof.read_proof_data(opts.proof_dir, label) + + # TODO avoid compilation, use compilation output from the proof directory + # kmir = KMIR(opts.proof_dir / label / haskell, opts.proof_dir / label / llvm-library) if they exist + # or else implement this in the `from_kompiled_kore` constructor + smir_info = SMIRInfo.from_file(target_path / 'smir.json') + kmir = KMIR.from_kompiled_kore( + smir_info, symbolic=True, bug_report=opts.bug_report, target_dir=str(target_path) + ) else: - smir_info = SMIRInfo(cargo_get_smir_json(opts.rs_file, save_smir=opts.save_smir)) + _LOGGER.info(f'Constructing initial proof: {label}') + if opts.smir: + smir_info = SMIRInfo.from_file(opts.rs_file) + else: + smir_info = SMIRInfo(cargo_get_smir_json(opts.rs_file, save_smir=opts.save_smir)) - smir_info = smir_info.reduce_to(opts.start_symbol) + smir_info = smir_info.reduce_to(opts.start_symbol) + _LOGGER.info(f'Reduced items table size {len(smir_info.items)}') - _LOGGER.info(f'Reduced items table size {len(smir_info.items)}') - apr_proof = self.apr_proof_from_smir( - label, smir_info, start_symbol=opts.start_symbol, proof_dir=opts.proof_dir - ) - if apr_proof.proof_dir is not None and (apr_proof.proof_dir / apr_proof.id).is_dir(): - smir_info.dump(apr_proof.proof_dir / apr_proof.id / 'smir.json') - if apr_proof.passed: - return apr_proof - with self.kcfg_explore(label) as kcfg_explore: - prover = APRProver(kcfg_explore, execute_depth=opts.max_depth) - prover.advance_proof(apr_proof, max_iterations=opts.max_iterations) - return apr_proof + kmir = KMIR.from_kompiled_kore( + smir_info, symbolic=True, bug_report=opts.bug_report, target_dir=str(target_path) + ) + + apr_proof = kmir.apr_proof_from_smir( + label, smir_info, start_symbol=opts.start_symbol, proof_dir=opts.proof_dir + ) + if apr_proof.proof_dir is not None and (apr_proof.proof_dir / label).is_dir(): + smir_info.dump(apr_proof.proof_dir / apr_proof.id / 'smir.json') + + if apr_proof.passed: + return apr_proof + + with kmir.kcfg_explore(label) as kcfg_explore: + prover = APRProver(kcfg_explore, execute_depth=opts.max_depth) + prover.advance_proof(apr_proof, max_iterations=opts.max_iterations) + return apr_proof class KMIRSemantics(DefaultSemantics): diff --git a/kmir/src/kmir/parse/parser.py b/kmir/src/kmir/parse/parser.py index 209653a43..a0cd9f450 100644 --- a/kmir/src/kmir/parse/parser.py +++ b/kmir/src/kmir/parse/parser.py @@ -445,15 +445,29 @@ def _parse_mir_bytes_json(self, json: JSON, prod: KProduction) -> ParseResult: for i in json: # null values are allowed and taken to mean \x00 assert isinstance(i, int) or i is None + import string + # Characters that need special escaping (using hex encoding) + ESCAPE_CHARS = {'\n': '\\x0a', '@': '\\x40', '"': '\\x34'} + # TODO: Handle uninitialized bytes instead of defaulting to 0 if all((chr(int(i)) if i is not None else chr(0)) in string.printable for i in json): - # if all elements are ascii printable, use simple characters - bytes = ''.join([chr(int(i)) for i in json]) + # if all elements are ascii printable, use characters with escaping + def format_printable_byte(byte_val): + if byte_val is None: + return '\\x00' + char = chr(byte_val) + if char in ESCAPE_CHARS: + return ESCAPE_CHARS[char] + else: + return char + + bytes = ''.join([format_printable_byte(i) for i in json]) else: # otherwise convert to hexadecimal representation \xCA\xFE bytes = ''.join([f'\\x{i:02x}' if i is not None else '\\x00' for i in json]) + symbol = _get_label(prod) if symbol == 'MIRBytes::Bytes': return KToken('b"' + str(bytes) + '"', KSort('Bytes')), KSort('Bytes') diff --git a/kmir/src/kmir/smir.py b/kmir/src/kmir/smir.py index f00a88523..e72538bf1 100644 --- a/kmir/src/kmir/smir.py +++ b/kmir/src/kmir/smir.py @@ -36,6 +36,10 @@ def from_file(smir_json_file: Path) -> SMIRInfo: def dump(self, smir_json_file: Path) -> None: smir_json_file.write_text(json.dumps(self._smir)) + @cached_property + def name(self) -> str: + return self._smir['name'] + @cached_property def allocs(self) -> dict[AllocId, AllocInfo]: return { diff --git a/kmir/src/tests/integration/data/crate-tests/single-lib/small_test_lib::testing::test_add_in_range.expected b/kmir/src/tests/integration/data/crate-tests/single-lib/small_test_lib::testing::test_add_in_range.expected index 28b21032a..b46c39ba9 100644 --- a/kmir/src/tests/integration/data/crate-tests/single-lib/small_test_lib::testing::test_add_in_range.expected +++ b/kmir/src/tests/integration/data/crate-tests/single-lib/small_test_lib::testing::test_add_in_range.expected @@ -14,9 +14,9 @@ ┃ ├─ 4 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 1 ) ) ┃ │ -┃ │ (4 steps) +┃ │ (5 steps) ┃ └─ 6 (stuck, leaf) -┃ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +┃ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "** UNKNOWN FUNCTION **" ) , ┃ ┗━━┓ subst: .Subst ┃ constraint: diff --git a/kmir/src/tests/integration/data/decode-value/enum-1-variant-1-field.json b/kmir/src/tests/integration/data/decode-value/enum-1-variant-1-field.json index 2c710fb10..52b87eed3 100644 --- a/kmir/src/tests/integration/data/decode-value/enum-1-variant-1-field.json +++ b/kmir/src/tests/integration/data/decode-value/enum-1-variant-1-field.json @@ -7,7 +7,7 @@ ], "types": [ [ - 0, + 3, { "PrimitiveType": { "Int": "I32" @@ -24,7 +24,7 @@ ], "fields": [ [ - 0 + 3 ] ], "layout": { diff --git a/kmir/src/tests/integration/data/decode-value/enum-1-variant-2-fields.json b/kmir/src/tests/integration/data/decode-value/enum-1-variant-2-fields.json index be39ea9aa..d40735c7e 100644 --- a/kmir/src/tests/integration/data/decode-value/enum-1-variant-2-fields.json +++ b/kmir/src/tests/integration/data/decode-value/enum-1-variant-2-fields.json @@ -7,7 +7,7 @@ ], "types": [ [ - 0, + 2, { "PrimitiveType": { "Int": "I16" @@ -30,7 +30,7 @@ ], "fields": [ [ - 0, + 2, 1 ] ], diff --git a/kmir/src/tests/integration/data/decode-value/enum-2-variants-1-field.json b/kmir/src/tests/integration/data/decode-value/enum-2-variants-1-field.json index b26877b9e..5c2fc8d2f 100644 --- a/kmir/src/tests/integration/data/decode-value/enum-2-variants-1-field.json +++ b/kmir/src/tests/integration/data/decode-value/enum-2-variants-1-field.json @@ -5,7 +5,7 @@ ], "types": [ [ - 1, + 0, { "PrimitiveType": { "Uint": "U8" @@ -13,7 +13,7 @@ } ], [ - 2, + 1, { "PrimitiveType": "Bool" } @@ -29,10 +29,10 @@ ], "fields": [ [ - 1 + 0 ], [ - 2 + 1 ] ], "layout": { diff --git a/kmir/src/tests/integration/data/decode-value/type-table b/kmir/src/tests/integration/data/decode-value/type-table new file mode 100644 index 000000000..40db1261c --- /dev/null +++ b/kmir/src/tests/integration/data/decode-value/type-table @@ -0,0 +1,6 @@ +[ + [0, { "PrimitiveType": { "Uint": "U8"}}], + [1, { "PrimitiveType": "Bool"}], + [2, { "PrimitiveType": { "Int": "I16"}}], + [3, { "PrimitiveType": { "Int": "I32"}}] +] diff --git a/kmir/src/tests/integration/data/exec-smir/allocs/array_const_compare.state b/kmir/src/tests/integration/data/exec-smir/allocs/array_const_compare.state index 08978f759..3e8bde783 100644 --- a/kmir/src/tests/integration/data/exec-smir/allocs/array_const_compare.state +++ b/kmir/src/tests/integration/data/exec-smir/allocs/array_const_compare.state @@ -49,116 +49,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 0 ) |-> Range ( ListItem ( Integer ( 1 , 8 , true ) ) - ListItem ( Integer ( -2 , 8 , true ) ) - ListItem ( Integer ( 3 , 8 , true ) ) ) - allocId ( 1 ) |-> Range ( ListItem ( Integer ( 1 , 8 , true ) ) - ListItem ( Integer ( -2 , 8 , true ) ) - ListItem ( Integer ( 3 , 8 , true ) ) ) - allocId ( 3 ) |-> Range ( ListItem ( Integer ( 100 , 16 , false ) ) - ListItem ( Integer ( 200 , 16 , false ) ) - ListItem ( Integer ( 300 , 16 , false ) ) ) - allocId ( 4 ) |-> StringVal ( "assertion failed: compare_to_stored(U16_ARRAY)" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 64 ) |-> monoItemFn (... name: symbol ( ">::spec_eq" ) , id: defId ( 16 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 183 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindTransmute , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 183 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 181 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 72 ) , id: mirConstId ( 30 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 182 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 185 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 184 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 186 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 187 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 188 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 183 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 187 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 188 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 189 ) ) ) ) - ty ( 65 ) |-> monoItemFn (... name: symbol ( ">::spec_eq" ) , id: defId ( 16 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 183 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindTransmute , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 66 ) ) ) , span: span ( 183 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 181 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 71 ) , id: mirConstId ( 29 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 182 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 185 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 184 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 186 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 66 ) , span: span ( 187 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 66 ) , span: span ( 188 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 66 ) , span: span ( 183 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 187 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 188 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 189 ) ) ) ) - ty ( 71 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( 72 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( 79 ) |-> monoItemFn (... name: symbol ( "std::array::equality::::eq" ) , id: defId ( 12 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 154 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 64 ) , id: mirConstId ( 25 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 155 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 156 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 157 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 158 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 159 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 158 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 159 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 160 ) ) ) ) - ty ( 80 ) |-> monoItemFn (... name: symbol ( "compare_to_stored" ) , id: defId ( 21 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 289 ) , 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 ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 66 ) , id: mirConstId ( 43 ) ) ) ) ) ) , span: span ( 289 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 290 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 288 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 87 ) , id: mirConstId ( 42 ) ) ) ) , args: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 288 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 291 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 292 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 81 ) , span: span ( 293 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 66 ) , span: span ( 289 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 66 ) , span: span ( 290 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "array" ) , sourceInfo: sourceInfo (... span: span ( 293 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 294 ) ) ) ) - ty ( 82 ) |-> monoItemFn (... name: symbol ( "core::panicking::assert_failed::<[i8; 3], [i8; 3]>" ) , id: defId ( 13 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 163 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 163 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 52 ) ) ) , span: span ( 163 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 164 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 164 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , ty ( 52 ) ) ) , span: span ( 164 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 161 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 67 ) , id: mirConstId ( 27 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 162 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 68 ) , span: span ( 165 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 69 ) , span: span ( 166 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 167 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 168 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 70 ) , span: span ( 169 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 52 ) , span: span ( 163 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 163 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 52 ) , span: span ( 164 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 164 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 166 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "left" ) , sourceInfo: sourceInfo (... span: span ( 167 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "right" ) , sourceInfo: sourceInfo (... span: span ( 168 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "args" ) , sourceInfo: sourceInfo (... span: span ( 169 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 170 ) ) ) ) - ty ( 87 ) |-> monoItemFn (... name: symbol ( "std::array::equality::::eq" ) , id: defId ( 12 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 154 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 65 ) , id: mirConstId ( 26 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 155 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 156 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 157 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 66 ) , span: span ( 158 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 66 ) , span: span ( 159 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 158 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 159 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 160 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 19 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 271 ) , 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 ( 25 ) , id: mirConstId ( 35 ) ) ) ) ) ) , span: span ( 271 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 272 ) , 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 ( 25 ) , id: mirConstId ( 36 ) ) ) ) ) ) , span: span ( 272 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 273 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 274 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 275 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 270 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 79 ) , id: mirConstId ( 34 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 270 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 270 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 276 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 80 ) , id: mirConstId ( 37 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 277 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d\x00\xc8\x00,\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityNot ) ) , ty: ty ( 81 ) , id: mirConstId ( 38 ) ) ) ) .Operands , destination: place (... local: local ( 10 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 278 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 20 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 281 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 18 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 83 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 282 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 279 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 82 ) , id: mirConstId ( 39 ) ) ) ) , args: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 280 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 278 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 283 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 84 ) , id: mirConstId ( 40 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\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 ( 85 ) , id: mirConstId ( 41 ) ) ) ) .Operands , destination: place (... local: local ( 11 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 283 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 284 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 285 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 86 ) , span: span ( 273 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 271 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 272 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 274 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 275 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 270 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 69 ) , span: span ( 286 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 68 ) , span: span ( 280 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 70 ) , span: span ( 282 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 278 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 68 ) , span: span ( 283 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 274 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 275 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 286 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 287 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 98 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 99 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 35 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 68 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 62 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 60 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoEnumType (... name: "std::result::Result<(), std::fmt::Error>" , adtDef: adtDef ( 35 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 1 ) .Tys : ty ( 96 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 23 ) |-> typeInfoRefType ( ty ( 25 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 90 ) ) - ty ( 25 ) |-> typeInfoRefType ( ty ( 89 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 28 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 2 ) ) - ty ( 30 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 31 ) |-> typeInfoArrayType ( ty ( 2 ) , noTyConst ) - ty ( 32 ) |-> typeInfoPtrType ( ty ( 2 ) ) - ty ( 34 ) |-> typeInfoPtrType ( ty ( 2 ) ) - ty ( 36 ) |-> typeInfoStructType ( "std::marker::PhantomData<&i8>" , adtDef ( 48 ) , .Tys ) - ty ( 37 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 38 ) |-> typeInfoRefType ( ty ( 39 ) ) - ty ( 39 ) |-> typeInfoStructType ( "std::fmt::DebugList<'_, '_>" , adtDef ( 41 ) , ty ( 97 ) .Tys ) - ty ( 40 ) |-> typeInfoStructType ( "std::slice::Iter<'_, i8>" , adtDef ( 6 ) , ty ( 42 ) ty ( 32 ) ty ( 36 ) .Tys ) - ty ( 41 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 42 ) |-> typeInfoStructType ( "std::ptr::NonNull" , adtDef ( 5 ) , ty ( 32 ) .Tys ) - ty ( 43 ) |-> typeInfoStructType ( "std::ptr::NonNull<[i8]>" , adtDef ( 5 ) , ty ( 44 ) .Tys ) - ty ( 44 ) |-> typeInfoPtrType ( ty ( 31 ) ) - ty ( 45 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 52 ) |-> typeInfoRefType ( ty ( 101 ) ) - ty ( 53 ) |-> typeInfoEnumType (... name: "std::option::Option<&i8>" , adtDef: adtDef ( 18 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 28 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 54 ) |-> typeInfoRefType ( ty ( 40 ) ) - ty ( 56 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 58 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 59 ) |-> typeInfoPtrType ( ty ( 28 ) ) - ty ( 60 ) |-> typeInfoPtrType ( ty ( 25 ) ) - ty ( 62 ) |-> typeInfoRefType ( ty ( 37 ) ) - ty ( 63 ) |-> typeInfoStructType ( "std::ops::RangeFull" , adtDef ( 39 ) , .Tys ) - ty ( 66 ) |-> typeInfoRefType ( ty ( 81 ) ) - ty ( 68 ) |-> typeInfoVoidType - ty ( 69 ) |-> typeInfoEnumType (... name: "core::panicking::AssertKind" , adtDef: adtDef ( 20 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 70 ) |-> typeInfoEnumType (... name: "std::option::Option>" , adtDef: adtDef ( 18 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 83 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) ) ) - ty ( 73 ) |-> typeInfoPtrType ( ty ( 42 ) ) - ty ( 74 ) |-> typeInfoPtrType ( ty ( 41 ) ) - ty ( 75 ) |-> typeInfoPtrType ( ty ( 42 ) ) - ty ( 76 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 77 ) |-> typeInfoRefType ( ty ( 42 ) ) - ty ( 78 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 81 ) |-> typeInfoArrayType ( ty ( 100 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 41 ) , allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 83 ) |-> typeInfoStructType ( "std::fmt::Arguments<'_>" , adtDef ( 72 ) , ty ( 105 ) ty ( 106 ) ty ( 107 ) .Tys ) - ty ( 85 ) |-> typeInfoRefType ( ty ( 109 ) ) - ty ( 86 ) |-> typeInfoTupleType ( ty ( 25 ) ty ( 25 ) .Tys ) - ty ( 89 ) |-> typeInfoArrayType ( ty ( 2 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 41 ) , allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 90 ) |-> typeInfoStructType ( "std::fmt::Formatter<'_>" , adtDef ( 25 ) , ty ( 45 ) ty ( 91 ) ty ( 92 ) ty ( 93 ) ty ( 93 ) ty ( 94 ) .Tys ) - ty ( 91 ) |-> typeInfoPrimitiveType ( primTypeChar ) - ty ( 92 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Alignment" , adtDef: adtDef ( 32 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) discriminant ( 3 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 3 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 93 ) |-> typeInfoEnumType (... name: "std::option::Option" , adtDef: adtDef ( 18 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 41 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 94 ) |-> typeInfoRefType ( ty ( 95 ) ) - ty ( 96 ) |-> typeInfoStructType ( "std::fmt::Error" , adtDef ( 38 ) , .Tys ) - ty ( 97 ) |-> typeInfoStructType ( "core::fmt::builders::DebugInner<'_, '_>" , adtDef ( 43 ) , ty ( 24 ) ty ( 22 ) ty ( 30 ) .Tys ) - ty ( 99 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 100 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU16 ) ) - ty ( 104 ) |-> typeInfoRefType ( ty ( 123 ) ) - ty ( 105 ) |-> typeInfoRefType ( ty ( 108 ) ) - ty ( 106 ) |-> typeInfoEnumType (... name: "std::option::Option<&[core::fmt::rt::Placeholder]>" , adtDef: adtDef ( 18 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 110 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 107 ) |-> typeInfoRefType ( ty ( 114 ) ) - ty ( 108 ) |-> typeInfoArrayType ( ty ( 85 ) , noTyConst ) - ty ( 109 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 110 ) |-> typeInfoRefType ( ty ( 111 ) ) - ty ( 111 ) |-> typeInfoArrayType ( ty ( 112 ) , noTyConst ) - ty ( 112 ) |-> typeInfoStructType ( "core::fmt::rt::Placeholder" , adtDef ( 76 ) , ty ( 41 ) ty ( 91 ) ty ( 92 ) ty ( 45 ) ty ( 113 ) ty ( 113 ) .Tys ) - ty ( 113 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Count" , adtDef: adtDef ( 83 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: ty ( 41 ) .Tys : ty ( 41 ) .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 114 ) |-> typeInfoArrayType ( ty ( 115 ) , noTyConst ) - ty ( 115 ) |-> typeInfoStructType ( "core::fmt::rt::Argument<'_>" , adtDef ( 86 ) , ty ( 116 ) .Tys ) - ty ( 116 ) |-> typeInfoEnumType (... name: "core::fmt::rt::ArgumentType<'_>" , adtDef: adtDef ( 88 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 117 ) ty ( 118 ) ty ( 119 ) .Tys : ty ( 41 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) machineSize (... numBits: 64 ) machineSize (... numBits: 128 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 117 ) |-> typeInfoStructType ( "std::ptr::NonNull<()>" , adtDef ( 5 ) , ty ( 120 ) .Tys ) - ty ( 119 ) |-> typeInfoStructType ( "std::marker::PhantomData<&()>" , adtDef ( 48 ) , .Tys ) - ty ( 120 ) |-> typeInfoPtrType ( ty ( 1 ) ) - ty ( 122 ) |-> typeInfoRefType ( ty ( 1 ) ) - ty ( 123 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 93 ) , ty ( 85 ) ty ( 45 ) ty ( 45 ) .Tys ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/allocs/array_nest_compare.state b/kmir/src/tests/integration/data/exec-smir/allocs/array_nest_compare.state index 768c366d7..a32dddf86 100644 --- a/kmir/src/tests/integration/data/exec-smir/allocs/array_nest_compare.state +++ b/kmir/src/tests/integration/data/exec-smir/allocs/array_nest_compare.state @@ -65,144 +65,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 0 ) |-> Range ( ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) - ListItem ( Integer ( 200 , 16 , false ) ) - ListItem ( Integer ( 300 , 16 , false ) ) ) ) - ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) - ListItem ( Integer ( 200 , 16 , false ) ) - ListItem ( Integer ( 300 , 16 , false ) ) ) ) ) - allocId ( 1 ) |-> Range ( ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) - ListItem ( Integer ( 200 , 16 , false ) ) - ListItem ( Integer ( 300 , 16 , false ) ) ) ) - ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) - ListItem ( Integer ( 200 , 16 , false ) ) - ListItem ( Integer ( 300 , 16 , false ) ) ) ) ) - allocId ( 4 ) |-> Range ( ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) - ListItem ( Integer ( 200 , 16 , false ) ) - ListItem ( Integer ( 300 , 16 , false ) ) ) ) - ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) - ListItem ( Integer ( 200 , 16 , false ) ) - ListItem ( Integer ( 300 , 16 , false ) ) ) ) ) - allocId ( 5 ) |-> StringVal ( "assertion failed: compare_to_stored(U16_ARRAY)" ) - allocId ( 6 ) |-> StringVal ( "assertion failed: compare_to_stored(NESTED[0])" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 81 ) |-> monoItemFn (... name: symbol ( ">::spec_eq" ) , id: defId ( 15 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 161 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindTransmute , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 161 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 159 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 88 ) , id: mirConstId ( 30 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 160 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 163 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 162 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 164 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 165 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 166 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 161 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 165 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 166 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 167 ) ) ) ) - ty ( 82 ) |-> monoItemFn (... name: symbol ( "<[u16; 3] as std::array::equality::SpecArrayEq<[u16; 3], 2>>::spec_eq" ) , id: defId ( 15 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 161 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindTransmute , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 161 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 159 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 87 ) , id: mirConstId ( 29 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 160 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 163 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 162 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 164 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 165 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 166 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 161 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 165 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 166 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 167 ) ) ) ) - ty ( 87 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( 88 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( 100 ) |-> monoItemFn (... name: symbol ( "std::array::equality::::eq" ) , id: defId ( 11 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 132 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 82 ) , id: mirConstId ( 26 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 133 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 134 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 135 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 136 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 137 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 136 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 137 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 138 ) ) ) ) - ty ( 101 ) |-> monoItemFn (... name: symbol ( "compare_to_stored" ) , id: defId ( 20 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 273 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 42 ) , id: mirConstId ( 33 ) ) ) ) ) ) , span: span ( 273 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 42 ) , id: mirConstId ( 44 ) ) ) ) ) ) , span: span ( 272 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 272 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 272 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 272 ) , 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 ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 47 ) ) ) ) ) ) , span: span ( 272 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 7 ) , projection: projectionElemDeref projectionElemIndex ( local ( 3 ) ) .ProjectionElems ) ) ) , span: span ( 272 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 275 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 274 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 108 ) , id: mirConstId ( 46 ) ) ) ) , args: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 274 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 276 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 277 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 48 ) , span: span ( 278 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 272 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 42 ) , span: span ( 273 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 42 ) , span: span ( 272 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 272 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 275 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 272 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "array" ) , sourceInfo: sourceInfo (... span: span ( 278 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 279 ) ) ) ) - ty ( 102 ) |-> monoItemFn (... name: symbol ( "core::panicking::assert_failed::<[[u16; 3]; 2], [[u16; 3]; 2]>" ) , id: defId ( 12 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 141 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 141 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 60 ) ) ) , span: span ( 141 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 142 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 142 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , ty ( 60 ) ) ) , span: span ( 142 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 139 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 83 ) , id: mirConstId ( 27 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 140 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 84 ) , span: span ( 143 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 85 ) , span: span ( 144 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 145 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 146 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 86 ) , span: span ( 147 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 60 ) , span: span ( 141 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 141 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 60 ) , span: span ( 142 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 142 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 144 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "left" ) , sourceInfo: sourceInfo (... span: span ( 145 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "right" ) , sourceInfo: sourceInfo (... span: span ( 146 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "args" ) , sourceInfo: sourceInfo (... span: span ( 147 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 148 ) ) ) ) - ty ( 108 ) |-> monoItemFn (... name: symbol ( "std::array::equality::::eq" ) , id: defId ( 11 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 132 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 81 ) , id: mirConstId ( 25 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 133 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 134 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 30 ) , span: span ( 135 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 136 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 137 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 136 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 137 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 138 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 18 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 249 ) , 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 ( 28 ) , id: mirConstId ( 36 ) ) ) ) ) ) , span: span ( 249 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 250 ) , 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 ( 28 ) , id: mirConstId ( 37 ) ) ) ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 28 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 28 ) ) .ProjectionElems ) ) ) ) , span: span ( 253 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 248 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 100 ) , id: mirConstId ( 35 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 248 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 248 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 254 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 101 ) , id: mirConstId ( 38 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 255 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d\x00\xc8\x00,\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityNot ) ) , ty: ty ( 48 ) , id: mirConstId ( 39 ) ) ) ) .Operands , destination: place (... local: local ( 10 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 256 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 19 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 259 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 17 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 103 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 257 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 102 ) , id: mirConstId ( 40 ) ) ) ) , args: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 258 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 256 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 261 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 104 ) , id: mirConstId ( 41 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\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 ( 105 ) , id: mirConstId ( 42 ) ) ) ) .Operands , destination: place (... local: local ( 11 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 261 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 263 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d\x00\xc8\x00,\x01d\x00\xc8\x00,\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityNot ) ) , ty: ty ( 106 ) , id: mirConstId ( 43 ) ) ) ) ) ) , span: span ( 263 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 264 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 42 ) , id: mirConstId ( 31 ) ) ) ) ) ) , span: span ( 264 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 42 ) , id: mirConstId ( 44 ) ) ) ) ) ) , span: span ( 262 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 262 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 262 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 14 ) , projection: projectionElemIndex ( local ( 15 ) ) .ProjectionElems ) ) ) ) , span: span ( 262 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 265 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 101 ) , id: mirConstId ( 38 ) ) ) ) , args: operandMove ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 8 ) ) , unwind: unwindActionContinue ) , span: span ( 266 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 10 ) ) .Branches , otherwise: basicBlockIdx ( 9 ) ) ) , span: span ( 266 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 267 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 268 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 104 ) , id: mirConstId ( 41 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 105 ) , id: mirConstId ( 45 ) ) ) ) .Operands , destination: place (... local: local ( 18 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 268 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 269 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 107 ) , span: span ( 251 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 249 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 250 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 252 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 253 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 248 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 85 ) , span: span ( 270 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 84 ) , span: span ( 258 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 86 ) , span: span ( 260 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 256 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 84 ) , span: span ( 261 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 266 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 48 ) , span: span ( 262 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 106 ) , span: span ( 263 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 42 ) , span: span ( 264 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 42 ) , span: span ( 262 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 262 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 84 ) , span: span ( 268 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 252 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 253 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 270 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 271 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 143 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 144 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 54 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 84 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 68 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 66 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoEnumType (... name: "std::result::Result<(), std::fmt::Error>" , adtDef: adtDef ( 54 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 1 ) .Tys : ty ( 134 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 23 ) |-> typeInfoRefType ( ty ( 25 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 130 ) ) - ty ( 25 ) |-> typeInfoRefType ( ty ( 48 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 28 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 106 ) ) - ty ( 30 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 31 ) |-> typeInfoArrayType ( ty ( 33 ) , noTyConst ) - ty ( 32 ) |-> typeInfoPtrType ( ty ( 33 ) ) - ty ( 33 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU16 ) ) - ty ( 35 ) |-> typeInfoPtrType ( ty ( 33 ) ) - ty ( 37 ) |-> typeInfoStructType ( "std::marker::PhantomData<&u16>" , adtDef ( 58 ) , .Tys ) - ty ( 38 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 39 ) |-> typeInfoRefType ( ty ( 40 ) ) - ty ( 40 ) |-> typeInfoStructType ( "std::fmt::DebugList<'_, '_>" , adtDef ( 73 ) , ty ( 138 ) .Tys ) - ty ( 41 ) |-> typeInfoStructType ( "std::slice::Iter<'_, u16>" , adtDef ( 6 ) , ty ( 43 ) ty ( 32 ) ty ( 37 ) .Tys ) - ty ( 42 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 43 ) |-> typeInfoStructType ( "std::ptr::NonNull" , adtDef ( 5 ) , ty ( 32 ) .Tys ) - ty ( 44 ) |-> typeInfoStructType ( "std::ptr::NonNull<[u16]>" , adtDef ( 5 ) , ty ( 45 ) .Tys ) - ty ( 45 ) |-> typeInfoPtrType ( ty ( 31 ) ) - ty ( 46 ) |-> typeInfoArrayType ( ty ( 48 ) , noTyConst ) - ty ( 47 ) |-> typeInfoPtrType ( ty ( 48 ) ) - ty ( 48 ) |-> typeInfoArrayType ( ty ( 33 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 42 ) , allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 1 ) ) ) ) - ty ( 49 ) |-> typeInfoPtrType ( ty ( 48 ) ) - ty ( 51 ) |-> typeInfoStructType ( "std::marker::PhantomData<&[u16; 3]>" , adtDef ( 58 ) , .Tys ) - ty ( 52 ) |-> typeInfoRefType ( ty ( 46 ) ) - ty ( 53 ) |-> typeInfoStructType ( "std::slice::Iter<'_, [u16; 3]>" , adtDef ( 6 ) , ty ( 54 ) ty ( 47 ) ty ( 51 ) .Tys ) - ty ( 54 ) |-> typeInfoStructType ( "std::ptr::NonNull<[u16; 3]>" , adtDef ( 5 ) , ty ( 47 ) .Tys ) - ty ( 55 ) |-> typeInfoStructType ( "std::ptr::NonNull<[[u16; 3]]>" , adtDef ( 5 ) , ty ( 56 ) .Tys ) - ty ( 56 ) |-> typeInfoPtrType ( ty ( 46 ) ) - ty ( 60 ) |-> typeInfoRefType ( ty ( 137 ) ) - ty ( 61 ) |-> typeInfoEnumType (... name: "std::option::Option<&[u16; 3]>" , adtDef: adtDef ( 17 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 25 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 62 ) |-> typeInfoRefType ( ty ( 53 ) ) - ty ( 65 ) |-> typeInfoRefType ( ty ( 33 ) ) - ty ( 66 ) |-> typeInfoEnumType (... name: "std::option::Option<&u16>" , adtDef: adtDef ( 17 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 65 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 67 ) |-> typeInfoRefType ( ty ( 41 ) ) - ty ( 68 ) |-> typeInfoRefType ( ty ( 65 ) ) - ty ( 70 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 72 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 73 ) |-> typeInfoPtrType ( ty ( 65 ) ) - ty ( 74 ) |-> typeInfoPtrType ( ty ( 25 ) ) - ty ( 75 ) |-> typeInfoPtrType ( ty ( 28 ) ) - ty ( 77 ) |-> typeInfoRefType ( ty ( 38 ) ) - ty ( 78 ) |-> typeInfoStructType ( "std::ops::RangeFull" , adtDef ( 65 ) , .Tys ) - ty ( 80 ) |-> typeInfoRefType ( ty ( 52 ) ) - ty ( 84 ) |-> typeInfoVoidType - ty ( 85 ) |-> typeInfoEnumType (... name: "core::panicking::AssertKind" , adtDef: adtDef ( 19 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 86 ) |-> typeInfoEnumType (... name: "std::option::Option>" , adtDef: adtDef ( 17 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 103 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) ) ) - ty ( 89 ) |-> typeInfoPtrType ( ty ( 54 ) ) - ty ( 90 ) |-> typeInfoPtrType ( ty ( 42 ) ) - ty ( 91 ) |-> typeInfoPtrType ( ty ( 54 ) ) - ty ( 92 ) |-> typeInfoPtrType ( ty ( 47 ) ) - ty ( 93 ) |-> typeInfoRefType ( ty ( 54 ) ) - ty ( 94 ) |-> typeInfoPtrType ( ty ( 47 ) ) - ty ( 95 ) |-> typeInfoPtrType ( ty ( 43 ) ) - ty ( 96 ) |-> typeInfoPtrType ( ty ( 43 ) ) - ty ( 97 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 98 ) |-> typeInfoRefType ( ty ( 43 ) ) - ty ( 99 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 103 ) |-> typeInfoStructType ( "std::fmt::Arguments<'_>" , adtDef ( 23 ) , ty ( 110 ) ty ( 111 ) ty ( 112 ) .Tys ) - ty ( 105 ) |-> typeInfoRefType ( ty ( 114 ) ) - ty ( 106 ) |-> typeInfoArrayType ( ty ( 48 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 42 ) , allocation (... bytes: b"\x02\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 107 ) |-> typeInfoTupleType ( ty ( 28 ) ty ( 28 ) .Tys ) - ty ( 109 ) |-> typeInfoRefType ( ty ( 136 ) ) - ty ( 110 ) |-> typeInfoRefType ( ty ( 113 ) ) - ty ( 111 ) |-> typeInfoEnumType (... name: "std::option::Option<&[core::fmt::rt::Placeholder]>" , adtDef: adtDef ( 17 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 115 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 112 ) |-> typeInfoRefType ( ty ( 122 ) ) - ty ( 113 ) |-> typeInfoArrayType ( ty ( 105 ) , noTyConst ) - ty ( 114 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 115 ) |-> typeInfoRefType ( ty ( 116 ) ) - ty ( 116 ) |-> typeInfoArrayType ( ty ( 117 ) , noTyConst ) - ty ( 117 ) |-> typeInfoStructType ( "core::fmt::rt::Placeholder" , adtDef ( 27 ) , ty ( 42 ) ty ( 118 ) ty ( 119 ) ty ( 120 ) ty ( 121 ) ty ( 121 ) .Tys ) - ty ( 118 ) |-> typeInfoPrimitiveType ( primTypeChar ) - ty ( 119 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Alignment" , adtDef: adtDef ( 34 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) discriminant ( 3 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 3 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 120 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 121 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Count" , adtDef: adtDef ( 35 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: ty ( 42 ) .Tys : ty ( 42 ) .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 122 ) |-> typeInfoArrayType ( ty ( 123 ) , noTyConst ) - ty ( 123 ) |-> typeInfoStructType ( "core::fmt::rt::Argument<'_>" , adtDef ( 38 ) , ty ( 124 ) .Tys ) - ty ( 124 ) |-> typeInfoEnumType (... name: "core::fmt::rt::ArgumentType<'_>" , adtDef: adtDef ( 40 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 125 ) ty ( 126 ) ty ( 127 ) .Tys : ty ( 42 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) machineSize (... numBits: 64 ) machineSize (... numBits: 128 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 125 ) |-> typeInfoStructType ( "std::ptr::NonNull<()>" , adtDef ( 5 ) , ty ( 128 ) .Tys ) - ty ( 127 ) |-> typeInfoStructType ( "std::marker::PhantomData<&()>" , adtDef ( 58 ) , .Tys ) - ty ( 128 ) |-> typeInfoPtrType ( ty ( 1 ) ) - ty ( 130 ) |-> typeInfoStructType ( "std::fmt::Formatter<'_>" , adtDef ( 46 ) , ty ( 120 ) ty ( 118 ) ty ( 119 ) ty ( 131 ) ty ( 131 ) ty ( 132 ) .Tys ) - ty ( 131 ) |-> typeInfoEnumType (... name: "std::option::Option" , adtDef: adtDef ( 17 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 42 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 132 ) |-> typeInfoRefType ( ty ( 133 ) ) - ty ( 134 ) |-> typeInfoStructType ( "std::fmt::Error" , adtDef ( 57 ) , .Tys ) - ty ( 135 ) |-> typeInfoRefType ( ty ( 1 ) ) - ty ( 136 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 59 ) , ty ( 105 ) ty ( 120 ) ty ( 120 ) .Tys ) - ty ( 138 ) |-> typeInfoStructType ( "core::fmt::builders::DebugInner<'_, '_>" , adtDef ( 75 ) , ty ( 24 ) ty ( 22 ) ty ( 30 ) .Tys ) - ty ( 144 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/allocs/enum-two-refs-fail.state b/kmir/src/tests/integration/data/exec-smir/allocs/enum-two-refs-fail.state index fc7be9a2f..aa870846e 100644 --- a/kmir/src/tests/integration/data/exec-smir/allocs/enum-two-refs-fail.state +++ b/kmir/src/tests/integration/data/exec-smir/allocs/enum-two-refs-fail.state @@ -1,6 +1,6 @@ - #traverseProjection ( toLocal ( 13 ) , AllocRef ( allocId ( 1 ) , .ProjectionElems , noMetadata ) , projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems , .Contexts ) ~> #forRef ( mutabilityNot , noMetadata ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 14 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 15 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 16 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 145 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 93 ) , id: mirConstId ( 47 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 145 ) ) ) ~> .K + #traverseProjection ( toLocal ( 13 ) , thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) , projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems , .Contexts ) ~> #forRef ( mutabilityNot , noMetadata ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 14 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 15 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 16 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 145 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 93 ) , id: mirConstId ( 47 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 145 ) ) ) ~> .K noReturn @@ -30,10 +30,10 @@ ListItem ( newLocal ( ty ( 43 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , noMetadata ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 2 ) , .ProjectionElems , noMetadata ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( AllocRef ( allocId ( 1 ) , .ProjectionElems , noMetadata ) ) - ListItem ( AllocRef ( allocId ( 2 ) , .ProjectionElems , noMetadata ) ) ) , ty ( 91 ) , mutabilityMut ) ) + ListItem ( typedValue ( thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) ) + ListItem ( thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) ) ) , ty ( 91 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 36 ) , mutabilityNot ) ) ListItem ( newLocal ( ty ( 31 ) , mutabilityNot ) ) ListItem ( newLocal ( ty ( 36 ) , mutabilityNot ) ) @@ -43,7 +43,7 @@ ListItem ( newLocal ( ty ( 54 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , noMetadata ) , ty ( 25 ) , mutabilityMut ) ) + ListItem ( typedValue ( thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) , ty ( 25 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 25 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 25 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 25 ) , mutabilityMut ) ) @@ -51,12 +51,12 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( AllocRef ( allocId ( 1 ) , .ProjectionElems , noMetadata ) ) - ListItem ( AllocRef ( allocId ( 2 ) , .ProjectionElems , noMetadata ) ) ) , ty ( 91 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) ) + ListItem ( thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) ) ) , ty ( 91 ) , mutabilityMut ) ) ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , noMetadata ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 2 ) , .ProjectionElems , noMetadata ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( thunk ( #decodeConstant ( 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 ( 25 ) , typeInfoRefType ( ty ( 99 ) ) ) ) , ty ( 25 ) , mutabilityNot ) ) ListItem ( newLocal ( ty ( 43 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 83 ) , mutabilityNot ) ) ListItem ( newLocal ( ty ( 82 ) , mutabilityNot ) ) @@ -75,127 +75,4 @@ ListItem ( newLocal ( ty ( 69 ) , mutabilityNot ) ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 0 ) |-> UnableToDecodePy (... msg: "Unable to decode value: b'', of type: ArrayT(element_type=113, length=0): Method nbytes() is unsupported for type: StructT(name=\"core::fmt::rt::Argument<'_>\", adt_def=51, fields=[114])" ) - allocId ( 1 ) |-> UnableToDecodePy (... msg: "Unable to decode alloc: b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', of type: EnumT(name=\"Thing<'_>\", adt_def=25, discriminants=[0], fields=[[37, 45]], layout=LayoutShape(fields=ArbitraryFields(offsets=[MachineSize(num_bits=0), MachineSize(num_bits=64)]), variants=Single(index=0), abi=ValueAbi(), abi_align=8, size=MachineSize(num_bits=128)))" ) - allocId ( 2 ) |-> UnableToDecodePy (... msg: "Unable to decode alloc: b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', of type: EnumT(name=\"Thing<'_>\", adt_def=25, discriminants=[0], fields=[[37, 45]], layout=LayoutShape(fields=ArbitraryFields(offsets=[MachineSize(num_bits=0), MachineSize(num_bits=64)]), variants=Single(index=0), abi=ValueAbi(), abi_align=8, size=MachineSize(num_bits=128)))" ) - allocId ( 3 ) |-> UnableToDecodePy (... msg: "Unable to decode alloc: b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', of type: StructT(name=\"Another<'_>\", adt_def=44, fields=[28, 42])" ) - allocId ( 4 ) |-> UnableToDecodePy (... msg: "Unable to decode alloc: b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', of type: StructT(name=\"Another<'_>\", adt_def=44, fields=[28, 42])" ) - allocId ( 5 ) |-> UnableToDecodePy (... msg: "Unable to decode alloc: b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x16\\x00\\x00\\x00\\x00\\x00\\x00\\x00', of type: ArrayT(element_type=96, length=1)" ) - allocId ( 8 ) |-> StringVal ( "Thing" ) - allocId ( 9 ) |-> StringVal ( "Another" ) - allocId ( 10 ) |-> UnableToDecodePy (... msg: "Unknown type: 0" ) - allocId ( 11 ) |-> UnableToDecodePy (... msg: "Unknown type: 0" ) - allocId ( 12 ) |-> UnableToDecodePy (... msg: "Unknown type: 0" ) - allocId ( 13 ) |-> UnableToDecodePy (... msg: "Unknown type: 0" ) - allocId ( 14 ) |-> Integer ( 1 , 32 , true ) - allocId ( 15 ) |-> Integer ( 2 , 32 , false ) - allocId ( 16 ) |-> Integer ( 1 , 32 , true ) - allocId ( 17 ) |-> Integer ( 2 , 32 , false ) - allocId ( 18 ) |-> StringVal ( "All assertions passed\n" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 48 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 51 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 37 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 37 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 44 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 44 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) - ty ( 49 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 51 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) - ty ( 50 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 52 ) , id: mirConstId ( 17 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 64 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 31 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 45 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 45 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( 51 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 51 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 42 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 42 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 47 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 47 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) - ty ( 52 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 51 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 45 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 45 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 46 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 46 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) - ty ( 53 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 48 ) , id: mirConstId ( 13 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 64 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 36 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 37 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 37 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( 85 ) |-> monoItemFn (... name: symbol ( " as std::cmp::PartialEq>::eq" ) , id: defId ( 21 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 146 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 13 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 14 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 15 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 16 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 145 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 93 ) , id: mirConstId ( 47 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 145 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 145 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 7 ) , projection: .ProjectionElems ) ) ) , span: span ( 147 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 147 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 94 ) , id: mirConstId ( 48 ) ) ) ) , args: operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 147 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 147 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 43 ) , id: mirConstId ( 49 ) ) ) ) ) ) , span: span ( 147 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 4 ) ) , span: span ( 147 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 148 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 146 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 146 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 146 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 91 ) , span: span ( 146 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 145 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 31 ) , span: span ( 147 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 36 ) , span: span ( 145 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 31 ) , span: span ( 147 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 43 ) , span: span ( 145 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 54 ) , span: span ( 145 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 54 ) , span: span ( 145 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 147 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 147 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 146 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 146 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 146 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 146 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 146 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 146 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "__self_0" ) , sourceInfo: sourceInfo (... span: span ( 145 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "__self_1" ) , sourceInfo: sourceInfo (... span: span ( 147 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "__arg1_0" ) , sourceInfo: sourceInfo (... span: span ( 145 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "__arg1_1" ) , sourceInfo: sourceInfo (... span: span ( 147 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 146 ) ) ) ) - ty ( 86 ) |-> monoItemFn (... name: symbol ( " as std::cmp::PartialEq>::eq" ) , id: defId ( 23 ) , body: someBody ( body (... blocks: 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 ( 0 ) , ty ( 28 ) ) .ProjectionElems ) ) ) , span: span ( 153 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 28 ) ) .ProjectionElems ) ) ) , span: span ( 153 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 153 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 97 ) , id: mirConstId ( 52 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 153 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 153 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 42 ) ) .ProjectionElems ) ) ) , span: span ( 154 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 42 ) ) .ProjectionElems ) ) ) , span: span ( 154 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 154 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 98 ) , id: mirConstId ( 53 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 154 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 154 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 43 ) , id: mirConstId ( 49 ) ) ) ) ) ) , span: span ( 154 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 4 ) ) , span: span ( 154 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 155 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 156 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 156 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 156 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 43 ) , span: span ( 153 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 153 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 153 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 40 ) , span: span ( 154 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 40 ) , span: span ( 154 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 156 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 156 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 156 ) ) ) ) - ty ( 87 ) |-> monoItemFn (... name: symbol ( "core::panicking::assert_failed::, Thing<'_>>" ) , id: defId ( 16 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 103 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 103 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 81 ) ) ) , span: span ( 103 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 104 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 104 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , ty ( 81 ) ) ) , span: span ( 104 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 80 ) , id: mirConstId ( 34 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 102 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 82 ) , span: span ( 105 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 83 ) , span: span ( 106 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 107 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 108 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 84 ) , span: span ( 109 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 81 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 103 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 81 ) , span: span ( 104 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 104 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 106 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "left" ) , sourceInfo: sourceInfo (... span: span ( 107 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "right" ) , sourceInfo: sourceInfo (... span: span ( 108 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "args" ) , sourceInfo: sourceInfo (... span: span ( 109 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 110 ) ) ) ) - ty ( 88 ) |-> monoItemFn (... name: symbol ( "std::fmt::Arguments::<'_>::new_const::<1>" ) , id: defId ( 12 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 92 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 64 ) ) ) , span: span ( 92 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 93 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandConstant ( constOperand (... span: span ( 93 ) , 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 ( 65 ) , id: mirConstId ( 30 ) ) ) ) , ty ( 66 ) ) ) , span: span ( 93 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 13 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityNot ) ) , ty: ty ( 67 ) , id: mirConstId ( 31 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 94 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 95 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 95 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 91 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 68 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 69 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 64 ) , span: span ( 92 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 66 ) , span: span ( 93 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "pieces" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 98 ) ) ) ) - ty ( 89 ) |-> monoItemFn (... name: symbol ( "core::panicking::assert_failed::, Another<'_>>" ) , id: defId ( 16 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 103 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 103 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 81 ) ) ) , span: span ( 103 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 104 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 104 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , ty ( 81 ) ) ) , span: span ( 104 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 80 ) , id: mirConstId ( 34 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 102 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 82 ) , span: span ( 105 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 83 ) , span: span ( 106 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 107 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 108 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 84 ) , span: span ( 109 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 81 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 103 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 81 ) , span: span ( 104 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 104 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 106 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "left" ) , sourceInfo: sourceInfo (... span: span ( 107 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "right" ) , sourceInfo: sourceInfo (... span: span ( 108 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "args" ) , sourceInfo: sourceInfo (... span: span ( 109 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 110 ) ) ) ) - ty ( 93 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 53 ) , id: mirConstId ( 18 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 64 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 54 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 54 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 36 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( 94 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 50 ) , id: mirConstId ( 15 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 64 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 31 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( 97 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 49 ) , id: mirConstId ( 14 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 64 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( 98 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 51 ) , id: mirConstId ( 16 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 64 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 43 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 40 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 40 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 42 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 42 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 18 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 117 ) , 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 ( 25 ) , id: mirConstId ( 37 ) ) ) ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 118 ) , 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 ( 25 ) , id: mirConstId ( 38 ) ) ) ) ) ) , span: span ( 118 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 119 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 120 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 121 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 116 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 85 ) , id: mirConstId ( 36 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 116 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 116 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 123 ) , 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 ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 34 ) , id: mirConstId ( 40 ) ) ) ) ) ) , span: span ( 123 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 124 ) , 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 ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 34 ) , id: mirConstId ( 41 ) ) ) ) ) ) , span: span ( 124 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 125 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 34 ) ) .ProjectionElems ) ) ) ) , span: span ( 126 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 34 ) ) .ProjectionElems ) ) ) ) , span: span ( 127 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 122 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 86 ) , id: mirConstId ( 39 ) ) ) ) , args: operandCopy ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 15 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 122 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 19 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 130 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 20 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 68 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 131 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 128 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 87 ) , id: mirConstId ( 42 ) ) ) ) , args: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 129 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 6 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 122 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 133 ) , 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 ( 5 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 69 ) , id: mirConstId ( 44 ) ) ) ) ) ) , span: span ( 133 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 132 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 88 ) , id: mirConstId ( 43 ) ) ) ) , args: operandCopy ( place (... local: local ( 21 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 20 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 7 ) ) , unwind: unwindActionContinue ) , span: span ( 132 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 19 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 136 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 20 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 68 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 137 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 134 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 89 ) , id: mirConstId ( 45 ) ) ) ) , args: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 135 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 138 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 90 ) , id: mirConstId ( 46 ) ) ) ) , args: operandMove ( place (... local: local ( 20 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 8 ) ) , unwind: unwindActionContinue ) , span: span ( 139 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 140 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 141 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 91 ) , span: span ( 119 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 117 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 118 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 43 ) , span: span ( 116 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 83 ) , span: span ( 142 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 82 ) , span: span ( 129 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 84 ) , span: span ( 131 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 92 ) , span: span ( 125 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 123 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 124 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 126 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 127 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 43 ) , span: span ( 122 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 83 ) , span: span ( 143 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 82 ) , span: span ( 135 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 84 ) , span: span ( 137 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 139 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 68 ) , span: span ( 132 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 69 ) , span: span ( 133 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 142 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 126 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 127 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 143 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 144 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 130 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 131 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 40 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 82 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 83 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 81 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoEnumType (... name: "std::result::Result<(), std::fmt::Error>" , adtDef: adtDef ( 40 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 1 ) .Tys : ty ( 107 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 23 ) |-> typeInfoRefType ( ty ( 25 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 100 ) ) - ty ( 25 ) |-> typeInfoRefType ( ty ( 99 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 28 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 16 ) ) - ty ( 30 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 31 ) |-> typeInfoRefType ( ty ( 45 ) ) - ty ( 33 ) |-> typeInfoRefType ( ty ( 34 ) ) - ty ( 34 ) |-> typeInfoRefType ( ty ( 108 ) ) - ty ( 36 ) |-> typeInfoRefType ( ty ( 37 ) ) - ty ( 37 ) |-> typeInfoRefType ( ty ( 44 ) ) - ty ( 39 ) |-> typeInfoRefType ( ty ( 40 ) ) - ty ( 40 ) |-> typeInfoRefType ( ty ( 42 ) ) - ty ( 42 ) |-> typeInfoRefType ( ty ( 47 ) ) - ty ( 43 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 44 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI16 ) ) - ty ( 45 ) |-> typeInfoRefType ( ty ( 46 ) ) - ty ( 46 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU16 ) ) - ty ( 47 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 54 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 64 ) |-> typeInfoRefType ( ty ( 110 ) ) - ty ( 65 ) |-> typeInfoRefType ( ty ( 112 ) ) - ty ( 66 ) |-> typeInfoRefType ( ty ( 121 ) ) - ty ( 67 ) |-> typeInfoEnumType (... name: "std::option::Option<&[core::fmt::rt::Placeholder]>" , adtDef: adtDef ( 20 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 122 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 68 ) |-> typeInfoStructType ( "std::fmt::Arguments<'_>" , adtDef ( 13 ) , ty ( 64 ) ty ( 67 ) ty ( 66 ) .Tys ) - ty ( 69 ) |-> typeInfoRefType ( ty ( 126 ) ) - ty ( 71 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 73 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 74 ) |-> typeInfoPtrType ( ty ( 37 ) ) - ty ( 75 ) |-> typeInfoPtrType ( ty ( 28 ) ) - ty ( 76 ) |-> typeInfoPtrType ( ty ( 31 ) ) - ty ( 77 ) |-> typeInfoPtrType ( ty ( 40 ) ) - ty ( 78 ) |-> typeInfoPtrType ( ty ( 25 ) ) - ty ( 79 ) |-> typeInfoPtrType ( ty ( 34 ) ) - ty ( 81 ) |-> typeInfoRefType ( ty ( 127 ) ) - ty ( 82 ) |-> typeInfoVoidType - ty ( 83 ) |-> typeInfoEnumType (... name: "core::panicking::AssertKind" , adtDef: adtDef ( 19 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 84 ) |-> typeInfoEnumType (... name: "std::option::Option>" , adtDef: adtDef ( 20 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 68 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) ) ) - ty ( 91 ) |-> typeInfoTupleType ( ty ( 25 ) ty ( 25 ) .Tys ) - ty ( 92 ) |-> typeInfoTupleType ( ty ( 34 ) ty ( 34 ) .Tys ) - ty ( 96 ) |-> typeInfoRefType ( ty ( 111 ) ) - ty ( 99 ) |-> typeInfoEnumType (... name: "Thing<'_>" , adtDef: adtDef ( 25 ) , discriminants: discriminant ( 0 ) .Discriminants , fields: ty ( 37 ) ty ( 45 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 100 ) |-> typeInfoStructType ( "std::fmt::Formatter<'_>" , adtDef ( 30 ) , ty ( 47 ) ty ( 101 ) ty ( 102 ) ty ( 103 ) ty ( 103 ) ty ( 104 ) .Tys ) - ty ( 101 ) |-> typeInfoPrimitiveType ( primTypeChar ) - ty ( 102 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Alignment" , adtDef: adtDef ( 37 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) discriminant ( 3 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 3 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 103 ) |-> typeInfoEnumType (... name: "std::option::Option" , adtDef: adtDef ( 20 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 105 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 104 ) |-> typeInfoRefType ( ty ( 106 ) ) - ty ( 105 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 107 ) |-> typeInfoStructType ( "std::fmt::Error" , adtDef ( 43 ) , .Tys ) - ty ( 108 ) |-> typeInfoStructType ( "Another<'_>" , adtDef ( 44 ) , ty ( 28 ) ty ( 42 ) .Tys ) - ty ( 110 ) |-> typeInfoArrayType ( ty ( 96 ) , noTyConst ) - ty ( 111 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 112 ) |-> typeInfoArrayType ( ty ( 113 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 105 ) , allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 113 ) |-> typeInfoStructType ( "core::fmt::rt::Argument<'_>" , adtDef ( 51 ) , ty ( 114 ) .Tys ) - ty ( 114 ) |-> typeInfoEnumType (... name: "core::fmt::rt::ArgumentType<'_>" , adtDef: adtDef ( 53 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 115 ) ty ( 116 ) ty ( 117 ) .Tys : ty ( 105 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) machineSize (... numBits: 64 ) machineSize (... numBits: 128 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 115 ) |-> typeInfoStructType ( "std::ptr::NonNull<()>" , adtDef ( 58 ) , ty ( 118 ) .Tys ) - ty ( 117 ) |-> typeInfoStructType ( "std::marker::PhantomData<&()>" , adtDef ( 60 ) , .Tys ) - ty ( 118 ) |-> typeInfoPtrType ( ty ( 1 ) ) - ty ( 120 ) |-> typeInfoRefType ( ty ( 1 ) ) - ty ( 121 ) |-> typeInfoArrayType ( ty ( 113 ) , noTyConst ) - ty ( 122 ) |-> typeInfoRefType ( ty ( 123 ) ) - ty ( 123 ) |-> typeInfoArrayType ( ty ( 124 ) , noTyConst ) - ty ( 124 ) |-> typeInfoStructType ( "core::fmt::rt::Placeholder" , adtDef ( 61 ) , ty ( 105 ) ty ( 101 ) ty ( 102 ) ty ( 47 ) ty ( 125 ) ty ( 125 ) .Tys ) - ty ( 125 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Count" , adtDef: adtDef ( 68 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: ty ( 105 ) .Tys : ty ( 105 ) .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 126 ) |-> typeInfoArrayType ( ty ( 96 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 105 ) , allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 1 ) ) ) ) - ty ( 128 ) |-> typeInfoRefType ( ty ( 129 ) ) - ty ( 129 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 77 ) , ty ( 96 ) ty ( 47 ) ty ( 47 ) .Tys ) - ty ( 131 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state index 60d250574..09d56cea7 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state @@ -54,44 +54,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 2 ) |-> StringVal ( "unsafe precondition(s) violated: u8::unchecked_add cannot overflow" ) - allocId ( 3 ) |-> StringVal ( "unsafe precondition(s) violated: i8::unchecked_sub cannot overflow" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 80 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 82 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 84 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 85 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 86 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 87 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 88 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) ) ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 70 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 72 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 9 ) , span: span ( 75 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 104 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 105 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 106 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 109 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 110 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 111 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 112 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 114 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 115 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 113 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 113 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 113 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 116 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 118 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 119 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 122 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 109 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 123 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 124 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 114 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 115 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 113 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 125 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 117 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 116 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 122 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 123 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 124 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 125 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 126 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 39 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 40 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 24 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 25 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 16 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 14 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 21 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 37 ) ) - ty ( 25 ) |-> typeInfoVoidType - ty ( 26 ) |-> typeInfoTupleType ( ty ( 2 ) ty ( 21 ) .Tys ) - ty ( 28 ) |-> typeInfoTupleType ( ty ( 9 ) ty ( 21 ) .Tys ) - ty ( 30 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 32 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI16 ) ) - ty ( 36 ) |-> typeInfoTupleType ( ty ( 35 ) ty ( 21 ) .Tys ) - ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 40 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state index 0e70f7967..a2940d22a 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state @@ -67,37 +67,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 59 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 8 ) , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 70 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 77 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 17 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 33 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 10 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 8 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 25 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI16 ) ) - ty ( 27 ) |-> typeInfoTupleType ( ty ( 9 ) ty ( 25 ) .Tys ) - ty ( 28 ) |-> typeInfoTupleType ( ty ( 2 ) ty ( 25 ) .Tys ) - ty ( 29 ) |-> typeInfoTupleType ( ty ( 26 ) ty ( 25 ) .Tys ) - ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 33 ) |-> typeInfoVoidType - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state index ef50509a5..97333b1b7 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state @@ -41,34 +41,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x85" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , expected: false , msg: assertMessageOverflowNeg ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNeg , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 63 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 28 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 29 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 19 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 30 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 12 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 10 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 25 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 26 ) |-> typeInfoTupleType ( ty ( 9 ) ty ( 25 ) .Tys ) - ty ( 29 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 30 ) |-> typeInfoVoidType - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arrays/array_indexing.state b/kmir/src/tests/integration/data/exec-smir/arrays/array_indexing.state index 7947d1403..d905964fc 100644 --- a/kmir/src/tests/integration/data/exec-smir/arrays/array_indexing.state +++ b/kmir/src/tests/integration/data/exec-smir/arrays/array_indexing.state @@ -49,40 +49,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 1 ) |-> StringVal ( "assertion failed: b == c" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueRepeat ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) , tyConst (... kind: tyConstKindValue ( ty ( 25 ) , allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 11 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 17 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 31 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 10 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 8 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 25 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI16 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 29 ) |-> typeInfoArrayType ( ty ( 26 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 25 ) , allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 30 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 31 ) |-> typeInfoVoidType - ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 35 ) |-> typeInfoRefType ( ty ( 37 ) ) - ty ( 36 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 37 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 23 ) , ty ( 28 ) ty ( 38 ) ty ( 38 ) .Tys ) - ty ( 38 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arrays/array_inlined.state b/kmir/src/tests/integration/data/exec-smir/arrays/array_inlined.state index 69b84b43d..a4e52f93f 100644 --- a/kmir/src/tests/integration/data/exec-smir/arrays/array_inlined.state +++ b/kmir/src/tests/integration/data/exec-smir/arrays/array_inlined.state @@ -92,75 +92,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 44 ) |-> monoItemFn (... name: symbol ( "core::panicking::assert_failed::" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 36 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 78 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 78 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , ty ( 36 ) ) ) , span: span ( 78 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 75 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 35 ) , id: mirConstId ( 14 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 76 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 37 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 38 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 39 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 36 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 36 ) , span: span ( 78 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 78 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "left" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "right" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "args" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 91 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\xfe\x03" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityNot ) ) , ty: ty ( 40 ) , id: mirConstId ( 16 ) ) ) ) ) ) , span: span ( 91 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 92 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 41 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 92 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 41 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 90 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 90 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 90 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemIndex ( local ( 4 ) ) .ProjectionElems ) ) ) ) , span: span ( 90 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 94 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\xfe\x03" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityNot ) ) , ty: ty ( 40 ) , id: mirConstId ( 16 ) ) ) ) ) ) , span: span ( 94 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 95 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 41 ) , id: mirConstId ( 19 ) ) ) ) ) ) , span: span ( 95 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 41 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 93 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 93 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 93 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 8 ) , projection: projectionElemIndex ( local ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 93 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 96 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 42 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 96 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 96 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 98 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\xec\xff\xff\xff\x1e\x00\x00\x00\xd8\xff\xff\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityNot ) ) , ty: ty ( 43 ) , id: mirConstId ( 20 ) ) ) ) ) ) , span: span ( 98 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 99 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 41 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 99 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 41 ) , id: mirConstId ( 21 ) ) ) ) ) ) , span: span ( 97 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 17 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 97 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 17 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 97 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 15 ) , projection: projectionElemIndex ( local ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 97 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\xec\xff\xff\xff\x1e\x00\x00\x00\xd8\xff\xff\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityNot ) ) , ty: ty ( 43 ) , id: mirConstId ( 20 ) ) ) ) ) ) , span: span ( 101 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 41 ) , id: mirConstId ( 19 ) ) ) ) ) ) , span: span ( 102 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 41 ) , id: mirConstId ( 21 ) ) ) ) ) ) , span: span ( 100 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 21 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 22 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 100 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 23 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 22 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 21 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 100 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 20 ) , projection: projectionElemIndex ( local ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 100 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 24 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 42 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 24 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 103 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 28 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 106 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 29 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 28 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 104 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 22 ) ) ) ) ) ) , span: span ( 105 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 29 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 42 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 28 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 104 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 22 ) ) ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 105 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 27 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 29 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 105 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 26 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 27 ) , projection: .ProjectionElems ) ) ) , span: span ( 108 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 30 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 13 ) , projection: .ProjectionElems ) ) ) , span: span ( 109 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 25 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 26 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 30 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 110 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 31 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 25 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 111 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 32 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 25 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 112 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 34 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 31 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 113 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 35 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 32 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 114 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 33 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 34 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 35 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 107 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 33 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 8 ) ) ) , span: span ( 107 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 115 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 36 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 10 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 118 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 38 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 11 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 45 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 119 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 116 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 44 ) , id: mirConstId ( 23 ) ) ) ) , args: operandMove ( place (... local: local ( 36 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 31 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 32 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 38 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 37 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 117 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 120 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 40 ) , span: span ( 91 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 41 ) , span: span ( 92 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 41 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 42 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 93 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 40 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 41 ) , span: span ( 95 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 41 ) , span: span ( 93 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 42 ) , span: span ( 93 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 46 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 122 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 97 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 43 ) , span: span ( 98 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 41 ) , span: span ( 99 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 41 ) , span: span ( 97 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 42 ) , span: span ( 97 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 100 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 43 ) , span: span ( 101 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 41 ) , span: span ( 102 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 41 ) , span: span ( 100 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 42 ) , span: span ( 100 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 47 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 48 ) , span: span ( 110 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 108 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 105 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 106 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 47 ) , span: span ( 105 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 109 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 111 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 112 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 42 ) , span: span ( 107 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 113 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 114 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 38 ) , span: span ( 123 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 37 ) , span: span ( 117 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 39 ) , span: span ( 119 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "i8_product" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i32_product" ) , sourceInfo: sourceInfo (... span: span ( 122 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 111 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 31 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 112 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 32 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 123 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 36 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 124 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 79 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 80 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 54 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 37 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 15 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 13 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoEnumType (... name: "std::result::Result<(), std::fmt::Error>" , adtDef: adtDef ( 54 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 1 ) .Tys : ty ( 76 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 23 ) |-> typeInfoRefType ( ty ( 25 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 72 ) ) - ty ( 25 ) |-> typeInfoRefType ( ty ( 16 ) ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 31 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 33 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 34 ) |-> typeInfoPtrType ( ty ( 25 ) ) - ty ( 36 ) |-> typeInfoRefType ( ty ( 50 ) ) - ty ( 37 ) |-> typeInfoVoidType - ty ( 38 ) |-> typeInfoEnumType (... name: "core::panicking::AssertKind" , adtDef: adtDef ( 10 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 39 ) |-> typeInfoEnumType (... name: "std::option::Option>" , adtDef: adtDef ( 11 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 45 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) ) ) - ty ( 40 ) |-> typeInfoArrayType ( ty ( 2 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 41 ) , allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 41 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 42 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 43 ) |-> typeInfoArrayType ( ty ( 16 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 41 ) , allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 1 ) ) ) ) - ty ( 45 ) |-> typeInfoStructType ( "std::fmt::Arguments<'_>" , adtDef ( 22 ) , ty ( 52 ) ty ( 53 ) ty ( 54 ) .Tys ) - ty ( 46 ) |-> typeInfoTupleType ( ty ( 2 ) ty ( 42 ) .Tys ) - ty ( 47 ) |-> typeInfoTupleType ( ty ( 16 ) ty ( 42 ) .Tys ) - ty ( 48 ) |-> typeInfoTupleType ( ty ( 25 ) ty ( 25 ) .Tys ) - ty ( 51 ) |-> typeInfoRefType ( ty ( 78 ) ) - ty ( 52 ) |-> typeInfoRefType ( ty ( 55 ) ) - ty ( 53 ) |-> typeInfoEnumType (... name: "std::option::Option<&[core::fmt::rt::Placeholder]>" , adtDef: adtDef ( 11 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 58 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 54 ) |-> typeInfoRefType ( ty ( 64 ) ) - ty ( 55 ) |-> typeInfoArrayType ( ty ( 56 ) , noTyConst ) - ty ( 56 ) |-> typeInfoRefType ( ty ( 57 ) ) - ty ( 57 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 58 ) |-> typeInfoRefType ( ty ( 59 ) ) - ty ( 59 ) |-> typeInfoArrayType ( ty ( 60 ) , noTyConst ) - ty ( 60 ) |-> typeInfoStructType ( "core::fmt::rt::Placeholder" , adtDef ( 26 ) , ty ( 41 ) ty ( 61 ) ty ( 62 ) ty ( 26 ) ty ( 63 ) ty ( 63 ) .Tys ) - ty ( 61 ) |-> typeInfoPrimitiveType ( primTypeChar ) - ty ( 62 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Alignment" , adtDef: adtDef ( 33 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) discriminant ( 3 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 3 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 63 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Count" , adtDef: adtDef ( 34 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: ty ( 41 ) .Tys : ty ( 41 ) .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 64 ) |-> typeInfoArrayType ( ty ( 65 ) , noTyConst ) - ty ( 65 ) |-> typeInfoStructType ( "core::fmt::rt::Argument<'_>" , adtDef ( 37 ) , ty ( 66 ) .Tys ) - ty ( 66 ) |-> typeInfoEnumType (... name: "core::fmt::rt::ArgumentType<'_>" , adtDef: adtDef ( 39 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 67 ) ty ( 68 ) ty ( 69 ) .Tys : ty ( 41 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) machineSize (... numBits: 64 ) machineSize (... numBits: 128 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 67 ) |-> typeInfoStructType ( "std::ptr::NonNull<()>" , adtDef ( 44 ) , ty ( 70 ) .Tys ) - ty ( 69 ) |-> typeInfoStructType ( "std::marker::PhantomData<&()>" , adtDef ( 58 ) , .Tys ) - ty ( 70 ) |-> typeInfoPtrType ( ty ( 1 ) ) - ty ( 72 ) |-> typeInfoStructType ( "std::fmt::Formatter<'_>" , adtDef ( 46 ) , ty ( 26 ) ty ( 61 ) ty ( 62 ) ty ( 73 ) ty ( 73 ) ty ( 74 ) .Tys ) - ty ( 73 ) |-> typeInfoEnumType (... name: "std::option::Option" , adtDef: adtDef ( 11 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 41 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 74 ) |-> typeInfoRefType ( ty ( 75 ) ) - ty ( 76 ) |-> typeInfoStructType ( "std::fmt::Error" , adtDef ( 57 ) , .Tys ) - ty ( 77 ) |-> typeInfoRefType ( ty ( 1 ) ) - ty ( 78 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 59 ) , ty ( 56 ) ty ( 26 ) ty ( 26 ) .Tys ) - ty ( 80 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arrays/array_write.state b/kmir/src/tests/integration/data/exec-smir/arrays/array_write.state index f161d0351..b5fd26e06 100644 --- a/kmir/src/tests/integration/data/exec-smir/arrays/array_write.state +++ b/kmir/src/tests/integration/data/exec-smir/arrays/array_write.state @@ -58,41 +58,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 1 ) |-> StringVal ( "assertion failed: a[0] == a[1]" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueRepeat ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) , tyConst (... kind: tyConstKindValue ( ty ( 25 ) , allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 2 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 6 ) ) .ProjectionElems ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 11 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 15 ) ) .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 6 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 65 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 67 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 18 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 33 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 34 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 17 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 32 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 10 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 8 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 25 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI16 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 37 ) ) - ty ( 29 ) |-> typeInfoArrayType ( ty ( 26 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 25 ) , allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 30 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 31 ) |-> typeInfoRefType ( ty ( 26 ) ) - ty ( 32 ) |-> typeInfoVoidType - ty ( 34 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 36 ) |-> typeInfoRefType ( ty ( 38 ) ) - ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 38 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 22 ) , ty ( 28 ) ty ( 39 ) ty ( 39 ) .Tys ) - ty ( 39 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast new file mode 100755 index 000000000..8f750f476 Binary files /dev/null and b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast differ diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state index 5703265f0..b2f9a3ef5 100644 --- a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state +++ b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state @@ -46,37 +46,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 29 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 69 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 79 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "g" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "h" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 9 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "j" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 10 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "k" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 11 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "l" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 12 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "m" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 13 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "n" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 14 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "o" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 15 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 82 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 30 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 31 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 12 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 32 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 18 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 16 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 25 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU16 ) ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI16 ) ) - ty ( 27 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI64 ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 29 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU64 ) ) - ty ( 31 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 32 ) |-> typeInfoVoidType - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast2 b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast2 new file mode 100755 index 000000000..71fe3bcd9 Binary files /dev/null and b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast2 differ diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.state index cab66e3dc..056091d15 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.state +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.state @@ -36,35 +36,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 29 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 30 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 20 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 31 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 11 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 9 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI16 ) ) - ty ( 30 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 31 ) |-> typeInfoVoidType - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/enum/enum.state b/kmir/src/tests/integration/data/exec-smir/enum/enum.state index df56b2700..65f7723a8 100644 --- a/kmir/src/tests/integration/data/exec-smir/enum/enum.state +++ b/kmir/src/tests/integration/data/exec-smir/enum/enum.state @@ -55,37 +55,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 1 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 9 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 2 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 3 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) .Operands ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 89 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDowncast ( variantIdx ( 1 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 1 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 2 ) ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 65 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 4 ) ) , span: span ( 68 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 89 , basicBlockIdx ( 7 ) ) branch ( 90 , basicBlockIdx ( 6 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 8 ) ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 5 ) , projection: projectionElemDowncast ( variantIdx ( 2 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 3 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 75 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) operandConstant ( constOperand (... span: span ( 76 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 78 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 8 ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 8 ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 81 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 82 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 84 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 85 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 88 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 89 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 77 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 84 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "zz" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "zzz" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "zzz" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "zzz" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 10 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 11 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 92 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 19 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 33 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 12 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 10 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 25 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI16 ) ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 27 ) |-> typeInfoEnumType (... name: "Letter" , adtDef: adtDef ( 7 ) , discriminants: discriminant ( 65 ) discriminant ( 66 ) discriminant ( 77 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 65 , end: 77 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 65 , end: 77 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 28 ) |-> typeInfoEnumType (... name: "WithData" , adtDef: adtDef ( 8 ) , discriminants: discriminant ( 88 ) discriminant ( 89 ) discriminant ( 90 ) discriminant ( 9090 ) .Discriminants , fields: .Tys : ty ( 16 ) .Tys : ty ( 25 ) ty ( 26 ) .Tys : ty ( 2 ) ty ( 2 ) ty ( 26 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI16 , signed: false ) ) , validRange: wrappingRange (... start: 88 , end: 9090 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 2 ) , size: machineSize (... numBits: 16 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 32 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 4 ) , size: machineSize (... numBits: 64 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 16 ) machineSize (... numBits: 32 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 2 ) , size: machineSize (... numBits: 48 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 16 ) machineSize (... numBits: 24 ) machineSize (... numBits: 32 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 3 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 2 ) , size: machineSize (... numBits: 48 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 4 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 29 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU16 ) ) - ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 33 ) |-> typeInfoVoidType - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state b/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state index df75041f2..42d20c987 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state @@ -50,74 +50,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 0 ) |-> Integer ( 11 , 32 , false ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 35 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 43 ) |-> monoItemFn (... name: symbol ( "add_one" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 94 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 41 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 17 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 94 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 26 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 42 ) , span: span ( 94 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 98 ) ) ) ) - ty ( 44 ) |-> monoItemFn (... name: symbol ( "std::hint::black_box::" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 35 ) , id: mirConstId ( 14 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 75 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 41 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 77 ) ) ) ) - ty ( 45 ) |-> monoItemFn (... name: symbol ( "core::panicking::assert_failed::" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 80 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 80 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 37 ) ) ) , span: span ( 80 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , ty ( 37 ) ) ) , span: span ( 81 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 36 ) , id: mirConstId ( 15 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 38 ) , span: span ( 82 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 84 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 85 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 40 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 37 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 37 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 81 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "left" ) , sourceInfo: sourceInfo (... span: span ( 84 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "right" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "args" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 87 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 11 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 19 ) ) ) ) ) ) , span: span ( 102 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 99 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 43 ) , id: mirConstId ( 18 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 100 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 103 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 44 ) , id: mirConstId ( 20 ) ) ) ) , args: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 104 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 106 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 107 ) , 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 ( 25 ) , id: mirConstId ( 21 ) ) ) ) ) ) , span: span ( 107 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 108 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 109 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 110 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 7 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 111 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 8 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 112 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 105 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 105 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 113 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 12 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 116 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 13 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 46 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 117 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 114 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 45 ) , id: mirConstId ( 22 ) ) ) ) , args: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 115 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 118 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 119 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 100 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 102 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 47 ) , span: span ( 108 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 106 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 107 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 109 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 110 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 41 ) , span: span ( 105 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 111 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 112 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 38 ) , span: span ( 115 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 40 ) , span: span ( 117 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "input" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 19 ) ) ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 119 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 109 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 110 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 122 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 79 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 80 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 25 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 38 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 64 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 62 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoEnumType (... name: "std::result::Result<(), std::fmt::Error>" , adtDef: adtDef ( 25 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 1 ) .Tys : ty ( 55 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 23 ) |-> typeInfoRefType ( ty ( 25 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 48 ) ) - ty ( 25 ) |-> typeInfoRefType ( ty ( 26 ) ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 31 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 33 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 34 ) |-> typeInfoPtrType ( ty ( 25 ) ) - ty ( 37 ) |-> typeInfoRefType ( ty ( 78 ) ) - ty ( 38 ) |-> typeInfoVoidType - ty ( 39 ) |-> typeInfoEnumType (... name: "core::panicking::AssertKind" , adtDef: adtDef ( 12 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 40 ) |-> typeInfoEnumType (... name: "std::option::Option>" , adtDef: adtDef ( 13 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 46 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) ) ) - ty ( 41 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 42 ) |-> typeInfoTupleType ( ty ( 26 ) ty ( 41 ) .Tys ) - ty ( 46 ) |-> typeInfoStructType ( "std::fmt::Arguments<'_>" , adtDef ( 32 ) , ty ( 57 ) ty ( 58 ) ty ( 59 ) .Tys ) - ty ( 47 ) |-> typeInfoTupleType ( ty ( 25 ) ty ( 25 ) .Tys ) - ty ( 48 ) |-> typeInfoStructType ( "std::fmt::Formatter<'_>" , adtDef ( 15 ) , ty ( 26 ) ty ( 49 ) ty ( 50 ) ty ( 51 ) ty ( 51 ) ty ( 52 ) .Tys ) - ty ( 49 ) |-> typeInfoPrimitiveType ( primTypeChar ) - ty ( 50 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Alignment" , adtDef: adtDef ( 22 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) discriminant ( 3 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 3 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 51 ) |-> typeInfoEnumType (... name: "std::option::Option" , adtDef: adtDef ( 13 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 53 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 52 ) |-> typeInfoRefType ( ty ( 54 ) ) - ty ( 53 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 55 ) |-> typeInfoStructType ( "std::fmt::Error" , adtDef ( 28 ) , .Tys ) - ty ( 56 ) |-> typeInfoRefType ( ty ( 76 ) ) - ty ( 57 ) |-> typeInfoRefType ( ty ( 60 ) ) - ty ( 58 ) |-> typeInfoEnumType (... name: "std::option::Option<&[core::fmt::rt::Placeholder]>" , adtDef: adtDef ( 13 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 63 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 59 ) |-> typeInfoRefType ( ty ( 67 ) ) - ty ( 60 ) |-> typeInfoArrayType ( ty ( 61 ) , noTyConst ) - ty ( 61 ) |-> typeInfoRefType ( ty ( 62 ) ) - ty ( 62 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 63 ) |-> typeInfoRefType ( ty ( 64 ) ) - ty ( 64 ) |-> typeInfoArrayType ( ty ( 65 ) , noTyConst ) - ty ( 65 ) |-> typeInfoStructType ( "core::fmt::rt::Placeholder" , adtDef ( 36 ) , ty ( 53 ) ty ( 49 ) ty ( 50 ) ty ( 26 ) ty ( 66 ) ty ( 66 ) .Tys ) - ty ( 66 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Count" , adtDef: adtDef ( 43 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: ty ( 53 ) .Tys : ty ( 53 ) .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 67 ) |-> typeInfoArrayType ( ty ( 68 ) , noTyConst ) - ty ( 68 ) |-> typeInfoStructType ( "core::fmt::rt::Argument<'_>" , adtDef ( 46 ) , ty ( 69 ) .Tys ) - ty ( 69 ) |-> typeInfoEnumType (... name: "core::fmt::rt::ArgumentType<'_>" , adtDef: adtDef ( 48 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 70 ) ty ( 71 ) ty ( 72 ) .Tys : ty ( 53 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) machineSize (... numBits: 64 ) machineSize (... numBits: 128 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 70 ) |-> typeInfoStructType ( "std::ptr::NonNull<()>" , adtDef ( 53 ) , ty ( 73 ) .Tys ) - ty ( 72 ) |-> typeInfoStructType ( "std::marker::PhantomData<&()>" , adtDef ( 55 ) , .Tys ) - ty ( 73 ) |-> typeInfoPtrType ( ty ( 1 ) ) - ty ( 75 ) |-> typeInfoRefType ( ty ( 1 ) ) - ty ( 76 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 56 ) , ty ( 61 ) ty ( 26 ) ty ( 26 ) .Tys ) - ty ( 80 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state index f881481ee..95201e717 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state @@ -40,39 +40,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 1 ) |-> StringVal ( "assertion failed: result" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( 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: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 13 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 30 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 24 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 22 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 35 ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) - ty ( 30 ) |-> typeInfoVoidType - ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 34 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 36 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 18 ) , ty ( 27 ) ty ( 37 ) ty ( 37 ) .Tys ) - ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state index fe1a84c21..596624cb4 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state @@ -32,34 +32,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 28 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 29 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 21 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 30 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 13 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 11 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 29 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 30 ) |-> typeInfoVoidType - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.state index 7ce94c6d2..a8b20314b 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.state @@ -34,34 +34,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 28 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 29 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 21 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 30 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 13 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 11 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 29 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 30 ) |-> typeInfoVoidType - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/niche-enum/niche-enum.state b/kmir/src/tests/integration/data/exec-smir/niche-enum/niche-enum.state index 22ce9e213..df69429dc 100644 --- a/kmir/src/tests/integration/data/exec-smir/niche-enum/niche-enum.state +++ b/kmir/src/tests/integration/data/exec-smir/niche-enum/niche-enum.state @@ -76,84 +76,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 2 ) |-> Aggregate ( variantIdx ( 0 ) , .List ) - allocId ( 3 ) |-> Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , .List ) ) ) - allocId ( 4 ) |-> Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 1 ) , .List ) ) ) - allocId ( 7 ) |-> StringVal ( "Two" ) - allocId ( 8 ) |-> StringVal ( "One" ) - allocId ( 9 ) |-> StringVal ( "Some" ) - allocId ( 10 ) |-> StringVal ( "None" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 45 ) |-> monoItemFn (... name: symbol ( "::eq" ) , id: defId ( 16 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 149 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 149 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 149 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 148 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 44 ) , span: span ( 149 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 149 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 149 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 149 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 149 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 149 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 149 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "__self_discr" ) , sourceInfo: sourceInfo (... span: span ( 149 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "__arg1_discr" ) , sourceInfo: sourceInfo (... span: span ( 149 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 149 ) ) ) ) - ty ( 47 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 1 , basicBlockIdx ( 3 ) ) branch ( 2 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 88 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 11 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 42 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 89 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 4 ) ) , span: span ( 89 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 12 ) , variantIdx ( 1 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 91 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 11 ) , variantIdx ( 1 ) , genericArgKindType ( ty ( 42 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 92 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 4 ) ) , span: span ( 90 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 12 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 94 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 11 ) , variantIdx ( 1 ) , genericArgKindType ( ty ( 42 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 95 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 4 ) ) , span: span ( 93 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 96 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 46 ) , span: span ( 97 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 98 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 42 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 42 ) , span: span ( 91 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 99 ) ) ) ) - ty ( 48 ) |-> monoItemFn (... name: symbol ( " as std::cmp::PartialEq>::eq" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) branch ( 1 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindUnreachable , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 6 ) ) branch ( 1 , basicBlockIdx ( 7 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) branch ( 1 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 44 ) , id: mirConstId ( 16 ) ) ) ) ) ) , span: span ( 74 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 8 ) ) , span: span ( 74 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 75 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 44 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 75 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 8 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 76 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 44 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 8 ) ) , span: span ( 76 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 1 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 42 ) ) .ProjectionElems ) ) ) , span: span ( 78 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 1 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 42 ) ) .ProjectionElems ) ) ) , span: span ( 79 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 45 ) , id: mirConstId ( 18 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 8 ) ) , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 80 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 44 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 79 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "l" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 87 ) ) ) ) - ty ( 49 ) |-> monoItemFn (... name: symbol ( "core::panicking::assert_failed::, std::option::Option>" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 36 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , ty ( 36 ) ) ) , span: span ( 56 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 35 ) , id: mirConstId ( 10 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 37 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 38 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 39 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 36 ) , span: span ( 55 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 36 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 56 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "left" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "right" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "args" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 13 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 100 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 47 ) , id: mirConstId ( 19 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 102 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 104 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 105 ) , 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 ( 25 ) , id: mirConstId ( 22 ) ) ) ) ) ) , span: span ( 105 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 106 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 107 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 108 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 103 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 48 ) , id: mirConstId ( 21 ) ) ) ) , args: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 103 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 109 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 47 ) , id: mirConstId ( 19 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 110 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 23 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 5 ) ) , unwind: unwindActionContinue ) , span: span ( 111 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 14 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 114 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 11 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 50 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 115 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 112 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 49 ) , id: mirConstId ( 24 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 9 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 113 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 13 ) , projection: .ProjectionElems ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 118 ) , 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 ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 25 ) ) ) ) ) ) , span: span ( 118 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 119 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 11 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 120 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 11 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 121 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 116 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 48 ) , id: mirConstId ( 21 ) ) ) ) , args: operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 6 ) ) , unwind: unwindActionContinue ) , span: span ( 116 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 17 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 116 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 122 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 47 ) , id: mirConstId ( 19 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 123 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 26 ) ) ) ) .Operands , destination: place (... local: local ( 23 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 9 ) ) , unwind: unwindActionContinue ) , span: span ( 124 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 14 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 127 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 11 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 50 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 128 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 125 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 49 ) , id: mirConstId ( 24 ) ) ) ) , args: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 20 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 126 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 23 ) , projection: .ProjectionElems ) ) ) , span: span ( 130 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 131 ) , 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 ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 27 ) ) ) ) ) ) , span: span ( 131 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 22 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 24 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 132 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 25 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 133 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 26 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 134 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 129 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 48 ) , id: mirConstId ( 21 ) ) ) ) , args: operandCopy ( place (... local: local ( 25 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 26 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 27 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 10 ) ) , unwind: unwindActionContinue ) , span: span ( 129 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 27 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 12 ) ) .Branches , otherwise: basicBlockIdx ( 11 ) ) ) , span: span ( 129 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 135 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 28 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 14 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 138 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 30 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 11 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 50 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 139 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 136 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 49 ) , id: mirConstId ( 24 ) ) ) ) , args: operandMove ( place (... local: local ( 28 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 25 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 26 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 30 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 29 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 137 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 140 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 51 ) , span: span ( 106 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 104 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 46 ) , span: span ( 102 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 105 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 107 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 108 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 44 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 38 ) , span: span ( 141 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 37 ) , span: span ( 113 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 39 ) , span: span ( 115 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 51 ) , span: span ( 119 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 117 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 46 ) , span: span ( 111 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 118 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 44 ) , span: span ( 116 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 38 ) , span: span ( 142 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 37 ) , span: span ( 126 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 39 ) , span: span ( 128 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 51 ) , span: span ( 132 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 130 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 46 ) , span: span ( 124 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 131 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 133 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 134 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 44 ) , span: span ( 129 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 38 ) , span: span ( 143 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 37 ) , span: span ( 137 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 39 ) , span: span ( 139 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 107 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 108 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 141 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 142 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 133 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 25 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 134 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 26 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 143 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 28 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 144 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 82 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 83 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 28 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 37 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709552000 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 73 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 71 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoEnumType (... name: "std::result::Result<(), std::fmt::Error>" , adtDef: adtDef ( 28 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 1 ) .Tys : ty ( 61 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 23 ) |-> typeInfoRefType ( ty ( 25 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 53 ) ) - ty ( 25 ) |-> typeInfoRefType ( ty ( 46 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 28 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 42 ) ) - ty ( 30 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 32 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 33 ) |-> typeInfoPtrType ( ty ( 28 ) ) - ty ( 34 ) |-> typeInfoPtrType ( ty ( 25 ) ) - ty ( 36 ) |-> typeInfoRefType ( ty ( 62 ) ) - ty ( 37 ) |-> typeInfoVoidType - ty ( 38 ) |-> typeInfoEnumType (... name: "core::panicking::AssertKind" , adtDef: adtDef ( 14 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 39 ) |-> typeInfoEnumType (... name: "std::option::Option>" , adtDef: adtDef ( 11 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 50 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) ) ) - ty ( 41 ) |-> typeInfoRefType ( ty ( 52 ) ) - ty ( 42 ) |-> typeInfoEnumType (... name: "SmallInt" , adtDef: adtDef ( 12 ) , discriminants: discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 1 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 1 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 44 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 46 ) |-> typeInfoEnumType (... name: "std::option::Option" , adtDef: adtDef ( 11 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 42 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 1 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 50 ) |-> typeInfoStructType ( "std::fmt::Arguments<'_>" , adtDef ( 35 ) , ty ( 64 ) ty ( 65 ) ty ( 66 ) .Tys ) - ty ( 51 ) |-> typeInfoTupleType ( ty ( 25 ) ty ( 25 ) .Tys ) - ty ( 52 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 53 ) |-> typeInfoStructType ( "std::fmt::Formatter<'_>" , adtDef ( 18 ) , ty ( 54 ) ty ( 55 ) ty ( 56 ) ty ( 57 ) ty ( 57 ) ty ( 58 ) .Tys ) - ty ( 54 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 55 ) |-> typeInfoPrimitiveType ( primTypeChar ) - ty ( 56 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Alignment" , adtDef: adtDef ( 25 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) discriminant ( 3 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 3 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 57 ) |-> typeInfoEnumType (... name: "std::option::Option" , adtDef: adtDef ( 11 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 59 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 58 ) |-> typeInfoRefType ( ty ( 60 ) ) - ty ( 59 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 61 ) |-> typeInfoStructType ( "std::fmt::Error" , adtDef ( 31 ) , .Tys ) - ty ( 63 ) |-> typeInfoRefType ( ty ( 81 ) ) - ty ( 64 ) |-> typeInfoRefType ( ty ( 67 ) ) - ty ( 65 ) |-> typeInfoEnumType (... name: "std::option::Option<&[core::fmt::rt::Placeholder]>" , adtDef: adtDef ( 11 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 68 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 66 ) |-> typeInfoRefType ( ty ( 72 ) ) - ty ( 67 ) |-> typeInfoArrayType ( ty ( 41 ) , noTyConst ) - ty ( 68 ) |-> typeInfoRefType ( ty ( 69 ) ) - ty ( 69 ) |-> typeInfoArrayType ( ty ( 70 ) , noTyConst ) - ty ( 70 ) |-> typeInfoStructType ( "core::fmt::rt::Placeholder" , adtDef ( 39 ) , ty ( 59 ) ty ( 55 ) ty ( 56 ) ty ( 54 ) ty ( 71 ) ty ( 71 ) .Tys ) - ty ( 71 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Count" , adtDef: adtDef ( 46 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: ty ( 59 ) .Tys : ty ( 59 ) .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 72 ) |-> typeInfoArrayType ( ty ( 73 ) , noTyConst ) - ty ( 73 ) |-> typeInfoStructType ( "core::fmt::rt::Argument<'_>" , adtDef ( 49 ) , ty ( 74 ) .Tys ) - ty ( 74 ) |-> typeInfoEnumType (... name: "core::fmt::rt::ArgumentType<'_>" , adtDef: adtDef ( 51 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 75 ) ty ( 76 ) ty ( 77 ) .Tys : ty ( 59 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) machineSize (... numBits: 64 ) machineSize (... numBits: 128 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 75 ) |-> typeInfoStructType ( "std::ptr::NonNull<()>" , adtDef ( 56 ) , ty ( 78 ) .Tys ) - ty ( 77 ) |-> typeInfoStructType ( "std::marker::PhantomData<&()>" , adtDef ( 58 ) , .Tys ) - ty ( 78 ) |-> typeInfoPtrType ( ty ( 1 ) ) - ty ( 80 ) |-> typeInfoRefType ( ty ( 1 ) ) - ty ( 81 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 59 ) , ty ( 41 ) ty ( 54 ) ty ( 54 ) .Tys ) - ty ( 83 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test-fail.state b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test-fail.state index 844e01129..70178511b 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test-fail.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test-fail.state @@ -86,55 +86,4 @@ ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , staticSize ( 8 ) ) , ty ( 31 ) , mutabilityNot ) ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 4 ) |-> StringVal ( "assertion failed: arr.len() >= 4" ) - allocId ( 5 ) |-> StringVal ( "assertion failed: arr4.len() == 4" ) - allocId ( 6 ) |-> StringVal ( "assertion failed: l4 == 4" ) - allocId ( 7 ) |-> StringVal ( "assertion failed: arr9.len() == 9" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 28 ) |-> monoItemFn (... name: symbol ( "array_cast_test" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpPtrMetadata , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 29 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 67 ) ) .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 ( 67 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 70 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 12 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 72 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\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 ( 34 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 72 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpPtrMetadata , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 4 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 12 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 6 ) ) , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 80 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\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 ( 34 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 11 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 80 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandMove ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , ty ( 36 ) ) ) , span: span ( 82 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 29 ) , id: mirConstId ( 16 ) ) ) ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 29 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 81 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: projectionElemDeref projectionElemIndex ( local ( 14 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 85 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b")" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 86 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 12 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 87 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 87 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpPtrMetadata , operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 88 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 17 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 4 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 9 ) ) ) , span: span ( 84 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 91 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 22 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 92 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 89 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 12 ) ) ) ) , args: operandCopy ( place (... local: local ( 21 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 25 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 10 ) ) , unwind: unwindActionContinue ) , span: span ( 90 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 34 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 20 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 93 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandMove ( place (... local: local ( 25 ) , projection: .ProjectionElems ) ) , ty ( 37 ) ) ) , span: span ( 95 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 96 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 28 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 23 ) , projection: .ProjectionElems ) ) ) , span: span ( 97 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 27 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandMove ( place (... local: local ( 28 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 97 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 26 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpPtrMetadata , operandMove ( place (... local: local ( 27 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 98 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 26 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 9 , basicBlockIdx ( 11 ) ) .Branches , otherwise: basicBlockIdx ( 12 ) ) ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 99 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 100 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 29 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 100 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 101 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 102 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 38 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 40 ) , span: span ( 103 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 41 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 104 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 38 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 105 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 41 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 93 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 92 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 41 ) , span: span ( 91 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 42 ) , span: span ( 106 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 37 ) , span: span ( 95 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 98 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 97 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 43 ) , span: span ( 97 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 100 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "arr" ) , sourceInfo: sourceInfo (... span: span ( 102 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "arr4" ) , sourceInfo: sourceInfo (... span: span ( 103 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "arr4_mut" ) , sourceInfo: sourceInfo (... span: span ( 104 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "l4" ) , sourceInfo: sourceInfo (... span: span ( 105 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 17 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "s4" ) , sourceInfo: sourceInfo (... span: span ( 107 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 21 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "arr9" ) , sourceInfo: sourceInfo (... span: span ( 106 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 23 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 108 ) ) ) ) - ty ( 32 ) |-> monoItemFn (... name: symbol ( "core::slice::::as_ptr" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 46 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 47 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 48 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 25 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 46 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 52 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueRepeat ( operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) , tyConst (... kind: tyConstKindValue ( ty ( 29 ) , allocation (... bytes: b"\x08\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 28 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 59 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 62 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 45 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 25 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 14 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 39 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 20 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 18 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 25 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 26 ) |-> typeInfoRefType ( ty ( 44 ) ) - ty ( 27 ) |-> typeInfoPtrType ( ty ( 44 ) ) - ty ( 29 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 30 ) |-> typeInfoArrayType ( ty ( 9 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 29 ) , allocation (... bytes: b"\x08\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 31 ) |-> typeInfoRefType ( ty ( 30 ) ) - ty ( 34 ) |-> typeInfoRefType ( ty ( 47 ) ) - ty ( 35 ) |-> typeInfoPtrType ( ty ( 40 ) ) - ty ( 36 ) |-> typeInfoPtrType ( ty ( 40 ) ) - ty ( 37 ) |-> typeInfoPtrType ( ty ( 42 ) ) - ty ( 38 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 39 ) |-> typeInfoVoidType - ty ( 40 ) |-> typeInfoArrayType ( ty ( 9 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 29 ) , allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 1 ) ) ) ) - ty ( 41 ) |-> typeInfoRefType ( ty ( 40 ) ) - ty ( 42 ) |-> typeInfoArrayType ( ty ( 9 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 29 ) , allocation (... bytes: b"\t\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 2 ) ) ) ) - ty ( 43 ) |-> typeInfoRefType ( ty ( 42 ) ) - ty ( 44 ) |-> typeInfoArrayType ( ty ( 9 ) , noTyConst ) - ty ( 46 ) |-> typeInfoRefType ( ty ( 48 ) ) - ty ( 47 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 48 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 24 ) , ty ( 34 ) ty ( 49 ) ty ( 49 ) .Tys ) - ty ( 49 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test.smir.dot b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test.smir.dot new file mode 100644 index 000000000..7483702a1 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test.smir.dot @@ -0,0 +1,149 @@ +digraph { + label="pointer_cast_length_test"; + node [shape=rectangle]; + Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; + Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label="array_cast_test"; + style="filled"; + color=palegreen; + node_1 [label="LOCALS\l0 = ()\l1 = &[u8]\l2 = bool\l3 = usize\l4 = !\l5 = [u8; 4]\l6 = *const [u8; 4]\l7 = *const u8\l8 = usize\l9 = &[u8]\l10 = &[u8; 4]\l11 = !\l12 = *mut [u8; 4]\l13 = *const u8\l14 = usize\l15 = usize\l16 = bool\l17 = usize\l18 = &[u8]\l19 = &[u8; 4]\l20 = !\l21 = &[u8]\l22 = &[u8; 4]\l23 = [u8; 9]\l24 = *const [u8; 9]\l25 = *const u8\l26 = usize\l27 = &[u8]\l28 = &[u8; 9]\l29 = !\l", style="filled", color=palegreen3]; + X6f0ac4e7275d1318_0 -> X6f0ac4e7275d1318_2 [label="0"]; + X6f0ac4e7275d1318_0 -> X6f0ac4e7275d1318_1 [label="other"]; + X6f0ac4e7275d1318_0 [label="3 <- PtrMetadata(cp(1))\l2 <- Ge(mv(3), const ?_usize)\lSwitchInt mv(2)\l"]; + X6f0ac4e7275d1318_1 -> X6f0ac4e7275d1318_3 [label="7"]; + X6f0ac4e7275d1318_1 [label="Call\l"]; + X6f0ac4e7275d1318_2 [label="Call\l"]; + X6f0ac4e7275d1318_3 -> X6f0ac4e7275d1318_4 [label="4"]; + X6f0ac4e7275d1318_3 -> X6f0ac4e7275d1318_5 [label="other"]; + X6f0ac4e7275d1318_3 [label="6 <- Cast-PtrToPtr mv(7)\l5 <- Use(cp((*6)))\l10 <- & 5\l9 <- Cast-PointerCoercion(Unsize) mv(10)\l8 <- PtrMetadata(mv(9))\lSwitchInt mv(8)\l"]; + X6f0ac4e7275d1318_4 -> X6f0ac4e7275d1318_6 [label="13"]; + X6f0ac4e7275d1318_4 [label="Call\l"]; + X6f0ac4e7275d1318_5 [label="Call\l"]; + X6f0ac4e7275d1318_6 -> X6f0ac4e7275d1318_7; + X6f0ac4e7275d1318_6 [label="12 <- Cast-PtrToPtr mv(13)\l14 <- Use(const ?_usize)\l15 <- Use(const ?_usize)\l16 <- Lt(cp(14), cp(15))\lAssert mv(16) == true\l"]; + X6f0ac4e7275d1318_7 -> X6f0ac4e7275d1318_8 [label="4"]; + X6f0ac4e7275d1318_7 -> X6f0ac4e7275d1318_9 [label="other"]; + X6f0ac4e7275d1318_7 [label="(*12)[_14] <- Use(const ?_u8)\l19 <- & (*12)\l18 <- Cast-PointerCoercion(Unsize) mv(19)\l17 <- PtrMetadata(mv(18))\lSwitchInt cp(17)\l"]; + X6f0ac4e7275d1318_8 -> X6f0ac4e7275d1318_10 [label="25"]; + X6f0ac4e7275d1318_8 [label="22 <- & 5\l21 <- Cast-PointerCoercion(Unsize) cp(22)\lCall\l"]; + X6f0ac4e7275d1318_9 [label="Call\l"]; + X6f0ac4e7275d1318_10 -> X6f0ac4e7275d1318_11 [label="9"]; + X6f0ac4e7275d1318_10 -> X6f0ac4e7275d1318_12 [label="other"]; + X6f0ac4e7275d1318_10 [label="24 <- Cast-PtrToPtr mv(25)\l23 <- Use(cp((*24)))\l28 <- & 23\l27 <- Cast-PointerCoercion(Unsize) mv(28)\l26 <- PtrMetadata(mv(27))\lSwitchInt mv(26)\l"]; + X6f0ac4e7275d1318_11 [label="Return\l"]; + X6f0ac4e7275d1318_12 [label="Call\l"]; + } + X6f0ac4e7275d1318_1 -> X6d807aad28e61610_0 [label="cp(1)"]; + X6f0ac4e7275d1318_2 -> Xac08878333d72e42_0 [label="const &str"]; + X6f0ac4e7275d1318_4 -> X6d807aad28e61610_0 [label="cp(1)"]; + X6f0ac4e7275d1318_5 -> Xac08878333d72e42_0 [label="const &str"]; + X6f0ac4e7275d1318_8 -> X6d807aad28e61610_0 [label="cp(21)"]; + X6f0ac4e7275d1318_9 -> Xac08878333d72e42_0 [label="const &str"]; + X6f0ac4e7275d1318_12 -> Xac08878333d72e42_0 [label="const &str"]; + subgraph cluster_2 { + label="main"; + style="filled"; + color=palegreen; + node_3 [label="LOCALS\l0 = ()\l1 = [u8; 8]\l2 = ()\l3 = &[u8]\l4 = &[u8; 8]\l", style="filled", color=palegreen3]; + Xd4948713ce89e77b_0 -> Xd4948713ce89e77b_1 [label="2"]; + Xd4948713ce89e77b_0 [label="1 <- Repeat const ?_u8\l4 <- & 1\l3 <- Cast-PointerCoercion(Unsize) cp(4)\lCall\l"]; + Xd4948713ce89e77b_1 [label="Return\l"]; + } + Xd4948713ce89e77b_0 -> X6f0ac4e7275d1318_0 [label="mv(3)"]; + subgraph cluster_4 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + node_5 [label="LOCALS\l0 = isize\l1 = fn()\l2 = isize\l3 = *const *const u8\l4 = u8\l5 = std::result::Result\l6 = &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe\l7 = &{closure@std::rt::lang_start<()>::{closure#0}}\l8 = {closure@std::rt::lang_start<()>::{closure#0}}\l", style="filled", color=palegreen3]; + X5af0172d73504fdf_0 -> X5af0172d73504fdf_1 [label="5"]; + X5af0172d73504fdf_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; + X5af0172d73504fdf_1 [label="Storage Dead _6\l0 <- Use(cp((5 as variant 0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X5af0172d73504fdf_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + node_7 [label="LOCALS\l0 = i32\l1 = &{closure@std::rt::lang_start<()>::{closure#0}}\l2 = std::process::ExitCode\l3 = ()\l4 = fn()\l5 = &std::sys::pal::unix::process::process_common::ExitCode\l6 = u8\l", style="filled", color=palegreen3]; + Xa9f4d9a3cbdeae96_0 -> Xa9f4d9a3cbdeae96_1 [label="3"]; + Xa9f4d9a3cbdeae96_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp((*1).0))\lCall\l"]; + Xa9f4d9a3cbdeae96_1 -> Xa9f4d9a3cbdeae96_2 [label="2"]; + Xa9f4d9a3cbdeae96_1 [label="Storage Dead _4\lCall\l"]; + Xa9f4d9a3cbdeae96_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + Xa9f4d9a3cbdeae96_0 -> X4444e554f994172e_0 [label="mv(4)"]; + Xa9f4d9a3cbdeae96_1 -> Xe45df593c5cbfb8f_0 [label="mv(3)"]; + subgraph cluster_8 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + node_9 [label="LOCALS\l0 = ()\l1 = fn()\l2 = ()\l", style="filled", color=palegreen3]; + X4444e554f994172e_0 -> X4444e554f994172e_1 [label="0"]; + X4444e554f994172e_0 [label="Call\l"]; + X4444e554f994172e_1 -> X4444e554f994172e_2 [label="2"]; + X4444e554f994172e_1 [label="Call\l"]; + X4444e554f994172e_2 [label="Return\l"]; + } + X4444e554f994172e_0 -> Xf701bffc7f99646f_0 [label="mv(1),const ()"]; + X4444e554f994172e_1 -> X3c6542d96320ad67_0 [label="const ()"]; + subgraph cluster_10 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + node_11 [label="LOCALS\l0 = i32\l1 = *mut {closure@std::rt::lang_start<()>::{closure#0}}\l2 = ()\l", style="filled", color=palegreen3]; + X9b2936d3ff0691ed_0 -> X9b2936d3ff0691ed_1 [label="0"]; + X9b2936d3ff0691ed_0 [label="Call\l"]; + X9b2936d3ff0691ed_1 [label="Return\l"]; + } + X9b2936d3ff0691ed_0 -> Xbc7ae6075430b623_0 [label="mv((*1)),mv(2)"]; + subgraph cluster_12 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + node_13 [label="LOCALS\l0 = i32\l1 = {closure@std::rt::lang_start<()>::{closure#0}}\l2 = ()\l3 = &mut {closure@std::rt::lang_start<()>::{closure#0}}\l", style="filled", color=palegreen3]; + Xbc7ae6075430b623_0 -> Xbc7ae6075430b623_3 [label="Cleanup"]; + Xbc7ae6075430b623_0 -> Xbc7ae6075430b623_1 [label="0"]; + Xbc7ae6075430b623_0 [label="3 <- &mut 1\lCall\l"]; + Xbc7ae6075430b623_1 -> Xbc7ae6075430b623_2; + Xbc7ae6075430b623_1 [label="Drop 1\l"]; + Xbc7ae6075430b623_2 [label="Return\l"]; + Xbc7ae6075430b623_3 -> Xbc7ae6075430b623_4; + Xbc7ae6075430b623_3 [label="Drop 1\l"]; + Xbc7ae6075430b623_4 [label="Resume\l"]; + } + Xbc7ae6075430b623_0 -> Xa9f4d9a3cbdeae96_0 [label="mv(3),mv(2)"]; + subgraph cluster_14 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + node_15 [label="LOCALS\l0 = ()\l1 = fn()\l2 = ()\l", style="filled", color=palegreen3]; + Xf701bffc7f99646f_0 -> Xf701bffc7f99646f_1 [label="0"]; + Xf701bffc7f99646f_0 [label="Call\l"]; + Xf701bffc7f99646f_1 [label="Return\l"]; + } + Xf701bffc7f99646f_0 -> Xf701bffc7f99646f_0: 1 [label=""]; + subgraph cluster_16 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + node_17 [label="LOCALS\l0 = ()\l1 = *mut {closure@std::rt::lang_start<()>::{closure#0}}\l", style="filled", color=palegreen3]; + X4a3a9878cdeeab7a_0 [label="Return\l"]; + } + subgraph cluster_18 { + label="core::slice::::as_ptr"; + style="filled"; + color=lightgray; + node_19 [label="LOCALS\l0 = *const u8\l1 = &[u8]\l2 = *const [u8]\l", style="filled", color=palegreen3]; + X6d807aad28e61610_0 [label="Storage Live _2\l2 <- &raw (*1)\l0 <- Cast-PtrToPtr mv(2)\lStorage Dead _2\lReturn\l"]; + } + subgraph cluster_20 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + node_21 [label="LOCALS\l0 = std::process::ExitCode\l1 = ()\l", style="filled", color=palegreen3]; + Xe45df593c5cbfb8f_0 [label="0 <- Use(const std::process::ExitCode)\lReturn\l"]; + } +} diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/ref_ptr_cases.state b/kmir/src/tests/integration/data/exec-smir/pointers/ref_ptr_cases.state index c06cee13f..06612f321 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/ref_ptr_cases.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/ref_ptr_cases.state @@ -39,85 +39,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 5 ) |-> Integer ( 1 , 8 , false ) - allocId ( 6 ) |-> StringVal ( "assertion failed: (first as *const u8) == (first_again as *const u8)" ) - allocId ( 7 ) |-> StringVal ( "assertion failed: (first as *const u8) != (second as *const u8)" ) - allocId ( 8 ) |-> StringVal ( "assertion failed: (&left as *const i32) != (&right as *const i32)" ) - allocId ( 9 ) |-> StringVal ( "assertion failed: (first as *const i32) == (second as *const i32)" ) - allocId ( 10 ) |-> StringVal ( "assertion failed: std::ptr::eq(first, second)" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 42 ) |-> monoItemFn (... name: symbol ( "std::ptr::eq::" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 75 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 35 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 36 ) , span: span ( 79 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 80 ) ) ) ) - ty ( 49 ) |-> monoItemFn (... name: symbol ( "core::panicking::assert_failed::" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 83 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 38 ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 84 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 84 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , ty ( 38 ) ) ) , span: span ( 84 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 37 ) , id: mirConstId ( 14 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 82 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 39 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 40 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 88 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 41 ) , span: span ( 89 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 38 ) , span: span ( 83 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 38 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 84 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "left" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "right" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "args" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) ) ) - ty ( 54 ) |-> monoItemFn (... name: symbol ( "aliasing_refs_have_same_pointer" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 97 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 16 ) ) ) ) ) ) , span: span ( 97 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 98 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 99 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 100 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 101 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 96 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 96 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 104 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 105 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 42 ) , id: mirConstId ( 17 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 106 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 43 ) , id: mirConstId ( 18 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00A\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 44 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 106 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 103 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 107 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 43 ) , id: mirConstId ( 18 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\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 ( 44 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 11 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 108 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 109 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 110 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 45 ) , span: span ( 111 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 45 ) , span: span ( 112 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 113 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 114 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 106 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 104 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 105 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 108 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "value" ) , sourceInfo: sourceInfo (... span: span ( 110 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "first" ) , sourceInfo: sourceInfo (... span: span ( 111 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "second" ) , sourceInfo: sourceInfo (... span: span ( 112 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 115 ) ) ) ) - ty ( 55 ) |-> monoItemFn (... name: symbol ( "distinct_locals_have_distinct_pointers" ) , id: defId ( 11 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 117 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 21 ) ) ) ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 118 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 21 ) ) ) ) ) ) , span: span ( 118 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 119 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 5 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 119 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 120 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 7 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 120 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpNe , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 116 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 121 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 122 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 43 ) , id: mirConstId ( 18 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00A\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 44 ) , id: mirConstId ( 22 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 122 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 123 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 124 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 125 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 116 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 126 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 45 ) , span: span ( 119 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 36 ) , span: span ( 127 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 45 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 39 ) , span: span ( 122 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "left" ) , sourceInfo: sourceInfo (... span: span ( 124 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right" ) , sourceInfo: sourceInfo (... span: span ( 125 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 128 ) ) ) ) - ty ( 56 ) |-> monoItemFn (... name: symbol ( "array_element_addresses_are_distinct" ) , id: defId ( 12 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindArray ( ty ( 9 ) ) , operandConstant ( constOperand (... span: span ( 130 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x03" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 23 ) ) ) ) operandConstant ( constOperand (... span: span ( 131 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x05" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 24 ) ) ) ) operandConstant ( constOperand (... span: span ( 132 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x07" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 25 ) ) ) ) .Operands ) ) , span: span ( 133 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 134 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 46 ) , id: mirConstId ( 26 ) ) ) ) ) ) , span: span ( 134 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 46 ) , id: mirConstId ( 27 ) ) ) ) ) ) , span: span ( 129 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 129 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 129 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 3 ) ) .ProjectionElems ) ) ) , span: span ( 136 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 137 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 46 ) , id: mirConstId ( 26 ) ) ) ) ) ) , span: span ( 137 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 46 ) , id: mirConstId ( 27 ) ) ) ) ) ) , span: span ( 135 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 135 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 135 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 7 ) ) .ProjectionElems ) ) ) , span: span ( 139 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 140 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 46 ) , id: mirConstId ( 28 ) ) ) ) ) ) , span: span ( 140 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 46 ) , id: mirConstId ( 27 ) ) ) ) ) ) , span: span ( 138 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 138 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 138 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 11 ) ) .ProjectionElems ) ) ) , span: span ( 142 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 143 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 144 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 141 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 141 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 146 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 10 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpNe , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 20 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 145 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 7 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 145 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 148 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 43 ) , id: mirConstId ( 18 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 44 ) , id: mirConstId ( 29 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 148 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 149 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 150 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 43 ) , id: mirConstId ( 18 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00?\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 44 ) , id: mirConstId ( 30 ) ) ) ) .Operands , destination: place (... local: local ( 21 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 150 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 151 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 47 ) , span: span ( 152 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 153 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 46 ) , span: span ( 134 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 46 ) , span: span ( 129 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 129 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 154 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 46 ) , span: span ( 137 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 46 ) , span: span ( 135 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 135 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 155 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 46 ) , span: span ( 140 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 46 ) , span: span ( 138 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 138 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 141 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 48 ) , span: span ( 156 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 48 ) , span: span ( 157 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 148 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 145 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 48 ) , span: span ( 158 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 48 ) , span: span ( 159 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 39 ) , span: span ( 150 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "items" ) , sourceInfo: sourceInfo (... span: span ( 152 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "first" ) , sourceInfo: sourceInfo (... span: span ( 153 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "first_again" ) , sourceInfo: sourceInfo (... span: span ( 154 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "second" ) , sourceInfo: sourceInfo (... span: span ( 155 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 160 ) ) ) ) - ty ( 57 ) |-> monoItemFn (... name: symbol ( "reborrow_mut_pointer_roundtrip" ) , id: defId ( 13 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 162 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 31 ) ) ) ) ) ) , span: span ( 162 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 163 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityMut , place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 163 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 164 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 32 ) ) ) ) ) ) , span: span ( 165 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 166 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 167 ) , 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 ( 5 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 33 ) ) ) ) ) ) , span: span ( 167 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 168 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 169 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 170 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 7 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 171 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 8 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 172 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 161 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 161 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 173 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 14 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 176 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 15 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 50 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , .Operands ) ) , span: span ( 177 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 174 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 49 ) , id: mirConstId ( 34 ) ) ) ) , args: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 175 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 178 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 179 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 51 ) , span: span ( 180 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 52 ) , span: span ( 163 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 53 ) , span: span ( 168 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 166 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 167 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 169 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 170 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 161 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 171 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 172 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 40 ) , span: span ( 181 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 39 ) , span: span ( 175 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 41 ) , span: span ( 177 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "byte" ) , sourceInfo: sourceInfo (... span: span ( 179 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "ptr" ) , sourceInfo: sourceInfo (... span: span ( 180 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "left_val" ) , sourceInfo: sourceInfo (... span: span ( 169 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "right_val" ) , sourceInfo: sourceInfo (... span: span ( 170 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "kind" ) , sourceInfo: sourceInfo (... span: span ( 181 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 182 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 16 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 183 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 54 ) , id: mirConstId ( 35 ) ) ) ) , args: .Operands , destination: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 184 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 185 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 55 ) , id: mirConstId ( 36 ) ) ) ) , args: .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 186 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 187 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 56 ) , id: mirConstId ( 37 ) ) ) ) , args: .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 188 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 189 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 57 ) , id: mirConstId ( 38 ) ) ) ) , args: .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 190 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 191 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 192 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 184 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 186 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 188 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 190 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 193 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 86 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 48 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 28 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 39 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 43 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 41 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoEnumType (... name: "std::result::Result<(), std::fmt::Error>" , adtDef: adtDef ( 28 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 1 ) .Tys : ty ( 64 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 8 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 23 ) |-> typeInfoRefType ( ty ( 25 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 58 ) ) - ty ( 25 ) |-> typeInfoRefType ( ty ( 9 ) ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 31 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 33 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 34 ) |-> typeInfoPtrType ( ty ( 25 ) ) - ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 36 ) |-> typeInfoPtrType ( ty ( 16 ) ) - ty ( 38 ) |-> typeInfoRefType ( ty ( 87 ) ) - ty ( 39 ) |-> typeInfoVoidType - ty ( 40 ) |-> typeInfoEnumType (... name: "core::panicking::AssertKind" , adtDef: adtDef ( 14 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 41 ) |-> typeInfoEnumType (... name: "std::option::Option>" , adtDef: adtDef ( 15 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 50 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 384 ) ) ) ) - ty ( 44 ) |-> typeInfoRefType ( ty ( 66 ) ) - ty ( 45 ) |-> typeInfoRefType ( ty ( 16 ) ) - ty ( 46 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 47 ) |-> typeInfoArrayType ( ty ( 9 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 46 ) , allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 48 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 50 ) |-> typeInfoStructType ( "std::fmt::Arguments<'_>" , adtDef ( 46 ) , ty ( 69 ) ty ( 70 ) ty ( 71 ) .Tys ) - ty ( 51 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 52 ) |-> typeInfoRefType ( ty ( 9 ) ) - ty ( 53 ) |-> typeInfoTupleType ( ty ( 25 ) ty ( 25 ) .Tys ) - ty ( 58 ) |-> typeInfoStructType ( "std::fmt::Formatter<'_>" , adtDef ( 18 ) , ty ( 26 ) ty ( 59 ) ty ( 60 ) ty ( 61 ) ty ( 61 ) ty ( 62 ) .Tys ) - ty ( 59 ) |-> typeInfoPrimitiveType ( primTypeChar ) - ty ( 60 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Alignment" , adtDef: adtDef ( 25 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) discriminant ( 3 ) .Discriminants , fields: .Tys : .Tys : .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 3 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) .LayoutShapes ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI8 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 3 ) ) ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 8 ) ) ) ) - ty ( 61 ) |-> typeInfoEnumType (... name: "std::option::Option" , adtDef: adtDef ( 15 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 46 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 1 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 62 ) |-> typeInfoRefType ( ty ( 63 ) ) - ty ( 64 ) |-> typeInfoStructType ( "std::fmt::Error" , adtDef ( 31 ) , .Tys ) - ty ( 65 ) |-> typeInfoRefType ( ty ( 67 ) ) - ty ( 66 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 67 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 36 ) , ty ( 44 ) ty ( 26 ) ty ( 26 ) .Tys ) - ty ( 69 ) |-> typeInfoRefType ( ty ( 72 ) ) - ty ( 70 ) |-> typeInfoEnumType (... name: "std::option::Option<&[core::fmt::rt::Placeholder]>" , adtDef: adtDef ( 15 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: .Tys : ty ( 73 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 0 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 71 ) |-> typeInfoRefType ( ty ( 77 ) ) - ty ( 72 ) |-> typeInfoArrayType ( ty ( 44 ) , noTyConst ) - ty ( 73 ) |-> typeInfoRefType ( ty ( 74 ) ) - ty ( 74 ) |-> typeInfoArrayType ( ty ( 75 ) , noTyConst ) - ty ( 75 ) |-> typeInfoStructType ( "core::fmt::rt::Placeholder" , adtDef ( 50 ) , ty ( 46 ) ty ( 59 ) ty ( 60 ) ty ( 26 ) ty ( 76 ) ty ( 76 ) .Tys ) - ty ( 76 ) |-> typeInfoEnumType (... name: "core::fmt::rt::Count" , adtDef: adtDef ( 57 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) discriminant ( 2 ) .Discriminants , fields: ty ( 46 ) .Tys : ty ( 46 ) .Tys : .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: false ) ) , validRange: wrappingRange (... start: 0 , end: 2 ) ) ) , tagEncoding: tagEncodingDirect , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 2 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 1 ) , size: machineSize (... numBits: 64 ) ) .LayoutShapes ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 77 ) |-> typeInfoArrayType ( ty ( 78 ) , noTyConst ) - ty ( 78 ) |-> typeInfoStructType ( "core::fmt::rt::Argument<'_>" , adtDef ( 60 ) , ty ( 79 ) .Tys ) - ty ( 79 ) |-> typeInfoEnumType (... name: "core::fmt::rt::ArgumentType<'_>" , adtDef: adtDef ( 62 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 80 ) ty ( 81 ) ty ( 82 ) .Tys : ty ( 46 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeMultiple ( mk (... tag: scalarInitialized ( mk (... value: primitivePointer ( addressSpace ( 0 ) ) , validRange: wrappingRange (... start: 1 , end: 0 ) ) ) , tagEncoding: tagEncodingNiche ( ) , tagField: 0 , variants: layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) machineSize (... numBits: 64 ) machineSize (... numBits: 128 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalarPair ( ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 64 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 1 ) ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) .LayoutShapes ) ) , abi: valueAbiAggregate ( mk (... sized: true ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 128 ) ) ) ) - ty ( 80 ) |-> typeInfoStructType ( "std::ptr::NonNull<()>" , adtDef ( 67 ) , ty ( 83 ) .Tys ) - ty ( 82 ) |-> typeInfoStructType ( "std::marker::PhantomData<&()>" , adtDef ( 69 ) , .Tys ) - ty ( 83 ) |-> typeInfoPtrType ( ty ( 1 ) ) - ty ( 85 ) |-> typeInfoRefType ( ty ( 1 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/array_elem_ref.state b/kmir/src/tests/integration/data/exec-smir/references/array_elem_ref.state index 0daa7fe69..84d76d60d 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/array_elem_ref.state +++ b/kmir/src/tests/integration/data/exec-smir/references/array_elem_ref.state @@ -45,43 +45,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 1 ) |-> StringVal ( "assertion failed: *x == 0" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 32 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 51 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 51 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 55 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 56 ) ) ) ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 59 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueRepeat ( operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 11 ) ) ) ) , tyConst (... kind: tyConstKindValue ( ty ( 31 ) , allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemIndex ( local ( 3 ) ) .ProjectionElems ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueAddressOf ( mutabilityNot , place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 66 ) , 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 ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 70 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) , args: operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 72 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 31 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 31 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x03\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "xx" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 40 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 41 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 25 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 29 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 12 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 10 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 26 ) |-> typeInfoRefType ( ty ( 38 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 28 ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 29 ) |-> typeInfoVoidType - ty ( 30 ) |-> typeInfoPtrType ( ty ( 28 ) ) - ty ( 31 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 34 ) |-> typeInfoArrayType ( ty ( 28 ) , someTyConst ( tyConst (... kind: tyConstKindValue ( ty ( 31 ) , allocation (... bytes: b"\x04\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , id: tyConstId ( 0 ) ) ) ) - ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 37 ) |-> typeInfoRefType ( ty ( 39 ) ) - ty ( 38 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 39 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 16 ) , ty ( 26 ) ty ( 28 ) ty ( 28 ) .Tys ) - ty ( 41 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.dot b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.dot new file mode 100644 index 000000000..3f81e56f8 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.dot @@ -0,0 +1,129 @@ +digraph { + label="doubleRef"; + node [shape=rectangle]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; + subgraph cluster_0 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + Xbd299000b2add6c9_0 -> Xbd299000b2add6c9_1 [label="5"]; + Xbd299000b2add6c9_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; + Xbd299000b2add6c9_1 [label="Storage Dead _6\l0 <- Use(cp(5 as VariantIdx(0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + Xbd299000b2add6c9_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; + subgraph cluster_1 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X3ba7b18402fcf308_0 -> X3ba7b18402fcf308_1 [label="0"]; + X3ba7b18402fcf308_0 [label="Call\l"]; + X3ba7b18402fcf308_1 -> X3ba7b18402fcf308_2 [label="2"]; + X3ba7b18402fcf308_1 [label="Call\l"]; + X3ba7b18402fcf308_2 [label="Return\l"]; + } + X3ba7b18402fcf308_0 -> X6791ad66ae25c2c6_0 [label="mv(1),const :: ()"]; + X3ba7b18402fcf308_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_2 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X6caab78df6a04d46_0 -> X6caab78df6a04d46_3 [label="Cleanup"]; + X6caab78df6a04d46_0 -> X6caab78df6a04d46_1 [label="0"]; + X6caab78df6a04d46_0 [label="3 <- &mut 1\lCall\l"]; + X6caab78df6a04d46_1 -> X6caab78df6a04d46_2; + X6caab78df6a04d46_1 [label="Drop 1\l"]; + X6caab78df6a04d46_2 [label="Return\l"]; + X6caab78df6a04d46_3 -> X6caab78df6a04d46_4; + X6caab78df6a04d46_3 [label="Drop 1\l"]; + X6caab78df6a04d46_4 [label="Resume\l"]; + } + X6caab78df6a04d46_0 -> X3b93ed1388248238_0 [label="mv(3),mv(2)"]; + subgraph cluster_3 { + label="std::cmp::impls::::eq"; + style="filled"; + color=lightgray; + X306f7be73fcb3e03_0 [label="Storage Live _3\l3 <- Use(cp(*1))\lStorage Live _4\l4 <- Use(cp(*2))\l0 <- Eq(mv(3), mv(4))\lStorage Dead _4\lStorage Dead _3\lReturn\l"]; + } + subgraph cluster_4 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X24ab9dbad4d15cdb_0 [label="0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_5 { + label="main"; + style="filled"; + color=palegreen; + X27bbcab3f64c86d7_0 -> X27bbcab3f64c86d7_2 [label="0"]; + X27bbcab3f64c86d7_0 -> X27bbcab3f64c86d7_1 [label="other"]; + X27bbcab3f64c86d7_0 [label="1 <- Use(const :: i8)\l2 <- & 1\l3 <- & 2\l13 <- CopyForDeref(*3)\l5 <- Use(cp(*13))\l4 <- Eq(mv(5), cp(1))\lSwitchInt mv(4)\l"]; + X27bbcab3f64c86d7_1 -> X27bbcab3f64c86d7_3 [label="7"]; + X27bbcab3f64c86d7_1 [label="8 <- & 3\l11 <- & 1\l10 <- & 11\l9 <- & 10\lCall\l"]; + X27bbcab3f64c86d7_2 [label="Call\l"]; + X27bbcab3f64c86d7_3 -> X27bbcab3f64c86d7_5 [label="0"]; + X27bbcab3f64c86d7_3 -> X27bbcab3f64c86d7_4 [label="other"]; + X27bbcab3f64c86d7_3 [label="SwitchInt mv(7)\l"]; + X27bbcab3f64c86d7_4 [label="Return\l"]; + X27bbcab3f64c86d7_5 [label="Call\l"]; + } + X27bbcab3f64c86d7_1 -> Xbfcd765f3e7d7ff4_0 [label="mv(8),mv(9)"]; + X27bbcab3f64c86d7_2 -> Xac08878333d72e42_0 [label="const :: &str"]; + X27bbcab3f64c86d7_5 -> Xac08878333d72e42_0 [label="const :: &str"]; + subgraph cluster_6 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X6791ad66ae25c2c6_0 -> X6791ad66ae25c2c6_1 [label="0"]; + X6791ad66ae25c2c6_0 [label="Call\l"]; + X6791ad66ae25c2c6_1 [label="Return\l"]; + } + X6791ad66ae25c2c6_0 -> X6791ad66ae25c2c6_0: 1 [label=""]; + subgraph cluster_7 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X5f947730f4358238_0 -> X5f947730f4358238_1 [label="0"]; + X5f947730f4358238_0 [label="Call\l"]; + X5f947730f4358238_1 [label="Return\l"]; + } + X5f947730f4358238_0 -> X6caab78df6a04d46_0 [label="mv(*1),mv(2)"]; + subgraph cluster_8 { + label="std::cmp::impls::::eq"; + style="filled"; + color=lightgray; + Xf61d9d7989260c39_0 -> Xf61d9d7989260c39_1 [label="0"]; + Xf61d9d7989260c39_0 [label="3 <- Use(cp(*1))\l4 <- Use(cp(*2))\lCall\l"]; + Xf61d9d7989260c39_1 [label="Return\l"]; + } + Xf61d9d7989260c39_0 -> X306f7be73fcb3e03_0 [label="mv(3),mv(4)"]; + subgraph cluster_9 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X753c42307ad207a_0 [label="Return\l"]; + } + subgraph cluster_10 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X3b93ed1388248238_0 -> X3b93ed1388248238_1 [label="3"]; + X3b93ed1388248238_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp(*1.0))\lCall\l"]; + X3b93ed1388248238_1 -> X3b93ed1388248238_2 [label="2"]; + X3b93ed1388248238_1 [label="Storage Dead _4\lCall\l"]; + X3b93ed1388248238_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X3b93ed1388248238_0 -> X3ba7b18402fcf308_0 [label="mv(4)"]; + X3b93ed1388248238_1 -> X24ab9dbad4d15cdb_0 [label="mv(3)"]; + subgraph cluster_11 { + label="std::cmp::impls::::eq"; + style="filled"; + color=lightgray; + Xbfcd765f3e7d7ff4_0 -> Xbfcd765f3e7d7ff4_1 [label="0"]; + Xbfcd765f3e7d7ff4_0 [label="3 <- Use(cp(*1))\l4 <- Use(cp(*2))\lCall\l"]; + Xbfcd765f3e7d7ff4_1 [label="Return\l"]; + } + Xbfcd765f3e7d7ff4_0 -> Xf61d9d7989260c39_0 [label="mv(3),mv(4)"]; +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state index 4efae3a3e..b0b2b9148 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state @@ -49,45 +49,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 2 ) |-> StringVal ( "assertion failed: **z == x" ) - allocId ( 3 ) |-> StringVal ( "assertion failed: z == &&x" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 44 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 44 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 46 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 47 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 48 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 49 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 50 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 45 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 49 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 50 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 51 ) ) ) ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 71 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 13 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 68 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 73 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 79 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 21 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 83 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 40 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 41 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 26 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 34 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 18 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 16 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 21 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 22 ) |-> typeInfoRefType ( ty ( 2 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 25 ) ) - ty ( 25 ) |-> typeInfoRefType ( ty ( 22 ) ) - ty ( 28 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 30 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 33 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 34 ) |-> typeInfoVoidType - ty ( 35 ) |-> typeInfoRefType ( ty ( 37 ) ) - ty ( 36 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 37 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 11 ) , ty ( 33 ) ty ( 38 ) ty ( 38 ) .Tys ) - ty ( 38 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 41 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state index 16016bc20..bfef72bc6 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state @@ -44,40 +44,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 2 ) |-> StringVal ( "assertion failed: x == 32" ) - allocId ( 3 ) |-> StringVal ( "assertion failed: x == 22" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 32 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 55 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "xref" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 15 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 29 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 21 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 19 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 34 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 2 ) ) - ty ( 29 ) |-> typeInfoVoidType - ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 33 ) |-> typeInfoRefType ( ty ( 35 ) ) - ty ( 34 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 35 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 24 ) , ty ( 27 ) ty ( 36 ) ty ( 36 ) .Tys ) - ty ( 36 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.dot b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.dot new file mode 100644 index 000000000..a368bcb0f --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.dot @@ -0,0 +1,106 @@ +digraph { + label="refAsArg"; + node [shape=rectangle]; + Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + subgraph cluster_0 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X685d8b03f4714f81_0 [label="0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_1 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X2ca4e3bc62b23458_0 -> X2ca4e3bc62b23458_1 [label="3"]; + X2ca4e3bc62b23458_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp(*1.0))\lCall\l"]; + X2ca4e3bc62b23458_1 -> X2ca4e3bc62b23458_2 [label="2"]; + X2ca4e3bc62b23458_1 [label="Storage Dead _4\lCall\l"]; + X2ca4e3bc62b23458_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X2ca4e3bc62b23458_0 -> X8cd01eaf0ee453a_0 [label="mv(4)"]; + X2ca4e3bc62b23458_1 -> X685d8b03f4714f81_0 [label="mv(3)"]; + subgraph cluster_2 { + label="f"; + style="filled"; + color=palegreen; + Xe9d79bc649d28e38_0 [label="0 <- Use(cp(*1))\lReturn\l"]; + } + subgraph cluster_3 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X1e39d93dda67c327_0 -> X1e39d93dda67c327_1 [label="0"]; + X1e39d93dda67c327_0 [label="Call\l"]; + X1e39d93dda67c327_1 [label="Return\l"]; + } + X1e39d93dda67c327_0 -> Xdfd1c8e91c9bd929_0 [label="mv(*1),mv(2)"]; + subgraph cluster_4 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xb2cc101365e47af5_0 -> Xb2cc101365e47af5_1 [label="0"]; + Xb2cc101365e47af5_0 [label="Call\l"]; + Xb2cc101365e47af5_1 [label="Return\l"]; + } + Xb2cc101365e47af5_0 -> Xb2cc101365e47af5_0: 1 [label=""]; + subgraph cluster_5 { + label="main"; + style="filled"; + color=palegreen; + Xc5e028c99b7e0e30_0 -> Xc5e028c99b7e0e30_1 [label="2"]; + Xc5e028c99b7e0e30_0 [label="1 <- Use(const :: i8)\l3 <- & 1\lCall\l"]; + Xc5e028c99b7e0e30_1 -> Xc5e028c99b7e0e30_3 [label="0"]; + Xc5e028c99b7e0e30_1 -> Xc5e028c99b7e0e30_2 [label="other"]; + Xc5e028c99b7e0e30_1 [label="4 <- Eq(cp(2), cp(1))\lSwitchInt mv(4)\l"]; + Xc5e028c99b7e0e30_2 [label="Return\l"]; + Xc5e028c99b7e0e30_3 [label="Call\l"]; + } + Xc5e028c99b7e0e30_0 -> Xe9d79bc649d28e38_0 [label="cp(3)"]; + Xc5e028c99b7e0e30_3 -> Xac08878333d72e42_0 [label="const :: &str"]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X20f97efbd17a14b2_0 -> X20f97efbd17a14b2_1 [label="5"]; + X20f97efbd17a14b2_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; + X20f97efbd17a14b2_1 [label="Storage Dead _6\l0 <- Use(cp(5 as VariantIdx(0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X20f97efbd17a14b2_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; + subgraph cluster_7 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X8cd01eaf0ee453a_0 -> X8cd01eaf0ee453a_1 [label="0"]; + X8cd01eaf0ee453a_0 [label="Call\l"]; + X8cd01eaf0ee453a_1 -> X8cd01eaf0ee453a_2 [label="2"]; + X8cd01eaf0ee453a_1 [label="Call\l"]; + X8cd01eaf0ee453a_2 [label="Return\l"]; + } + X8cd01eaf0ee453a_0 -> Xb2cc101365e47af5_0 [label="mv(1),const :: ()"]; + X8cd01eaf0ee453a_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_8 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xdfd1c8e91c9bd929_0 -> Xdfd1c8e91c9bd929_3 [label="Cleanup"]; + Xdfd1c8e91c9bd929_0 -> Xdfd1c8e91c9bd929_1 [label="0"]; + Xdfd1c8e91c9bd929_0 [label="3 <- &mut 1\lCall\l"]; + Xdfd1c8e91c9bd929_1 -> Xdfd1c8e91c9bd929_2; + Xdfd1c8e91c9bd929_1 [label="Drop 1\l"]; + Xdfd1c8e91c9bd929_2 [label="Return\l"]; + Xdfd1c8e91c9bd929_3 -> Xdfd1c8e91c9bd929_4; + Xdfd1c8e91c9bd929_3 [label="Drop 1\l"]; + Xdfd1c8e91c9bd929_4 [label="Resume\l"]; + } + Xdfd1c8e91c9bd929_0 -> X2ca4e3bc62b23458_0 [label="mv(3),mv(2)"]; + subgraph cluster_9 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X2fd66bdb8e82d232_0 [label="Return\l"]; + } +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state index 6ee544fa1..db3bb356c 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state @@ -39,40 +39,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 1 ) |-> StringVal ( "assertion failed: z == x" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 64 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 65 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 37 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 25 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 30 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 17 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 15 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 32 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 2 ) ) - ty ( 29 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 30 ) |-> typeInfoVoidType - ty ( 31 ) |-> typeInfoRefType ( ty ( 33 ) ) - ty ( 32 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 33 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 10 ) , ty ( 27 ) ty ( 34 ) ty ( 34 ) .Tys ) - ty ( 34 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 37 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.dot b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.dot new file mode 100644 index 000000000..3e9c097af --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.dot @@ -0,0 +1,115 @@ +digraph { + label="refAsArg2"; + node [shape=rectangle]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; + subgraph cluster_0 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + Xc5a815e73373717f_0 -> Xc5a815e73373717f_1 [label="3"]; + Xc5a815e73373717f_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp(*1.0))\lCall\l"]; + Xc5a815e73373717f_1 -> Xc5a815e73373717f_2 [label="2"]; + Xc5a815e73373717f_1 [label="Storage Dead _4\lCall\l"]; + Xc5a815e73373717f_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + Xc5a815e73373717f_0 -> X2bd403d7859f7ae5_0 [label="mv(4)"]; + Xc5a815e73373717f_1 -> X17331deae89f58e7_0 [label="mv(3)"]; + subgraph cluster_1 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X2bd403d7859f7ae5_0 -> X2bd403d7859f7ae5_1 [label="0"]; + X2bd403d7859f7ae5_0 [label="Call\l"]; + X2bd403d7859f7ae5_1 -> X2bd403d7859f7ae5_2 [label="2"]; + X2bd403d7859f7ae5_1 [label="Call\l"]; + X2bd403d7859f7ae5_2 [label="Return\l"]; + } + X2bd403d7859f7ae5_0 -> X45b785352b7c912f_0 [label="mv(1),const :: ()"]; + X2bd403d7859f7ae5_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_2 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xcf138c5a7b34606d_0 -> Xcf138c5a7b34606d_3 [label="Cleanup"]; + Xcf138c5a7b34606d_0 -> Xcf138c5a7b34606d_1 [label="0"]; + Xcf138c5a7b34606d_0 [label="3 <- &mut 1\lCall\l"]; + Xcf138c5a7b34606d_1 -> Xcf138c5a7b34606d_2; + Xcf138c5a7b34606d_1 [label="Drop 1\l"]; + Xcf138c5a7b34606d_2 [label="Return\l"]; + Xcf138c5a7b34606d_3 -> Xcf138c5a7b34606d_4; + Xcf138c5a7b34606d_3 [label="Drop 1\l"]; + Xcf138c5a7b34606d_4 [label="Resume\l"]; + } + Xcf138c5a7b34606d_0 -> Xc5a815e73373717f_0 [label="mv(3),mv(2)"]; + subgraph cluster_3 { + label="f"; + style="filled"; + color=palegreen; + Xa6a0d5dd60844a45_0 -> Xa6a0d5dd60844a45_1 [label="0"]; + Xa6a0d5dd60844a45_0 [label="Call\l"]; + Xa6a0d5dd60844a45_1 [label="Return\l"]; + } + Xa6a0d5dd60844a45_0 -> Xb7ca137976fc59f4_0 [label="cp(1)"]; + subgraph cluster_4 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xbb24543691d1d5b6_0 [label="Return\l"]; + } + subgraph cluster_5 { + label="main"; + style="filled"; + color=palegreen; + X184612654b61cb15_0 -> X184612654b61cb15_1 [label="2"]; + X184612654b61cb15_0 [label="1 <- Use(const :: i8)\l3 <- & 1\lCall\l"]; + X184612654b61cb15_1 -> X184612654b61cb15_3 [label="0"]; + X184612654b61cb15_1 -> X184612654b61cb15_2 [label="other"]; + X184612654b61cb15_1 [label="4 <- Eq(cp(2), cp(1))\lSwitchInt mv(4)\l"]; + X184612654b61cb15_2 [label="Return\l"]; + X184612654b61cb15_3 [label="Call\l"]; + } + X184612654b61cb15_0 -> Xa6a0d5dd60844a45_0 [label="cp(3)"]; + X184612654b61cb15_3 -> Xac08878333d72e42_0 [label="const :: &str"]; + subgraph cluster_6 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X17331deae89f58e7_0 [label="0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_7 { + label="g"; + style="filled"; + color=palegreen; + Xb7ca137976fc59f4_0 [label="0 <- Use(cp(*1))\lReturn\l"]; + } + subgraph cluster_8 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X37bbccad8e2a42c_0 -> X37bbccad8e2a42c_1 [label="5"]; + X37bbccad8e2a42c_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; + X37bbccad8e2a42c_1 [label="Storage Dead _6\l0 <- Use(cp(5 as VariantIdx(0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X37bbccad8e2a42c_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; + subgraph cluster_9 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X45b785352b7c912f_0 -> X45b785352b7c912f_1 [label="0"]; + X45b785352b7c912f_0 [label="Call\l"]; + X45b785352b7c912f_1 [label="Return\l"]; + } + X45b785352b7c912f_0 -> X45b785352b7c912f_0: 1 [label=""]; + subgraph cluster_10 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X14bc3a5ec9b4e773_0 -> X14bc3a5ec9b4e773_1 [label="0"]; + X14bc3a5ec9b4e773_0 [label="Call\l"]; + X14bc3a5ec9b4e773_1 [label="Return\l"]; + } + X14bc3a5ec9b4e773_0 -> Xcf138c5a7b34606d_0 [label="mv(*1),mv(2)"]; +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state index 6ac139b9b..db3bb356c 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state @@ -39,41 +39,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 1 ) |-> StringVal ( "assertion failed: z == x" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 65 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) ) ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 67 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 14 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 30 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 19 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 17 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 2 ) ) - ty ( 29 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 30 ) |-> typeInfoVoidType - ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 35 ) |-> typeInfoRefType ( ty ( 37 ) ) - ty ( 36 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 37 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 24 ) , ty ( 27 ) ty ( 38 ) ty ( 38 ) .Tys ) - ty ( 38 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.dot b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.dot new file mode 100644 index 000000000..4817f2f13 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.dot @@ -0,0 +1,115 @@ +digraph { + label="refReturned"; + node [shape=rectangle]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; + Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + subgraph cluster_0 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X2b67616b31e45b20_0 -> X2b67616b31e45b20_3 [label="Cleanup"]; + X2b67616b31e45b20_0 -> X2b67616b31e45b20_1 [label="0"]; + X2b67616b31e45b20_0 [label="3 <- &mut 1\lCall\l"]; + X2b67616b31e45b20_1 -> X2b67616b31e45b20_2; + X2b67616b31e45b20_1 [label="Drop 1\l"]; + X2b67616b31e45b20_2 [label="Return\l"]; + X2b67616b31e45b20_3 -> X2b67616b31e45b20_4; + X2b67616b31e45b20_3 [label="Drop 1\l"]; + X2b67616b31e45b20_4 [label="Resume\l"]; + } + X2b67616b31e45b20_0 -> X3099dc956b67cfb9_0 [label="mv(3),mv(2)"]; + subgraph cluster_1 { + label="main"; + style="filled"; + color=palegreen; + X431952ad442c1d4f_0 -> X431952ad442c1d4f_1 [label="2"]; + X431952ad442c1d4f_0 [label="1 <- Use(const :: i8)\l3 <- & 1\lCall\l"]; + X431952ad442c1d4f_1 -> X431952ad442c1d4f_3 [label="0"]; + X431952ad442c1d4f_1 -> X431952ad442c1d4f_2 [label="other"]; + X431952ad442c1d4f_1 [label="4 <- Use(cp(*2))\l5 <- Eq(cp(4), cp(1))\lSwitchInt mv(5)\l"]; + X431952ad442c1d4f_2 [label="Return\l"]; + X431952ad442c1d4f_3 [label="Call\l"]; + } + X431952ad442c1d4f_0 -> Xb77a4ea00bddb5ee_0 [label="cp(3)"]; + X431952ad442c1d4f_3 -> Xac08878333d72e42_0 [label="const :: &str"]; + subgraph cluster_2 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xa0a612dbef71f102_0 -> Xa0a612dbef71f102_1 [label="0"]; + Xa0a612dbef71f102_0 [label="Call\l"]; + Xa0a612dbef71f102_1 [label="Return\l"]; + } + Xa0a612dbef71f102_0 -> X2b67616b31e45b20_0 [label="mv(*1),mv(2)"]; + subgraph cluster_3 { + label="g"; + style="filled"; + color=palegreen; + Xfe22f42cfe47a1ac_0 [label="0 <- Use(cp(1))\lReturn\l"]; + } + subgraph cluster_4 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xb5a1cedf0f02c033_0 [label="0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_5 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X477ce20d50401084_0 [label="Return\l"]; + } + subgraph cluster_6 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X8b185d64c9b90db6_0 -> X8b185d64c9b90db6_1 [label="5"]; + X8b185d64c9b90db6_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; + X8b185d64c9b90db6_1 [label="Storage Dead _6\l0 <- Use(cp(5 as VariantIdx(0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X8b185d64c9b90db6_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; + subgraph cluster_7 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X8ba77942ecdf0df8_0 -> X8ba77942ecdf0df8_1 [label="0"]; + X8ba77942ecdf0df8_0 [label="Call\l"]; + X8ba77942ecdf0df8_1 [label="Return\l"]; + } + X8ba77942ecdf0df8_0 -> X8ba77942ecdf0df8_0: 1 [label=""]; + subgraph cluster_8 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X3099dc956b67cfb9_0 -> X3099dc956b67cfb9_1 [label="3"]; + X3099dc956b67cfb9_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp(*1.0))\lCall\l"]; + X3099dc956b67cfb9_1 -> X3099dc956b67cfb9_2 [label="2"]; + X3099dc956b67cfb9_1 [label="Storage Dead _4\lCall\l"]; + X3099dc956b67cfb9_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X3099dc956b67cfb9_0 -> X933d4e5c628373c7_0 [label="mv(4)"]; + X3099dc956b67cfb9_1 -> Xb5a1cedf0f02c033_0 [label="mv(3)"]; + subgraph cluster_9 { + label="f"; + style="filled"; + color=palegreen; + Xb77a4ea00bddb5ee_0 -> Xb77a4ea00bddb5ee_1 [label="0"]; + Xb77a4ea00bddb5ee_0 [label="Call\l"]; + Xb77a4ea00bddb5ee_1 [label="Return\l"]; + } + Xb77a4ea00bddb5ee_0 -> Xfe22f42cfe47a1ac_0 [label="cp(1)"]; + subgraph cluster_10 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X933d4e5c628373c7_0 -> X933d4e5c628373c7_1 [label="0"]; + X933d4e5c628373c7_0 [label="Call\l"]; + X933d4e5c628373c7_1 -> X933d4e5c628373c7_2 [label="2"]; + X933d4e5c628373c7_1 [label="Call\l"]; + X933d4e5c628373c7_2 [label="Return\l"]; + } + X933d4e5c628373c7_0 -> X8ba77942ecdf0df8_0 [label="mv(1),const :: ()"]; + X933d4e5c628373c7_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state index a5c093996..080d3afa0 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state @@ -40,41 +40,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 1 ) |-> StringVal ( "assertion failed: z == x" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 37 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 38 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 26 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 30 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 11 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 9 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 33 ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 2 ) ) - ty ( 29 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 30 ) |-> typeInfoVoidType - ty ( 32 ) |-> typeInfoRefType ( ty ( 34 ) ) - ty ( 33 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 34 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 15 ) , ty ( 27 ) ty ( 35 ) ty ( 35 ) .Tys ) - ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 38 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.smir.dot b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.dot new file mode 100644 index 000000000..70c4062f4 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.dot @@ -0,0 +1,97 @@ +digraph { + label="simple"; + node [shape=rectangle]; + Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X4af6e702c49b2819_0 [label="0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_1 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + Xd4751a0bfa93e011_0 -> Xd4751a0bfa93e011_1 [label="5"]; + Xd4751a0bfa93e011_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; + Xd4751a0bfa93e011_1 [label="Storage Dead _6\l0 <- Use(cp(5 as VariantIdx(0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + Xd4751a0bfa93e011_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; + subgraph cluster_2 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xa9b61f901a7d3753_0 -> Xa9b61f901a7d3753_3 [label="Cleanup"]; + Xa9b61f901a7d3753_0 -> Xa9b61f901a7d3753_1 [label="0"]; + Xa9b61f901a7d3753_0 [label="3 <- &mut 1\lCall\l"]; + Xa9b61f901a7d3753_1 -> Xa9b61f901a7d3753_2; + Xa9b61f901a7d3753_1 [label="Drop 1\l"]; + Xa9b61f901a7d3753_2 [label="Return\l"]; + Xa9b61f901a7d3753_3 -> Xa9b61f901a7d3753_4; + Xa9b61f901a7d3753_3 [label="Drop 1\l"]; + Xa9b61f901a7d3753_4 [label="Resume\l"]; + } + Xa9b61f901a7d3753_0 -> X6478806ef92408be_0 [label="mv(3),mv(2)"]; + subgraph cluster_3 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xdbf5b6a01188feab_0 -> Xdbf5b6a01188feab_1 [label="0"]; + Xdbf5b6a01188feab_0 [label="Call\l"]; + Xdbf5b6a01188feab_1 [label="Return\l"]; + } + Xdbf5b6a01188feab_0 -> Xa9b61f901a7d3753_0 [label="mv(*1),mv(2)"]; + subgraph cluster_4 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + Xdfbfd33c57cd4b42_0 -> Xdfbfd33c57cd4b42_1 [label="0"]; + Xdfbfd33c57cd4b42_0 [label="Call\l"]; + Xdfbfd33c57cd4b42_1 -> Xdfbfd33c57cd4b42_2 [label="2"]; + Xdfbfd33c57cd4b42_1 [label="Call\l"]; + Xdfbfd33c57cd4b42_2 [label="Return\l"]; + } + Xdfbfd33c57cd4b42_0 -> Xa4d0dcc36c9c8ee4_0 [label="mv(1),const :: ()"]; + Xdfbfd33c57cd4b42_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_5 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xa4d0dcc36c9c8ee4_0 -> Xa4d0dcc36c9c8ee4_1 [label="0"]; + Xa4d0dcc36c9c8ee4_0 [label="Call\l"]; + Xa4d0dcc36c9c8ee4_1 [label="Return\l"]; + } + Xa4d0dcc36c9c8ee4_0 -> Xa4d0dcc36c9c8ee4_0: 1 [label=""]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X6478806ef92408be_0 -> X6478806ef92408be_1 [label="3"]; + X6478806ef92408be_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp(*1.0))\lCall\l"]; + X6478806ef92408be_1 -> X6478806ef92408be_2 [label="2"]; + X6478806ef92408be_1 [label="Storage Dead _4\lCall\l"]; + X6478806ef92408be_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X6478806ef92408be_0 -> Xdfbfd33c57cd4b42_0 [label="mv(4)"]; + X6478806ef92408be_1 -> X4af6e702c49b2819_0 [label="mv(3)"]; + subgraph cluster_7 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xac9ab9d11a60e24b_0 [label="Return\l"]; + } + subgraph cluster_8 { + label="main"; + style="filled"; + color=palegreen; + Xed5b6cb48ca16c6d_0 -> Xed5b6cb48ca16c6d_2 [label="0"]; + Xed5b6cb48ca16c6d_0 -> Xed5b6cb48ca16c6d_1 [label="other"]; + Xed5b6cb48ca16c6d_0 [label="1 <- Use(const :: i8)\l2 <- & 1\l3 <- Use(cp(*2))\l4 <- Eq(cp(3), cp(1))\lSwitchInt mv(4)\l"]; + Xed5b6cb48ca16c6d_1 [label="Return\l"]; + Xed5b6cb48ca16c6d_2 [label="Call\l"]; + } + Xed5b6cb48ca16c6d_2 -> Xac08878333d72e42_0 [label="const :: &str"]; +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.state b/kmir/src/tests/integration/data/exec-smir/references/simple.state index 5676a9648..d3c43f58c 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.state +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.state @@ -38,39 +38,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 1 ) |-> StringVal ( "assertion failed: z == x" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 55 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 35 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 36 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 24 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 29 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 15 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 13 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 26 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 2 ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 29 ) |-> typeInfoVoidType - ty ( 30 ) |-> typeInfoRefType ( ty ( 32 ) ) - ty ( 31 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 32 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 8 ) , ty ( 26 ) ty ( 33 ) ty ( 33 ) .Tys ) - ty ( 33 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 36 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state index b4eee7173..f0da321f4 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state @@ -67,50 +67,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - allocId ( 5 ) |-> StringVal ( "assertion failed: a.a_value == 42" ) - allocId ( 6 ) |-> StringVal ( "assertion failed: a.a_value == 43" ) - allocId ( 7 ) |-> StringVal ( "assertion failed: vv == 43" ) - allocId ( 8 ) |-> StringVal ( "assertion failed: a.another" ) - allocId ( 9 ) |-> StringVal ( "assertion failed: a.a_third == 43" ) - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 42 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 59 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\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 ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 65 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 71 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\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 ( 28 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 78 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 10 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 82 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 83 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 88 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 91 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 78 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 92 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 83 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 88 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r2" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "ee" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "vv" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r3" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 42 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 43 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 30 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 32 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 12 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 10 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 25 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyUsize ) ) - ty ( 28 ) |-> typeInfoRefType ( ty ( 39 ) ) - ty ( 29 ) |-> typeInfoRefType ( ty ( 30 ) ) - ty ( 30 ) |-> typeInfoStructType ( "MyStruct" , adtDef ( 7 ) , ty ( 2 ) ty ( 25 ) ty ( 26 ) .Tys ) - ty ( 31 ) |-> typeInfoRefType ( ty ( 2 ) ) - ty ( 32 ) |-> typeInfoVoidType - ty ( 33 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 34 ) |-> typeInfoStructType ( "Enclosing<'_>" , adtDef ( 8 ) , ty ( 29 ) .Tys ) - ty ( 35 ) |-> typeInfoRefType ( ty ( 34 ) ) - ty ( 36 ) |-> typeInfoRefType ( ty ( 26 ) ) - ty ( 38 ) |-> typeInfoRefType ( ty ( 40 ) ) - ty ( 39 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 40 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 17 ) , ty ( 28 ) ty ( 41 ) ty ( 41 ) .Tys ) - ty ( 41 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - ty ( 43 ) |-> typeInfoPtrType ( ty ( 9 ) ) - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state index 4dd00c908..57665d4db 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state @@ -39,35 +39,4 @@ ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) .Operands ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 13 ) ) ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"33333sE@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 62 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 30 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 31 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 24 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 32 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 10 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 8 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 25 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) - ty ( 27 ) |-> typeInfoTupleType ( ty ( 16 ) ty ( 16 ) .Tys ) - ty ( 28 ) |-> typeInfoStructType ( "MyStruct" , adtDef ( 7 ) , ty ( 16 ) ty ( 25 ) ty ( 26 ) ty ( 27 ) .Tys ) - ty ( 31 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 32 ) |-> typeInfoVoidType - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.state index ddfc6ca7a..47b68a635 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.state @@ -50,36 +50,4 @@ ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType (... name: "std::result::Result" , adtDef: adtDef ( 19 ) , discriminants: discriminant ( 0 ) discriminant ( 1 ) .Discriminants , fields: ty ( 6 ) .Tys : ty ( 33 ) .Tys : .Tyss , layout: someLayoutShape ( layoutShape (... fields: fieldsShapeArbitrary ( mk (... offsets: machineSize (... numBits: 0 ) .MachineSizes ) ) , variants: variantsShapeSingle ( mk (... index: variantIdx ( 0 ) ) ) , abi: valueAbiScalar ( scalarInitialized ( mk (... value: primitiveInt ( mk (... length: integerLengthI64 , signed: true ) ) , validRange: wrappingRange (... start: 0 , end: 18446744073709551615 ) ) ) ) , abiAlign: align ( 8 ) , size: machineSize (... numBits: 64 ) ) ) ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 25 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 23 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 26 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 27 ) |-> typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) - ty ( 28 ) |-> typeInfoStructType ( "S" , adtDef ( 7 ) , ty ( 16 ) ty ( 26 ) ty ( 27 ) .Tys ) - ty ( 29 ) |-> typeInfoTupleType ( ty ( 16 ) ty ( 26 ) ty ( 27 ) .Tys ) - ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 33 ) |-> typeInfoVoidType - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/pointer-cast-length-test-fail.array_cast_test.expected b/kmir/src/tests/integration/data/prove-rs/show/pointer-cast-length-test-fail.array_cast_test.expected index e8790c95d..ff6808691 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/pointer-cast-length-test-fail.array_cast_test.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/pointer-cast-length-test-fail.array_cast_test.expected @@ -15,10 +15,10 @@ ┃ ├─ 4 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ │ -┃ │ (4 steps) +┃ │ (5 steps) ┃ └─ 6 (stuck, leaf) -┃ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -┃ span: 72 +┃ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "** UNKNOWN FUNCTION **" ) , +┃ span: 32 ┃ ┗━━┓ subst: .Subst ┃ constraint: diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected index 8c8453582..8dd5ab168 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected @@ -3,11 +3,10 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (562 steps) +│ (563 steps) └─ 3 (stuck, leaf) - #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC - function: main - span: prove-rs/symbolic-args-fail.rs:53 + #setUpCalleeData ( monoItemFn ( ... name: symbol ( "** UNKNOWN FUNCTION **" ) , + span: no-location:0 ┌─ 2 (root, leaf, target, terminal) @@ -26,11 +25,11 @@ Node roles (exclusive): Leaf paths from init: total leaves (non-root): 1 reachable leaves : 1 - total steps : 562 + total steps : 563 - leaf 3: steps 562, path 1 -> 3 + leaf 3: steps 563, path 1 -> 3 LEAF CELLS --------------- Node 3: - #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandConstant ( constOperand ( ... span: span ( 117 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindZeroSized , ty: ty ( 38 ) , id: mirConstId ( 24 ) ) ) ) , args: operandConstant ( constOperand ( ... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap ( ... ptrs: provenanceMapEntry ( ... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 39 ) , id: mirConstId ( 25 ) ) ) ) .Operands , destination: place ( ... local: local ( 25 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 117 ) ) ) ~> .K \ No newline at end of file + #setUpCalleeData ( monoItemFn ( ... name: symbol ( "** UNKNOWN FUNCTION **" ) , id: defId ( 38 ) , body: noBody ) , operandConstant ( constOperand ( ... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap ( ... ptrs: provenanceMapEntry ( ... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 39 ) , id: mirConstId ( 25 ) ) ) ) .Operands ) ~> .K \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected index 9e40f97cb..47fb9f7be 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected @@ -3,11 +3,10 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (562 steps) +│ (563 steps) └─ 3 (stuck, leaf) - #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC - function: main - span: 117 + #setUpCalleeData ( monoItemFn ( ... name: symbol ( "** UNKNOWN FUNCTION **" ) , + span: 32 ┌─ 2 (root, leaf, target, terminal) diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-structs-fail.eats_struct_args.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-structs-fail.eats_struct_args.expected index ef708c9c0..c1d466815 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-structs-fail.eats_struct_args.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-structs-fail.eats_struct_args.expected @@ -27,10 +27,10 @@ ┃ ┃ ├─ 8 ┃ ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 5 ) ) ┃ ┃ │ -┃ ┃ │ (4 steps) +┃ ┃ │ (5 steps) ┃ ┃ └─ 10 (stuck, leaf) -┃ ┃ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -┃ ┃ span: 65 +┃ ┃ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "** UNKNOWN FUNCTION **" ) , +┃ ┃ span: 32 ┃ ┃ ┃ ┗━━┓ subst: .Subst ┃ ┃ constraint: diff --git a/kmir/src/tests/integration/data/proving/unchecked-add-spec.k b/kmir/src/tests/integration/data/proving/unchecked-add-spec.k deleted file mode 100644 index d3819bb5e..000000000 --- a/kmir/src/tests/integration/data/proving/unchecked-add-spec.k +++ /dev/null @@ -1,75 +0,0 @@ -module UNCHECKED-ADD-SPEC - imports KMIR - - claim [unchecked-ADD-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody (body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: someBody (body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: someBody (body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ) - - - requires // i16 invariants - 0 -Int (1 < Path: - from kmir.build import LLVM_DEF_DIR +@pytest.fixture(scope='session') +def definition_dir(): # -> Path: + import time + + from kmir.kmir import KMIR + + from .utils import TEST_DATA_DIR + + target_dir = TEST_DATA_DIR / 'decode-value' / 'tmp' + + # prevent other processes from concurrently trying to compile + # (the scope='session' above does not actually work in pytest-xdist) + lock_file = TEST_DATA_DIR / 'decode-value' / 'tmp.lock' + try: + with open(lock_file, 'x') as _: + # generate and compile an LLVM interpreter with the type-table + _ = KMIR.from_kompiled_kore(TEST_SMIR, target_dir=str(target_dir), symbolic=False) + lock_file.unlink() + except FileExistsError: + # wait loop until interpreter exists, max 1min + secs = 0 + while lock_file.exists() and secs < 60: + time.sleep(1) + if not (target_dir / 'llvm' / 'interpreter').exists(): + raise Exception('Waited in vain for interpreter to arise. Exiting') from None - return LLVM_DEF_DIR + yield target_dir / 'llvm' + # should remove the target_dir but other processes are probably still using it + print(f'Remove {target_dir} if you want to clean up') -@pytest.fixture(scope='module') + +@pytest.fixture(scope='session') def definition(definition_dir: Path) -> KDefinition: from pyk.kast.outer import read_kast_definition @@ -58,10 +85,6 @@ def dedent(s: str) -> str: Lbl'-LT-'locals'-GT-'{}(Lbl'Stop'List{}()) ), Lbl'-LT-'stack'-GT-'{}(Lbl'Stop'List{}()), - Lbl'-LT-'memory'-GT-'{}(Lbl'Stop'Map{}()), - Lbl'-LT-'functions'-GT-'{}(Lbl'Stop'Map{}()), - Lbl'-LT-'start-symbol'-GT-'{}(Lblsymbol'LParUndsRParUnds'LIB'Unds'Symbol'Unds'String{}(\dv{SortString{}}(""))), - Lbl'-LT-'types'-GT-'{}(Lbl'Stop'Map{}()) ), Lbl'-LT-'generatedCounter'-GT-'{}(\dv{SortInt{}}("0")) ) @@ -78,8 +101,8 @@ class _TestData(NamedTuple): expected: str def to_pattern(self, definition: KDefinition) -> Pattern: - from pyk.kore.prelude import SORT_K_ITEM, bytes_dv, inj, int_dv, map_pattern - from pyk.kore.syntax import App, SortApp + from pyk.kore.prelude import bytes_dv + from pyk.kore.syntax import App return App( 'LbldecodeValue', @@ -87,15 +110,6 @@ def to_pattern(self, definition: KDefinition) -> Pattern: ( bytes_dv(self.bytez), self._json_type_info_to_kore(self.type_info, definition), - map_pattern( - *( - ( - inj(SortApp('SortTy'), SORT_K_ITEM, App('Lblty', (), (int_dv(key),))), - inj(SortApp('SortTypeInfo'), SORT_K_ITEM, self._json_type_info_to_kore(value, definition)), - ) - for key, value in self.types.items() - ) - ), ), ) @@ -135,7 +149,31 @@ def parse_test_data(test_file: Path, expected_file: Path) -> _TestData: ) +def load_test_types(): + import json + + from .utils import TEST_DATA_DIR + + types = json.loads((TEST_DATA_DIR / 'decode-value' / 'type-table').read_text()) + assert isinstance(types, list) + + smir = { + 'name': 'decode_value', + 'crate-id': 0, + 'allocs': [], + 'debug': None, + 'functions': [], + 'items': [], + 'machine': None, + 'spans': [], + 'uneval_consts': [], + 'types': types, + } + return SMIRInfo(smir) + + TEST_DATA: Final = load_test_data() +TEST_SMIR: Final = load_test_types() SKIP: Final = ( 'enum-1-variant-1-field', 'enum-1-variant-2-fields', diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index f928a499e..179c997ed 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -10,14 +10,11 @@ from pyk.cterm.show import CTermShow from pyk.kast.inner import KApply, KSort, KToken from pyk.kast.pretty import PrettyPrinter -from pyk.proof import Proof from pyk.proof.show import APRProofShow -from kmir.__main__ import _kmir_gen_spec, _kmir_prove_raw -from kmir.build import HASKELL_DEF_DIR, LLVM_DEF_DIR from kmir.cargo import CargoProject from kmir.kmir import KMIR, KMIRAPRNodePrinter -from kmir.options import GenSpecOpts, ProveRawOpts, ProveRSOpts, ShowOpts +from kmir.options import ProveRSOpts, ShowOpts from kmir.parse.parser import Parser from kmir.smir import SMIRInfo from kmir.testing.fixtures import assert_or_update_show_output @@ -307,7 +304,7 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo ] -@pytest.mark.parametrize('kmir_backend', [KMIR(LLVM_DEF_DIR), KMIR(HASKELL_DEF_DIR)], ids=['llvm', 'haskell']) +@pytest.mark.parametrize('symbolic', [False, True], ids=['llvm', 'haskell']) @pytest.mark.parametrize( 'test_case', EXEC_DATA, @@ -315,17 +312,18 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo ) def test_exec_smir( test_case: tuple[str, Path, Path, int], - kmir_backend: KMIR, + symbolic: bool, update_expected_output: bool, ) -> None: (_, input_json, output_kast, depth) = test_case smir_info = SMIRInfo.from_file(input_json) - result = kmir_backend.run_smir(smir_info, depth=depth) - - result_pretty = kmir_backend.kore_to_pretty(result).rstrip() - assert_or_update_show_output(result_pretty, output_kast, update=update_expected_output) + with tempfile.TemporaryDirectory() as temp_dir: + kmir_backend = KMIR.from_kompiled_kore(smir_info, target_dir=temp_dir, symbolic=symbolic) + result = kmir_backend.run_smir(smir_info, depth=depth) + result_pretty = kmir_backend.kore_to_pretty(result).rstrip() + assert_or_update_show_output(result_pretty, output_kast, update=update_expected_output) @pytest.mark.parametrize( @@ -335,39 +333,11 @@ def test_exec_smir( ) def test_prove_termination(test_data: tuple[str, Path], tmp_path: Path, kmir: KMIR) -> None: testname, smir_json = test_data - spec_file = tmp_path / f'{testname}.k' - gen_opts = GenSpecOpts(smir_json, spec_file, 'main') - - proof_dir = tmp_path / 'proof' - prove_opts = ProveRawOpts(spec_file, proof_dir=proof_dir) - - _kmir_gen_spec(gen_opts) - _kmir_prove_raw(prove_opts) - - claim_labels = kmir.get_claim_index(spec_file).labels() - for label in claim_labels: - proof = Proof.read_proof_data(proof_dir, label) - assert proof.passed + prove_rs_opts = ProveRSOpts(rs_file=smir_json, smir=True) -PROVING_DIR = (Path(__file__).parent / 'data' / 'proving').resolve(strict=True) -PROVING_FILES = list(PROVING_DIR.glob('*-spec.k')) - - -@pytest.mark.parametrize( - 'spec', - PROVING_FILES, - ids=[spec.stem for spec in PROVING_FILES], -) -def test_prove(spec: Path, tmp_path: Path, kmir: KMIR) -> None: - proof_dir = tmp_path / (spec.stem + 'proofs') - prove_opts = ProveRawOpts(spec, proof_dir=proof_dir) - _kmir_prove_raw(prove_opts) - - claim_labels = kmir.get_claim_index(spec).labels() - for label in claim_labels: - proof = Proof.read_proof_data(proof_dir, label) - assert proof.passed + proof = KMIR.prove_rs(prove_rs_opts) + assert proof.passed SCHEMA_PARSE_DATA = (Path(__file__).parent / 'data' / 'schema-parse').resolve(strict=True)