diff --git a/Makefile b/Makefile index f1e65742c..852a58f07 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ smir-parse-tests: # build # commented out for CI's sake && echo -n "smir-ed " \ || report "$$source" "SMIR ERROR!"; \ if [ -s $${target} ]; then \ - ${POETRY_RUN} convert-from-definition $$(realpath $${target}) Pgm > /dev/null \ + ${POETRY_RUN} convert-from-definition $$(realpath $${target}) Crate > /dev/null \ && (echo "and parsed!"; rm $${target}) \ || report "$$source" "PARSE ERROR!"; \ fi; \ diff --git a/kmir/src/kmir/__main__.py b/kmir/src/kmir/__main__.py index 3ed9af1c6..f13e21bd4 100644 --- a/kmir/src/kmir/__main__.py +++ b/kmir/src/kmir/__main__.py @@ -1,5 +1,6 @@ from __future__ import annotations +import os import sys from argparse import ArgumentParser from dataclasses import dataclass @@ -7,16 +8,19 @@ from typing import TYPE_CHECKING from pyk.cterm import CTerm, cterm_build_claim -from pyk.kast.inner import Subst +from pyk.kast.inner import KApply, KSort, Subst from pyk.kast.manip import split_config_from from pyk.kast.outer import KFlatModule, KImport from kmir.build import haskell_semantics, llvm_semantics +from kmir.convert_from_definition.__main__ import parse_mir_klist_json from kmir.convert_from_definition.v2parser import parse_json if TYPE_CHECKING: from collections.abc import Sequence + from pyk.kast.inner import KToken + @dataclass class KMirOpts: ... @@ -24,9 +28,10 @@ class KMirOpts: ... @dataclass class RunOpts(KMirOpts): - input_file: Path + input_files: list[Path] depth: int start_symbol: str + start_crate: str haskell_backend: bool @@ -48,22 +53,43 @@ def __init__(self, input_file: Path, output_file: str | None, start_symbol: str) def _kmir_run(opts: RunOpts) -> None: tools = haskell_semantics() if opts.haskell_backend else llvm_semantics() - parse_result = parse_json(tools.definition, opts.input_file, 'Pgm') - if parse_result is None: - print('Parse error!', file=sys.stderr) + # TODO: Same as comment in convert_from_definition::__main__.py - args.sort might not be right + results = [parse_json(tools.definition, input_file, 'Crate') for input_file in opts.input_files] + + failed = [] + passed: list[tuple[KApply | KToken, KSort]] = [] + + for index, result in enumerate(results): + if result is None: + failed.append(opts.input_files[index]) + else: + passed.append(result) + + if failed: + for failure in failed: + print(f'Parse error! In {failure}', file=sys.stderr) sys.exit(1) - kmir_kast, _ = parse_result + terms, _sort = parse_mir_klist_json(passed, KSort('Crate')) + + start_crate = ( + extract_crate_name(opts.input_files[0]).replace('-', '_') if len(opts.input_files) == 1 else opts.start_crate + ) + + run_result = tools.run_parsed(terms, opts.start_symbol, start_crate, opts.depth) - result = tools.run_parsed(kmir_kast, opts.start_symbol, opts.depth) + print(tools.kprint.kore_to_pretty(run_result)) - print(tools.kprint.kore_to_pretty(result)) + +def extract_crate_name(file_path: Path) -> str: + filename = os.path.basename(file_path) + return filename.removesuffix('.smir.json') def _kmir_gen_spec(opts: GenSpecOpts) -> None: tools = haskell_semantics() - parse_result = parse_json(tools.definition, opts.input_file, 'Pgm') + parse_result = parse_json(tools.definition, opts.input_file, 'Crate') if parse_result is None: print('Parse error!', file=sys.stderr) sys.exit(1) @@ -105,11 +131,14 @@ def _arg_parser() -> ArgumentParser: command_parser = parser.add_subparsers(dest='command', required=True) run_parser = command_parser.add_parser('run', help='run stable MIR programs') - run_parser.add_argument('input_file', metavar='FILE', help='MIR program to run') + run_parser.add_argument('input_file', metavar='FILE', nargs='+', help='MIR program to run') run_parser.add_argument('--depth', type=int, metavar='DEPTH', help='Depth to execute') run_parser.add_argument( '--start-symbol', type=str, metavar='SYMBOL', default='main', help='Symbol name to begin execution from' ) + run_parser.add_argument( + '--start-crate', type=str, metavar='START_CRATE', default='main', help='Crate name to begin execution from' + ) run_parser.add_argument('--haskell-backend', action='store_true', help='Run with the haskell backend') gen_spec_parser = command_parser.add_parser('gen-spec', help='Generate a k spec from a SMIR json') @@ -128,9 +157,10 @@ def _parse_args(args: Sequence[str]) -> KMirOpts: match ns.command: case 'run': return RunOpts( - input_file=Path(ns.input_file).resolve(), + input_files=[Path(file).resolve() for file in ns.input_file], depth=ns.depth, start_symbol=ns.start_symbol, + start_crate=ns.start_crate, haskell_backend=ns.haskell_backend, ) case 'gen-spec': diff --git a/kmir/src/kmir/convert_from_definition/__main__.py b/kmir/src/kmir/convert_from_definition/__main__.py index f4a3c5af7..158397053 100644 --- a/kmir/src/kmir/convert_from_definition/__main__.py +++ b/kmir/src/kmir/convert_from_definition/__main__.py @@ -1,6 +1,14 @@ +from __future__ import annotations + import argparse import sys from pathlib import Path +from typing import TYPE_CHECKING + +from pyk.kast.inner import KApply, KSort + +if TYPE_CHECKING: + from pyk.kast.inner import KToken from kmir.build import llvm_semantics @@ -9,20 +17,51 @@ def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser() - parser.add_argument('json', metavar='JSON', help='JSON data to convert') - parser.add_argument('sort', metavar='SORT', help='Expected Sort name for the parsed term', default='pgm') + parser.add_argument( + 'json', metavar='JSON', nargs='+', help='JSON data to convert, add multiple files for cross-crate' + ) + parser.add_argument('sort', metavar='SORT', help='Expected Sort name for the parsed term', default='Crate') return parser.parse_args() +# This is essentially just a duplicate of `Parser` method `_parse_mir_klist_json` +def parse_mir_klist_json(crates: list[tuple[KApply | KToken, KSort]], sort: KSort) -> tuple[KApply, KSort]: + append_symbol = '_List_' + empty_symbol = '.List' + list_item_symbol = 'ListItem' + list_kapply = KApply(empty_symbol, ()) + first_iter = True + for element_kapply, _ in crates: + element_list_item = KApply(list_item_symbol, (element_kapply)) + if first_iter: + list_kapply = element_list_item + first_iter = False + else: + list_kapply = KApply(append_symbol, (list_kapply, element_list_item)) + return list_kapply, sort + + def main() -> None: args = parse_args() tools = llvm_semantics() - result = parse_json(tools.definition, Path(args.json), args.sort) + # TODO: args.sort might not be right + results = [parse_json(tools.definition, Path(json), args.sort) for json in args.json] + + failed = [] + passed: list[tuple[KApply | KToken, KSort]] = [] - if result is None: - print('Parse error!', file=sys.stderr) + for index, result in enumerate(results): + if result is None: + failed.append(args.json[index]) + else: + passed.append(result) + + if failed: + for failure in failed: + print(f'Parse error! In {failure}', file=sys.stderr) sys.exit(1) - term, _ = result - print(tools.krun.pretty_print(term)) + terms, _sort = parse_mir_klist_json(passed, KSort('Crate')) + + print(tools.krun.pretty_print(terms)) diff --git a/kmir/src/kmir/convert_json/convert.py b/kmir/src/kmir/convert_json/convert.py index 94f7f329a..edc2a28f1 100644 --- a/kmir/src/kmir/convert_json/convert.py +++ b/kmir/src/kmir/convert_json/convert.py @@ -637,7 +637,7 @@ def from_dict(js: Mapping[str, object]) -> KInner: CRATE_ID = id functions_map_from_dict(functions) return KApply( - 'pgm', + 'crate', ( string_from_dict(name), global_allocs_from_dict(allocs), diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md b/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md index b30fca5e7..8fdbf2866 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md @@ -15,9 +15,13 @@ module KMIR-AST imports MONO imports TARGET imports TYPES +``` - syntax Pgm ::= Symbol GlobalAllocs FunctionNames MonoItems BaseTypes - [symbol(pgm), group(mir---name--allocs--functions--items--types)] +`Crate` deviates from the Stable MIR definition of crate (which is a struct containing `id: CrateNum`, `name: Symbol`, `is_local: bool`) since this is not rich enough in information for our purposes. +```k + syntax Crate ::= ".Crate" + | Symbol GlobalAllocs FunctionNames MonoItems BaseTypes + [symbol(crate), group(mir---name--allocs--functions--items--types)] syntax FunctionKind ::= functionNormalSym(Symbol) [symbol(FunctionKind::NormalSym), group(mir-enum)] | functionIntrinsic(Symbol) [symbol(FunctionKind::IntrinsicSym), group(mir-enum)] diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 847a934dc..c9bd68810 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -8,14 +8,15 @@ requires "rt/data.md" ## Syntax of MIR in K The MIR syntax is largely defined in [KMIR-AST](./kmir-ast.md) and its -submodules. The execution is initialised based on a loaded `Pgm` read +submodules. The execution is initialised based on a loaded `Crate` read from a json format of stable-MIR, and the name of the function to execute. ```k module KMIR-SYNTAX imports KMIR-AST - syntax KItem ::= #init( Pgm ) + syntax CrateList ::= List + syntax KItem ::= #init( Crate ) endmodule ``` @@ -45,6 +46,8 @@ module KMIR-CONFIGURATION imports BOOL-SYNTAX imports RT-DATA-HIGH-SYNTAX + syntax KItem ::= "#populate_crate_map" "(" CrateList ")" + syntax RetVal ::= MaybeValue syntax StackFrame ::= StackFrame(caller:Ty, // index of caller function @@ -54,7 +57,7 @@ module KMIR-CONFIGURATION locals:List) // return val, args, local variables configuration - #init($PGM:Pgm) + #populate_crate_map($PGM:CrateList) NoValue ty(-1) // to retrieve caller // unpacking the top frame to avoid frequent stack read/write operations @@ -74,8 +77,15 @@ module KMIR-CONFIGURATION .Map // FIXME unclear how to model // FIXME where do we put the "GlobalAllocs"? in the heap, presumably? symbol($STARTSYM:String) + symbol($STARTCRATE:String) // static information about the base type interning in the MIR .Map + + + symbol(""):Symbol + .Crate:Crate + + endmodule @@ -103,6 +113,32 @@ function and executing its function body. Before execution begins, the function map and the initial memory have to be set up. ```k + // TODO: This leave the dummy configuration in the cell map, need to remove it or better yet never add it at all + rule #populate_crate_map( ListItem(NAME:Symbol ALLOCS:GlobalAllocs FUNCTIONS:FunctionNames ITEMS:MonoItems TYPES:BaseTypes) LIST) + => #populate_crate_map(LIST) ... + + ( .Bag => + NAME + NAME ALLOCS FUNCTIONS ITEMS TYPES + + ) + ... + + + rule #populate_crate_map( .List ) => #init( #lookup_crate(START_CRATE) ) ... + START_CRATE + + syntax Crate ::= "#lookup_crate" "(" Symbol ")" [function] + + rule [[ #lookup_crate( NAME ) => CONTENTS ]] + + + NAME + CONTENTS + + ... + + // #init step, assuming a singleton in the K cell rule #init(_NAME:Symbol _ALLOCS:GlobalAllocs FUNCTIONS:FunctionNames ITEMS:MonoItems TYPES:BaseTypes) => diff --git a/kmir/src/kmir/kdist/mir-semantics/lib.md b/kmir/src/kmir/kdist/mir-semantics/lib.md index 9ffffebe3..69f142a2c 100644 --- a/kmir/src/kmir/kdist/mir-semantics/lib.md +++ b/kmir/src/kmir/kdist/mir-semantics/lib.md @@ -26,7 +26,6 @@ syntax ImplTraitDecls ::= List {ImplDef, ""} syntax CrateItem ::= crateItem(Int) // imported from crate syntax CrateNum ::= crateNum(Int) -syntax Crate ::= crate(id: CrateNum, name: Symbol, isLocal: MIRBool) syntax ItemKind ::= "itemKindFn" [symbol(itemKindFn)] | "itemKindStatic" [symbol(itemKindStatic)] diff --git a/kmir/src/kmir/tools.py b/kmir/src/kmir/tools.py index d17f09fb4..1bfaabde5 100644 --- a/kmir/src/kmir/tools.py +++ b/kmir/src/kmir/tools.py @@ -57,17 +57,27 @@ def kmir(self) -> KMIR: def definition(self) -> KDefinition: return self.__definition - def run_parsed(self, parsed_smir: KInner, start_symbol: KInner | str = 'main', depth: int | None = None) -> Pattern: - init_config = self.make_init_config(parsed_smir, start_symbol) + def run_parsed( + self, + parsed_smir: KInner, + start_symbol: KInner | str = 'main', + start_crate: KInner | str = 'main', + depth: int | None = None, + ) -> Pattern: + init_config = self.make_init_config(parsed_smir, start_symbol, start_crate) init_kore = self.krun.kast_to_kore(init_config, KSort('GeneratedTopCell')) result = self.krun.run_pattern(init_kore, depth=depth) return result - def make_init_config(self, parsed_smir: KInner, start_symbol: KInner | str = 'main') -> KInner: + def make_init_config( + self, parsed_smir: KInner, start_symbol: KInner | str = 'main', start_crate: KInner | str = 'main' + ) -> KInner: if isinstance(start_symbol, str): start_symbol = stringToken(start_symbol) + if isinstance(start_crate, str): + start_crate = stringToken(start_crate) - subst = Subst({'$PGM': parsed_smir, '$STARTSYM': start_symbol}) + subst = Subst({'$PGM': parsed_smir, '$STARTSYM': start_symbol, '$STARTCRATE': start_crate}) init_config = subst.apply(self.definition.init_config(KSort('GeneratedTopCell'))) return init_config 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 17efb5d9c..a366da418 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state @@ -81,6 +81,9 @@ symbol ( "main" ) + + symbol ( "arithmetic" ) + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) ty ( 6 ) |-> rigidTyInt ( intTyIsize ) @@ -89,5 +92,28 @@ ty ( 25 ) |-> rigidTyBool ty ( 26 ) |-> rigidTyInt ( intTyI16 ) - - + + + + symbol ( "" ) + + + .Crate + + + + symbol ( "arithmetic" ) + + + symbol ( "arithmetic" ) .GlobalAllocs ListItem ( functionName ( ty ( 20 ) , functionIntrinsic ( symbol ( "black_box" ) ) ) ) + ListItem ( functionName ( ty ( 19 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E" ) ) ) ) + ListItem ( functionName ( ty ( 13 ) , functionNormalSym ( symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E" ) ) ) ) + ListItem ( functionName ( ty ( 14 ) , functionNormalSym ( symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E" ) ) ) ) + ListItem ( functionName ( ty ( 30 ) , functionNoop ( symbol ( "" ) ) ) ) + ListItem ( functionName ( ty ( 21 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E" ) ) ) ) + ListItem ( functionName ( ty ( 23 ) , functionNormalSym ( symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE" ) ) ) ) + ListItem ( functionName ( ty ( 0 ) , functionNormalSym ( symbol ( "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" ) ) ) ) monoItem (... symbolName: symbol ( "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hddd54efbfb63f680E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 44 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 44 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 44 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E" ) , monoItemKind: monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E" ) , monoItemKind: monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: 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 ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN10arithmetic4main17hcd0e28aacae0c2e9E" ) , monoItemKind: monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 59 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 8 ) , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 70 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 77 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h2376acb044c61e74E" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 21 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start17h408f33832fba4274E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>" ) , id: defId ( 0 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 1 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 2 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindClosure ( closureDef ( 1 ) , genericArgKindType ( ty ( 1 ) ) genericArgKindType ( ty ( 2 ) ) genericArgKindType ( ty ( 3 ) ) genericArgKindType ( ty ( 4 ) ) .GenericArgs ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 8 ) , projection: .ProjectionElems ) ) ) , span: span ( 2 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , ty ( 5 ) ) ) , span: span ( 2 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 0 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 0 ) , id: mirConstId ( 0 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 1 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 5 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 5 ) , projection: projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 6 ) ) .ProjectionElems ) ) ) ) , span: span ( 6 ) ) statement (... kind: statementKindStorageDead ( local ( 8 ) ) , span: span ( 7 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 7 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 4 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 8 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 9 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 10 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 8 ) , span: span ( 11 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 12 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 10 ) , span: span ( 1 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 5 ) , span: span ( 2 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 2 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 12 ) , span: span ( 3 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "argc" ) , sourceInfo: sourceInfo (... span: span ( 10 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "argv" ) , sourceInfo: sourceInfo (... span: span ( 11 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "sigpipe" ) , sourceInfo: sourceInfo (... span: span ( 12 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) varDebugInfo (... name: symbol ( "v" ) , sourceInfo: sourceInfo (... span: span ( 6 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 13 ) ) .Bodies ) ) .MonoItems baseType ( ty ( 2 ) , tyKindRigidTy ( rigidTyInt ( intTyI8 ) ) ) baseType ( ty ( 6 ) , tyKindRigidTy ( rigidTyInt ( intTyIsize ) ) ) baseType ( ty ( 9 ) , tyKindRigidTy ( rigidTyUint ( uintTyU8 ) ) ) baseType ( ty ( 26 ) , tyKindRigidTy ( rigidTyInt ( intTyI16 ) ) ) baseType ( ty ( 25 ) , tyKindRigidTy ( rigidTyBool ) ) baseType ( ty ( 16 ) , tyKindRigidTy ( rigidTyInt ( intTyI32 ) ) ) .BaseTypes + + + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json index a7b2eb531..6396f45a3 100644 --- a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json @@ -1 +1,2179 @@ -{"name":"assign_cast2","crate_id":2350940226393625358,"allocs":[],"functions":[[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h011c262af6fc81d1E"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h2ac90369701c0f15E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h57c7180edb6a8d4dE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h3f80f4d2567d1397E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[33,{"NoOpSym":""}],[20,{"IntrinsicSym":"black_box"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hf72b8252ed673ed3E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h11453166664855b3E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h28b446e5bad970fcE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h7179fe126d65311fE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h57c7180edb6a8d4dE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hf72b8252ed673ed3E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h2ac90369701c0f15E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN12assign_cast24main17h62f0e7a858f55442E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":51,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[128,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":25,"id":9}}}}]},"span":51},{"kind":{"Assign":[{"local":2,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},2]}]},"span":52},{"kind":{"Assign":[{"local":3,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},26]}]},"span":53},{"kind":{"Assign":[{"local":4,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},16]}]},"span":54},{"kind":{"Assign":[{"local":5,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":2,"projection":[]}},26]}]},"span":55},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},27]}]},"span":56},{"kind":{"Assign":[{"local":7,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},2]}]},"span":57},{"kind":{"Assign":[{"local":8,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},2]}]},"span":58},{"kind":{"Assign":[{"local":9,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},25]}]},"span":59},{"kind":{"Assign":[{"local":10,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},28]}]},"span":60},{"kind":{"Assign":[{"local":11,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":2,"projection":[]}},25]}]},"span":61},{"kind":{"Assign":[{"local":12,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},29]}]},"span":62},{"kind":{"Assign":[{"local":13,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},9]}]},"span":63},{"kind":{"Assign":[{"local":14,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},9]}]},"span":64},{"kind":{"Assign":[{"local":15,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":6,"projection":[]}},28]}]},"span":65}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"},{"ty":25,"span":67,"mutability":"Not"},{"ty":2,"span":68,"mutability":"Not"},{"ty":26,"span":69,"mutability":"Not"},{"ty":16,"span":70,"mutability":"Not"},{"ty":26,"span":71,"mutability":"Not"},{"ty":27,"span":72,"mutability":"Not"},{"ty":2,"span":73,"mutability":"Not"},{"ty":2,"span":74,"mutability":"Not"},{"ty":25,"span":75,"mutability":"Not"},{"ty":28,"span":76,"mutability":"Not"},{"ty":25,"span":77,"mutability":"Not"},{"ty":29,"span":78,"mutability":"Not"},{"ty":9,"span":79,"mutability":"Not"},{"ty":9,"span":80,"mutability":"Not"},{"ty":28,"span":81,"mutability":"Not"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":68,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"c","source_info":{"span":69,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null},{"name":"d","source_info":{"span":70,"scope":4},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"e","source_info":{"span":71,"scope":5},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null},{"name":"f","source_info":{"span":72,"scope":6},"composite":null,"value":{"Place":{"local":6,"projection":[]}},"argument_index":null},{"name":"g","source_info":{"span":73,"scope":7},"composite":null,"value":{"Place":{"local":7,"projection":[]}},"argument_index":null},{"name":"h","source_info":{"span":74,"scope":8},"composite":null,"value":{"Place":{"local":8,"projection":[]}},"argument_index":null},{"name":"i","source_info":{"span":75,"scope":9},"composite":null,"value":{"Place":{"local":9,"projection":[]}},"argument_index":null},{"name":"j","source_info":{"span":76,"scope":10},"composite":null,"value":{"Place":{"local":10,"projection":[]}},"argument_index":null},{"name":"k","source_info":{"span":77,"scope":11},"composite":null,"value":{"Place":{"local":11,"projection":[]}},"argument_index":null},{"name":"l","source_info":{"span":78,"scope":12},"composite":null,"value":{"Place":{"local":12,"projection":[]}},"argument_index":null},{"name":"m","source_info":{"span":79,"scope":13},"composite":null,"value":{"Place":{"local":13,"projection":[]}},"argument_index":null},{"name":"n","source_info":{"span":80,"scope":14},"composite":null,"value":{"Place":{"local":14,"projection":[]}},"argument_index":null},{"name":"o","source_info":{"span":81,"scope":15},"composite":null,"value":{"Place":{"local":15,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h3f80f4d2567d1397E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h011c262af6fc81d1E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[25,{"RigidTy":{"Uint":"U16"}}],[26,{"RigidTy":{"Int":"I16"}}],[28,{"RigidTy":{"Uint":"U32"}}],[29,{"RigidTy":{"Uint":"U64"}}],[27,{"RigidTy":{"Int":"I64"}}],[9,{"RigidTy":{"Uint":"U8"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file +{ + "name": "assign_cast", + "crate_id": 13002952174156868308, + "allocs": [], + "functions": [ + [ + 30, + { + "NoOpSym": "" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hb5b25907048cfcaeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN11assign_cast4main17ha51d0dbb589964c1E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 9 + } + } + } + } + ] + }, + "span": 51 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 2 + ] + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 27 + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 2 + ] + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 2 + ] + } + ] + }, + "span": 58 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 25 + ] + } + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 28 + ] + } + ] + }, + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + 25 + ] + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 29 + ] + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 9 + ] + } + ] + }, + "span": 63 + }, + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 9 + ] + } + ] + }, + "span": 64 + }, + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 28 + ] + } + ] + }, + "span": 65 + } + ], + "terminator": { + "kind": "Return", + "span": 50 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 67, + "mutability": "Not" + }, + { + "ty": 2, + "span": 68, + "mutability": "Not" + }, + { + "ty": 26, + "span": 69, + "mutability": "Not" + }, + { + "ty": 16, + "span": 70, + "mutability": "Not" + }, + { + "ty": 26, + "span": 71, + "mutability": "Not" + }, + { + "ty": 27, + "span": 72, + "mutability": "Not" + }, + { + "ty": 2, + "span": 73, + "mutability": "Not" + }, + { + "ty": 2, + "span": 74, + "mutability": "Not" + }, + { + "ty": 25, + "span": 75, + "mutability": "Not" + }, + { + "ty": 28, + "span": 76, + "mutability": "Not" + }, + { + "ty": 25, + "span": 77, + "mutability": "Not" + }, + { + "ty": 29, + "span": 78, + "mutability": "Not" + }, + { + "ty": 9, + "span": 79, + "mutability": "Not" + }, + { + "ty": 9, + "span": 80, + "mutability": "Not" + }, + { + "ty": 28, + "span": 81, + "mutability": "Not" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 68, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 69, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 70, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 71, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "f", + "source_info": { + "span": 72, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "g", + "source_info": { + "span": 73, + "scope": 7 + }, + "composite": null, + "value": { + "Place": { + "local": 7, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "h", + "source_info": { + "span": 74, + "scope": 8 + }, + "composite": null, + "value": { + "Place": { + "local": 8, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "i", + "source_info": { + "span": 75, + "scope": 9 + }, + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "j", + "source_info": { + "span": 76, + "scope": 10 + }, + "composite": null, + "value": { + "Place": { + "local": 10, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "k", + "source_info": { + "span": 77, + "scope": 11 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "l", + "source_info": { + "span": 78, + "scope": 12 + }, + "composite": null, + "value": { + "Place": { + "local": 12, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "m", + "source_info": { + "span": 79, + "scope": 13 + }, + "composite": null, + "value": { + "Place": { + "local": 13, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "n", + "source_info": { + "span": 80, + "scope": 14 + }, + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "o", + "source_info": { + "span": 81, + "scope": 15 + }, + "composite": null, + "value": { + "Place": { + "local": 15, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 82 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h5f5fa8aba711bbb4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0a70c56a5c4492dfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 28, + { + "RigidTy": { + "Uint": "U32" + } + } + ], + [ + 27, + { + "RigidTy": { + "Int": "I64" + } + } + ], + [ + 25, + { + "RigidTy": { + "Uint": "U16" + } + } + ], + [ + 29, + { + "RigidTy": { + "Uint": "U64" + } + } + ], + [ + 26, + { + "RigidTy": { + "Int": "I16" + } + } + ] + ], + "debug": null +} \ 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 ffacaa3a0..c6fdb561c 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 @@ -60,6 +60,9 @@ symbol ( "main" ) + + symbol ( "assign_cast" ) + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) ty ( 6 ) |-> rigidTyInt ( intTyIsize ) @@ -71,4 +74,28 @@ ty ( 28 ) |-> rigidTyUint ( uintTyU32 ) ty ( 29 ) |-> rigidTyUint ( uintTyU64 ) + + + + symbol ( "" ) + + + .Crate + + + + symbol ( "assign_cast" ) + + + symbol ( "assign_cast" ) .GlobalAllocs ListItem ( functionName ( ty ( 30 ) , functionNoop ( symbol ( "" ) ) ) ) + ListItem ( functionName ( ty ( 13 ) , functionNormalSym ( symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE" ) ) ) ) + ListItem ( functionName ( ty ( 0 ) , functionNormalSym ( symbol ( "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" ) ) ) ) + ListItem ( functionName ( ty ( 20 ) , functionIntrinsic ( symbol ( "black_box" ) ) ) ) + ListItem ( functionName ( ty ( 23 ) , functionNormalSym ( symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E" ) ) ) ) + ListItem ( functionName ( ty ( 19 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE" ) ) ) ) + ListItem ( functionName ( ty ( 21 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E" ) ) ) ) + ListItem ( functionName ( ty ( 14 ) , functionNormalSym ( symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E" ) ) ) ) monoItem (... symbolName: symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E" ) , monoItemKind: monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hb5b25907048cfcaeE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 44 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 44 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 44 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: 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 ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN11assign_cast4main17ha51d0dbb589964c1E" ) , monoItemKind: monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 29 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 69 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 79 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "g" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "h" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 9 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "j" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 10 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "k" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 11 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "l" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 12 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "m" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 13 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "n" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 14 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "o" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 15 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 82 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start17h5f5fa8aba711bbb4E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>" ) , id: defId ( 0 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 1 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 2 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindClosure ( closureDef ( 1 ) , genericArgKindType ( ty ( 1 ) ) genericArgKindType ( ty ( 2 ) ) genericArgKindType ( ty ( 3 ) ) genericArgKindType ( ty ( 4 ) ) .GenericArgs ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 8 ) , projection: .ProjectionElems ) ) ) , span: span ( 2 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , ty ( 5 ) ) ) , span: span ( 2 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 0 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 0 ) , id: mirConstId ( 0 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 1 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 5 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 5 ) , projection: projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 6 ) ) .ProjectionElems ) ) ) ) , span: span ( 6 ) ) statement (... kind: statementKindStorageDead ( local ( 8 ) ) , span: span ( 7 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 7 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 4 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 8 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 9 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 10 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 8 ) , span: span ( 11 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 12 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 10 ) , span: span ( 1 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 5 ) , span: span ( 2 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 2 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 12 ) , span: span ( 3 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "argc" ) , sourceInfo: sourceInfo (... span: span ( 10 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "argv" ) , sourceInfo: sourceInfo (... span: span ( 11 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "sigpipe" ) , sourceInfo: sourceInfo (... span: span ( 12 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) varDebugInfo (... name: symbol ( "v" ) , sourceInfo: sourceInfo (... span: span ( 6 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 13 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE" ) , monoItemKind: monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0a70c56a5c4492dfE" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 21 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) .MonoItems baseType ( ty ( 9 ) , tyKindRigidTy ( rigidTyUint ( uintTyU8 ) ) ) baseType ( ty ( 6 ) , tyKindRigidTy ( rigidTyInt ( intTyIsize ) ) ) baseType ( ty ( 16 ) , tyKindRigidTy ( rigidTyInt ( intTyI32 ) ) ) baseType ( ty ( 2 ) , tyKindRigidTy ( rigidTyInt ( intTyI8 ) ) ) baseType ( ty ( 28 ) , tyKindRigidTy ( rigidTyUint ( uintTyU32 ) ) ) baseType ( ty ( 27 ) , tyKindRigidTy ( rigidTyInt ( intTyI64 ) ) ) baseType ( ty ( 25 ) , tyKindRigidTy ( rigidTyUint ( uintTyU16 ) ) ) baseType ( ty ( 29 ) , tyKindRigidTy ( rigidTyUint ( uintTyU64 ) ) ) baseType ( ty ( 26 ) , tyKindRigidTy ( rigidTyInt ( intTyI16 ) ) ) .BaseTypes + + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state index 995631132..821abf6b0 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state @@ -1,6 +1,6 @@ - #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) ~> .K + typedLocal ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ~> #setLocalValue ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ~> #setArgsFromStack ( 3 , .Operands ) ~> #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) ~> .K NoValue @@ -27,7 +27,7 @@ ListItem ( typedLocal ( NoValue , ty ( 1 ) , mutabilityMut ) ) ListItem ( typedLocal ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedLocal ( NoValue , ty ( 28 ) , mutabilityNot ) ) @@ -51,6 +51,9 @@ symbol ( "main" ) + + symbol ( "main_a_b_with_int" ) + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) ty ( 6 ) |-> rigidTyInt ( intTyIsize ) @@ -59,4 +62,30 @@ ty ( 26 ) |-> rigidTyUint ( uintTyUsize ) ty ( 28 ) |-> rigidTyInt ( intTyI16 ) + + + + symbol ( "" ) + + + .Crate + + + + symbol ( "main_a_b_with_int" ) + + + symbol ( "main_a_b_with_int" ) .GlobalAllocs ListItem ( functionName ( ty ( 0 ) , functionNormalSym ( symbol ( "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" ) ) ) ) + ListItem ( functionName ( ty ( 32 ) , functionNoop ( symbol ( "" ) ) ) ) + ListItem ( functionName ( ty ( 13 ) , functionNormalSym ( symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE" ) ) ) ) + ListItem ( functionName ( ty ( 20 ) , functionIntrinsic ( symbol ( "black_box" ) ) ) ) + ListItem ( functionName ( ty ( 19 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE" ) ) ) ) + ListItem ( functionName ( ty ( 21 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE" ) ) ) ) + ListItem ( functionName ( ty ( 23 ) , functionNormalSym ( symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E" ) ) ) ) + ListItem ( functionName ( ty ( 27 ) , functionNormalSym ( symbol ( "_ZN17main_a_b_with_int1b17h92605682282418dbE" ) ) ) ) + ListItem ( functionName ( ty ( 14 ) , functionNormalSym ( symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E" ) ) ) ) + ListItem ( functionName ( ty ( 25 ) , functionNormalSym ( symbol ( "_ZN17main_a_b_with_int1a17h55bc10e786653b90E" ) ) ) ) monoItem (... symbolName: symbol ( "_ZN17main_a_b_with_int4main17h37f7f24b825d5c5dE" ) , monoItemKind: monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN17main_a_b_with_int1b17h92605682282418dbE" ) , monoItemKind: monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start17hfb4d01dc98c21e58E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>" ) , id: defId ( 0 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 1 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 2 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindClosure ( closureDef ( 1 ) , genericArgKindType ( ty ( 1 ) ) genericArgKindType ( ty ( 2 ) ) genericArgKindType ( ty ( 3 ) ) genericArgKindType ( ty ( 4 ) ) .GenericArgs ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 8 ) , projection: .ProjectionElems ) ) ) , span: span ( 2 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , ty ( 5 ) ) ) , span: span ( 2 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 0 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 0 ) , id: mirConstId ( 0 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 1 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 5 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 5 ) , projection: projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 6 ) ) .ProjectionElems ) ) ) ) , span: span ( 6 ) ) statement (... kind: statementKindStorageDead ( local ( 8 ) ) , span: span ( 7 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 7 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 4 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 8 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 9 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 10 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 8 ) , span: span ( 11 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 12 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 10 ) , span: span ( 1 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 5 ) , span: span ( 2 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 2 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 12 ) , span: span ( 3 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "argc" ) , sourceInfo: sourceInfo (... span: span ( 10 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "argv" ) , sourceInfo: sourceInfo (... span: span ( 11 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "sigpipe" ) , sourceInfo: sourceInfo (... span: span ( 12 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) varDebugInfo (... name: symbol ( "v" ) , sourceInfo: sourceInfo (... span: span ( 6 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 13 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h96705bf254340eb7E" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 21 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: 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 ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE" ) , monoItemKind: monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN17main_a_b_with_int1a17h55bc10e786653b90E" ) , monoItemKind: monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h343aa02f84d02209E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 44 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 44 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 44 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E" ) , monoItemKind: monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) ) .MonoItems baseType ( ty ( 28 ) , tyKindRigidTy ( rigidTyInt ( intTyI16 ) ) ) baseType ( ty ( 16 ) , tyKindRigidTy ( rigidTyInt ( intTyI32 ) ) ) baseType ( ty ( 6 ) , tyKindRigidTy ( rigidTyInt ( intTyIsize ) ) ) baseType ( ty ( 26 ) , tyKindRigidTy ( rigidTyUint ( uintTyUsize ) ) ) baseType ( ty ( 2 ) , tyKindRigidTy ( rigidTyInt ( intTyI8 ) ) ) baseType ( ty ( 9 ) , tyKindRigidTy ( rigidTyUint ( uintTyU8 ) ) ) .BaseTypes + + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state index 6235107dd..d1052cce8 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state @@ -1,6 +1,6 @@ - #execTerminator ( terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) ~> .K + #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) ) ~> .K NoValue @@ -50,10 +50,40 @@ symbol ( "main" ) + + symbol ( "main_a_b_c" ) + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) ty ( 6 ) |-> rigidTyInt ( intTyIsize ) ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + + + + symbol ( "" ) + + + .Crate + + + + symbol ( "main_a_b_c" ) + + + symbol ( "main_a_b_c" ) .GlobalAllocs ListItem ( functionName ( ty ( 13 ) , functionNormalSym ( symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E" ) ) ) ) + ListItem ( functionName ( ty ( 21 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E" ) ) ) ) + ListItem ( functionName ( ty ( 23 ) , functionNormalSym ( symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE" ) ) ) ) + ListItem ( functionName ( ty ( 14 ) , functionNormalSym ( symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE" ) ) ) ) + ListItem ( functionName ( ty ( 19 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E" ) ) ) ) + ListItem ( functionName ( ty ( 20 ) , functionIntrinsic ( symbol ( "black_box" ) ) ) ) + ListItem ( functionName ( ty ( 27 ) , functionNormalSym ( symbol ( "_ZN10main_a_b_c1c17h59101d2318335bbdE" ) ) ) ) + ListItem ( functionName ( ty ( 25 ) , functionNormalSym ( symbol ( "_ZN10main_a_b_c1a17hf96e7944faad0bd0E" ) ) ) ) + ListItem ( functionName ( ty ( 0 ) , functionNormalSym ( symbol ( "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" ) ) ) ) + ListItem ( functionName ( ty ( 26 ) , functionNormalSym ( symbol ( "_ZN10main_a_b_c1b17hbedf65f2538ce3adE" ) ) ) ) + ListItem ( functionName ( ty ( 31 ) , functionNoop ( symbol ( "" ) ) ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start17he509fe31442a28c4E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>" ) , id: defId ( 0 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 1 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 2 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindClosure ( closureDef ( 1 ) , genericArgKindType ( ty ( 1 ) ) genericArgKindType ( ty ( 2 ) ) genericArgKindType ( ty ( 3 ) ) genericArgKindType ( ty ( 4 ) ) .GenericArgs ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 8 ) , projection: .ProjectionElems ) ) ) , span: span ( 2 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , ty ( 5 ) ) ) , span: span ( 2 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 0 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 0 ) , id: mirConstId ( 0 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 1 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 5 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 5 ) , projection: projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 6 ) ) .ProjectionElems ) ) ) ) , span: span ( 6 ) ) statement (... kind: statementKindStorageDead ( local ( 8 ) ) , span: span ( 7 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 7 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 4 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 8 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 9 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 10 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 8 ) , span: span ( 11 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 12 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 10 ) , span: span ( 1 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 5 ) , span: span ( 2 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 2 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 12 ) , span: span ( 3 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "argc" ) , sourceInfo: sourceInfo (... span: span ( 10 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "argv" ) , sourceInfo: sourceInfo (... span: span ( 11 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "sigpipe" ) , sourceInfo: sourceInfo (... span: span ( 12 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) varDebugInfo (... name: symbol ( "v" ) , sourceInfo: sourceInfo (... span: span ( 6 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 13 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN10main_a_b_c1b17hbedf65f2538ce3adE" ) , monoItemKind: monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN10main_a_b_c4main17hcaca459da1b06b9fE" ) , monoItemKind: monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE" ) , monoItemKind: monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E" ) , monoItemKind: monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN10main_a_b_c1a17hf96e7944faad0bd0E" ) , monoItemKind: monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h651e2df3ec0dc2ccE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 44 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 44 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 44 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hba596ab1e21f4dfaE" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 21 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN10main_a_b_c1c17h59101d2318335bbdE" ) , monoItemKind: monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: 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 ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) .MonoItems baseType ( ty ( 6 ) , tyKindRigidTy ( rigidTyInt ( intTyIsize ) ) ) baseType ( ty ( 2 ) , tyKindRigidTy ( rigidTyInt ( intTyI8 ) ) ) baseType ( ty ( 9 ) , tyKindRigidTy ( rigidTyUint ( uintTyU8 ) ) ) baseType ( ty ( 16 ) , tyKindRigidTy ( rigidTyInt ( intTyI32 ) ) ) .BaseTypes + + + \ 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 198ede671..622f7f7d6 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 @@ -49,10 +49,40 @@ symbol ( "main" ) + + symbol ( "main_a_b_c" ) + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) ty ( 6 ) |-> rigidTyInt ( intTyIsize ) ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + + + + symbol ( "" ) + + + .Crate + + + + symbol ( "main_a_b_c" ) + + + symbol ( "main_a_b_c" ) .GlobalAllocs ListItem ( functionName ( ty ( 13 ) , functionNormalSym ( symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E" ) ) ) ) + ListItem ( functionName ( ty ( 21 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E" ) ) ) ) + ListItem ( functionName ( ty ( 23 ) , functionNormalSym ( symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE" ) ) ) ) + ListItem ( functionName ( ty ( 14 ) , functionNormalSym ( symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE" ) ) ) ) + ListItem ( functionName ( ty ( 19 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E" ) ) ) ) + ListItem ( functionName ( ty ( 20 ) , functionIntrinsic ( symbol ( "black_box" ) ) ) ) + ListItem ( functionName ( ty ( 27 ) , functionNormalSym ( symbol ( "_ZN10main_a_b_c1c17h59101d2318335bbdE" ) ) ) ) + ListItem ( functionName ( ty ( 25 ) , functionNormalSym ( symbol ( "_ZN10main_a_b_c1a17hf96e7944faad0bd0E" ) ) ) ) + ListItem ( functionName ( ty ( 0 ) , functionNormalSym ( symbol ( "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" ) ) ) ) + ListItem ( functionName ( ty ( 26 ) , functionNormalSym ( symbol ( "_ZN10main_a_b_c1b17hbedf65f2538ce3adE" ) ) ) ) + ListItem ( functionName ( ty ( 31 ) , functionNoop ( symbol ( "" ) ) ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start17he509fe31442a28c4E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>" ) , id: defId ( 0 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 1 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 2 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindClosure ( closureDef ( 1 ) , genericArgKindType ( ty ( 1 ) ) genericArgKindType ( ty ( 2 ) ) genericArgKindType ( ty ( 3 ) ) genericArgKindType ( ty ( 4 ) ) .GenericArgs ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 8 ) , projection: .ProjectionElems ) ) ) , span: span ( 2 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , ty ( 5 ) ) ) , span: span ( 2 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 0 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 0 ) , id: mirConstId ( 0 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 1 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 5 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 5 ) , projection: projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 6 ) ) .ProjectionElems ) ) ) ) , span: span ( 6 ) ) statement (... kind: statementKindStorageDead ( local ( 8 ) ) , span: span ( 7 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 7 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 4 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 8 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 9 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 10 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 8 ) , span: span ( 11 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 12 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 10 ) , span: span ( 1 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 5 ) , span: span ( 2 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 2 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 12 ) , span: span ( 3 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "argc" ) , sourceInfo: sourceInfo (... span: span ( 10 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "argv" ) , sourceInfo: sourceInfo (... span: span ( 11 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "sigpipe" ) , sourceInfo: sourceInfo (... span: span ( 12 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) varDebugInfo (... name: symbol ( "v" ) , sourceInfo: sourceInfo (... span: span ( 6 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 13 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN10main_a_b_c1b17hbedf65f2538ce3adE" ) , monoItemKind: monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN10main_a_b_c4main17hcaca459da1b06b9fE" ) , monoItemKind: monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE" ) , monoItemKind: monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E" ) , monoItemKind: monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN10main_a_b_c1a17hf96e7944faad0bd0E" ) , monoItemKind: monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h651e2df3ec0dc2ccE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 44 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 44 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 44 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hba596ab1e21f4dfaE" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 21 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN10main_a_b_c1c17h59101d2318335bbdE" ) , monoItemKind: monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: 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 ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) .MonoItems baseType ( ty ( 6 ) , tyKindRigidTy ( rigidTyInt ( intTyIsize ) ) ) baseType ( ty ( 2 ) , tyKindRigidTy ( rigidTyInt ( intTyI8 ) ) ) baseType ( ty ( 9 ) , tyKindRigidTy ( rigidTyUint ( uintTyU8 ) ) ) baseType ( ty ( 16 ) , tyKindRigidTy ( rigidTyInt ( intTyI32 ) ) ) .BaseTypes + + + \ 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 7ecc75cfd..5c1a43011 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 @@ -53,6 +53,9 @@ symbol ( "main" ) + + symbol ( "struct_field_update" ) + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) ty ( 6 ) |-> rigidTyInt ( intTyIsize ) @@ -61,4 +64,28 @@ ty ( 25 ) |-> rigidTyBool ty ( 26 ) |-> rigidTyFloat ( floatTyF64 ) + + + + symbol ( "" ) + + + .Crate + + + + symbol ( "struct_field_update" ) + + + symbol ( "struct_field_update" ) .GlobalAllocs ListItem ( functionName ( ty ( 13 ) , functionNormalSym ( symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E" ) ) ) ) + ListItem ( functionName ( ty ( 23 ) , functionNormalSym ( symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E" ) ) ) ) + ListItem ( functionName ( ty ( 19 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE" ) ) ) ) + ListItem ( functionName ( ty ( 0 ) , functionNormalSym ( symbol ( "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" ) ) ) ) + ListItem ( functionName ( ty ( 21 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE" ) ) ) ) + ListItem ( functionName ( ty ( 20 ) , functionIntrinsic ( symbol ( "black_box" ) ) ) ) + ListItem ( functionName ( ty ( 32 ) , functionNoop ( symbol ( "" ) ) ) ) + ListItem ( functionName ( ty ( 14 ) , functionNormalSym ( symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E" ) ) ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start17h7596bfce4c2de521E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>" ) , id: defId ( 0 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 1 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 2 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindClosure ( closureDef ( 1 ) , genericArgKindType ( ty ( 1 ) ) genericArgKindType ( ty ( 2 ) ) genericArgKindType ( ty ( 3 ) ) genericArgKindType ( ty ( 4 ) ) .GenericArgs ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 8 ) , projection: .ProjectionElems ) ) ) , span: span ( 2 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , ty ( 5 ) ) ) , span: span ( 2 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 0 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 0 ) , id: mirConstId ( 0 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 1 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 5 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 5 ) , projection: projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 6 ) ) .ProjectionElems ) ) ) ) , span: span ( 6 ) ) statement (... kind: statementKindStorageDead ( local ( 8 ) ) , span: span ( 7 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 7 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 4 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 8 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 9 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 10 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 8 ) , span: span ( 11 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 12 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 10 ) , span: span ( 1 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 5 ) , span: span ( 2 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 2 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 12 ) , span: span ( 3 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "argc" ) , sourceInfo: sourceInfo (... span: span ( 10 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "argv" ) , sourceInfo: sourceInfo (... span: span ( 11 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "sigpipe" ) , sourceInfo: sourceInfo (... span: span ( 12 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) varDebugInfo (... name: symbol ( "v" ) , sourceInfo: sourceInfo (... span: span ( 6 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 13 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: 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 ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E" ) , monoItemKind: monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE" ) , monoItemKind: monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN19struct_field_update4main17h502cdc578af7c9e8E" ) , monoItemKind: monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) .Operands ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 13 ) ) ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"33333sE@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 62 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h09bc4ea8ad5997d5E" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 21 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h21cb4ff546418550E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 44 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 44 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 44 ) ) .Bodies ) ) .MonoItems baseType ( ty ( 16 ) , tyKindRigidTy ( rigidTyInt ( intTyI32 ) ) ) baseType ( ty ( 26 ) , tyKindRigidTy ( rigidTyFloat ( floatTyF64 ) ) ) baseType ( ty ( 25 ) , tyKindRigidTy ( rigidTyBool ) ) baseType ( ty ( 2 ) , tyKindRigidTy ( rigidTyInt ( intTyI8 ) ) ) baseType ( ty ( 6 ) , tyKindRigidTy ( rigidTyInt ( intTyIsize ) ) ) baseType ( ty ( 9 ) , tyKindRigidTy ( rigidTyUint ( uintTyU8 ) ) ) .BaseTypes + + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state index 94ea3c9a0..9a0f31f08 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state @@ -1,6 +1,6 @@ - #execTerminator ( terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ~> .K + #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ) ~> .K NoValue @@ -64,6 +64,9 @@ symbol ( "main" ) + + symbol ( "structs_tuples" ) + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) ty ( 6 ) |-> rigidTyInt ( intTyIsize ) @@ -72,4 +75,29 @@ ty ( 26 ) |-> rigidTyBool ty ( 27 ) |-> rigidTyFloat ( floatTyF64 ) + + + + symbol ( "" ) + + + .Crate + + + + symbol ( "structs_tuples" ) + + + symbol ( "structs_tuples" ) .GlobalAllocs ListItem ( functionName ( ty ( 19 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE" ) ) ) ) + ListItem ( functionName ( ty ( 20 ) , functionIntrinsic ( symbol ( "black_box" ) ) ) ) + ListItem ( functionName ( ty ( 25 ) , functionNormalSym ( symbol ( "_ZN14structs_tuples3foo17h3890d1fc66f78799E" ) ) ) ) + ListItem ( functionName ( ty ( 14 ) , functionNormalSym ( symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE" ) ) ) ) + ListItem ( functionName ( ty ( 13 ) , functionNormalSym ( symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE" ) ) ) ) + ListItem ( functionName ( ty ( 23 ) , functionNormalSym ( symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E" ) ) ) ) + ListItem ( functionName ( ty ( 0 ) , functionNormalSym ( symbol ( "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" ) ) ) ) + ListItem ( functionName ( ty ( 30 ) , functionNoop ( symbol ( "" ) ) ) ) + ListItem ( functionName ( ty ( 21 ) , functionNormalSym ( symbol ( "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE" ) ) ) ) monoItem (... symbolName: symbol ( "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hcc7804faa37550b8E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 44 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 44 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 44 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN14structs_tuples3foo17h3890d1fc66f78799E" ) , monoItemKind: monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: 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 ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start17h35bcf3f6dc6c431bE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>" ) , id: defId ( 0 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 1 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 2 ) ) statement (... kind: statementKindStorageLive ( local ( 8 ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindClosure ( closureDef ( 1 ) , genericArgKindType ( ty ( 1 ) ) genericArgKindType ( ty ( 2 ) ) genericArgKindType ( ty ( 3 ) ) genericArgKindType ( ty ( 4 ) ) .GenericArgs ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 3 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 8 ) , projection: .ProjectionElems ) ) ) , span: span ( 2 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , ty ( 5 ) ) ) , span: span ( 2 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 0 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 0 ) , id: mirConstId ( 0 ) ) ) ) , args: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 1 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 5 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 5 ) , projection: projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 6 ) ) .ProjectionElems ) ) ) ) , span: span ( 6 ) ) statement (... kind: statementKindStorageDead ( local ( 8 ) ) , span: span ( 7 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 7 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 4 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 8 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 9 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 10 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 8 ) , span: span ( 11 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 12 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 10 ) , span: span ( 1 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 5 ) , span: span ( 2 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 2 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 12 ) , span: span ( 3 ) , mut: mutabilityNot ) .LocalDecls , argCount: 4 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "argc" ) , sourceInfo: sourceInfo (... span: span ( 10 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "argv" ) , sourceInfo: sourceInfo (... span: span ( 11 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "sigpipe" ) , sourceInfo: sourceInfo (... span: span ( 12 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 4 ) ) varDebugInfo (... name: symbol ( "v" ) , sourceInfo: sourceInfo (... span: span ( 6 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 13 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE" ) , monoItemKind: monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE" ) , monoItemKind: monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN14structs_tuples4main17hc13d6b1ad2ba5288E" ) , monoItemKind: monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0fc835eb50e37b13E" ) , monoItemKind: monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 21 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E" ) , monoItemKind: monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) ) monoItem (... symbolName: symbol ( "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE" ) , monoItemKind: monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) ) .MonoItems baseType ( ty ( 9 ) , tyKindRigidTy ( rigidTyUint ( uintTyU8 ) ) ) baseType ( ty ( 27 ) , tyKindRigidTy ( rigidTyFloat ( floatTyF64 ) ) ) baseType ( ty ( 6 ) , tyKindRigidTy ( rigidTyInt ( intTyIsize ) ) ) baseType ( ty ( 26 ) , tyKindRigidTy ( rigidTyBool ) ) baseType ( ty ( 16 ) , tyKindRigidTy ( rigidTyInt ( intTyI32 ) ) ) baseType ( ty ( 2 ) , tyKindRigidTy ( rigidTyInt ( intTyI8 ) ) ) .BaseTypes + + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json index 2100e09fd..4821912ed 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json @@ -1,67 +1,67 @@ { - "name": "struct_tuple_fields", - "crate_id": 15052015653515667555, + "name": "structs_tuples", + "crate_id": 4825803685595141642, "allocs": [], "functions": [ [ - 13, + 19, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hb280b8a231f5f9feE" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE" } ], [ - 19, + 20, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h13fdc527832fef9bE" + "IntrinsicSym": "black_box" } ], [ - 23, + 25, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h14ef065ef2b7c26fE" + "NormalSym": "_ZN14structs_tuples3foo17h3890d1fc66f78799E" } ], [ - 0, + 14, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE" } ], [ - 25, + 13, { - "NormalSym": "_ZN19struct_tuple_fields3foo17h313cc5516683e5b2E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE" } ], [ - 30, + 23, { - "NoOpSym": "" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E" } ], [ - 14, + 0, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h29c5f28db416dd9bE" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ - 21, + 30, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9fd74af38a279f31E" + "NoOpSym": "" } ], [ - 20, + 21, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h12e57977f213b84cE", + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hcc7804faa37550b8E", "mono_item_kind": { "MonoItemFn": { "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", @@ -100,66 +100,94 @@ "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h13fdc527832fef9bE", + "symbol_name": "_ZN14structs_tuples3foo17h3890d1fc66f78799E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, + "name": "foo", + "id": 8, "body": [ { "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, { "statements": [], "terminator": { "kind": "Return", - "span": 43 + "span": 73 } } ], "locals": [ { "ty": 1, - "span": 43, + "span": 74, "mutability": "Mut" }, { - "ty": 7, - "span": 43, + "ty": 16, + "span": 75, "mutability": "Not" }, { - "ty": 1, - "span": 43, + "ty": 26, + "span": 76, + "mutability": "Not" + }, + { + "ty": 27, + "span": 77, "mutability": "Not" } ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + "arg_count": 3, + "var_debug_info": [ + { + "name": "_i", + "source_info": { + "span": 75, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "_b", + "source_info": { + "span": 76, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "_f", + "source_info": { + "span": 77, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + } + ], + "spread_arg": null, + "span": 78 } ] } @@ -167,60 +195,42 @@ "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h14ef065ef2b7c26fE", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, "body": [ { "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, { "kind": { "Assign": [ { - "local": 4, + "local": 3, "projection": [] }, { - "Use": { - "Copy": { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + "projection": [] } - } + ] } ] }, - "span": 17 + "span": 43 } ], "terminator": { @@ -228,244 +238,396 @@ "Call": { "func": { "Constant": { - "span": 14, + "span": 43, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 13, - "id": 1 + "ty": 23, + "id": 7 } } }, "args": [ { "Move": { - "local": 4, + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, "projection": [] } } ], "destination": { - "local": 3, + "local": 0, "projection": [] }, "target": 1, - "unwind": "Continue" + "unwind": { + "Cleanup": 3 + } } }, - "span": 15 + "span": 43 } }, { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], + "statements": [], "terminator": { "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, + "Drop": { + "place": { + "local": 1, "projection": [] }, "target": 2, "unwind": "Continue" } }, - "span": 16 + "span": 43 } }, { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } }, - { - "kind": { + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h35bcf3f6dc6c431bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { "StorageLive": 5 }, - "span": 22 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 }, { "kind": { "Assign": [ { - "local": 5, + "local": 8, "projection": [] }, { - "Ref": [ + "Aggregate": [ { - "kind": "ReErased" + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + [ + { + "Copy": { + "local": 1, + "projection": [] } - ] - } + } + ] ] } ] }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 + "span": 3 }, { "kind": { "Assign": [ { - "local": 6, + "local": 7, "projection": [] }, { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] } - } + ] } ] }, - "span": 23 + "span": 2 }, { "kind": { "Assign": [ { - "local": 0, + "local": 6, "projection": [] }, { "Cast": [ - "IntToInt", { - "Move": { - "local": 6, + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, "projection": [] } }, - 16 + 5 ] } ] }, - "span": 24 + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, + "span": 1 + } + }, + { + "statements": [ { "kind": { "StorageDead": 6 }, - "span": 25 + "span": 5 }, { "kind": { - "StorageDead": 5 + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - "span": 26 + "span": 6 }, { "kind": { - "StorageDead": 2 + "StorageDead": 8 }, - "span": 27 + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } ], "terminator": { "kind": "Return", - "span": 20 + "span": 4 } } ], "locals": [ { - "ty": 16, - "span": 28, + "ty": 6, + "span": 8, "mutability": "Mut" }, { - "ty": 11, - "span": 3, - "mutability": "Mut" + "ty": 7, + "span": 9, + "mutability": "Not" }, { - "ty": 17, - "span": 16, - "mutability": "Mut" + "ty": 6, + "span": 10, + "mutability": "Not" }, { - "ty": 1, - "span": 15, - "mutability": "Mut" + "ty": 8, + "span": 11, + "mutability": "Not" }, { - "ty": 7, - "span": 17, - "mutability": "Mut" + "ty": 9, + "span": 12, + "mutability": "Not" }, { - "ty": 18, - "span": 22, + "ty": 10, + "span": 1, "mutability": "Mut" }, { - "ty": 9, - "span": 23, + "ty": 5, + "span": 2, "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" } ], - "arg_count": 1, + "arg_count": 4, "var_debug_info": [ { "name": "main", @@ -477,24 +639,16 @@ "value": { "Place": { "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + "projection": [] } }, - "argument_index": null + "argument_index": 1 }, { - "name": "self", + "name": "argc", "source_info": { - "span": 29, - "scope": 1 + "span": 10, + "scope": 0 }, "composite": null, "value": { @@ -503,26 +657,56 @@ "projection": [] } }, - "argument_index": 1 + "argument_index": 2 }, { - "name": "self", + "name": "argv", "source_info": { - "span": 30, - "scope": 2 + "span": 11, + "scope": 0 }, "composite": null, "value": { "Place": { - "local": 5, + "local": 3, "projection": [] } }, - "argument_index": 1 + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null } ], "spread_arg": null, - "span": 3 + "span": 13 } ] } @@ -530,95 +714,31 @@ "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9fd74af38a279f31E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "name": ">::call_once", "id": 3, "body": [ { "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } + "Move": { + "local": 1, + "projection": [] } }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], + "args": [], "destination": { "local": 0, "projection": [] }, "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, "unwind": "Continue" } }, @@ -631,39 +751,16 @@ "kind": "Return", "span": 43 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } } ], "locals": [ { - "ty": 16, + "ty": 1, "span": 43, "mutability": "Mut" }, { - "ty": 12, + "ty": 7, "span": 43, "mutability": "Not" }, @@ -671,11 +768,6 @@ "ty": 1, "span": 43, "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" } ], "arg_count": 2, @@ -689,11 +781,11 @@ "details": null }, { - "symbol_name": "_ZN19struct_tuple_fields4main17he368ec089685e92cE", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, + "name": "<() as std::process::Termination>::report", + "id": 5, "body": [ { "blocks": [ @@ -703,41 +795,137 @@ "kind": { "Assign": [ { - "local": 1, + "local": 0, "projection": [] }, { - "Aggregate": [ - { - "Adt": [ - 7, - 0, - [], - null, - null - ] - }, - [ - { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 10, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN14structs_tuples4main17hc13d6b1ad2ba5288E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 10, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, "ty": 16, "id": 10 } @@ -1260,107 +1448,11 @@ "details": null }, { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h29c5f28db416dd9bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hb280b8a231f5f9feE", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0fc835eb50e37b13E", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, "body": [ { "blocks": [ @@ -1371,12 +1463,12 @@ "Call": { "func": { "Constant": { - "span": 31, + "span": 43, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 19, - "id": 3 + "ty": 21, + "id": 6 } } }, @@ -1384,18 +1476,15 @@ { "Move": { "local": 1, - "projection": [] + "projection": [ + "Deref" + ] } }, { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "Move": { + "local": 2, + "projection": [] } } ], @@ -1407,129 +1496,38 @@ "unwind": "Continue" } }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 + "span": 43 } }, { "statements": [], "terminator": { "kind": "Return", - "span": 36 + "span": 43 } } ], "locals": [ { - "ty": 1, - "span": 37, + "ty": 16, + "span": 43, "mutability": "Mut" }, { - "ty": 7, - "span": 38, + "ty": 22, + "span": 43, "mutability": "Not" }, { "ty": 1, - "span": 39, + "span": 43, "mutability": "Not" } ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } ] } @@ -1537,11 +1535,11 @@ "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start17hb9b0e627f12f2913E", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, "body": [ { "blocks": [ @@ -1549,111 +1547,48 @@ "statements": [ { "kind": { - "StorageLive": 5 + "StorageLive": 2 }, - "span": 1 + "span": 16 }, { "kind": { - "StorageLive": 6 + "StorageLive": 3 }, - "span": 2 + "span": 15 }, { "kind": { - "StorageLive": 8 + "StorageLive": 4 }, - "span": 3 + "span": 17 }, { "kind": { "Assign": [ { - "local": 8, + "local": 4, "projection": [] }, { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] + ] } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] + } } ] }, - "span": 2 + "span": 17 } ], "terminator": { @@ -1661,79 +1596,148 @@ "Call": { "func": { "Constant": { - "span": 0, + "span": 14, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 0, - "id": 0 + "ty": 13, + "id": 1 } } }, "args": [ { "Move": { - "local": 6, + "local": 4, "projection": [] } - }, - { - "Move": { - "local": 2, - "projection": [] + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 } - }, + } + }, + "args": [ { "Move": { "local": 3, "projection": [] } - }, - { - "Move": { - "local": 4, - "projection": [] - } } ], "destination": { - "local": 5, + "local": 2, "projection": [] }, - "target": 1, + "target": 2, "unwind": "Continue" } }, - "span": 1 + "span": 16 } }, { "statements": [ { "kind": { - "StorageDead": 6 + "StorageDead": 3 }, - "span": 5 + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 }, { "kind": { "Assign": [ { - "local": 0, + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, { "Use": { "Copy": { - "local": 5, + "local": 2, "projection": [ { - "Downcast": 0 + "Field": [ + 0, + 15 + ] }, { "Field": [ 0, - 6 + 9 ] } ] @@ -1742,221 +1746,123 @@ } ] }, - "span": 6 + "span": 23 }, { "kind": { - "StorageDead": 8 + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] }, - "span": 7 + "span": 24 }, { "kind": { - "StorageDead": 5 + "StorageDead": 6 }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN19struct_tuple_fields3foo17h313cc5516683e5b2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "foo", - "id": 8, - "body": [ - { - "blocks": [ - { - "statements": [], + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], "terminator": { "kind": "Return", - "span": 73 + "span": 20 } } ], "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, { "ty": 1, - "span": 74, + "span": 15, "mutability": "Mut" }, { - "ty": 16, - "span": 75, - "mutability": "Not" + "ty": 7, + "span": 17, + "mutability": "Mut" }, { - "ty": 26, - "span": 76, - "mutability": "Not" + "ty": 18, + "span": 22, + "mutability": "Mut" }, { - "ty": 27, - "span": 77, - "mutability": "Not" + "ty": 9, + "span": 23, + "mutability": "Mut" } ], - "arg_count": 3, + "arg_count": 1, "var_debug_info": [ { - "name": "_i", + "name": "main", "source_info": { - "span": 75, + "span": 9, "scope": 0 }, "composite": null, "value": { "Place": { "local": 1, - "projection": [] + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } }, - "argument_index": 1 + "argument_index": null }, { - "name": "_b", + "name": "self", "source_info": { - "span": 76, - "scope": 0 + "span": 29, + "scope": 1 }, "composite": null, "value": { @@ -1965,26 +1871,26 @@ "projection": [] } }, - "argument_index": 2 + "argument_index": 1 }, { - "name": "_f", + "name": "self", "source_info": { - "span": 77, - "scope": 0 + "span": 30, + "scope": 2 }, "composite": null, "value": { "Place": { - "local": 3, + "local": 5, "projection": [] } }, - "argument_index": 3 + "argument_index": 1 } ], "spread_arg": null, - "span": 78 + "span": 3 } ] } @@ -1992,11 +1898,11 @@ "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ea230cb4a81ac50E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, "body": [ { "blocks": [ @@ -2007,12 +1913,12 @@ "Call": { "func": { "Constant": { - "span": 43, + "span": 31, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 21, - "id": 6 + "ty": 19, + "id": 3 } } }, @@ -2020,15 +1926,18 @@ { "Move": { "local": 1, - "projection": [ - "Deref" - ] + "projection": [] } }, { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } } ], @@ -2040,38 +1949,129 @@ "unwind": "Continue" } }, - "span": 43 + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 } }, { "statements": [], "terminator": { "kind": "Return", - "span": 43 + "span": 36 } } ], "locals": [ { - "ty": 16, - "span": 43, + "ty": 1, + "span": 37, "mutability": "Mut" }, { - "ty": 22, - "span": 43, + "ty": 7, + "span": 38, "mutability": "Not" }, { "ty": 1, - "span": 43, + "span": 39, "mutability": "Not" } ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 } ] } @@ -2081,48 +2081,48 @@ ], "types": [ [ - 6, + 9, { "RigidTy": { - "Int": "Isize" + "Uint": "U8" } } ], [ - 16, + 27, { "RigidTy": { - "Int": "I32" + "Float": "F64" } } ], [ - 9, + 6, { "RigidTy": { - "Uint": "U8" + "Int": "Isize" } } ], [ - 2, + 26, { - "RigidTy": { - "Int": "I8" - } + "RigidTy": "Bool" } ], [ - 26, + 16, { - "RigidTy": "Bool" + "RigidTy": { + "Int": "I32" + } } ], [ - 27, + 2, { "RigidTy": { - "Float": "F64" + "Int": "I8" } } ] diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index 6036e15b7..6fe897803 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -8,7 +8,9 @@ import pytest from pyk.kast.inner import KApply, KSort, KToken +from kmir.__main__ import extract_crate_name from kmir.build import haskell_semantics, llvm_semantics +from kmir.convert_from_definition.__main__ import parse_mir_klist_json from kmir.convert_from_definition.v2parser import Parser if TYPE_CHECKING: @@ -269,11 +271,14 @@ def test_exec_smir( with input_json.open('r') as f: json_data = json.load(f) - parsed = parser.parse_mir_json(json_data, 'Pgm') + parsed = parser.parse_mir_json(json_data, 'Crate') assert parsed is not None - kmir_kast, _ = parsed - result = tools.run_parsed(kmir_kast, depth=depth) + kmir_kast, _ = parse_mir_klist_json([parsed], KSort('Crate')) # Still would need more for multi-crate test + + start_crate = extract_crate_name(input_json).replace('-', '_') + + result = tools.run_parsed(kmir_kast, start_crate=start_crate, depth=depth) with output_kast.open('r') as f: expected = f.read().rstrip()