diff --git a/kmir/src/kmir/cargo.py b/kmir/src/kmir/cargo.py index db3dc293b..d51718a9d 100644 --- a/kmir/src/kmir/cargo.py +++ b/kmir/src/kmir/cargo.py @@ -5,6 +5,7 @@ import os import shutil import subprocess +import tempfile from functools import cached_property from pathlib import Path from typing import TYPE_CHECKING @@ -180,16 +181,20 @@ def cargo_get_smir_json( command.append(str(rs_file.resolve())) cwd = cwd or Path.cwd() - smir_json_result = cwd / rs_file.with_suffix('.smir.json').name - run_process_2(command, cwd=cwd) - json_smir = json.loads(smir_json_result.read_text()) - _LOGGER.info(f'Loaded: {smir_json_result}') - if save_smir: - _LOGGER.info(f'SMIR JSON available at: {smir_json_result}') - else: - smir_json_result.unlink() - _LOGGER.info(f'Deleted: {smir_json_result}') - return json_smir + smir_name = rs_file.with_suffix('.smir.json').name + with tempfile.TemporaryDirectory(prefix=f'{rs_file.stem}.smir.', dir=cwd) as temp_dir: + workdir = Path(temp_dir) + smir_json_result = workdir / smir_name + run_process_2(command, cwd=workdir) + json_smir = json.loads(smir_json_result.read_text()) + _LOGGER.info(f'Loaded: {smir_json_result}') + if save_smir: + saved_smir = cwd / smir_name + shutil.move(smir_json_result, saved_smir) + _LOGGER.info(f'SMIR JSON available at: {saved_smir}') + else: + _LOGGER.info(f'Deleted with temporary directory: {smir_json_result}') + return json_smir def stable_mir_json() -> Path: diff --git a/kmir/src/kmir/kast.py b/kmir/src/kmir/kast.py index 7268cf755..e4887ae15 100644 --- a/kmir/src/kmir/kast.py +++ b/kmir/src/kmir/kast.py @@ -215,8 +215,18 @@ def _make_symbolic_call_config( types: Mapping[Ty, TypeMetadata], ) -> tuple[KInner, list[KInner]]: locals, constraints = _symbolic_locals(fn_data.args, types) + init_config = definition.init_config(KSort('GeneratedTopCell')) + _, init_subst = split_config_from(init_config) + symbolic_init_cells = ( + 'FRAMEID_CELL', + 'ADDRESSMAP_CELL', + 'NEXTADDRESS_CELL', + 'EXPOSEDSET_CELL', + 'GENERATEDCOUNTER_CELL', + ) subst = Subst( { + **{cell: init_subst[cell] for cell in symbolic_init_cells}, 'K_CELL': fn_data.call_terminator, 'STACK_CELL': list_empty(), # FIXME see #560, problems matching a symbolic stack 'LOCALS_CELL': list_of(locals), diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 82c28b3f0..4171e252e 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -225,6 +225,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f _ => CALLER // + _ => FRAMEID _ => #getBlocks(CALLER) CALLER => NEWCALLER DEST => NEWDEST @@ -233,7 +234,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f ListItem(typedValue(VAL:Value, _, _)) _ => NEWLOCALS // // remaining call stack (without top frame) - ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK + ListItem(StackFrame(FRAMEID, NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK // no value to return, skip writing rule [termReturnNone]: #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ @@ -242,6 +243,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f _ => CALLER // + _ => FRAMEID _ => #getBlocks(CALLER) CALLER => NEWCALLER _ => NEWDEST @@ -250,7 +252,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f ListItem(_:NewLocal) _ => NEWLOCALS // // remaining call stack (without top frame) - ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK + ListItem(StackFrame(FRAMEID, NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK syntax List ::= #getBlocks( Ty ) [function, total] | #getBlocksAux( MonoItemKind ) [function, total] @@ -356,6 +358,7 @@ where the returned result should go. CALLER => FTY + OLDFRAMEID => !_NEWFRAMEID:Int _ OLDCALLER => CALLER OLDDEST => DEST @@ -363,7 +366,7 @@ where the returned result should go. OLDUNWIND => UNWIND LOCALS - STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK + STACK => ListItem(StackFrame(OLDFRAMEID, OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK requires notBool isIntrinsicFunction(FUNC) andBool notBool #functionNameMatchesEnv(getFunctionName(FUNC)) @@ -374,6 +377,7 @@ where the returned result should go. CALLER => FTY + OLDFRAMEID => !_NEWFRAMEID:Int _ OLDCALLER => CALLER OLDDEST => DEST @@ -381,7 +385,7 @@ where the returned result should go. OLDUNWIND => UNWIND LOCALS - STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK + STACK => ListItem(StackFrame(OLDFRAMEID, OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK requires notBool isIntrinsicFunction(FUNC) andBool #functionNameMatchesEnv(getFunctionName(FUNC)) @@ -498,7 +502,7 @@ An operand may be a `Reference` (the only way a function could access another fu #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef(getValue(CALLERLOCALS, I))) ... - ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List + ListItem(StackFrame(_, _, _, _, _, CALLERLOCALS)) _:List requires 0 <=Int I andBool I - (ListItem(StackFrame(_, _, _, _, CALLERLOCALS) #as CALLERFRAME => #updateStackLocal(CALLERFRAME, I, Moved))) _:List + (ListItem(StackFrame(_, _, _, _, _, CALLERLOCALS) #as CALLERFRAME => #updateStackLocal(CALLERFRAME, I, Moved))) _:List requires 0 <=Int I andBool I ty(-1) // to retrieve caller // unpacking the top frame to avoid frequent stack read/write operations + 0 .List ty(-1) place(local(-1), .ProjectionElems) @@ -45,6 +49,10 @@ module KMIR-CONFIGURATION // remaining call stack (without top frame) .List + // address allocation model for pointer-to-integer casts + .Map + 4096 + .Set ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 5839521b4..7360aa4ca 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -18,6 +18,7 @@ module RT-DATA imports BYTES imports LIST imports MAP + imports SET imports K-EQUAL imports BODY @@ -362,13 +363,105 @@ These helpers mark down, as we traverse the projection, what `Place` we are curr syntax StackFrame ::= #updateStackLocal ( StackFrame, Int, Value ) [function] - rule #updateStackLocal(StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS), I, VAL) - => StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedValue(VAL, tyOfLocal(getLocal(LOCALS, I)), mutabilityMut)]) + rule #updateStackLocal(StackFrame(FRAMEID, CALLER, DEST, TARGET, UNWIND, LOCALS), I, VAL) + => StackFrame(FRAMEID, CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedValue(VAL, tyOfLocal(getLocal(LOCALS, I)), mutabilityMut)]) requires 0 <=Int I andBool I FRAMEID + + syntax Int ::= #stackFrameId ( Int , Int , List ) [function, total] + // ---------------------------------------------------------------- + rule #stackFrameId(0, CURRENT_FRAME_ID, _STACK) => CURRENT_FRAME_ID + rule #stackFrameId(OFFSET, _CURRENT_FRAME_ID, STACK) + => #frameIdOf({STACK[OFFSET -Int 1]}:>StackFrame) + requires 0 -1 [owise] + + syntax AllocKey ::= #stackAllocKey ( Int , Local , Int , List ) [function, total] + // --------------------------------------------------------------------------- + rule #stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) + => allocKey(#stackFrameId(STACK_DEPTH, CURRENT_FRAME_ID, STACK), LOCAL) + + syntax ProjectionElems ::= #addressProjs ( ProjectionElems ) [function, total] + // ----------------------------------------------------------------------- + rule #addressProjs(.ProjectionElems) => .ProjectionElems + rule #addressProjs(projectionElemToZST REST) => #addressProjs(REST) + rule #addressProjs(projectionElemFromZST REST) => #addressProjs(REST) + rule #addressProjs(projectionElemWrapStruct REST) => #addressProjs(REST) + rule #addressProjs(PROJ REST) => PROJ #addressProjs(REST) [owise] + + syntax MaybeTy ::= #stackAllocTy ( Int , Local , List , List ) [function, total] + | #stackAllocTyInStack ( Int , Local , List ) [function, total] + | #ptrBaseElemTy ( Int , Local , ProjectionElems , List , List ) [function, total] + | #ptrBaseElemTyInStack ( Int , Local , ProjectionElems , List ) [function, total] + // ---------------------------------------------------------------------------------------------------------------- + rule #stackAllocTy(0, local(I:Int), LOCALS, _STACK) + => tyOfLocal({LOCALS[I]}:>TypedLocal) + requires 0 <=Int I + andBool I #stackAllocTyInStack(OFFSET, LOCAL, STACK) + requires 0 tyOfLocal({FRAMELOCALS[I]}:>TypedLocal) + requires 0 <=Int I + andBool I #stackAllocTyInStack(OFFSET -Int 1, LOCAL, REST) + requires 1 TyUnknown [owise] + rule #stackAllocTyInStack(_, _, _) => TyUnknown [owise] + + rule #ptrBaseElemTy(0, local(I:Int), PROJS, LOCALS, _STACK) + => getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), #addressProjs(PROJS)) + requires 0 <=Int I + andBool I #ptrBaseElemTyInStack(OFFSET, LOCAL, PROJS, STACK) + requires 0 getTyOf(tyOfLocal({FRAMELOCALS[I]}:>TypedLocal), #addressProjs(PROJS)) + requires 0 <=Int I + andBool I #ptrBaseElemTyInStack(OFFSET -Int 1, LOCAL, PROJS, REST) + requires 1 TyUnknown [owise] + rule #ptrBaseElemTyInStack(_, _, _, _) => TyUnknown [owise] + + syntax Int ::= #ptrByteStep ( Ty , Int , Local , ProjectionElems , List , List ) [function, total] + // -------------------------------------------------------------------------------------------- + rule #ptrByteStep(TY_SOURCE, _STACK_DEPTH, _LOCAL, _PROJS, _LOCALS, _STACK) + => #sizeOf(#lookupMaybeTy({pointeeTy(#lookupMaybeTy(TY_SOURCE))}:>Ty)) + requires isTy(pointeeTy(#lookupMaybeTy(TY_SOURCE))) + andBool #sizeOf(#lookupMaybeTy({pointeeTy(#lookupMaybeTy(TY_SOURCE))}:>Ty)) >Int 0 + [preserves-definedness] + rule #ptrByteStep(_TY_SOURCE, STACK_DEPTH, LOCAL, PROJS, LOCALS, STACK) + => #ptrElemSize(#lookupMaybeTy({#ptrBaseElemTy(STACK_DEPTH, LOCAL, PROJS, LOCALS, STACK)}:>Ty)) + requires isTy(#ptrBaseElemTy(STACK_DEPTH, LOCAL, PROJS, LOCALS, STACK)) + [preserves-definedness] + rule #ptrByteStep(_, _, _, _, _, _) => 1 [owise] + syntax ProjectionElems ::= appendP ( ProjectionElems , ProjectionElems ) [function, total] syntax ProjectionElems ::= appendP ( ProjectionElems , ProjectionElems ) [function, total] | consP ( ProjectionElem , ProjectionElems ) [function, total] @@ -1615,6 +1708,128 @@ What can be supported without additional layout consideration is trivial casts b requires lookupTy(TY_SOURCE) ==K lookupTy(TY_TARGET) ``` +Transmuting a pointer to an integer discards provenance and reinterprets the pointer's +address as a value of the target integer type. +The address is computed from a lazily-assigned base address for the allocation plus the +pointer offset within that allocation. + +A stack allocation key uses a stable frame id together with the local index, so the +same stack slot keeps the same abstract address even when deeper calls change relative +stack depths. + +```k + syntax AllocKey ::= allocKey ( Int , Local ) [symbol(allocKey)] + syntax AddrEntry ::= addrEntry ( Int , Int ) [symbol(addrEntry)] + + syntax Int ::= #alignUp ( Int , Int ) [function, total] + rule #alignUp(ADDR, ALIGN) => ((ADDR +Int ALIGN -Int 1) /Int ALIGN) *Int ALIGN + requires ALIGN >Int 0 + [preserves-definedness] + rule #alignUp(ADDR, _) => ADDR [owise] + + syntax Int ::= #addrEntryBase ( AddrEntry ) [function, total] + rule #addrEntryBase(addrEntry(BASE, _)) => BASE + + syntax Int ::= #ptrElemSize ( TypeInfo ) [function, total] + rule #ptrElemSize(TY_INFO) => #sizeOf(TY_INFO) requires #sizeOf(TY_INFO) >Int 0 + rule #ptrElemSize(TY_INFO) => 1 requires #sizeOf(TY_INFO) ==Int 0 // ZST + rule #ptrElemSize(_) => 1 [owise] + + syntax KItem ::= #allocAddressFor ( Int , Local , Int , Int ) + // #allocAddressFor(STACK_DEPTH, LOCAL, SIZE, ALIGN) + // Lazily assigns an aligned base address for the allocation at (frame id of STACK_DEPTH, LOCAL). + rule #allocAddressFor(STACK_DEPTH, LOCAL, SIZE, ALIGN) + => .K + ... + + CURRENT_FRAME_ID ... + STACK + + MAP => MAP[#stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) <- addrEntry(#alignUp(NEXT, ALIGN), SIZE)] + + + NEXT => #alignUp(NEXT, ALIGN) +Int maxInt(SIZE, 1) + + requires 0 <=Int #stackFrameId(STACK_DEPTH, CURRENT_FRAME_ID, STACK) + andBool notBool #stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) in_keys(MAP) + + // Already allocated: no-op + rule #allocAddressFor(STACK_DEPTH, LOCAL, _, _) => .K ... + CURRENT_FRAME_ID ... + STACK + MAP + requires 0 <=Int #stackFrameId(STACK_DEPTH, CURRENT_FRAME_ID, STACK) + andBool #stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) in_keys(MAP) +``` + +Transmuting a `PtrLocal` to an integer type: look up or lazily assign the base address, +then compute `base + byte_offset` where byte_offset comes from the pointer's metadata. + +```k + // Case 1: address already assigned — compute base + offset + rule #cast( + PtrLocal(STACK_DEPTH, place(LOCAL, PROJS), _MUT, metadata(_SIZE, PTR_OFFSET, _ORIGIN)), + castKindTransmute, + TY_SOURCE, + TY_TARGET + ) + => + #intAsType( + #addrEntryBase({MAP[#stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK)]}:>AddrEntry) + +Int PTR_OFFSET *Int #ptrByteStep(TY_SOURCE, STACK_DEPTH, LOCAL, PROJS, LOCALS, STACK), + 64, + #numTypeOf(lookupTy(TY_TARGET)) + ) + ... + + + CURRENT_FRAME_ID + LOCALS + ... + + STACK + MAP + requires #isIntType(lookupTy(TY_TARGET)) + andBool 0 <=Int #stackFrameId(STACK_DEPTH, CURRENT_FRAME_ID, STACK) + andBool #stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) in_keys(MAP) + [preserves-definedness] + + // Case 2: address not yet assigned — allocate first, original #cast stays on + rule #cast( + PtrLocal(STACK_DEPTH, place(LOCAL, PROJS), MUT, META), + castKindTransmute, + TY_SOURCE, + TY_TARGET + ) + => + #allocAddressFor( + STACK_DEPTH, + LOCAL, + #sizeOf(#lookupMaybeTy({#stackAllocTy(STACK_DEPTH, LOCAL, LOCALS, STACK)}:>Ty)), + #alignOf(#lookupMaybeTy({#stackAllocTy(STACK_DEPTH, LOCAL, LOCALS, STACK)}:>Ty)) + ) + ~> #cast( + PtrLocal(STACK_DEPTH, place(LOCAL, PROJS), MUT, META), + castKindTransmute, + TY_SOURCE, + TY_TARGET + ) + ... + + + CURRENT_FRAME_ID + LOCALS + ... + + STACK + MAP + requires #isIntType(lookupTy(TY_TARGET)) + andBool 0 <=Int #stackFrameId(STACK_DEPTH, CURRENT_FRAME_ID, STACK) + andBool isTy(#stackAllocTy(STACK_DEPTH, LOCAL, LOCALS, STACK)) + andBool notBool #stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) in_keys(MAP) + [preserves-definedness] +``` + Other `Transmute` casts that can be resolved are round-trip casts from type A to type B and then directly back from B to A. The first cast is reified as a `thunk`, the second one resolves it and eliminates the `thunk`: @@ -1879,12 +2094,151 @@ the safety of this cast. The logic of the semantics and saftey of this cast for ``` +### Pointer provenance casts + +`PointerExposeAddress` converts a pointer to an integer (like `ptr as usize`), exposing +the pointer's provenance so that a future `PointerWithExposedProvenance` cast can recover it. + +```k + // PointerExposeAddress for PtrLocal: compute address and expose provenance + rule #cast( + PtrLocal(STACK_DEPTH, place(LOCAL, PROJS), _MUT, metadata(_SIZE, PTR_OFFSET, _ORIGIN)), + castKindPointerExposeAddress, + TY_SOURCE, + TY_TARGET + ) + => + #intAsType( + #addrEntryBase({MAP[#stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK)]}:>AddrEntry) + +Int PTR_OFFSET *Int #ptrByteStep(TY_SOURCE, STACK_DEPTH, LOCAL, PROJS, LOCALS, STACK), + 64, + #numTypeOf(lookupTy(TY_TARGET)) + ) + ... + + + CURRENT_FRAME_ID + LOCALS + ... + + STACK + MAP + EXPOSED => EXPOSED |Set SetItem(#stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK)) + requires #isIntType(lookupTy(TY_TARGET)) + andBool 0 <=Int #stackFrameId(STACK_DEPTH, CURRENT_FRAME_ID, STACK) + andBool #stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) in_keys(MAP) + [preserves-definedness] + + rule #cast( + PtrLocal(STACK_DEPTH, place(LOCAL, PROJS), MUT, META), + castKindPointerExposeAddress, + TY_SOURCE, + TY_TARGET + ) + => + #allocAddressFor( + STACK_DEPTH, + LOCAL, + #sizeOf(#lookupMaybeTy({#stackAllocTy(STACK_DEPTH, LOCAL, LOCALS, STACK)}:>Ty)), + #alignOf(#lookupMaybeTy({#stackAllocTy(STACK_DEPTH, LOCAL, LOCALS, STACK)}:>Ty)) + ) + ~> #cast( + PtrLocal(STACK_DEPTH, place(LOCAL, PROJS), MUT, META), + castKindPointerExposeAddress, + TY_SOURCE, + TY_TARGET + ) + ... + + + CURRENT_FRAME_ID + LOCALS + ... + + STACK + MAP + requires #isIntType(lookupTy(TY_TARGET)) + andBool 0 <=Int #stackFrameId(STACK_DEPTH, CURRENT_FRAME_ID, STACK) + andBool isTy(#stackAllocTy(STACK_DEPTH, LOCAL, LOCALS, STACK)) + andBool notBool #stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) in_keys(MAP) + [preserves-definedness] + + // PointerExposeAddress for Reference + rule #cast( + Reference(STACK_DEPTH, place(LOCAL, PROJS), _MUT, metadata(_SIZE, PTR_OFFSET, _ORIGIN)), + castKindPointerExposeAddress, + TY_SOURCE, + TY_TARGET + ) + => + #intAsType( + #addrEntryBase({MAP[#stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK)]}:>AddrEntry) + +Int PTR_OFFSET *Int #ptrByteStep(TY_SOURCE, STACK_DEPTH, LOCAL, PROJS, LOCALS, STACK), + 64, + #numTypeOf(lookupTy(TY_TARGET)) + ) + ... + + + CURRENT_FRAME_ID + LOCALS + ... + + STACK + MAP + EXPOSED => EXPOSED |Set SetItem(#stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK)) + requires #isIntType(lookupTy(TY_TARGET)) + andBool 0 <=Int #stackFrameId(STACK_DEPTH, CURRENT_FRAME_ID, STACK) + andBool #stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) in_keys(MAP) + [preserves-definedness] + + rule #cast( + Reference(STACK_DEPTH, place(LOCAL, PROJS), MUT, META), + castKindPointerExposeAddress, + TY_SOURCE, + TY_TARGET + ) + => + #allocAddressFor( + STACK_DEPTH, + LOCAL, + #sizeOf(#lookupMaybeTy({#stackAllocTy(STACK_DEPTH, LOCAL, LOCALS, STACK)}:>Ty)), + #alignOf(#lookupMaybeTy({#stackAllocTy(STACK_DEPTH, LOCAL, LOCALS, STACK)}:>Ty)) + ) + ~> #cast( + Reference(STACK_DEPTH, place(LOCAL, PROJS), MUT, META), + castKindPointerExposeAddress, + TY_SOURCE, + TY_TARGET + ) + ... + + + CURRENT_FRAME_ID + LOCALS + ... + + STACK + MAP + requires #isIntType(lookupTy(TY_TARGET)) + andBool 0 <=Int #stackFrameId(STACK_DEPTH, CURRENT_FRAME_ID, STACK) + andBool isTy(#stackAllocTy(STACK_DEPTH, LOCAL, LOCALS, STACK)) + andBool notBool #stackAllocKey(STACK_DEPTH, LOCAL, CURRENT_FRAME_ID, STACK) in_keys(MAP) + [preserves-definedness] +``` + +`PointerWithExposedProvenance` converts an integer to a pointer (`ptr::with_exposed_provenance`), +recovering the provenance that was previously exposed. + +```k + // TODO: PointerWithExposedProvenance requires searching the address map and exposed set + // to recover the original allocation. This is left for future implementation. +``` + ### Other casts involving pointers | CastKind | Description | |------------------------------|-------------| -| PointerExposeAddress | | -| PointerWithExposedProvenance | | | FnPtrToPtr | | ## Decoding constants from their bytes representation to values diff --git a/kmir/src/kmir/testing/fixtures.py b/kmir/src/kmir/testing/fixtures.py index d42bf606d..162a1b972 100644 --- a/kmir/src/kmir/testing/fixtures.py +++ b/kmir/src/kmir/testing/fixtures.py @@ -31,20 +31,53 @@ def _normalize_symbol_hashes(text: str) -> str: return text +def _normalize_optional_show_diagnostics(text: str) -> str: + """Drop diagnostics that are present only on some environments/backends.""" + return re.sub(r'(?m)^ >> message: .*\n?', '', text) + + +def _normalize_step_counts(text: str) -> str: + """Normalize unstable proof step counts in human-facing snapshots.""" + text = re.sub(r'\(\d+ steps\)', '( steps)', text) + text = re.sub(r'steps \d+', 'steps ', text) + return text + + +def _normalize_trailing_newlines(text: str) -> str: + """Ignore EOF newline count drift in snapshot comparisons.""" + return text.rstrip('\n') + + def assert_or_update_show_output( - actual_text: str, expected_file: Path, *, update: bool, path_replacements: dict[str, str] | None = None + actual_text: str, + expected_file: Path, + *, + update: bool, + path_replacements: dict[str, str] | None = None, + normalize_optional_diagnostics: bool = False, + normalize_steps: bool = False, ) -> None: if path_replacements: for old, new in path_replacements.items(): actual_text = actual_text.replace(old, new) # Normalize rustc symbol hash suffixes that can drift across builds/environments. actual_text = _normalize_symbol_hashes(actual_text) + if normalize_optional_diagnostics: + actual_text = _normalize_optional_show_diagnostics(actual_text) + if normalize_steps: + actual_text = _normalize_step_counts(actual_text) + actual_text = _normalize_trailing_newlines(actual_text) if update: expected_file.write_text(actual_text) else: assert expected_file.is_file() expected_text = expected_file.read_text() expected_text = _normalize_symbol_hashes(expected_text) + if normalize_optional_diagnostics: + expected_text = _normalize_optional_show_diagnostics(expected_text) + if normalize_steps: + expected_text = _normalize_step_counts(expected_text) + expected_text = _normalize_trailing_newlines(expected_text) if actual_text != expected_text: diff = '\n'.join( unified_diff( diff --git a/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::a_module::twice.expected b/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::a_module::twice.expected index 2609e8676..c8c65b003 100644 --- a/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::a_module::twice.expected +++ b/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::a_module::twice.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ │ (44 steps) ├─ 3 (split) diff --git a/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::main.expected b/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::main.expected index 3edeb4f48..34f6b2b5b 100644 --- a/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::main.expected +++ b/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ │ (228 steps) ├─ 3 (terminal) diff --git a/kmir/src/tests/integration/data/crate-tests/single-dylib/small_test_dylib::add.expected b/kmir/src/tests/integration/data/crate-tests/single-dylib/small_test_dylib::add.expected index 76fa2d153..4b5a9b765 100644 --- a/kmir/src/tests/integration/data/crate-tests/single-dylib/small_test_dylib::add.expected +++ b/kmir/src/tests/integration/data/crate-tests/single-dylib/small_test_dylib::add.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ │ (35 steps) ├─ 3 (split) 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 3cb67eec2..345099ef1 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 @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ │ (114 steps) ├─ 3 (split) diff --git a/kmir/src/tests/integration/data/crate-tests/two-crate-bin/crate2::main.expected b/kmir/src/tests/integration/data/crate-tests/two-crate-bin/crate2::main.expected index 544958705..c708a582e 100644 --- a/kmir/src/tests/integration/data/crate-tests/two-crate-bin/crate2::main.expected +++ b/kmir/src/tests/integration/data/crate-tests/two-crate-bin/crate2::main.expected @@ -1,8 +1,9 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ -│ (737 steps) +│ (736 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ diff --git a/kmir/src/tests/integration/data/crate-tests/two-crate-dylib/crate2::test_crate1_with.expected b/kmir/src/tests/integration/data/crate-tests/two-crate-dylib/crate2::test_crate1_with.expected index bd3076868..a26327334 100644 --- a/kmir/src/tests/integration/data/crate-tests/two-crate-dylib/crate2::test_crate1_with.expected +++ b/kmir/src/tests/integration/data/crate-tests/two-crate-dylib/crate2::test_crate1_with.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ │ (216 steps) ├─ 3 (terminal) 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 5c2707c89..4a822c659 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -47,6 +50,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 6c3fa5051..ea41c3385 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -63,6 +66,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 a1a21b0dc..c00663ab8 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 @@ -9,6 +9,9 @@ ty ( 85 ) + + 1 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -50,7 +53,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , 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 ( 109 ) ) ) ) ) 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 ( 109 ) ) ) ) ) ) , ty ( 91 ) , mutabilityMut ) ) ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) @@ -73,6 +76,15 @@ ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) ListItem ( newLocal ( ty ( 68 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 69 ) , mutabilityNot ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/allocs/option_consts.state b/kmir/src/tests/integration/data/exec-smir/allocs/option_consts.state index 4186cc79a..9db0bc1f7 100644 --- a/kmir/src/tests/integration/data/exec-smir/allocs/option_consts.state +++ b/kmir/src/tests/integration/data/exec-smir/allocs/option_consts.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 326 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 44 ) , id: mirConstId ( 47 ) ) ) ) ) ) , span: span ( 326 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 323 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 101 ) , id: mirConstId ( 45 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 324 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 44 ) , id: mirConstId ( 46 ) ) ) ) operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 325 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 328 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 329 ) , 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 ( 6 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 36 ) , id: mirConstId ( 49 ) ) ) ) ) ) , span: span ( 329 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 330 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 36 ) ) .ProjectionElems ) ) ) ) , span: span ( 331 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 36 ) ) .ProjectionElems ) ) ) ) , span: span ( 332 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 327 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 102 ) , id: mirConstId ( 48 ) ) ) ) , args: operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 327 ) ) ) ) @@ -110,6 +113,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 09d56cea7..b55a214ee 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -52,6 +55,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 a2940d22a..08695e29e 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -65,6 +68,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 97333b1b7..0ab7bc533 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -39,6 +42,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 d905964fc..2d3df72b8 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -47,6 +50,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 7e5876270..55aef79f8 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -90,6 +93,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 861180b8d..8ea8616e8 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -56,6 +59,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file 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 b2f9a3ef5..d543ef5ba 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) @@ -44,6 +47,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/closure-call.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/closure-call.state index db13358c2..71c72223c 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/closure-call.state +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/closure-call.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 28 ) , id: mirConstId ( 11 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 60 ) ) ) ) @@ -46,6 +49,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file 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 056091d15..520e6a5c6 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 @@ -9,6 +9,9 @@ ty ( 27 ) + + 2 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) @@ -31,9 +34,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 1 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) - 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 ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 16e4c197d..c804d1a5e 100644 --- a/kmir/src/tests/integration/data/exec-smir/enum/enum.state +++ b/kmir/src/tests/integration/data/exec-smir/enum/enum.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -53,6 +56,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 b05e88c0e..944521b51 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -48,6 +51,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 baeb2b64a..4b7179f2a 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -38,6 +41,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 596624cb4..f192812c4 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) ) @@ -30,6 +33,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 a8b20314b..c0a3e3ec8 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 @@ -9,6 +9,9 @@ ty ( 27 ) + + 3 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) ) @@ -29,9 +32,18 @@ - ListItem ( StackFrame ( ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - 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 ) ) + ListItem ( StackFrame ( 2 , ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( 1 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state index ac4b58c68..9e2fad481 100644 --- a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state +++ b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityNot ) ) , ty: ty ( 30 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 31 ) ) .ProjectionElems ) ) ) , span: span ( 66 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 29 ) , id: mirConstId ( 12 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) ) ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 67 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 14 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 68 ) ) ) ) @@ -66,6 +69,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 2f67853c8..00732e036 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -74,6 +77,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_get_unchecked.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_get_unchecked.state index 93cab02ec..4f57251c4 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_get_unchecked.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_get_unchecked.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindArray ( ty ( 16 ) ) , operandConstant ( constOperand (... span: span ( 100 ) , 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 ( 15 ) ) ) ) operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 16 ) ) ) ) operandConstant ( constOperand (... span: span ( 102 ) , 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 ( 17 ) ) ) ) .Operands ) ) , span: span ( 103 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 104 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 104 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 97 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 36 ) , id: mirConstId ( 13 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 98 ) , 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 ( 28 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 99 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 106 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 105 ) ) ) ) @@ -48,6 +51,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_read.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_read.state index db78dd210..96cc0ffb1 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_read.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_read.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindArray ( ty ( 29 ) ) , operandConstant ( constOperand (... span: span ( 172 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 29 ) , id: mirConstId ( 24 ) ) ) ) operandConstant ( constOperand (... span: span ( 173 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 29 ) , id: mirConstId ( 25 ) ) ) ) operandConstant ( constOperand (... span: span ( 174 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"!\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 29 ) , id: mirConstId ( 26 ) ) ) ) .Operands ) ) , span: span ( 175 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 176 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 16 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 3 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 177 ) , 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 ( 3 ) , id: mirConstId ( 27 ) ) ) ) .Operands ) ) , span: span ( 178 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 171 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 50 ) , id: mirConstId ( 23 ) ) ) ) , 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 ( 171 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 180 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 181 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 182 ) , 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 ( 42 ) , id: mirConstId ( 29 ) ) ) ) ) ) , span: span ( 182 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 179 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 51 ) , id: mirConstId ( 28 ) ) ) ) , args: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 179 ) ) ) ) @@ -44,6 +47,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_read.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_read.state index 57c58de76..8f06e6c71 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_read.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_read.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindArray ( ty ( 51 ) ) , operandConstant ( constOperand (... span: span ( 172 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 51 ) , id: mirConstId ( 24 ) ) ) ) operandConstant ( constOperand (... span: span ( 173 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 51 ) , id: mirConstId ( 25 ) ) ) ) operandConstant ( constOperand (... span: span ( 174 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"!\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 51 ) , id: mirConstId ( 26 ) ) ) ) .Operands ) ) , span: span ( 175 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 16 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 176 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 52 ) ) .ProjectionElems ) ) ) , span: span ( 177 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 17 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 3 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 178 ) , 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 ( 3 ) , id: mirConstId ( 27 ) ) ) ) .Operands ) ) , span: span ( 179 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 171 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 50 ) , id: mirConstId ( 23 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 171 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 181 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 182 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 183 ) , 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 ( 42 ) , id: mirConstId ( 29 ) ) ) ) ) ) , span: span ( 183 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 180 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 53 ) , id: mirConstId ( 28 ) ) ) ) , 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 ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 180 ) ) ) ) @@ -45,6 +48,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_write.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_write.state index fb4462dbf..2c288742c 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_write.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_write.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindArray ( ty ( 46 ) ) , operandConstant ( constOperand (... span: span ( 135 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 46 ) , id: mirConstId ( 18 ) ) ) ) operandConstant ( constOperand (... span: span ( 136 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 46 ) , id: mirConstId ( 19 ) ) ) ) operandConstant ( constOperand (... span: span ( 137 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"!\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 46 ) , id: mirConstId ( 20 ) ) ) ) .Operands ) ) , span: span ( 138 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 13 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 139 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 47 ) ) .ProjectionElems ) ) ) , span: span ( 140 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 14 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 3 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 141 ) , 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 ( 3 ) , id: mirConstId ( 21 ) ) ) ) .Operands ) ) , span: span ( 142 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 134 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 45 ) , id: mirConstId ( 17 ) ) ) ) , 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 ( 134 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 144 ) , 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 ( 3 ) , id: mirConstId ( 22 ) ) ) ) ) ) , span: span ( 144 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueLen ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 143 ) ) 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 ( 143 ) ) .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 ( 143 ) ) ) ) @@ -48,6 +51,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_write.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_write.state index 1919e7923..aec5abb81 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_write.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_write.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindArray ( ty ( 30 ) ) , operandConstant ( constOperand (... span: span ( 135 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 30 ) , id: mirConstId ( 18 ) ) ) ) operandConstant ( constOperand (... span: span ( 136 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 30 ) , id: mirConstId ( 19 ) ) ) ) operandConstant ( constOperand (... span: span ( 137 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"!\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 30 ) , id: mirConstId ( 20 ) ) ) ) .Operands ) ) , span: span ( 138 ) ) 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 ( 139 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 13 ) , variantIdx ( 0 ) , genericArgKindType ( ty ( 3 ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , 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 ( 3 ) , id: mirConstId ( 21 ) ) ) ) .Operands ) ) , span: span ( 141 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 134 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 45 ) , id: mirConstId ( 17 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 134 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 143 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 3 ) , id: mirConstId ( 22 ) ) ) ) ) ) , span: span ( 143 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueLen ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 142 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 142 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageBoundsCheck (... len: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , index: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 142 ) ) ) ) @@ -47,6 +50,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 133db0c7a..643d26f9e 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 @@ -12,6 +12,9 @@ ty ( 28 ) + + 1 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -76,7 +79,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 42 , 8 , false ) ) ListItem ( Integer ( 41 , 8 , false ) ) ListItem ( Integer ( 42 , 8 , false ) ) @@ -84,6 +87,15 @@ ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityNot ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-zst.state b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-zst.state index 691092911..c72dbcb47 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-zst.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-zst.state @@ -9,6 +9,9 @@ ty ( 31 ) + + 1 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindTransmute , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpAlignOf , ty ( 28 ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 50 ) , 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 ( 27 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpBitAnd , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 50 ) , 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 ( 27 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageMisalignedPointerDereference (... required: operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , found: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionUnreachable ) , span: span ( 50 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) ) @@ -39,12 +42,21 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 3405691582 , 32 , false ) ) ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 34 ) , mutabilityNot ) ) ListItem ( newLocal ( ty ( 35 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file 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 06612f321..fe11af364 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -37,6 +40,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 c90e1b425..bf1ca9d45 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -43,6 +46,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file 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 de694867d..837568054 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -47,6 +50,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 951a10279..0af5dfbe8 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -42,6 +45,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file 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 043aae9d7..bb91b1c71 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -37,6 +40,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file 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 043aae9d7..bb91b1c71 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -37,6 +40,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file 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 7301205f2..a664cac11 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -38,6 +41,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file 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 86f6e5353..13f8e131d 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.state +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) ) @@ -36,6 +39,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 454f37867..1f3bbe3a3 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) ListItem ( 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 ) ) ) ) @@ -65,6 +68,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state index 17f4708f6..2a0608965 100644 --- a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 137 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x1f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityNot ) ) , ty: ty ( 36 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 137 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 138 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 139 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 1 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 139 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 135 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 35 ) , id: mirConstId ( 16 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 136 ) ) ) ) ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 136 ) ) ) ) @@ -53,6 +56,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 bed580f75..16ecabf28 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 @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + ListItem ( 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 ) ) ) ) @@ -37,6 +40,15 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ 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 e6dc9aec9..0b5e18cf6 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 @@ -9,6 +9,9 @@ ty ( 25 ) + + 1 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ) @@ -32,7 +35,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 10 , 32 , true ) ) ListItem ( BoolVal ( false ) ) ListItem ( Float ( 0.10000000000000000e2 , 64 ) ) ) , ty ( 28 ) , mutabilityNot ) ) @@ -48,6 +51,15 @@ ListItem ( newLocal ( ty ( 16 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 26 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/modules/test-add-module-multiple.k b/kmir/src/tests/integration/data/modules/test-add-module-multiple.k index eea9602de..c8bb56a6d 100644 --- a/kmir/src/tests/integration/data/modules/test-add-module-multiple.k +++ b/kmir/src/tests/integration/data/modules/test-add-module-multiple.k @@ -12,6 +12,9 @@ module TEST-ADD-MODULE ( CURRENTFUNC_CELL => ty ( -1 ) ) + + 0 + ( _CURRENTBODY_CELL => ListItem ( basicBlock ( ... statements: .Statements , terminator: terminator ( ... kind: terminatorKindReturn , span: span ( 50 ) ) ) ) ) @@ -32,8 +35,17 @@ module TEST-ADD-MODULE - ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + ( .List => ListItem ( StackFrame ( 0 , CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + + .Map + + + 4096 + + + .Set + [priority(20), label(BASIC-BLOCK-1-TO-3)] diff --git a/kmir/src/tests/integration/data/modules/test-add-module.k b/kmir/src/tests/integration/data/modules/test-add-module.k index fe59569cc..64a5ef911 100644 --- a/kmir/src/tests/integration/data/modules/test-add-module.k +++ b/kmir/src/tests/integration/data/modules/test-add-module.k @@ -12,6 +12,9 @@ module TEST-ADD-MODULE ( CURRENTFUNC_CELL => ty ( -1 ) ) + + 0 + ( _CURRENTBODY_CELL => ListItem ( basicBlock ( ... statements: .Statements , terminator: terminator ( ... kind: terminatorKindReturn , span: span ( 50 ) ) ) ) ) @@ -32,8 +35,17 @@ module TEST-ADD-MODULE - ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + ( .List => ListItem ( StackFrame ( 0 , CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + + .Map + + + 4096 + + + .Set + [priority(20), label(BASIC-BLOCK-1-TO-3)] diff --git a/kmir/src/tests/integration/data/modules/test-add-module.md b/kmir/src/tests/integration/data/modules/test-add-module.md index 06776ba27..df33fd6cc 100644 --- a/kmir/src/tests/integration/data/modules/test-add-module.md +++ b/kmir/src/tests/integration/data/modules/test-add-module.md @@ -15,6 +15,9 @@ module TEST-ADD-MODULE ( CURRENTFUNC_CELL => ty ( -1 ) ) + + 0 + ( _CURRENTBODY_CELL => ListItem ( basicBlock ( ... statements: .Statements , terminator: terminator ( ... kind: terminatorKindReturn , span: span ( 50 ) ) ) ) ) @@ -35,8 +38,17 @@ module TEST-ADD-MODULE - ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + ( .List => ListItem ( StackFrame ( 0 , CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + + .Map + + + 4096 + + + .Set + [priority(20), label(BASIC-BLOCK-1-TO-3)] diff --git a/kmir/src/tests/integration/data/prove-rs/alignment-check.rs b/kmir/src/tests/integration/data/prove-rs/alignment-check.rs new file mode 100644 index 000000000..0ef832c69 --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/alignment-check.rs @@ -0,0 +1,14 @@ +// Test for issue #638: alignment check in raw pointer dereference. +// The compiler inserts an alignment check that transmutes a pointer to usize. +// Verifies that the transmute cast evaluates concretely. + +struct Thing { payload: i16 } + +fn main() { + let a = [Thing { payload: 1 }, Thing { payload: 2 }, Thing { payload: 3 }]; + let p = &a as *const Thing; + let p1 = unsafe { p.add(1) }; + + let two = unsafe { (*p1).payload }; + assert!(two == 2); +} diff --git a/kmir/src/tests/integration/data/prove-rs/interior-mut3-fail.rs b/kmir/src/tests/integration/data/prove-rs/interior-mut3.rs similarity index 100% rename from kmir/src/tests/integration/data/prove-rs/interior-mut3-fail.rs rename to kmir/src/tests/integration/data/prove-rs/interior-mut3.rs diff --git a/kmir/src/tests/integration/data/prove-rs/local-raw-fail.rs b/kmir/src/tests/integration/data/prove-rs/local-raw.rs similarity index 100% rename from kmir/src/tests/integration/data/prove-rs/local-raw-fail.rs rename to kmir/src/tests/integration/data/prove-rs/local-raw.rs diff --git a/kmir/src/tests/integration/data/prove-rs/ptr-cast-array-to-wrapper-fail.rs b/kmir/src/tests/integration/data/prove-rs/ptr-cast-array-to-wrapper.rs similarity index 100% rename from kmir/src/tests/integration/data/prove-rs/ptr-cast-array-to-wrapper-fail.rs rename to kmir/src/tests/integration/data/prove-rs/ptr-cast-array-to-wrapper.rs diff --git a/kmir/src/tests/integration/data/prove-rs/ptr-cast-cross-frame-eq.rs b/kmir/src/tests/integration/data/prove-rs/ptr-cast-cross-frame-eq.rs new file mode 100644 index 000000000..c68cdb626 --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/ptr-cast-cross-frame-eq.rs @@ -0,0 +1,13 @@ +fn addr_of(ptr: *const i32) -> usize { + ptr as usize +} + +fn main() { + let x = 7; + let ptr = &x as *const i32; + + let caller_addr = ptr as usize; + let callee_addr = addr_of(ptr); + + assert_eq!(caller_addr, callee_addr); +} diff --git a/kmir/src/tests/integration/data/prove-rs/ptr-through-wrapper-fail.rs b/kmir/src/tests/integration/data/prove-rs/ptr-through-wrapper.rs similarity index 100% rename from kmir/src/tests/integration/data/prove-rs/ptr-through-wrapper-fail.rs rename to kmir/src/tests/integration/data/prove-rs/ptr-through-wrapper.rs diff --git a/kmir/src/tests/integration/data/prove-rs/ptr-transmute-nonzero.rs b/kmir/src/tests/integration/data/prove-rs/ptr-transmute-nonzero.rs new file mode 100644 index 000000000..252a4bd0a --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/ptr-transmute-nonzero.rs @@ -0,0 +1,11 @@ +/// Test that a stack pointer transmuted to usize is non-zero. +use std::mem::transmute; + +fn main() { + let x: u32 = 42; + let ptr: *const u32 = &x; + unsafe { + let addr: usize = transmute(ptr); + assert!(addr != 0); + } +} diff --git a/kmir/src/tests/integration/data/prove-rs/ptr-transmute-two-locals.rs b/kmir/src/tests/integration/data/prove-rs/ptr-transmute-two-locals.rs new file mode 100644 index 000000000..aceabc703 --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/ptr-transmute-two-locals.rs @@ -0,0 +1,14 @@ +/// Test that two different local pointers transmute to different addresses. +use std::mem::transmute; + +fn main() { + let a: u32 = 42; + let b: u32 = 99; + let pa: *const u32 = &a; + let pb: *const u32 = &b; + unsafe { + let addr_a: usize = transmute(pa); + let addr_b: usize = transmute(pb); + assert!(addr_a != addr_b); + } +} diff --git a/kmir/src/tests/integration/data/prove-rs/ptr_offset.rs b/kmir/src/tests/integration/data/prove-rs/ptr_offset.rs new file mode 100644 index 000000000..e14cb1ebc --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/ptr_offset.rs @@ -0,0 +1,11 @@ +struct Thing {payload: i16} + +fn main() { + + let a = [Thing{payload: 1}, Thing{payload: 2}, Thing{payload:3}]; + let p = &a as *const Thing; + let p1 = unsafe { p.add(1) }; + + let two = unsafe { (*p1).payload }; + assert!(two == 2); +} diff --git a/kmir/src/tests/integration/data/prove-rs/raw-ptr-cast-fail.rs b/kmir/src/tests/integration/data/prove-rs/raw-ptr-cast.rs similarity index 69% rename from kmir/src/tests/integration/data/prove-rs/raw-ptr-cast-fail.rs rename to kmir/src/tests/integration/data/prove-rs/raw-ptr-cast.rs index cf098c9c3..bf425e202 100644 --- a/kmir/src/tests/integration/data/prove-rs/raw-ptr-cast-fail.rs +++ b/kmir/src/tests/integration/data/prove-rs/raw-ptr-cast.rs @@ -5,6 +5,6 @@ fn main() { let ptr_mut = &mut data as *mut i32; unsafe { (*ptr_mut) = 44; - assert_eq!(44, *ptr); // FIXME: fails due to thunks on casts + assert_eq!(44, *ptr); } } diff --git a/kmir/src/tests/integration/data/prove-rs/ref-ptr-cast-elem-offset-fail.rs b/kmir/src/tests/integration/data/prove-rs/ref-ptr-cast-elem-offset.rs similarity index 100% rename from kmir/src/tests/integration/data/prove-rs/ref-ptr-cast-elem-offset-fail.rs rename to kmir/src/tests/integration/data/prove-rs/ref-ptr-cast-elem-offset.rs diff --git a/kmir/src/tests/integration/data/prove-rs/ref-ptr-cast-elem-fail.rs b/kmir/src/tests/integration/data/prove-rs/ref-ptr-cast-elem.rs similarity index 100% rename from kmir/src/tests/integration/data/prove-rs/ref-ptr-cast-elem-fail.rs rename to kmir/src/tests/integration/data/prove-rs/ref-ptr-cast-elem.rs diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-inhabited-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-inhabited-fail.main.expected index cdb5d7e6d..3e53996c9 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-inhabited-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-inhabited-fail.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (10 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.json b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.json index 9cf02027b..05f75ae90 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.json +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.json @@ -365,6 +365,26 @@ "params": [] }, "args": [ + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "", + "params": [] + }, + "args": [ + { + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } + } + ], + "arity": 1, + "variable": false + }, { "node": "KApply", "label": { @@ -704,7 +724,7 @@ "variable": false } ], - "arity": 6, + "arity": 7, "variable": false }, { @@ -740,10 +760,18 @@ "node": "KApply", "label": { "node": "KLabel", - "name": "StackFrame(_,_,_,_,_)_KMIR-CONFIGURATION_StackFrame_Ty_Place_MaybeBasicBlockIdx_UnwindAction_List", + "name": "StackFrame(_,_,_,_,_,_)_KMIR-CONFIGURATION_StackFrame_Int_Ty_Place_MaybeBasicBlockIdx_UnwindAction_List", "params": [] }, "args": [ + { + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } + }, { "node": "KVariable", "name": "CALLER_CELL", @@ -832,7 +860,7 @@ "variable": false } ], - "arity": 5, + "arity": 6, "variable": false } ], @@ -843,9 +871,75 @@ ], "arity": 1, "variable": false + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "", + "params": [] + }, + "args": [ + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": ".Map", + "params": [] + }, + "args": [], + "arity": 0, + "variable": false + } + ], + "arity": 1, + "variable": false + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "", + "params": [] + }, + "args": [ + { + "node": "KToken", + "token": "4096", + "sort": { + "node": "KSort", + "name": "Int" + } + } + ], + "arity": 1, + "variable": false + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "", + "params": [] + }, + "args": [ + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": ".Set", + "params": [] + }, + "args": [], + "arity": 0, + "variable": false + } + ], + "arity": 1, + "variable": false } ], - "arity": 5, + "arity": 8, "variable": false }, { @@ -857,8 +951,23 @@ }, "args": [ { - "node": "KVariable", - "name": "_GENERATEDCOUNTER_CELL" + "node": "KRewrite", + "lhs": { + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } + }, + "rhs": { + "node": "KToken", + "token": "1", + "sort": { + "node": "KSort", + "name": "Int" + } + } } ], "arity": 1, diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.k b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.k index 58b96e706..7c476de2a 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.k +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.k @@ -12,6 +12,9 @@ module ASSERT-TRUE-MAIN-SUMMARY ( CURRENTFUNC_CELL => ty ( -1 ) ) + + 0 + ( _CURRENTBODY_CELL => ListItem ( basicBlock ( ... statements: .Statements , terminator: terminator ( ... kind: terminatorKindReturn , span: span ( 50 ) ) ) ) ) @@ -32,8 +35,17 @@ module ASSERT-TRUE-MAIN-SUMMARY - ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + ( .List => ListItem ( StackFrame ( 0 , CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + + .Map + + + 4096 + + + .Set + [priority(20), label(BASIC-BLOCK-1-TO-3)] diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert_eq_exp.main.expected b/kmir/src/tests/integration/data/prove-rs/show/assert_eq_exp.main.expected index 3fe017dcf..15a6b0597 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert_eq_exp.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert_eq_exp.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (148 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/assume-cheatcode-conflict-fail.check_assume_conflict.expected b/kmir/src/tests/integration/data/prove-rs/show/assume-cheatcode-conflict-fail.check_assume_conflict.expected index 470f41c25..525044759 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assume-cheatcode-conflict-fail.check_assume_conflict.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assume-cheatcode-conflict-fail.check_assume_conflict.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (61 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/bitwise-not-shift.main.expected b/kmir/src/tests/integration/data/prove-rs/show/bitwise-not-shift.main.expected index 6cf403b84..2e1bc8f40 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/bitwise-not-shift.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/bitwise-not-shift.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (837 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/box_heap_alloc-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/box_heap_alloc-fail.main.expected index 3993211b3..ef34e1819 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/box_heap_alloc-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/box_heap_alloc-fail.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (73 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/break-on-function.main.cli-break-on-function.expected b/kmir/src/tests/integration/data/prove-rs/show/break-on-function.main.cli-break-on-function.expected index 59a3b1f2a..5f98b51d0 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/break-on-function.main.cli-break-on-function.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/break-on-function.main.cli-break-on-function.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: src/rust/library/std/src/rt.rs:194 │ │ (7 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected index 4c165cf72..efd05f29d 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (877 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/interior-mut3-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/interior-mut3-fail.main.expected deleted file mode 100644 index ea0b2c00a..000000000 --- a/kmir/src/tests/integration/data/prove-rs/show/interior-mut3-fail.main.expected +++ /dev/null @@ -1,22 +0,0 @@ - -┌─ 1 (root, init) -│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (94 steps) -├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl -│ function: main -│ span: 73 -│ -│ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj - function: main - span: 73 - - -┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/prove-rs/show/iter_next_3.main.expected b/kmir/src/tests/integration/data/prove-rs/show/iter_next_3.main.expected index a4c5bdc3d..28a7a5eef 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/iter_next_3.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/iter_next_3.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (2028 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/iterator-simple.main.expected b/kmir/src/tests/integration/data/prove-rs/show/iterator-simple.main.expected index f1cd9a4d1..58ee082a4 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/iterator-simple.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/iterator-simple.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (798 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/local-raw-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/local-raw-fail.main.expected deleted file mode 100644 index 193e3e171..000000000 --- a/kmir/src/tests/integration/data/prove-rs/show/local-raw-fail.main.expected +++ /dev/null @@ -1,22 +0,0 @@ - -┌─ 1 (root, init) -│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (46 steps) -├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl -│ function: main -│ span: 50 -│ -│ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj - function: main - span: 50 - - -┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/prove-rs/show/niche-enum.main.expected b/kmir/src/tests/integration/data/prove-rs/show/niche-enum.main.expected index 586c10ed1..fa592a26f 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/niche-enum.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/niche-enum.main.expected @@ -11,7 +11,4 @@ ┊ constraint: true ┊ subst: ... └─ 2 (leaf, target, terminal) - #EndProgram ~> .K - - - + #EndProgram ~> .K \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/offset-u8-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/offset-u8-fail.main.expected index c373bdd71..1b93d21cd 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/offset-u8-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/offset-u8-fail.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (35 steps) @@ -11,5 +12,3 @@ ┌─ 2 (root, leaf, target, terminal) │ #EndProgram ~> .K - - 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 9198552ba..01c330cac 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 @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (44 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-nested-wrapper-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-nested-wrapper-fail.main.expected index 28b856633..e24bac4b5 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-nested-wrapper-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-nested-wrapper-fail.main.expected @@ -1,19 +1,14 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (68 steps) -├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl │ function: main -│ span: 270 +│ span: 0 │ -│ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj +│ (142 steps) +└─ 3 (stuck, leaf) + #traverseProjection ( toLocal ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( function: main - span: 270 + span: 282 ┌─ 2 (root, leaf, target, terminal) diff --git a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-singleton-wrapped-array-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-singleton-wrapped-array-fail.main.expected index 28b856633..70c557528 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-singleton-wrapped-array-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-singleton-wrapped-array-fail.main.expected @@ -1,19 +1,14 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (68 steps) -├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl │ function: main -│ span: 270 +│ span: 0 │ -│ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj +│ (141 steps) +└─ 3 (stuck, leaf) + #traverseProjection ( toLocal ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( function: main - span: 270 + span: 282 ┌─ 2 (root, leaf, target, terminal) diff --git a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-wrapper-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-wrapper-fail.main.expected deleted file mode 100644 index 28b856633..000000000 --- a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-wrapper-fail.main.expected +++ /dev/null @@ -1,22 +0,0 @@ - -┌─ 1 (root, init) -│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (68 steps) -├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl -│ function: main -│ span: 270 -│ -│ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj - function: main - span: 270 - - -┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-cross-frame-eq.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-cross-frame-eq.main.expected new file mode 100644 index 000000000..5bf0c059e --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-cross-frame-eq.main.expected @@ -0,0 +1,14 @@ + +┌─ 1 (root, init) +│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ span: 0 +│ +│ (173 steps) +├─ 3 (terminal) +│ #EndProgram ~> .K +│ function: main +│ +┊ constraint: true +┊ subst: ... +└─ 2 (leaf, target, terminal) + #EndProgram ~> .K \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/ptr-through-wrapper-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ptr-through-wrapper-fail.main.expected deleted file mode 100644 index 193e3e171..000000000 --- a/kmir/src/tests/integration/data/prove-rs/show/ptr-through-wrapper-fail.main.expected +++ /dev/null @@ -1,22 +0,0 @@ - -┌─ 1 (root, init) -│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (46 steps) -├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl -│ function: main -│ span: 50 -│ -│ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj - function: main - span: 50 - - -┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/prove-rs/show/raw-ptr-cast-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/raw-ptr-cast-fail.main.expected deleted file mode 100644 index 796c7be18..000000000 --- a/kmir/src/tests/integration/data/prove-rs/show/raw-ptr-cast-fail.main.expected +++ /dev/null @@ -1,22 +0,0 @@ - -┌─ 1 (root, init) -│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (60 steps) -├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl -│ function: main -│ span: 90 -│ -│ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj - function: main - span: 90 - - -┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-fail.main.expected deleted file mode 100644 index 0f38a6cfb..000000000 --- a/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-fail.main.expected +++ /dev/null @@ -1,22 +0,0 @@ - -┌─ 1 (root, init) -│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (64 steps) -├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl -│ function: main -│ span: 50 -│ -│ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj - function: main - span: 50 - - -┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-offset-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-offset-fail.main.expected deleted file mode 100644 index 2dd05b5e9..000000000 --- a/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-offset-fail.main.expected +++ /dev/null @@ -1,22 +0,0 @@ - -┌─ 1 (root, init) -│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (125 steps) -├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl -│ function: main -│ span: 144 -│ -│ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj - function: main - span: 144 - - -┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected index d75e7ed57..335338deb 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected @@ -132,7 +132,4 @@ │ └─ 19 (stuck, leaf) #traverseProjection ( toStack ( 1 , local ( 12 ) ) , Range ( #mapOffset ( ARG_AR - span: 69 - - - + span: 69 \ No newline at end of file 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 e4e10b74c..a6b2b9a77 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 @@ -34,5 +34,4 @@ LEAF CELLS Node 3: #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17hE" ) , 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 , span ( 117 ) ) ~> .K >> function: core::panicking::panic::h - >> call span: /kmir/src/tests/integration/data/prove-rs/symbolic-args-fail.rs:53:5 - >> message: 'assertion failed: false' \ No newline at end of file + >> call span: /kmir/src/tests/integration/data/prove-rs/symbolic-args-fail.rs:53:5 \ 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 e5b630195..5d51bc857 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 @@ -10,6 +10,4 @@ ┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - +│ #EndProgram ~> .K \ No newline at end of file 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 673eb0193..96b533786 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 @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (61 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/test_offset_from-fail.testing.expected b/kmir/src/tests/integration/data/prove-rs/show/test_offset_from-fail.testing.expected index 816d1da62..613fd5cec 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/test_offset_from-fail.testing.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/test_offset_from-fail.testing.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (297 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/transmute-maybe-uninit-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/transmute-maybe-uninit-fail.main.expected index 12948003f..f2ceb65f0 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/transmute-maybe-uninit-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/transmute-maybe-uninit-fail.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (16 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/transmute-u8-to-enum-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/transmute-u8-to-enum-fail.main.expected index 4d7658d18..f8ac33565 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/transmute-u8-to-enum-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/transmute-u8-to-enum-fail.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (15 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/unions-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/unions-fail.main.expected index dea9bd948..fd0087cc1 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/unions-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/unions-fail.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (76 steps) diff --git a/kmir/src/tests/integration/data/prove-rs/show/volatile_load_static-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/volatile_load_static-fail.main.expected index e68710b66..64ee8443d 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/volatile_load_static-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/volatile_load_static-fail.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (10 steps) @@ -18,5 +19,3 @@ ┌─ 2 (root, leaf, target, terminal) │ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/prove-rs/show/volatile_store_static-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/volatile_store_static-fail.main.expected index 420e0659d..85400104a 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/volatile_store_static-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/volatile_store_static-fail.main.expected @@ -1,6 +1,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main │ span: 0 │ │ (10 steps) @@ -18,5 +19,3 @@ ┌─ 2 (root, leaf, target, terminal) │ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-0.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-0.expected index c8bee9fef..879fda965 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-0.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-0.expected @@ -25,6 +25,9 @@ ty ( 64 ) + + 4 + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 247 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 248 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindTwoPhaseBorrow ) , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) ) ) , span: span ( 248 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 246 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 249 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindStorageLive ( local ( 9 ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 251 ) ) statement (... kind: statementKindStorageLive ( local ( 10 ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindStorageDead ( local ( 10 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 9 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 7 ) ) , span: span ( 254 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 255 ) , 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 ( 3 ) , id: mirConstId ( 6 ) ) ) ) ) ) , span: span ( 246 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 246 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 255 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 257 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 258 ) ) statement (... kind: statementKindStorageLive ( local ( 11 ) ) , span: span ( 259 ) ) statement (... kind: statementKindStorageLive ( local ( 12 ) ) , span: span ( 256 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 4 ) ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 256 ) ) ) ) @@ -79,7 +82,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -341142443 , 32 , true ) ) ListItem ( Integer ( 48424546 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 207 , 8 , false ) ) @@ -153,7 +156,7 @@ ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -341142443 , 32 , true ) ) ListItem ( Integer ( 48424546 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 207 , 8 , false ) ) @@ -172,4 +175,13 @@ ListItem ( Integer ( -1714975244 , 32 , true ) ) ListItem ( Integer ( -282729822 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-1.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-1.expected index 50fb59617..0277f1ff9 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-1.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-1.expected @@ -25,6 +25,9 @@ ty ( 64 ) + + 4 + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 247 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 248 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindTwoPhaseBorrow ) , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) ) ) , span: span ( 248 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 246 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 249 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindStorageLive ( local ( 9 ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 251 ) ) statement (... kind: statementKindStorageLive ( local ( 10 ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindStorageDead ( local ( 10 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 9 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 7 ) ) , span: span ( 254 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 255 ) , 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 ( 3 ) , id: mirConstId ( 6 ) ) ) ) ) ) , span: span ( 246 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 246 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 255 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 257 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 258 ) ) statement (... kind: statementKindStorageLive ( local ( 11 ) ) , span: span ( 259 ) ) statement (... kind: statementKindStorageLive ( local ( 12 ) ) , span: span ( 256 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 4 ) ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 256 ) ) ) ) @@ -79,7 +82,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 32 , 8 , false ) ) ListItem ( Integer ( 130 , 8 , false ) ) @@ -151,7 +154,7 @@ ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 32 , 8 , false ) ) ListItem ( Integer ( 130 , 8 , false ) ) @@ -169,4 +172,13 @@ ListItem ( Integer ( 1296334389 , 32 , true ) ) ListItem ( Integer ( -784133741 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-2.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-2.expected index 66dbadacc..35a415224 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-2.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-2.expected @@ -25,6 +25,9 @@ ty ( 64 ) + + 4 + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 247 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 248 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindTwoPhaseBorrow ) , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) ) ) , span: span ( 248 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 246 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 249 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindStorageLive ( local ( 9 ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 251 ) ) statement (... kind: statementKindStorageLive ( local ( 10 ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindStorageDead ( local ( 10 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 9 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 7 ) ) , span: span ( 254 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 255 ) , 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 ( 3 ) , id: mirConstId ( 6 ) ) ) ) ) ) , span: span ( 246 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 246 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 255 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 257 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 258 ) ) statement (... kind: statementKindStorageLive ( local ( 11 ) ) , span: span ( 259 ) ) statement (... kind: statementKindStorageLive ( local ( 12 ) ) , span: span ( 256 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 4 ) ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 256 ) ) ) ) @@ -79,7 +82,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 46 , 8 , false ) ) ListItem ( Integer ( 43 , 8 , false ) ) @@ -151,7 +154,7 @@ ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 46 , 8 , false ) ) ListItem ( Integer ( 43 , 8 , false ) ) @@ -173,4 +176,13 @@ ListItem ( Integer ( 1751273387 , 32 , true ) ) ListItem ( Integer ( -1385399937 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-3.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-3.expected index d408600a9..d4b040158 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-3.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-3.expected @@ -25,6 +25,9 @@ ty ( 64 ) + + 4 + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 247 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 248 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindTwoPhaseBorrow ) , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) ) ) , span: span ( 248 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 246 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 249 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindStorageLive ( local ( 9 ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 251 ) ) statement (... kind: statementKindStorageLive ( local ( 10 ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindStorageDead ( local ( 10 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 9 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 7 ) ) , span: span ( 254 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 255 ) , 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 ( 3 ) , id: mirConstId ( 6 ) ) ) ) ) ) , span: span ( 246 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 246 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 255 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 257 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 258 ) ) statement (... kind: statementKindStorageLive ( local ( 11 ) ) , span: span ( 259 ) ) statement (... kind: statementKindStorageLive ( local ( 12 ) ) , span: span ( 256 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 4 ) ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 256 ) ) ) ) @@ -79,7 +82,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 66 , 8 , false ) ) ListItem ( Integer ( 189 , 8 , false ) ) @@ -151,7 +154,7 @@ ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 66 , 8 , false ) ) ListItem ( Integer ( 189 , 8 , false ) ) @@ -175,4 +178,13 @@ ListItem ( Integer ( 1870830728 , 32 , true ) ) ListItem ( Integer ( 1627219933 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-4.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-4.expected index 2b6e8720c..427e2edee 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-4.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-4.expected @@ -25,6 +25,9 @@ ty ( 64 ) + + 4 + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 247 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 248 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindTwoPhaseBorrow ) , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) ) ) , span: span ( 248 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 246 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 249 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindStorageLive ( local ( 9 ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 251 ) ) statement (... kind: statementKindStorageLive ( local ( 10 ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindStorageDead ( local ( 10 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 9 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 7 ) ) , span: span ( 254 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 255 ) , 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 ( 3 ) , id: mirConstId ( 6 ) ) ) ) ) ) , span: span ( 246 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 246 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 255 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 257 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 258 ) ) statement (... kind: statementKindStorageLive ( local ( 11 ) ) , span: span ( 259 ) ) statement (... kind: statementKindStorageLive ( local ( 12 ) ) , span: span ( 256 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 4 ) ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 256 ) ) ) ) @@ -79,7 +82,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 155 , 8 , false ) ) ListItem ( Integer ( 52 , 8 , false ) ) @@ -151,7 +154,7 @@ ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 155 , 8 , false ) ) ListItem ( Integer ( 52 , 8 , false ) ) @@ -188,4 +191,13 @@ ListItem ( Integer ( 1776105656 , 32 , true ) ) ListItem ( Integer ( -252750415 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-5.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-5.expected index 73d82794e..1a8330d1d 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-5.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-5.expected @@ -25,6 +25,9 @@ ty ( 64 ) + + 7 + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 247 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 248 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindTwoPhaseBorrow ) , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) ) ) , span: span ( 248 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 246 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 249 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindStorageLive ( local ( 9 ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 251 ) ) statement (... kind: statementKindStorageLive ( local ( 10 ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindStorageDead ( local ( 10 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 9 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 7 ) ) , span: span ( 254 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 255 ) , 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 ( 3 ) , id: mirConstId ( 6 ) ) ) ) ) ) , span: span ( 246 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 246 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 255 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 257 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 258 ) ) statement (... kind: statementKindStorageLive ( local ( 11 ) ) , span: span ( 259 ) ) statement (... kind: statementKindStorageLive ( local ( 12 ) ) , span: span ( 256 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 4 ) ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 256 ) ) ) ) @@ -79,7 +82,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 130 , 8 , false ) ) ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 14 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 238 , 8 , false ) ) @@ -154,7 +157,7 @@ ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 130 , 8 , false ) ) ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 14 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 238 , 8 , false ) ) @@ -191,4 +194,13 @@ ListItem ( Integer ( 1368024730 , 32 , true ) ) ListItem ( Integer ( -791162561 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-6.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-6.expected index 3a3a93c89..98e1f49c5 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-6.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-6.expected @@ -25,6 +25,9 @@ ty ( 64 ) + + 7 + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 247 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 248 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindTwoPhaseBorrow ) , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) ) ) , span: span ( 248 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 246 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 249 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindStorageLive ( local ( 9 ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 251 ) ) statement (... kind: statementKindStorageLive ( local ( 10 ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindStorageDead ( local ( 10 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 9 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 7 ) ) , span: span ( 254 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 255 ) , 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 ( 3 ) , id: mirConstId ( 6 ) ) ) ) ) ) , span: span ( 246 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 246 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 255 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 257 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 258 ) ) statement (... kind: statementKindStorageLive ( local ( 11 ) ) , span: span ( 259 ) ) statement (... kind: statementKindStorageLive ( local ( 12 ) ) , span: span ( 256 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 4 ) ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 256 ) ) ) ) @@ -79,7 +82,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 41 , 8 , false ) ) ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 133 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 18 , 8 , false ) ) @@ -154,7 +157,7 @@ ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 41 , 8 , false ) ) ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 133 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 18 , 8 , false ) ) @@ -198,4 +201,13 @@ ListItem ( Integer ( 1422748784 , 32 , true ) ) ListItem ( Integer ( 1271734833 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-7.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-7.expected index 8bdd69426..1fa0a7e52 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-7.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-7.expected @@ -9,6 +9,9 @@ ty ( -2 ) + + 0 + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 331 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 16 ) ) branch ( 1 , basicBlockIdx ( 3 ) ) branch ( 2 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 20 ) ) ) , span: span ( 330 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueDiscriminant ( place (... local: local ( 1 ) , projection: projectionElemDowncast ( variantIdx ( 2 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 55 ) ) .ProjectionElems ) ) ) , span: span ( 331 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 1 , basicBlockIdx ( 2 ) ) branch ( 0 , basicBlockIdx ( 16 ) ) .Branches , otherwise: basicBlockIdx ( 20 ) ) ) , span: span ( 330 ) ) ) ) @@ -128,7 +131,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1923567076 , 32 , true ) ) ListItem ( Integer ( -1940095024 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 48 , 8 , false ) ) @@ -145,4 +148,13 @@ ListItem ( Integer ( 281121487 , 32 , true ) ) ListItem ( Integer ( 1921781853 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-8.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-8.expected index 056a32057..a4f6e6a5c 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-8.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-8.expected @@ -25,6 +25,9 @@ ty ( 64 ) + + 4 + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 247 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 248 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindTwoPhaseBorrow ) , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) ) ) , span: span ( 248 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 246 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 249 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindStorageLive ( local ( 9 ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 251 ) ) statement (... kind: statementKindStorageLive ( local ( 10 ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindStorageDead ( local ( 10 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 9 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 7 ) ) , span: span ( 254 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 255 ) , 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 ( 3 ) , id: mirConstId ( 6 ) ) ) ) ) ) , span: span ( 246 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 246 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 255 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 257 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 258 ) ) statement (... kind: statementKindStorageLive ( local ( 11 ) ) , span: span ( 259 ) ) statement (... kind: statementKindStorageLive ( local ( 12 ) ) , span: span ( 256 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 4 ) ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 256 ) ) ) ) @@ -79,7 +82,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 189 , 8 , false ) ) ListItem ( Integer ( 192 , 8 , false ) ) @@ -151,7 +154,7 @@ ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 189 , 8 , false ) ) ListItem ( Integer ( 192 , 8 , false ) ) @@ -195,4 +198,13 @@ ListItem ( Integer ( -328986497 , 32 , true ) ) ListItem ( Integer ( -528598575 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-9.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-9.expected index 92a082106..0d3b3a69e 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-9.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-9.expected @@ -25,6 +25,9 @@ ty ( 64 ) + + 4 + ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 247 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 248 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindTwoPhaseBorrow ) , place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) ) ) , span: span ( 248 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 246 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 249 ) ) statement (... kind: statementKindStorageLive ( local ( 7 ) ) , span: span ( 250 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 250 ) ) statement (... kind: statementKindStorageLive ( local ( 9 ) ) , span: span ( 251 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 251 ) ) statement (... kind: statementKindStorageLive ( local ( 10 ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 252 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindStorageDead ( local ( 10 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 9 ) ) , span: span ( 253 ) ) statement (... kind: statementKindStorageDead ( local ( 7 ) ) , span: span ( 254 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 255 ) , 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 ( 3 ) , id: mirConstId ( 6 ) ) ) ) ) ) , span: span ( 246 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 246 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 255 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 257 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 3 ) ) .ProjectionElems ) ) ) ) , span: span ( 258 ) ) statement (... kind: statementKindStorageLive ( local ( 11 ) ) , span: span ( 259 ) ) statement (... kind: statementKindStorageLive ( local ( 12 ) ) , span: span ( 256 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 4 ) ) ) , span: span ( 260 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 256 ) ) ) ) @@ -79,7 +82,7 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 486255726 , 32 , true ) ) ListItem ( Integer ( -1000150020 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 95 , 8 , false ) ) @@ -153,7 +156,7 @@ ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 486255726 , 32 , true ) ) ListItem ( Integer ( -1000150020 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) ListItem ( typedValue ( Range ( ListItem ( Integer ( 95 , 8 , false ) ) @@ -176,4 +179,13 @@ ListItem ( Integer ( -939805772 , 32 , true ) ) ListItem ( Integer ( 1329338341 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-0.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-0.expected index 7e6b4e60a..b3a5f1f2f 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-0.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-0.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -48,4 +51,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-1.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-1.expected index 8d4f34f7d..a7be547fc 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-1.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-1.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -47,4 +50,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-2.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-2.expected index 6bbd4c726..70a832ba9 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-2.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-2.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -51,4 +54,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-3.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-3.expected index a46aea65e..e01869c6f 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-3.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-3.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -53,4 +56,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-4.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-4.expected index 77d20383f..89c378530 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-4.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-4.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -66,4 +69,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-5.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-5.expected index b2eeca22a..ab464a8b7 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-5.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-5.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -66,4 +69,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-6.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-6.expected index 175fabdab..ad0b8b3d3 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-6.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-6.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -73,4 +76,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-7.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-7.expected index d186da3b3..200b7578c 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-7.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-7.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -46,4 +49,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-8.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-8.expected index 5a1813338..2814c5438 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-8.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-8.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -73,4 +76,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-9.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-9.expected index edca97d9f..51caa870e 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-9.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-9.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -52,4 +55,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-0.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-0.expected index f041f3897..0bbfabd66 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-0.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-0.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -75,9 +78,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 197 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( -341142443 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-1.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-1.expected index d4175ed23..40f021259 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-1.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-1.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -76,9 +79,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 32 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( -1051970500 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-2.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-2.expected index c9b4a3ba5..47e6fa2b9 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-2.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-2.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -75,9 +78,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 28 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( -1754129965 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-3.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-3.expected index 09fef980f..cafaac9b5 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-3.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-3.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -76,9 +79,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 66 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 446333181 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-4.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-4.expected index fe0fc56a4..f71230bd7 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-4.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-4.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -76,9 +79,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 155 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( -446426455 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-5.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-5.expected index 451c52bb4..9d3b89403 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-5.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-5.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -76,9 +79,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 130 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 1038467225 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-6.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-6.expected index 0ccc56705..fe91544e6 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-6.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-6.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -75,9 +78,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 41 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( -1023827911 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-7.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-7.expected index f39dc9787..dd347b635 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-7.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-7.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -76,9 +79,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 77 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( -1940095024 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-8.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-8.expected index ef460d19e..ea1ef2d16 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-8.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-8.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -76,9 +79,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 189 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 1985542055 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-9.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-9.expected index 3bd535f28..362ecd6f5 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-9.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-9.expected @@ -9,6 +9,9 @@ ty ( -4 ) + + 0 + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: someUserTypeAnnotationIndex ( userTypeAnnotationIndex ( 0 ) ) , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 15 ) , id: mirConstId ( 3 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 32 ) ) ) ) ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpGe , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 8 ) , id: mirConstId ( 4 ) ) ) ) ) ) , span: span ( 33 ) ) .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 ( 33 ) ) ) ) @@ -76,9 +79,18 @@ - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) + ListItem ( StackFrame ( 0 , ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 191 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( -1000150020 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-0.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-0.expected index 821e11dd2..02d4a656e 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-0.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-0.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-1.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-1.expected index 49c6c69f5..53daa3af9 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-1.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-1.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-2.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-2.expected index d28072381..f6fbb632a 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-2.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-2.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-3.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-3.expected index 27c8bd0af..9c3157d1e 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-3.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-3.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-4.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-4.expected index 56e7fffcf..c08992bd4 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-4.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-4.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-5.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-5.expected index 23a47f9da..765edbb75 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-5.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-5.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-6.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-6.expected index 5d3b0ff0c..0311fc1de 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-6.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-6.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-7.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-7.expected index 6d7802d4e..72634e93a 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-7.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-7.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-8.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-8.expected index c2dccad40..d5e049dfc 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-8.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-8.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-9.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-9.expected index cf31f963d..3c56023fc 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-9.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-9.expected @@ -9,6 +9,9 @@ ty ( -1 ) + + 0 + .List @@ -34,4 +37,13 @@ .List + + .Map + + + 4096 + + + .Set + \ No newline at end of file diff --git a/kmir/src/tests/integration/test_cli.py b/kmir/src/tests/integration/test_cli.py index 9396e5fc5..fec2a4aee 100644 --- a/kmir/src/tests/integration/test_cli.py +++ b/kmir/src/tests/integration/test_cli.py @@ -126,6 +126,7 @@ def test_cli_show_statistics_and_leaves( PROVE_DIR / f'show/{src.stem}.{start_symbol}.cli-stats-leaves.expected', update=update_expected_output, path_replacements=_PATH_REPLACEMENTS, + normalize_optional_diagnostics=True, ) diff --git a/kmir/src/tests/integration/test_decode_value.py b/kmir/src/tests/integration/test_decode_value.py index afbcb2560..d774d2f35 100644 --- a/kmir/src/tests/integration/test_decode_value.py +++ b/kmir/src/tests/integration/test_decode_value.py @@ -77,6 +77,7 @@ def dedent(s: str) -> str: Lbl'-LT-'retVal'-GT-'{}(LblnoReturn'Unds'KMIR-CONFIGURATION'Unds'RetVal{}()), Lbl'-LT-'currentFunc'-GT-'{}(Lblty{}(\dv{SortInt{}}("-1"))), Lbl'-LT-'currentFrame'-GT-'{}( + Lbl'-LT-'frameId'-GT-'{}(\dv{SortInt{}}("0")), Lbl'-LT-'currentBody'-GT-'{}(Lbl'Stop'List{}()), Lbl'-LT-'caller'-GT-'{}(Lblty{}(\dv{SortInt{}}("-1"))), Lbl'-LT-'dest'-GT-'{}(Lblplace{}(Lbllocal{}(\dv{SortInt{}}("-1")),LblProjectionElems'ColnColn'empty{}())), @@ -85,6 +86,9 @@ def dedent(s: str) -> str: Lbl'-LT-'locals'-GT-'{}(Lbl'Stop'List{}()) ), Lbl'-LT-'stack'-GT-'{}(Lbl'Stop'List{}()), + Lbl'-LT-'addressMap'-GT-'{}(Lbl'Stop'Map{}()), + Lbl'-LT-'nextAddress'-GT-'{}(\dv{SortInt{}}("4096")), + Lbl'-LT-'exposedSet'-GT-'{}(Lbl'Stop'Set{}()), ), Lbl'-LT-'generatedCounter'-GT-'{}(\dv{SortInt{}}("0")) ) diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index 14b5221c3..b2247d89f 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -42,9 +42,7 @@ 'spl-multisig-iter-eq-copied-next': ['repro'], } PROVE_SHOW_SPECS = [ - 'local-raw-fail', 'interior-mut-fail', - 'interior-mut3-fail', 'iter_next_3', 'assert_eq_exp', 'bitwise-not-shift', @@ -55,20 +53,16 @@ 'pointer-cast-length-test-fail', 'niche-enum', 'assume-cheatcode-conflict-fail', - 'raw-ptr-cast-fail', 'transmute-u8-to-enum-fail', 'assert-inhabited-fail', 'iterator-simple', 'unions-fail', 'transmute-maybe-uninit-fail', - 'ptr-through-wrapper-fail', 'test_offset_from-fail', - 'ref-ptr-cast-elem-fail', - 'ref-ptr-cast-elem-offset-fail', 'volatile_store_static-fail', 'volatile_load_static-fail', 'box_heap_alloc-fail', - 'ptr-cast-array-to-wrapper-fail', + 'ptr-cast-cross-frame-eq', 'ptr-cast-array-to-nested-wrapper-fail', 'ptr-cast-array-to-singleton-wrapped-array-fail', ] @@ -148,7 +142,7 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo spans_removed = [line for line in shower.show(proof) if 'span: ' not in line] show_res = '\n'.join(spans_removed) - assert_or_update_show_output(show_res, file, update=update_expected_output) + assert_or_update_show_output(show_res, file, update=update_expected_output, normalize_steps=True) os.unlink(linked_file) diff --git a/kmir/src/tests/unit/test_cargo.py b/kmir/src/tests/unit/test_cargo.py new file mode 100644 index 000000000..6593accfe --- /dev/null +++ b/kmir/src/tests/unit/test_cargo.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +import json +from pathlib import Path + +from kmir.cargo import cargo_get_smir_json + + +def test_cargo_get_smir_json_uses_isolated_temp_dirs(monkeypatch, tmp_path: Path) -> None: + rs_file = tmp_path / 'assert-true.rs' + rs_file.write_text('fn main() {}') + + run_dirs: list[Path] = [] + + def fake_stable_mir_json() -> Path: + return Path('/fake/stable_mir_json') + + def fake_run_process_2(command: list[str], *, cwd: Path, **_kwargs: object) -> None: + run_dirs.append(cwd) + (cwd / 'assert-true.smir.json').write_text(json.dumps({'cwd': str(cwd), 'command': command})) + + monkeypatch.setattr('kmir.cargo.stable_mir_json', fake_stable_mir_json) + monkeypatch.setattr('kmir.cargo.run_process_2', fake_run_process_2) + + first = cargo_get_smir_json(rs_file, cwd=tmp_path) + second = cargo_get_smir_json(rs_file, cwd=tmp_path) + + assert first['cwd'] != second['cwd'] + assert len(run_dirs) == 2 + assert all(path.parent == tmp_path for path in run_dirs) + assert not (tmp_path / 'assert-true.smir.json').exists() + + +def test_cargo_get_smir_json_preserves_saved_output(monkeypatch, tmp_path: Path) -> None: + rs_file = tmp_path / 'assert-true.rs' + rs_file.write_text('fn main() {}') + + def fake_stable_mir_json() -> Path: + return Path('/fake/stable_mir_json') + + def fake_run_process_2(command: list[str], *, cwd: Path, **_kwargs: object) -> None: + (cwd / 'assert-true.smir.json').write_text(json.dumps({'command': command})) + + monkeypatch.setattr('kmir.cargo.stable_mir_json', fake_stable_mir_json) + monkeypatch.setattr('kmir.cargo.run_process_2', fake_run_process_2) + + result = cargo_get_smir_json(rs_file, cwd=tmp_path, save_smir=True) + + assert result['command'][0] == '/fake/stable_mir_json' + assert (tmp_path / 'assert-true.smir.json').is_file()