diff --git a/toolchain/check/call.cpp b/toolchain/check/call.cpp index d1193d51c49f..016a8e815f4a 100644 --- a/toolchain/check/call.cpp +++ b/toolchain/check/call.cpp @@ -9,60 +9,102 @@ #include "toolchain/check/convert.h" #include "toolchain/check/deduce.h" #include "toolchain/check/function.h" +#include "toolchain/sem_ir/entity_with_params_base.h" #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/inst.h" #include "toolchain/sem_ir/typed_insts.h" namespace Carbon::Check { +// Resolves the callee expression in a call to a specific callee, or diagnoses +// if no specific callee can be identified. This verifies the arity of the +// callee and determines any compile-time arguments, but doesn't check that the +// runtime arguments are convertible to the parameter types. +// +// `self_id` and `arg_ids` are the self argument and explicit arguments in the +// call. +// +// Returns a SpecificId for the specific callee, or `nullopt` if an error has +// been diagnosed. +static auto ResolveCalleeInCall(Context& context, SemIR::LocId loc_id, + const SemIR::EntityWithParamsBase& entity, + llvm::StringLiteral entity_kind_for_diagnostic, + SemIR::GenericId entity_generic_id, + SemIR::SpecificId enclosing_specific_id, + SemIR::InstId self_id, + llvm::ArrayRef arg_ids) + -> std::optional { + CalleeParamsInfo callee_info(entity); + + // Check that the arity matches. + auto params = context.inst_blocks().GetOrEmpty(callee_info.param_refs_id); + if (arg_ids.size() != params.size()) { + CARBON_DIAGNOSTIC(CallArgCountMismatch, Error, + "{0} argument(s) passed to {1} expecting " + "{2} argument(s).", + int, llvm::StringLiteral, int); + CARBON_DIAGNOSTIC(InCallToEntity, Note, "Calling {0} declared here.", + llvm::StringLiteral); + context.emitter() + .Build(loc_id, CallArgCountMismatch, arg_ids.size(), + entity_kind_for_diagnostic, params.size()) + .Note(callee_info.callee_loc, InCallToEntity, + entity_kind_for_diagnostic) + .Emit(); + return std::nullopt; + } + + // Perform argument deduction. + auto specific_id = SemIR::SpecificId::Invalid; + if (entity_generic_id.is_valid()) { + specific_id = DeduceGenericCallArguments( + context, loc_id, entity_generic_id, enclosing_specific_id, + callee_info.implicit_param_refs_id, callee_info.param_refs_id, self_id, + arg_ids); + if (!specific_id.is_valid()) { + return std::nullopt; + } + } + return specific_id; +} + // Performs a call where the callee is the name of a generic class, such as // `Vector(i32)`. static auto PerformCallToGenericClass(Context& context, SemIR::LocId loc_id, - SemIR::InstId callee_id, SemIR::ClassId class_id, + SemIR::SpecificId enclosing_specific_id, llvm::ArrayRef arg_ids) -> SemIR::InstId { - CalleeParamsInfo class_info(context.classes().Get(class_id)); - - // TODO: Pass in information about the specific in which the generic class - // name was found. - // TODO: Perform argument deduction. - auto specific_id = SemIR::SpecificId::Invalid; - - // Convert the arguments to match the parameters. - auto converted_args_id = ConvertCallArgs( - context, loc_id, /*self_id=*/SemIR::InstId::Invalid, arg_ids, - /*return_storage_id=*/SemIR::InstId::Invalid, class_info, specific_id); - return context.AddInst(loc_id, - {.type_id = SemIR::TypeId::TypeType, - .callee_id = callee_id, - .args_id = converted_args_id}); + const auto& generic_class = context.classes().Get(class_id); + auto callee_specific_id = ResolveCalleeInCall( + context, loc_id, generic_class, "generic class", generic_class.generic_id, + enclosing_specific_id, /*self_id=*/SemIR::InstId::Invalid, arg_ids); + if (!callee_specific_id) { + return SemIR::InstId::BuiltinError; + } + return context.AddInst( + loc_id, {.type_id = SemIR::TypeId::TypeType, + .class_id = class_id, + .specific_id = *callee_specific_id}); } // Performs a call where the callee is the name of a generic interface, such as // `AddWith(i32)`. -// TODO: Refactor with PerformCallToGenericClass. -static auto PerformCallToGenericInterface(Context& context, SemIR::LocId loc_id, - SemIR::InstId callee_id, - SemIR::InterfaceId interface_id, - llvm::ArrayRef arg_ids) - -> SemIR::InstId { - CalleeParamsInfo interface_info(context.interfaces().Get(interface_id)); - - // TODO: Pass in information about the specific in which the generic interface - // name was found. - // TODO: Perform argument deduction. - auto specific_id = SemIR::SpecificId::Invalid; - - // Convert the arguments to match the parameters. - auto converted_args_id = ConvertCallArgs( - context, loc_id, /*self_id=*/SemIR::InstId::Invalid, arg_ids, - /*return_storage_id=*/SemIR::InstId::Invalid, interface_info, - specific_id); - return context.AddInst(loc_id, - {.type_id = SemIR::TypeId::TypeType, - .callee_id = callee_id, - .args_id = converted_args_id}); +static auto PerformCallToGenericInterface( + Context& context, SemIR::LocId loc_id, SemIR::InterfaceId interface_id, + SemIR::SpecificId enclosing_specific_id, + llvm::ArrayRef arg_ids) -> SemIR::InstId { + const auto& interface = context.interfaces().Get(interface_id); + auto callee_specific_id = ResolveCalleeInCall( + context, loc_id, interface, "generic interface", interface.generic_id, + enclosing_specific_id, /*self_id=*/SemIR::InstId::Invalid, arg_ids); + if (!callee_specific_id) { + return SemIR::InstId::BuiltinError; + } + return context.AddInst( + loc_id, {.type_id = SemIR::TypeId::TypeType, + .interface_id = interface_id, + .specific_id = *callee_specific_id}); } auto PerformCall(Context& context, SemIR::LocId loc_id, SemIR::InstId callee_id, @@ -74,13 +116,14 @@ auto PerformCall(Context& context, SemIR::LocId loc_id, SemIR::InstId callee_id, context.types().GetAsInst(context.insts().Get(callee_id).type_id()); CARBON_KIND_SWITCH(type_inst) { case CARBON_KIND(SemIR::GenericClassType generic_class): { - return PerformCallToGenericClass(context, loc_id, callee_id, - generic_class.class_id, arg_ids); + return PerformCallToGenericClass( + context, loc_id, generic_class.class_id, + generic_class.enclosing_specific_id, arg_ids); } case CARBON_KIND(SemIR::GenericInterfaceType generic_interface): { - return PerformCallToGenericInterface(context, loc_id, callee_id, - generic_interface.interface_id, - arg_ids); + return PerformCallToGenericInterface( + context, loc_id, generic_interface.interface_id, + generic_interface.enclosing_specific_id, arg_ids); } default: { if (!callee_function.is_error) { @@ -98,15 +141,11 @@ auto PerformCall(Context& context, SemIR::LocId loc_id, SemIR::InstId callee_id, // If the callee is a generic function, determine the generic argument values // for the call. - auto specific_id = SemIR::SpecificId::Invalid; - if (callable.generic_id.is_valid()) { - specific_id = DeduceGenericCallArguments( - context, loc_id, callable.generic_id, callee_function.specific_id, - callable.implicit_param_refs_id, callable.param_refs_id, - callee_function.self_id, arg_ids); - if (!specific_id.is_valid()) { - return SemIR::InstId::BuiltinError; - } + auto callee_specific_id = ResolveCalleeInCall( + context, loc_id, callable, "function", callable.generic_id, + callee_function.specific_id, callee_function.self_id, arg_ids); + if (!callee_specific_id) { + return SemIR::InstId::BuiltinError; } // If there is a return slot, build storage for the result. @@ -118,7 +157,8 @@ auto PerformCall(Context& context, SemIR::LocId loc_id, SemIR::InstId callee_id, "Return type declared here."); builder.Note(callable.return_storage_id, IncompleteReturnTypeHere); }); - return CheckFunctionReturnType(context, callee_id, callable, specific_id); + return CheckFunctionReturnType(context, callee_id, callable, + *callee_specific_id); }(); switch (return_info.init_repr.kind) { case SemIR::InitRepr::InPlace: @@ -146,7 +186,7 @@ auto PerformCall(Context& context, SemIR::LocId loc_id, SemIR::InstId callee_id, // Convert the arguments to match the parameters. auto converted_args_id = ConvertCallArgs( context, loc_id, callee_function.self_id, arg_ids, return_storage_id, - CalleeParamsInfo(callable), specific_id); + CalleeParamsInfo(callable), *callee_specific_id); auto call_inst_id = context.AddInst(loc_id, {.type_id = return_info.type_id, .callee_id = callee_id, diff --git a/toolchain/check/context.cpp b/toolchain/check/context.cpp index 0d8e8e191c45..151d476a72ed 100644 --- a/toolchain/check/context.cpp +++ b/toolchain/check/context.cpp @@ -1241,13 +1241,18 @@ auto Context::GetFunctionType(SemIR::FunctionId fn_id, return GetCompleteTypeImpl(*this, fn_id, specific_id); } -auto Context::GetGenericClassType(SemIR::ClassId class_id) -> SemIR::TypeId { - return GetCompleteTypeImpl(*this, class_id); +auto Context::GetGenericClassType(SemIR::ClassId class_id, + SemIR::SpecificId enclosing_specific_id) + -> SemIR::TypeId { + return GetCompleteTypeImpl(*this, class_id, + enclosing_specific_id); } -auto Context::GetGenericInterfaceType(SemIR::InterfaceId interface_id) +auto Context::GetGenericInterfaceType(SemIR::InterfaceId interface_id, + SemIR::SpecificId enclosing_specific_id) -> SemIR::TypeId { - return GetCompleteTypeImpl(*this, interface_id); + return GetCompleteTypeImpl( + *this, interface_id, enclosing_specific_id); } auto Context::GetPointerType(SemIR::TypeId pointee_type_id) -> SemIR::TypeId { diff --git a/toolchain/check/context.h b/toolchain/check/context.h index 557846d796c5..6768e8ae2028 100644 --- a/toolchain/check/context.h +++ b/toolchain/check/context.h @@ -330,12 +330,15 @@ class Context { // Gets a generic class type, which is the type of a name of a generic class, // such as the type of `Vector` given `class Vector(T:! type)`. The returned // type will be complete. - auto GetGenericClassType(SemIR::ClassId class_id) -> SemIR::TypeId; + auto GetGenericClassType(SemIR::ClassId class_id, + SemIR::SpecificId enclosing_specific_id) + -> SemIR::TypeId; // Gets a generic interface type, which is the type of a name of a generic // interface, such as the type of `AddWith` given // `interface AddWith(T:! type)`. The returned type will be complete. - auto GetGenericInterfaceType(SemIR::InterfaceId interface_id) + auto GetGenericInterfaceType(SemIR::InterfaceId interface_id, + SemIR::SpecificId enclosing_specific_id) -> SemIR::TypeId; // Returns a pointer type whose pointee type is `pointee_type_id`. diff --git a/toolchain/check/convert.cpp b/toolchain/check/convert.cpp index 37e7f85277f9..d5908d273ca6 100644 --- a/toolchain/check/convert.cpp +++ b/toolchain/check/convert.cpp @@ -1188,19 +1188,8 @@ auto ConvertCallArgs(Context& context, SemIR::LocId call_loc_id, context.inst_blocks().GetOrEmpty(callee.implicit_param_refs_id); auto param_refs = context.inst_blocks().GetOrEmpty(callee.param_refs_id); - // If sizes mismatch, fail early. - if (arg_refs.size() != param_refs.size()) { - CARBON_DIAGNOSTIC(CallArgCountMismatch, Error, - "{0} argument(s) passed to function expecting " - "{1} argument(s).", - int, int); - context.emitter() - .Build(call_loc_id, CallArgCountMismatch, arg_refs.size(), - param_refs.size()) - .Note(callee.callee_loc, InCallToFunction) - .Emit(); - return SemIR::InstBlockId::Invalid; - } + // The caller should have ensured this callee has the right arity. + CARBON_CHECK(arg_refs.size() == param_refs.size()); // Start building a block to hold the converted arguments. llvm::SmallVector args; @@ -1222,9 +1211,8 @@ auto ConvertCallArgs(Context& context, SemIR::LocId call_loc_id, } args.push_back(converted_self_id); } else { - // TODO: Form argument values for implicit parameters. - context.TODO(call_loc_id, "Call with implicit parameters"); - return SemIR::InstBlockId::Invalid; + CARBON_CHECK(!param.runtime_index.is_valid(), + "Unexpected implicit parameter passed at runtime"); } } @@ -1239,9 +1227,18 @@ auto ConvertCallArgs(Context& context, SemIR::LocId call_loc_id, }); // Check type conversions per-element. - for (auto [i, arg_id, param_id] : llvm::enumerate(arg_refs, param_refs)) { + for (auto [i, arg_id, param_ref_id] : llvm::enumerate(arg_refs, param_refs)) { diag_param_index = i; + // TODO: In general we need to perform pattern matching here to find the + // argument corresponding to each parameter. + auto [param_id, param] = + SemIR::Function::GetParamFromParamRefId(context.sem_ir(), param_ref_id); + if (!param.runtime_index.is_valid()) { + // Not a runtime parameter: we don't pass an argument. + continue; + } + auto param_type_id = SemIR::GetTypeInSpecific(context.sem_ir(), callee_specific_id, context.insts().Get(param_id).type_id()); @@ -1253,6 +1250,8 @@ auto ConvertCallArgs(Context& context, SemIR::LocId call_loc_id, return SemIR::InstBlockId::Invalid; } + CARBON_CHECK(static_cast(args.size()) == param.runtime_index.index, + "Parameters not numbered in order."); args.push_back(converted_arg_id); } @@ -1261,7 +1260,7 @@ auto ConvertCallArgs(Context& context, SemIR::LocId call_loc_id, args.push_back(return_storage_id); } - return context.inst_blocks().Add(args); + return context.inst_blocks().AddOrEmpty(args); } auto ExprAsType(Context& context, SemIR::LocId loc_id, SemIR::InstId value_id) diff --git a/toolchain/check/convert.h b/toolchain/check/convert.h index bd2e61d3bfdb..142002bf7269 100644 --- a/toolchain/check/convert.h +++ b/toolchain/check/convert.h @@ -110,7 +110,7 @@ struct CalleeParamsInfo { // Implicitly converts a set of arguments to match the parameter types in a // function call. Returns a block containing the converted implicit and explicit -// argument values. +// argument values for runtime parameters. auto ConvertCallArgs(Context& context, SemIR::LocId call_loc_id, SemIR::InstId self_id, llvm::ArrayRef arg_refs, diff --git a/toolchain/check/deduce.cpp b/toolchain/check/deduce.cpp index 44ac3c8c1f52..34223629235c 100644 --- a/toolchain/check/deduce.cpp +++ b/toolchain/check/deduce.cpp @@ -6,8 +6,10 @@ #include "toolchain/base/kind_switch.h" #include "toolchain/check/context.h" +#include "toolchain/check/convert.h" #include "toolchain/check/generic.h" #include "toolchain/check/subst.h" +#include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/typed_insts.h" namespace Carbon::Check { @@ -131,6 +133,25 @@ auto DeduceGenericCallArguments( context.types().GetInstId(param_type_id), context.types().GetInstId(context.insts().Get(arg_id).type_id()), needs_substitution); + } else { + // The argument needs to have the same type as the parameter. + DiagnosticAnnotationScope annotate_diagnostics( + &context.emitter(), [&](auto& builder) { + if (auto param = context.insts().TryGetAs( + param_id)) { + CARBON_DIAGNOSTIC( + InitializingGenericParam, Note, + "Initializing generic parameter `{0}` declared here.", + SemIR::NameId); + builder.Note( + param_id, InitializingGenericParam, + context.entity_names().Get(param->entity_name_id).name_id); + } + }); + arg_id = ConvertToValueOfType(context, loc_id, arg_id, param_type_id); + if (arg_id == SemIR::InstId::BuiltinError) { + return SemIR::SpecificId::Invalid; + } } // If the parameter is a symbolic constant, deduce against it. diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index 6b1d6e41be54..7f0d946762c4 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -1104,41 +1104,7 @@ static auto MakeConstantForCall(EvalContext& eval_context, SemIRLoc loc, eval_context.inst_blocks().Get(call.args_id), phase); } - // Look at the type of the callee for special cases: calls to generic class - // and generic interface types. - auto type_inst = eval_context.GetConstantValueAsInst( - eval_context.insts().Get(call.callee_id).type_id()); - CARBON_KIND_SWITCH(type_inst) { - case CARBON_KIND(SemIR::GenericClassType generic_class): { - auto specific_id = MakeSpecificIfGeneric( - eval_context.context(), - eval_context.classes().Get(generic_class.class_id).generic_id, - call.args_id); - return MakeConstantResult( - eval_context.context(), - SemIR::ClassType{.type_id = call.type_id, - .class_id = generic_class.class_id, - .specific_id = specific_id}, - phase); - } - case CARBON_KIND(SemIR::GenericInterfaceType generic_interface): { - auto specific_id = - MakeSpecificIfGeneric(eval_context.context(), - eval_context.interfaces() - .Get(generic_interface.interface_id) - .generic_id, - call.args_id); - return MakeConstantResult( - eval_context.context(), - SemIR::InterfaceType{.type_id = call.type_id, - .interface_id = generic_interface.interface_id, - .specific_id = specific_id}, - phase); - } - default: { - return SemIR::ConstantId::NotConstant; - } - } + return SemIR::ConstantId::NotConstant; } auto TryEvalInstInContext(EvalContext& eval_context, SemIR::InstId inst_id, @@ -1206,6 +1172,13 @@ auto TryEvalInstInContext(EvalContext& eval_context, SemIR::InstId inst_id, case SemIR::FunctionType::Kind: return RebuildIfFieldsAreConstant(eval_context, inst, &SemIR::FunctionType::specific_id); + case SemIR::GenericClassType::Kind: + return RebuildIfFieldsAreConstant( + eval_context, inst, &SemIR::GenericClassType::enclosing_specific_id); + case SemIR::GenericInterfaceType::Kind: + return RebuildIfFieldsAreConstant( + eval_context, inst, + &SemIR::GenericInterfaceType::enclosing_specific_id); case SemIR::InterfaceType::Kind: return RebuildIfFieldsAreConstant(eval_context, inst, &SemIR::InterfaceType::specific_id); @@ -1270,8 +1243,6 @@ auto TryEvalInstInContext(EvalContext& eval_context, SemIR::InstId inst_id, return RebuildInitAsValue(eval_context, inst, SemIR::TupleValue::Kind); case SemIR::BuiltinInst::Kind: - case SemIR::GenericClassType::Kind: - case SemIR::GenericInterfaceType::Kind: // Builtins are always template constants. return MakeConstantResult(eval_context.context(), inst, Phase::Template); diff --git a/toolchain/check/generic.cpp b/toolchain/check/generic.cpp index 5ef082aa7c4a..b64b4234342d 100644 --- a/toolchain/check/generic.cpp +++ b/toolchain/check/generic.cpp @@ -435,7 +435,9 @@ auto RequireGenericParams(Context& context, SemIR::InstBlockId block_id) // reflected in SemIR output. inst_id = context.AddInstInNoBlock( context.insts().GetLocId(inst_id), - {.type_id = SemIR::TypeId::Error, .name_id = SemIR::NameId::Base}); + {.type_id = SemIR::TypeId::Error, + .name_id = SemIR::NameId::Base, + .runtime_index = SemIR::RuntimeParamIndex::Invalid}); } } } diff --git a/toolchain/check/handle_binding_pattern.cpp b/toolchain/check/handle_binding_pattern.cpp index d69395a0d73e..ea9cadc46613 100644 --- a/toolchain/check/handle_binding_pattern.cpp +++ b/toolchain/check/handle_binding_pattern.cpp @@ -157,7 +157,9 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id, // TODO: A tuple pattern can appear in other places than function // parameters. auto param_id = context.AddInst( - name_node, {.type_id = cast_type_id, .name_id = name_id}); + name_node, {.type_id = cast_type_id, + .name_id = name_id, + .runtime_index = SemIR::RuntimeParamIndex::Invalid}); auto bind_id = context.AddInst(make_bind_name(cast_type_id, param_id)); push_bind_name(bind_id); // TODO: Bindings should come into scope immediately in other contexts diff --git a/toolchain/check/handle_class.cpp b/toolchain/check/handle_class.cpp index c532817d277b..32f4fbb4ac45 100644 --- a/toolchain/check/handle_class.cpp +++ b/toolchain/check/handle_class.cpp @@ -239,7 +239,8 @@ static auto BuildClassDecl(Context& context, Parse::AnyClassDeclId node_id, class_info.generic_id = FinishGenericDecl(context, class_decl_id); class_decl.class_id = context.classes().Add(class_info); if (class_info.has_parameters()) { - class_decl.type_id = context.GetGenericClassType(class_decl.class_id); + class_decl.type_id = context.GetGenericClassType( + class_decl.class_id, context.scope_stack().PeekSpecificId()); } } else { FinishGenericRedecl(context, class_decl_id, class_info.generic_id); diff --git a/toolchain/check/handle_function.cpp b/toolchain/check/handle_function.cpp index 593f18efcb99..d97871eaae87 100644 --- a/toolchain/check/handle_function.cpp +++ b/toolchain/check/handle_function.cpp @@ -65,6 +65,51 @@ static auto DiagnoseModifiers(Context& context, DeclIntroducerState& introducer, RequireDefaultFinalOnlyInInterfaces(context, introducer, parent_scope_inst); } +// Checks that the parameter lists specified in a function declaration are +// valid for a function declaration, and numbers the parameters. +static auto CheckFunctionSignature(Context& context, + const NameComponent& name_and_params) + -> void { + SemIR::RuntimeParamIndex next_index(0); + for (auto param_id : llvm::concat( + context.inst_blocks().GetOrEmpty(name_and_params.implicit_params_id), + context.inst_blocks().GetOrEmpty(name_and_params.params_id))) { + auto param = context.insts().Get(param_id); + + // Find the parameter in the pattern. + // TODO: This duplicates work done by Function::GetParamFromParamRefId. + if (auto addr_pattern = param.TryAs()) { + param_id = addr_pattern->inner_id; + param = context.insts().Get(param_id); + } + + auto bind_name = param.TryAs(); + if (bind_name) { + param_id = bind_name->value_id; + param = context.insts().Get(param_id); + } + + auto param_inst = param.TryAs(); + if (!param_inst) { + // Once we support more generalized patterns we will need to diagnose + // parameters with unsupported patterns. + context.TODO(param_id, "unexpected syntax for parameter"); + // TODO: Also repair the param ID so downstream code doesn't need to deal + // with this. + continue; + } + + // If this is a runtime parameter, number it. + if (bind_name && bind_name->kind == SemIR::BindName::Kind) { + param_inst->runtime_index = next_index; + context.ReplaceInstBeforeConstantUse(param_id, *param_inst); + ++next_index.index; + } + } + + // TODO: Also assign a parameter index to the return storage, if present. +} + // Tries to merge new_function into prev_function_id. Since new_function won't // have a definition even if one is upcoming, set is_definition to indicate the // planned result. @@ -182,6 +227,10 @@ static auto BuildFunctionDecl(Context& context, context.TODO(node_id, "function with positional parameters"); name.params_id = SemIR::InstBlockId::Empty; } + + // Check that the function signature is valid and number the parameters. + CheckFunctionSignature(context, name); + auto name_context = context.decl_name_stack().FinishName(name); context.node_stack() .PopAndDiscardSoloNodeId(); @@ -315,26 +364,20 @@ static auto HandleFunctionDefinitionAfterSignature( SemIR::SpecificId::Invalid); // Check the parameter types are complete. - for (auto param_id : llvm::concat( + for (auto param_ref_id : llvm::concat( context.inst_blocks().GetOrEmpty(function.implicit_param_refs_id), context.inst_blocks().GetOrEmpty(function.param_refs_id))) { - auto param = context.insts().Get(param_id); - - // Find the parameter in the pattern. - // TODO: More general pattern handling? - if (auto addr_pattern = param.TryAs()) { - param_id = addr_pattern->inner_id; - param = context.insts().Get(param_id); - } + auto [param_id, param] = + SemIR::Function::GetParamFromParamRefId(context.sem_ir(), param_ref_id); // The parameter types need to be complete. - context.TryToCompleteType(param.type_id(), [&] { + context.TryToCompleteType(param.type_id, [&] { CARBON_DIAGNOSTIC( IncompleteTypeInFunctionParam, Error, "Parameter has incomplete type `{0}` in function definition.", SemIR::TypeId); return context.emitter().Build(param_id, IncompleteTypeInFunctionParam, - param.type_id()); + param.type_id); }); } diff --git a/toolchain/check/handle_interface.cpp b/toolchain/check/handle_interface.cpp index ce338e9d36fd..21c8a68ddbdf 100644 --- a/toolchain/check/handle_interface.cpp +++ b/toolchain/check/handle_interface.cpp @@ -109,8 +109,8 @@ static auto BuildInterfaceDecl(Context& context, interface_info.generic_id = FinishGenericDecl(context, interface_decl_id); interface_decl.interface_id = context.interfaces().Add(interface_info); if (interface_info.has_parameters()) { - interface_decl.type_id = - context.GetGenericInterfaceType(interface_decl.interface_id); + interface_decl.type_id = context.GetGenericInterfaceType( + interface_decl.interface_id, context.scope_stack().PeekSpecificId()); } } else { FinishGenericRedecl( diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index 8f83579a25e0..aa0d334f58ad 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -706,7 +706,10 @@ class ImportRefResolver { context_.GetTypeIdForTypeConstant(param_data.type_const_id); auto new_param_id = context_.AddInstInNoBlock( - AddImportIRInst(param_id), {.type_id = type_id, .name_id = name_id}); + AddImportIRInst(param_id), + {.type_id = type_id, + .name_id = name_id, + .runtime_index = param_inst.runtime_index}); if (bind_inst) { switch (bind_inst->kind) { case SemIR::BindName::Kind: { @@ -1195,7 +1198,8 @@ class ImportRefResolver { // Makes an incomplete class. This is necessary even with classes with a // complete declaration, because things such as `Self` may refer back to the // type. - auto MakeIncompleteClass(const SemIR::Class& import_class) + auto MakeIncompleteClass(const SemIR::Class& import_class, + SemIR::SpecificId enclosing_specific_id) -> std::pair { SemIR::ClassDecl class_decl = {.type_id = SemIR::TypeId::TypeType, .class_id = SemIR::ClassId::Invalid, @@ -1211,7 +1215,8 @@ class ImportRefResolver { .inheritance_kind = import_class.inheritance_kind}}); if (import_class.has_parameters()) { - class_decl.type_id = context_.GetGenericClassType(class_decl.class_id); + class_decl.type_id = context_.GetGenericClassType(class_decl.class_id, + enclosing_specific_id); } // Write the class ID into the ClassDecl. @@ -1266,14 +1271,25 @@ class ImportRefResolver { SemIR::ClassId class_id = SemIR::ClassId::Invalid; if (!class_const_id.is_valid()) { + auto import_specific_id = SemIR::SpecificId::Invalid; + if (auto import_generic_class_type = + import_ir_.types().TryGetAs( + inst.type_id)) { + import_specific_id = import_generic_class_type->enclosing_specific_id; + } + auto specific_data = GetLocalSpecificData(import_specific_id); if (HasNewWork()) { - // This is the end of the first phase. Don't make a new class yet if we - // already have new work. + // This is the end of the first phase. Don't make a new class yet if + // we already have new work. return Retry(); } + // On the second phase, create a forward declaration of the class for any // recursive references. - std::tie(class_id, class_const_id) = MakeIncompleteClass(import_class); + auto enclosing_specific_id = + GetOrAddLocalSpecific(import_specific_id, specific_data); + std::tie(class_id, class_const_id) = + MakeIncompleteClass(import_class, enclosing_specific_id); } else { // On the third phase, compute the class ID from the constant // value of the declaration. @@ -1428,10 +1444,9 @@ class ImportRefResolver { return Retry(); } + // On the second phase, create a forward declaration of the interface. auto specific_id = GetOrAddLocalSpecific(import_specific_id, specific_data); - - // On the second phase, create a forward declaration of the interface. std::tie(function_id, function_const_id) = MakeFunctionDecl(import_function, specific_id); } else { @@ -1555,7 +1570,8 @@ class ImportRefResolver { // Make a declaration of an interface. This is done as a separate step from // importing the interface definition in order to resolve cycles. - auto MakeInterfaceDecl(const SemIR::Interface& import_interface) + auto MakeInterfaceDecl(const SemIR::Interface& import_interface, + SemIR::SpecificId enclosing_specific_id) -> std::pair { SemIR::InterfaceDecl interface_decl = { .type_id = SemIR::TypeId::TypeType, @@ -1572,8 +1588,8 @@ class ImportRefResolver { {}}); if (import_interface.has_parameters()) { - interface_decl.type_id = - context_.GetGenericInterfaceType(interface_decl.interface_id); + interface_decl.type_id = context_.GetGenericInterfaceType( + interface_decl.interface_id, enclosing_specific_id); } // Write the interface ID into the InterfaceDecl. @@ -1614,14 +1630,25 @@ class ImportRefResolver { SemIR::InterfaceId interface_id = SemIR::InterfaceId::Invalid; if (!interface_const_id.is_valid()) { + auto import_specific_id = SemIR::SpecificId::Invalid; + if (auto import_generic_interface_type = + import_ir_.types().TryGetAs( + inst.type_id)) { + import_specific_id = + import_generic_interface_type->enclosing_specific_id; + } + auto specific_data = GetLocalSpecificData(import_specific_id); if (HasNewWork()) { // This is the end of the first phase. Don't make a new interface yet if // we already have new work. return Retry(); } + // On the second phase, create a forward declaration of the interface. + auto enclosing_specific_id = + GetOrAddLocalSpecific(import_specific_id, specific_data); std::tie(interface_id, interface_const_id) = - MakeInterfaceDecl(import_interface); + MakeInterfaceDecl(import_interface, enclosing_specific_id); } else { // On the third phase, compute the interface ID from the constant value of // the declaration. diff --git a/toolchain/check/testdata/alias/no_prelude/fail_params.carbon b/toolchain/check/testdata/alias/no_prelude/fail_params.carbon index e7a647d7b7cc..bb8639e5a371 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_params.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_params.carbon @@ -28,7 +28,7 @@ alias A(T:! type) = T*; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .A = %A // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc18_9.1: type = param T +// CHECK:STDOUT: %T.loc18_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc18_9.2: type = bind_symbolic_name T 0, %T.loc18_9.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc18_9.2 [symbolic = constants.%T] // CHECK:STDOUT: %.loc18: type = ptr_type %T [symbolic = constants.%.1] diff --git a/toolchain/check/testdata/array/canonicalize_index.carbon b/toolchain/check/testdata/array/canonicalize_index.carbon index 835c29d58057..04f1b92f89c5 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -58,12 +58,12 @@ let b: [i32; 3]* = &a; // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] -// CHECK:STDOUT: %b.loc11_16.1: i32 = param b +// CHECK:STDOUT: %b.loc11_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: %int.make_type_32.loc11_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_32.loc11_27 [template = i32] diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index 5ecb85ca8369..0713970c02de 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -53,7 +53,7 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11_14, %.loc11_14.1 [template = i32] -// CHECK:STDOUT: %n.loc11_11.1: i32 = param n +// CHECK:STDOUT: %n.loc11_11.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @Negate.%n: i32 = bind_name n, %n.loc11_11.1 // CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_32.loc11_22 [template = i32] diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index b934a692f6a2..cda82f13c9c3 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -90,7 +90,7 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: %.loc30_9.1: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_9.2: init type = call constants.%ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %.loc30_9.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] // CHECK:STDOUT: %.loc30_9.3: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc30_9.3 [template = constants.%.8] // CHECK:STDOUT: %.loc30_9.4: type = converted %.loc30_9.1, [template = ] diff --git a/toolchain/check/testdata/array/fail_invalid_type.carbon b/toolchain/check/testdata/array/fail_invalid_type.carbon index 9300f4c299d1..1c4a9aa520b0 100644 --- a/toolchain/check/testdata/array/fail_invalid_type.carbon +++ b/toolchain/check/testdata/array/fail_invalid_type.carbon @@ -67,7 +67,7 @@ var a: [1; 1]; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc17_9.1: i32 = int_literal 1 [template = constants.%.1] // CHECK:STDOUT: %.loc17_12: i32 = int_literal 1 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_9.2: init type = call constants.%ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %.loc17_9.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] // CHECK:STDOUT: %.loc17_9.3: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc17_9.3 [template = constants.%.8] // CHECK:STDOUT: %.loc17_9.4: type = converted %.loc17_9.1, [template = ] diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 4532c1e6b6c9..47ea8bff664f 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -197,7 +197,7 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.loc18_39.2: i32 = int_literal 0 [template = constants.%.10] // CHECK:STDOUT: %.loc18_39.3: ref i32 = array_index file.%a.var, %.loc18_39.2 // CHECK:STDOUT: %.loc18_39.4: init i32 = initialize_from %.loc18_20 to %.loc18_39.3 [template = constants.%.5] -// CHECK:STDOUT: %.loc18_39.5: init type = call constants.%ImplicitAs(i32) [template = constants.%.14] +// CHECK:STDOUT: %.loc18_39.5: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.14] // CHECK:STDOUT: %.loc18_39.6: %.15 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.16] // CHECK:STDOUT: %Convert.ref.loc18: %.15 = name_ref Convert, %.loc18_39.6 [template = constants.%.16] // CHECK:STDOUT: %.loc18_39.7: i32 = converted %.loc18_23, [template = ] @@ -209,7 +209,7 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.loc28_19.4: ref i32 = array_index file.%b.var, %.loc28_19.3 // CHECK:STDOUT: %.loc28_19.5: init i32 = initialize_from %.loc28_19.2 to %.loc28_19.4 // CHECK:STDOUT: %.loc28_19.6: ref String = tuple_access %t1.ref, element1 -// CHECK:STDOUT: %.loc28_19.7: init type = call constants.%ImplicitAs(i32) [template = constants.%.14] +// CHECK:STDOUT: %.loc28_19.7: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.14] // CHECK:STDOUT: %.loc28_19.8: %.15 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.16] // CHECK:STDOUT: %Convert.ref.loc28: %.15 = name_ref Convert, %.loc28_19.8 [template = constants.%.16] // CHECK:STDOUT: %.loc28_19.9: i32 = converted %.loc28_19.6, [template = ] diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index 46dfdfcc0ff9..ad673e9107ca 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -64,12 +64,12 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11_12, %.loc11_12.1 [template = i32] // CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [template = constants.%.3] -// CHECK:STDOUT: %arr.loc11_6.1: %.3 = param arr +// CHECK:STDOUT: %arr.loc11_6.1: %.3 = param arr, runtime_param0 // CHECK:STDOUT: @F.%arr: %.3 = bind_name arr, %arr.loc11_6.1 // CHECK:STDOUT: %int.make_type_32.loc11_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_32.loc11_24 [template = i32] // CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_32.loc11_24, %.loc11_24.1 [template = i32] -// CHECK:STDOUT: %i.loc11_21.1: i32 = param i +// CHECK:STDOUT: %i.loc11_21.1: i32 = param i, runtime_param1 // CHECK:STDOUT: @F.%i: i32 = bind_name i, %i.loc11_21.1 // CHECK:STDOUT: %int.make_type_32.loc11_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_32.1: type = value_of_initializer %int.make_type_32.loc11_32 [template = i32] diff --git a/toolchain/check/testdata/array/generic_empty.carbon b/toolchain/check/testdata/array/generic_empty.carbon index e79110a22e87..6e860c4a7a39 100644 --- a/toolchain/check/testdata/array/generic_empty.carbon +++ b/toolchain/check/testdata/array/generic_empty.carbon @@ -46,7 +46,7 @@ fn G(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %T.loc11_6.1: type = param T +// CHECK:STDOUT: %T.loc11_6.1: type = param T, runtime_param // CHECK:STDOUT: @G.%T.loc11: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = @G.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index 28ae5e21216e..2c6a56872681 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -639,7 +639,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc21_18: i32 = int_literal 1 [template = constants.%.5] // CHECK:STDOUT: %.loc21_19.1: %.3 = struct_literal (%.loc21_18) // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc21_21.1: init type = call constants.%As(constants.%B) [template = constants.%.9] +// CHECK:STDOUT: %.loc21_21.1: type = interface_type @As, @As(constants.%B) [template = constants.%.9] // CHECK:STDOUT: %.loc21_21.2: %.10 = specific_constant imports.%import_ref.4, @As(constants.%B) [template = constants.%.11] // CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc21_21.2 [template = constants.%.11] // CHECK:STDOUT: %struct: %.3 = struct_value (%.loc21_18) [template = constants.%struct] diff --git a/toolchain/check/testdata/as/fail_no_conversion.carbon b/toolchain/check/testdata/as/fail_no_conversion.carbon index 6b7b0e0ef79d..73a17a6abf98 100644 --- a/toolchain/check/testdata/as/fail_no_conversion.carbon +++ b/toolchain/check/testdata/as/fail_no_conversion.carbon @@ -122,7 +122,7 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: %.loc17_35.4: type = value_of_initializer %int.make_type_32.loc17_32 [template = i32] // CHECK:STDOUT: %.loc17_35.5: type = converted %int.make_type_32.loc17_32, %.loc17_35.4 [template = i32] // CHECK:STDOUT: %.loc17_35.6: type = converted %.loc17_35.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_23.1: init type = call constants.%As(constants.%.3) [template = constants.%.9] +// CHECK:STDOUT: %.loc17_23.1: type = interface_type @As, @As(constants.%.3) [template = constants.%.9] // CHECK:STDOUT: %.loc17_23.2: %.10 = specific_constant imports.%import_ref.4, @As(constants.%.3) [template = constants.%.11] // CHECK:STDOUT: %Convert.ref: %.10 = name_ref Convert, %.loc17_23.2 [template = constants.%.11] // CHECK:STDOUT: %.loc17_23.3: %.3 = converted %.loc17_21, [template = ] diff --git a/toolchain/check/testdata/as/fail_not_type.carbon b/toolchain/check/testdata/as/fail_not_type.carbon index cb71c07c47db..12510f08baeb 100644 --- a/toolchain/check/testdata/as/fail_not_type.carbon +++ b/toolchain/check/testdata/as/fail_not_type.carbon @@ -108,7 +108,7 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc17_14: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc17_19.1: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_19.2: init type = call constants.%ImplicitAs(type) [template = constants.%.7] +// CHECK:STDOUT: %.loc17_19.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.7] // CHECK:STDOUT: %.loc17_19.3: %.8 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc17_19.3 [template = constants.%.9] // CHECK:STDOUT: %.loc17_19.4: type = converted %.loc17_19.1, [template = ] diff --git a/toolchain/check/testdata/as/identity.carbon b/toolchain/check/testdata/as/identity.carbon index 30eb047faabe..a05b981a7695 100644 --- a/toolchain/check/testdata/as/identity.carbon +++ b/toolchain/check/testdata/as/identity.carbon @@ -72,13 +72,13 @@ fn Initializing() { // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} // CHECK:STDOUT: %Value.decl: %Value.type = fn_decl @Value [template = constants.%Value] { // CHECK:STDOUT: %X.ref.loc17: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %n.loc17_10.1: %X = param n +// CHECK:STDOUT: %n.loc17_10.1: %X = param n, runtime_param0 // CHECK:STDOUT: @Value.%n: %X = bind_name n, %n.loc17_10.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Reference.decl: %Reference.type = fn_decl @Reference [template = constants.%Reference] { // CHECK:STDOUT: %X.ref.loc21: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %.loc21: type = ptr_type %X [template = constants.%.4] -// CHECK:STDOUT: %p.loc21_14.1: %.4 = param p +// CHECK:STDOUT: %p.loc21_14.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @Reference.%p: %.4 = bind_name p, %p.loc21_14.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index 858640fd1093..8b45fd24c873 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -93,8 +93,6 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %.loc15_22.1: type = value_of_initializer %.loc15_20 [template = constants.%.7] -// CHECK:STDOUT: %.loc15_22.2: type = converted %.loc15_20, %.loc15_22.1 [template = constants.%.7] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] @@ -102,10 +100,8 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Core.ref.loc15: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %As.ref.loc15: %As.type = name_ref As, imports.%import_ref.2 [template = constants.%As] // CHECK:STDOUT: %X.ref.loc15: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc15_20: init type = call %As.ref.loc15(%X.ref.loc15) [template = constants.%.7] +// CHECK:STDOUT: %.loc15_20: type = interface_type @As, @As(constants.%X) [template = constants.%.7] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_22.1: type = value_of_initializer %.loc19_18.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc19_22.2: type = converted %.loc19_18.3, %.loc19_22.1 [template = constants.%.12] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %X.ref.loc19: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %Core.ref.loc19: = name_ref Core, imports.%Core [template = imports.%Core] @@ -113,7 +109,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_18.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_18.2: type = converted %int.make_type_32.loc19, %.loc19_18.1 [template = i32] -// CHECK:STDOUT: %.loc19_18.3: init type = call %As.ref.loc19(%.loc19_18.2) [template = constants.%.12] +// CHECK:STDOUT: %.loc19_18.3: type = interface_type @As, @As(i32) [template = constants.%.12] // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_32.loc23 [template = i32] @@ -144,7 +140,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_20.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_20.2: type = converted %int.make_type_32, %.loc16_20.1 [template = i32] -// CHECK:STDOUT: %self.loc16_14.1: i32 = param self +// CHECK:STDOUT: %self.loc16_14.1: i32 = param self, runtime_param0 // CHECK:STDOUT: %self.loc16_14.2: i32 = bind_name self, %self.loc16_14.1 // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %return.var: ref %X = var @@ -159,7 +155,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: impl @impl.2: %X as %.12 { // CHECK:STDOUT: %Convert.decl: %Convert.type.4 = fn_decl @Convert.3 [template = constants.%Convert.4] { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %self.loc20_14.1: %X = param self +// CHECK:STDOUT: %self.loc20_14.1: %X = param self, runtime_param0 // CHECK:STDOUT: %self.loc20_14.2: %X = bind_name self, %self.loc20_14.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_28.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -221,7 +217,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %.loc23_21.1: type = value_of_initializer %int.make_type_32.loc23_21 [template = i32] // CHECK:STDOUT: %.loc23_21.2: type = converted %int.make_type_32.loc23_21, %.loc23_21.1 [template = i32] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc23_26.1: init type = call constants.%As(constants.%X) [template = constants.%.7] +// CHECK:STDOUT: %.loc23_26.1: type = interface_type @As, @As(constants.%X) [template = constants.%.7] // CHECK:STDOUT: %.loc23_26.2: %.8 = specific_constant imports.%import_ref.4, @As(constants.%X) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref.loc23_26: %.8 = name_ref Convert, %.loc23_26.2 [template = constants.%.9] // CHECK:STDOUT: %.loc23_26.3: %Convert.type.3 = interface_witness_access @impl.1.%.loc15, element0 [template = constants.%Convert.2] @@ -232,7 +228,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %int.make_type_32.loc23_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_32.loc23_35 [template = i32] // CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_32.loc23_35, %.loc23_35.1 [template = i32] -// CHECK:STDOUT: %.loc23_32.1: init type = call constants.%As(i32) [template = constants.%.12] +// CHECK:STDOUT: %.loc23_32.1: type = interface_type @As, @As(i32) [template = constants.%.12] // CHECK:STDOUT: %.loc23_32.2: %.13 = specific_constant imports.%import_ref.4, @As(i32) [template = constants.%.14] // CHECK:STDOUT: %Convert.ref.loc23_32: %.13 = name_ref Convert, %.loc23_32.2 [template = constants.%.14] // CHECK:STDOUT: %.loc23_26.7: ref %X = temporary %.loc23_26.5, %.loc23_26.6 diff --git a/toolchain/check/testdata/basics/fail_bad_run_2.carbon b/toolchain/check/testdata/basics/fail_bad_run_2.carbon index 01d64adf134c..5aae129a323f 100644 --- a/toolchain/check/testdata/basics/fail_bad_run_2.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run_2.carbon @@ -48,7 +48,7 @@ fn Run(n: i32) {} // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32, %.loc14_11.1 [template = i32] -// CHECK:STDOUT: %n.loc14_8.1: i32 = param n +// CHECK:STDOUT: %n.loc14_8.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @Run.%n: i32 = bind_name n, %n.loc14_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon index 19b48f6980b6..d6e04bd51244 100644 --- a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon +++ b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon @@ -99,7 +99,7 @@ var x: type = 42; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc17_15: i32 = int_literal 42 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_17.1: init type = call constants.%ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %.loc17_17.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] // CHECK:STDOUT: %.loc17_17.2: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc17_17.2 [template = constants.%.8] // CHECK:STDOUT: %.loc17_17.3: type = converted %.loc17_15, [template = ] diff --git a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon index 252df75a92d1..b845beb04a55 100644 --- a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon @@ -138,7 +138,7 @@ fn B() { // CHECK:STDOUT: 'inst+10': {kind: FunctionType, arg0: function1, arg1: specific, type: typeTypeType} // CHECK:STDOUT: 'inst+11': {kind: StructValue, arg0: empty, type: type(inst+10)} // CHECK:STDOUT: 'inst+12': {kind: NameRef, arg0: name1, arg1: inst+8, type: type(inst+10)} -// CHECK:STDOUT: 'inst+13': {kind: Call, arg0: inst+12, arg1: block5, type: type(inst+5)} +// CHECK:STDOUT: 'inst+13': {kind: Call, arg0: inst+12, arg1: empty, type: type(inst+5)} // CHECK:STDOUT: 'inst+14': {kind: Return} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: 'inst+0': templateConstant(inst+0) @@ -167,8 +167,7 @@ fn B() { // CHECK:STDOUT: 1: inst+12 // CHECK:STDOUT: 2: inst+13 // CHECK:STDOUT: 3: inst+14 -// CHECK:STDOUT: block5: {} -// CHECK:STDOUT: block6: +// CHECK:STDOUT: block5: // CHECK:STDOUT: 0: inst+0 // CHECK:STDOUT: 1: inst+1 // CHECK:STDOUT: 2: inst+3 diff --git a/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon b/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon index 770e5650d1f8..e616c9bffae6 100644 --- a/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon @@ -117,7 +117,7 @@ fn B() { // CHECK:STDOUT: 'inst+10': {kind: FunctionType, arg0: function1, arg1: specific, type: typeTypeType} // CHECK:STDOUT: 'inst+11': {kind: StructValue, arg0: empty, type: type(inst+10)} // CHECK:STDOUT: 'inst+12': {kind: NameRef, arg0: name1, arg1: inst+8, type: type(inst+10)} -// CHECK:STDOUT: 'inst+13': {kind: Call, arg0: inst+12, arg1: block5, type: type(inst+5)} +// CHECK:STDOUT: 'inst+13': {kind: Call, arg0: inst+12, arg1: empty, type: type(inst+5)} // CHECK:STDOUT: 'inst+14': {kind: Return} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: 'inst+0': templateConstant(inst+0) @@ -146,8 +146,7 @@ fn B() { // CHECK:STDOUT: 1: inst+12 // CHECK:STDOUT: 2: inst+13 // CHECK:STDOUT: 3: inst+14 -// CHECK:STDOUT: block5: {} -// CHECK:STDOUT: block6: +// CHECK:STDOUT: block5: // CHECK:STDOUT: 0: inst+0 // CHECK:STDOUT: 1: inst+1 // CHECK:STDOUT: 2: inst+3 diff --git a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon index 8dc3f1f35e70..ed9ad162e24e 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon @@ -49,7 +49,7 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: 'inst+1': {kind: TupleType, arg0: type_block0, type: typeTypeType} // CHECK:STDOUT: 'inst+2': {kind: TupleLiteral, arg0: empty, type: type(inst+1)} // CHECK:STDOUT: 'inst+3': {kind: Converted, arg0: inst+2, arg1: inst+1, type: typeTypeType} -// CHECK:STDOUT: 'inst+4': {kind: Param, arg0: name1, type: type(inst+1)} +// CHECK:STDOUT: 'inst+4': {kind: Param, arg0: name1, arg1: runtime_param0, type: type(inst+1)} // CHECK:STDOUT: 'inst+5': {kind: BindName, arg0: entity_name0, arg1: inst+4, type: type(inst+1)} // CHECK:STDOUT: 'inst+6': {kind: TupleLiteral, arg0: empty, type: type(inst+1)} // CHECK:STDOUT: 'inst+7': {kind: TupleLiteral, arg0: empty, type: type(inst+1)} @@ -168,7 +168,7 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %.loc15_12.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %n.loc15_8.1: %.1 = param n +// CHECK:STDOUT: %n.loc15_8.1: %.1 = param n, runtime_param0 // CHECK:STDOUT: @Foo.%n: %.1 = bind_name n, %n.loc15_8.1 // CHECK:STDOUT: %.loc15_20: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_24: %.1 = tuple_literal () diff --git a/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon b/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon index ff1b5f315ca7..c3a3b943ce37 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon @@ -45,7 +45,7 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] { // CHECK:STDOUT: %.loc15_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_10.2: type = converted %.loc15_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %n.loc15_6.1: %.1 = param n +// CHECK:STDOUT: %n.loc15_6.1: %.1 = param n, runtime_param0 // CHECK:STDOUT: @A.%n: %.1 = bind_name n, %n.loc15_6.1 // CHECK:STDOUT: %.loc15_17.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_17.2: type = converted %.loc15_17.1, constants.%.1 [template = constants.%.1] @@ -54,7 +54,7 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %.loc19_12.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc19_12.2: type = converted %.loc19_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %n.loc19_6.1: %.1 = param n +// CHECK:STDOUT: %n.loc19_6.1: %.1 = param n, runtime_param0 // CHECK:STDOUT: @B.%n: %.1 = bind_name n, %n.loc19_6.1 // CHECK:STDOUT: %.loc19_19.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc19_19.2: type = converted %.loc19_19.1, constants.%.1 [template = constants.%.1] @@ -63,7 +63,7 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] { // CHECK:STDOUT: %.loc23_13.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc23_13.2: type = converted %.loc23_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %if.loc23_6.1: %.1 = param r#if +// CHECK:STDOUT: %if.loc23_6.1: %.1 = param r#if, runtime_param0 // CHECK:STDOUT: @C.%if: %.1 = bind_name r#if, %if.loc23_6.1 // CHECK:STDOUT: %.loc23_20.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc23_20.2: type = converted %.loc23_20.1, constants.%.1 [template = constants.%.1] diff --git a/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon b/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon index 726f81156840..ede48e093070 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon @@ -58,11 +58,11 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: 1: type(inst+8) // CHECK:STDOUT: insts: // CHECK:STDOUT: 'inst+0': {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(instNamespaceType)} -// CHECK:STDOUT: 'inst+1': {kind: Param, arg0: name1, type: typeTypeType} +// CHECK:STDOUT: 'inst+1': {kind: Param, arg0: name1, arg1: runtime_param, type: typeTypeType} // CHECK:STDOUT: 'inst+2': {kind: BindSymbolicName, arg0: entity_name0, arg1: inst+1, type: typeTypeType} // CHECK:STDOUT: 'inst+3': {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: typeTypeType} // CHECK:STDOUT: 'inst+4': {kind: NameRef, arg0: name1, arg1: inst+2, type: typeTypeType} -// CHECK:STDOUT: 'inst+5': {kind: Param, arg0: name2, type: type(symbolicConstant2)} +// CHECK:STDOUT: 'inst+5': {kind: Param, arg0: name2, arg1: runtime_param0, type: type(symbolicConstant2)} // CHECK:STDOUT: 'inst+6': {kind: BindName, arg0: entity_name1, arg1: inst+5, type: type(symbolicConstant2)} // CHECK:STDOUT: 'inst+7': {kind: NameRef, arg0: name1, arg1: inst+2, type: typeTypeType} // CHECK:STDOUT: 'inst+8': {kind: TupleType, arg0: type_block0, type: typeTypeType} diff --git a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon index f48e2efcfec0..637384705b1e 100644 --- a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon @@ -35,7 +35,7 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %.loc15_12.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %n.loc15_8.1: %.1 = param n +// CHECK:STDOUT: %n.loc15_8.1: %.1 = param n, runtime_param0 // CHECK:STDOUT: @Foo.%n: %.1 = bind_name n, %n.loc15_8.1 // CHECK:STDOUT: %.loc15_20: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_24: %.1 = tuple_literal () diff --git a/toolchain/check/testdata/builtins/float/add.carbon b/toolchain/check/testdata/builtins/float/add.carbon index 8f94fbe31f4a..7853e6d9bea2 100644 --- a/toolchain/check/testdata/builtins/float/add.carbon +++ b/toolchain/check/testdata/builtins/float/add.carbon @@ -94,13 +94,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %a.loc2_8.1: f64 = param a +// CHECK:STDOUT: %a.loc2_8.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Add.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %b.loc2_16.1: f64 = param b +// CHECK:STDOUT: %b.loc2_16.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @Add.%b: f64 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] @@ -113,13 +113,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %a.loc4_16.1: f64 = param a +// CHECK:STDOUT: %a.loc4_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %b.loc4_24.1: f64 = param b +// CHECK:STDOUT: %b.loc4_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] @@ -219,7 +219,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %a.loc8_11.1: f64 = param a +// CHECK:STDOUT: %a.loc8_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @TooFew.%a: f64 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] @@ -232,19 +232,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %a.loc13_12.1: f64 = param a +// CHECK:STDOUT: %a.loc13_12.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %b.loc13_20.1: f64 = param b +// CHECK:STDOUT: %b.loc13_20.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %c.loc13_28.1: f64 = param c +// CHECK:STDOUT: %c.loc13_28.1: f64 = param c, runtime_param2 // CHECK:STDOUT: @TooMany.%c: f64 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] @@ -257,13 +257,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %a.loc17_18.1: f64 = param a +// CHECK:STDOUT: %a.loc17_18.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] -// CHECK:STDOUT: %b.loc17_26.1: f64 = param b +// CHECK:STDOUT: %b.loc17_26.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @BadReturnType.%b: f64 = bind_name b, %b.loc17_26.1 // CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] @@ -275,13 +275,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %a.loc18_14.1: f64 = param a +// CHECK:STDOUT: %a.loc18_14.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc18_14.1 // CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %b.loc18_22.1: f64 = param b +// CHECK:STDOUT: %b.loc18_22.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @JustRight.%b: f64 = bind_name b, %b.loc18_22.1 // CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] @@ -294,7 +294,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %a.loc20_22.1: f64 = param a +// CHECK:STDOUT: %a.loc20_22.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc20_22.1 // CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] @@ -307,19 +307,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %a.loc24_23.1: f64 = param a +// CHECK:STDOUT: %a.loc24_23.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc24_23.1 // CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %b.loc24_31.1: f64 = param b +// CHECK:STDOUT: %b.loc24_31.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc24_31.1 // CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %c.loc24_39.1: f64 = param c +// CHECK:STDOUT: %c.loc24_39.1: f64 = param c, runtime_param2 // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc24_39.1 // CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] @@ -332,13 +332,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %a.loc28_29.1: f64 = param a +// CHECK:STDOUT: %a.loc28_29.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc28_29.1 // CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] -// CHECK:STDOUT: %b.loc28_37.1: f64 = param b +// CHECK:STDOUT: %b.loc28_37.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc28_37.1 // CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type.loc28 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/div.carbon b/toolchain/check/testdata/builtins/float/div.carbon index 3dc31b1400ae..a7f1a897857a 100644 --- a/toolchain/check/testdata/builtins/float/div.carbon +++ b/toolchain/check/testdata/builtins/float/div.carbon @@ -102,13 +102,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %a.loc2_8.1: f64 = param a +// CHECK:STDOUT: %a.loc2_8.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Div.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %b.loc2_16.1: f64 = param b +// CHECK:STDOUT: %b.loc2_16.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @Div.%b: f64 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] @@ -121,13 +121,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %a.loc4_16.1: f64 = param a +// CHECK:STDOUT: %a.loc4_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %b.loc4_24.1: f64 = param b +// CHECK:STDOUT: %b.loc4_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] @@ -249,7 +249,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %a.loc8_11.1: f64 = param a +// CHECK:STDOUT: %a.loc8_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @TooFew.%a: f64 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] @@ -262,19 +262,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %a.loc13_12.1: f64 = param a +// CHECK:STDOUT: %a.loc13_12.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %b.loc13_20.1: f64 = param b +// CHECK:STDOUT: %b.loc13_20.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %c.loc13_28.1: f64 = param c +// CHECK:STDOUT: %c.loc13_28.1: f64 = param c, runtime_param2 // CHECK:STDOUT: @TooMany.%c: f64 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] @@ -287,13 +287,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %a.loc17_18.1: f64 = param a +// CHECK:STDOUT: %a.loc17_18.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] -// CHECK:STDOUT: %b.loc17_26.1: f64 = param b +// CHECK:STDOUT: %b.loc17_26.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @BadReturnType.%b: f64 = bind_name b, %b.loc17_26.1 // CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] @@ -305,13 +305,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %a.loc18_14.1: f64 = param a +// CHECK:STDOUT: %a.loc18_14.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc18_14.1 // CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %b.loc18_22.1: f64 = param b +// CHECK:STDOUT: %b.loc18_22.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @JustRight.%b: f64 = bind_name b, %b.loc18_22.1 // CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] @@ -324,7 +324,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %a.loc20_22.1: f64 = param a +// CHECK:STDOUT: %a.loc20_22.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc20_22.1 // CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] @@ -337,19 +337,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %a.loc24_23.1: f64 = param a +// CHECK:STDOUT: %a.loc24_23.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc24_23.1 // CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %b.loc24_31.1: f64 = param b +// CHECK:STDOUT: %b.loc24_31.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc24_31.1 // CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %c.loc24_39.1: f64 = param c +// CHECK:STDOUT: %c.loc24_39.1: f64 = param c, runtime_param2 // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc24_39.1 // CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] @@ -362,13 +362,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %a.loc28_29.1: f64 = param a +// CHECK:STDOUT: %a.loc28_29.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc28_29.1 // CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] -// CHECK:STDOUT: %b.loc28_37.1: f64 = param b +// CHECK:STDOUT: %b.loc28_37.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc28_37.1 // CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type.loc28 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/eq.carbon b/toolchain/check/testdata/builtins/float/eq.carbon index fac975ba390b..561d74ef1d2e 100644 --- a/toolchain/check/testdata/builtins/float/eq.carbon +++ b/toolchain/check/testdata/builtins/float/eq.carbon @@ -90,13 +90,13 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %float.make_type.loc2_10: init type = call constants.%Float(%.loc2_10.1) [template = f64] // CHECK:STDOUT: %.loc2_10.2: type = value_of_initializer %float.make_type.loc2_10 [template = f64] // CHECK:STDOUT: %.loc2_10.3: type = converted %float.make_type.loc2_10, %.loc2_10.2 [template = f64] -// CHECK:STDOUT: %a.loc2_7.1: f64 = param a +// CHECK:STDOUT: %a.loc2_7.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Eq.%a: f64 = bind_name a, %a.loc2_7.1 // CHECK:STDOUT: %.loc2_18.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_18: init type = call constants.%Float(%.loc2_18.1) [template = f64] // CHECK:STDOUT: %.loc2_18.2: type = value_of_initializer %float.make_type.loc2_18 [template = f64] // CHECK:STDOUT: %.loc2_18.3: type = converted %float.make_type.loc2_18, %.loc2_18.2 [template = f64] -// CHECK:STDOUT: %b.loc2_15.1: f64 = param b +// CHECK:STDOUT: %b.loc2_15.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @Eq.%b: f64 = bind_name b, %b.loc2_15.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -107,10 +107,10 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc7_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -118,13 +118,13 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%.loc12_19.1) [template = f64] // CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %float.make_type.loc12_19 [template = f64] // CHECK:STDOUT: %.loc12_19.3: type = converted %float.make_type.loc12_19, %.loc12_19.2 [template = f64] -// CHECK:STDOUT: %a.loc12_16.1: f64 = param a +// CHECK:STDOUT: %a.loc12_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc12_16.1 // CHECK:STDOUT: %.loc12_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%.loc12_27.1) [template = f64] // CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %float.make_type.loc12_27 [template = f64] // CHECK:STDOUT: %.loc12_27.3: type = converted %float.make_type.loc12_27, %.loc12_27.2 [template = f64] -// CHECK:STDOUT: %b.loc12_24.1: f64 = param b +// CHECK:STDOUT: %b.loc12_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc12_24.1 // CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] @@ -240,13 +240,13 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%.loc7_19.1) [template = f64] // CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %float.make_type.loc7_19 [template = f64] // CHECK:STDOUT: %.loc7_19.3: type = converted %float.make_type.loc7_19, %.loc7_19.2 [template = f64] -// CHECK:STDOUT: %a.loc7_16.1: f64 = param a +// CHECK:STDOUT: %a.loc7_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @WrongResult.%a: f64 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %.loc7_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%.loc7_27.1) [template = f64] // CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %float.make_type.loc7_27 [template = f64] // CHECK:STDOUT: %.loc7_27.3: type = converted %float.make_type.loc7_27, %.loc7_27.2 [template = f64] -// CHECK:STDOUT: %b.loc7_24.1: f64 = param b +// CHECK:STDOUT: %b.loc7_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @WrongResult.%b: f64 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %.loc7_35.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%.loc7_35.1) [template = f64] diff --git a/toolchain/check/testdata/builtins/float/greater.carbon b/toolchain/check/testdata/builtins/float/greater.carbon index 4b4eec20e9b4..7f18ba112701 100644 --- a/toolchain/check/testdata/builtins/float/greater.carbon +++ b/toolchain/check/testdata/builtins/float/greater.carbon @@ -90,13 +90,13 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc2_15: init type = call constants.%Float(%.loc2_15.1) [template = f64] // CHECK:STDOUT: %.loc2_15.2: type = value_of_initializer %float.make_type.loc2_15 [template = f64] // CHECK:STDOUT: %.loc2_15.3: type = converted %float.make_type.loc2_15, %.loc2_15.2 [template = f64] -// CHECK:STDOUT: %a.loc2_12.1: f64 = param a +// CHECK:STDOUT: %a.loc2_12.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Greater.%a: f64 = bind_name a, %a.loc2_12.1 // CHECK:STDOUT: %.loc2_23.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_23: init type = call constants.%Float(%.loc2_23.1) [template = f64] // CHECK:STDOUT: %.loc2_23.2: type = value_of_initializer %float.make_type.loc2_23 [template = f64] // CHECK:STDOUT: %.loc2_23.3: type = converted %float.make_type.loc2_23, %.loc2_23.2 [template = f64] -// CHECK:STDOUT: %b.loc2_20.1: f64 = param b +// CHECK:STDOUT: %b.loc2_20.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @Greater.%b: f64 = bind_name b, %b.loc2_20.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_31.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -108,7 +108,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %a.loc3_11.1: f64 = param a +// CHECK:STDOUT: %a.loc3_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] @@ -120,10 +120,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -131,13 +131,13 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %a.loc16_16.1: f64 = param a +// CHECK:STDOUT: %a.loc16_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] -// CHECK:STDOUT: %b.loc16_24.1: f64 = param b +// CHECK:STDOUT: %b.loc16_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc16_24.1 // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/greater_eq.carbon b/toolchain/check/testdata/builtins/float/greater_eq.carbon index 6beeaa5a0b6c..9f4e8537bb09 100644 --- a/toolchain/check/testdata/builtins/float/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/float/greater_eq.carbon @@ -90,13 +90,13 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc2_17: init type = call constants.%Float(%.loc2_17.1) [template = f64] // CHECK:STDOUT: %.loc2_17.2: type = value_of_initializer %float.make_type.loc2_17 [template = f64] // CHECK:STDOUT: %.loc2_17.3: type = converted %float.make_type.loc2_17, %.loc2_17.2 [template = f64] -// CHECK:STDOUT: %a.loc2_14.1: f64 = param a +// CHECK:STDOUT: %a.loc2_14.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @GreaterEq.%a: f64 = bind_name a, %a.loc2_14.1 // CHECK:STDOUT: %.loc2_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_25: init type = call constants.%Float(%.loc2_25.1) [template = f64] // CHECK:STDOUT: %.loc2_25.2: type = value_of_initializer %float.make_type.loc2_25 [template = f64] // CHECK:STDOUT: %.loc2_25.3: type = converted %float.make_type.loc2_25, %.loc2_25.2 [template = f64] -// CHECK:STDOUT: %b.loc2_22.1: f64 = param b +// CHECK:STDOUT: %b.loc2_22.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @GreaterEq.%b: f64 = bind_name b, %b.loc2_22.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -108,7 +108,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %a.loc3_11.1: f64 = param a +// CHECK:STDOUT: %a.loc3_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] @@ -120,10 +120,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -131,13 +131,13 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %a.loc16_16.1: f64 = param a +// CHECK:STDOUT: %a.loc16_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] -// CHECK:STDOUT: %b.loc16_24.1: f64 = param b +// CHECK:STDOUT: %b.loc16_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc16_24.1 // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/less.carbon b/toolchain/check/testdata/builtins/float/less.carbon index 453e3cb1df57..8ec60ba29b3d 100644 --- a/toolchain/check/testdata/builtins/float/less.carbon +++ b/toolchain/check/testdata/builtins/float/less.carbon @@ -90,13 +90,13 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc2_12: init type = call constants.%Float(%.loc2_12.1) [template = f64] // CHECK:STDOUT: %.loc2_12.2: type = value_of_initializer %float.make_type.loc2_12 [template = f64] // CHECK:STDOUT: %.loc2_12.3: type = converted %float.make_type.loc2_12, %.loc2_12.2 [template = f64] -// CHECK:STDOUT: %a.loc2_9.1: f64 = param a +// CHECK:STDOUT: %a.loc2_9.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Less.%a: f64 = bind_name a, %a.loc2_9.1 // CHECK:STDOUT: %.loc2_20.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_20: init type = call constants.%Float(%.loc2_20.1) [template = f64] // CHECK:STDOUT: %.loc2_20.2: type = value_of_initializer %float.make_type.loc2_20 [template = f64] // CHECK:STDOUT: %.loc2_20.3: type = converted %float.make_type.loc2_20, %.loc2_20.2 [template = f64] -// CHECK:STDOUT: %b.loc2_17.1: f64 = param b +// CHECK:STDOUT: %b.loc2_17.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @Less.%b: f64 = bind_name b, %b.loc2_17.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_28.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -108,7 +108,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %a.loc3_11.1: f64 = param a +// CHECK:STDOUT: %a.loc3_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] @@ -120,10 +120,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -131,13 +131,13 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %a.loc16_16.1: f64 = param a +// CHECK:STDOUT: %a.loc16_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] -// CHECK:STDOUT: %b.loc16_24.1: f64 = param b +// CHECK:STDOUT: %b.loc16_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc16_24.1 // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/less_eq.carbon b/toolchain/check/testdata/builtins/float/less_eq.carbon index ffff5228bb14..e5359dc5bc5d 100644 --- a/toolchain/check/testdata/builtins/float/less_eq.carbon +++ b/toolchain/check/testdata/builtins/float/less_eq.carbon @@ -90,13 +90,13 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%.loc2_14.1) [template = f64] // CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %float.make_type.loc2_14 [template = f64] // CHECK:STDOUT: %.loc2_14.3: type = converted %float.make_type.loc2_14, %.loc2_14.2 [template = f64] -// CHECK:STDOUT: %a.loc2_11.1: f64 = param a +// CHECK:STDOUT: %a.loc2_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @LessEq.%a: f64 = bind_name a, %a.loc2_11.1 // CHECK:STDOUT: %.loc2_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%.loc2_22.1) [template = f64] // CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %float.make_type.loc2_22 [template = f64] // CHECK:STDOUT: %.loc2_22.3: type = converted %float.make_type.loc2_22, %.loc2_22.2 [template = f64] -// CHECK:STDOUT: %b.loc2_19.1: f64 = param b +// CHECK:STDOUT: %b.loc2_19.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @LessEq.%b: f64 = bind_name b, %b.loc2_19.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_30.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -108,7 +108,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %a.loc3_11.1: f64 = param a +// CHECK:STDOUT: %a.loc3_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] @@ -120,10 +120,10 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -131,13 +131,13 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %a.loc16_16.1: f64 = param a +// CHECK:STDOUT: %a.loc16_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] -// CHECK:STDOUT: %b.loc16_24.1: f64 = param b +// CHECK:STDOUT: %b.loc16_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc16_24.1 // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index 08a13df88282..e03029056c98 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -79,7 +79,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_16.2: type = converted %int.make_type_32, %.loc4_16.1 [template = i32] -// CHECK:STDOUT: %size.loc4_10.1: i32 = param size +// CHECK:STDOUT: %size.loc4_10.1: i32 = param size, runtime_param0 // CHECK:STDOUT: @Float.%size: i32 = bind_name size, %size.loc4_10.1 // CHECK:STDOUT: @Float.%return: ref type = var // CHECK:STDOUT: } @@ -139,7 +139,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_23.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_23.2: type = converted %int.make_type_32, %.loc8_23.1 [template = i32] -// CHECK:STDOUT: %dyn_size.loc8_13.1: i32 = param dyn_size +// CHECK:STDOUT: %dyn_size.loc8_13.1: i32 = param dyn_size, runtime_param0 // CHECK:STDOUT: @GetFloat.%dyn_size: i32 = bind_name dyn_size, %dyn_size.loc8_13.1 // CHECK:STDOUT: @GetFloat.%return: ref type = var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/float/mul.carbon b/toolchain/check/testdata/builtins/float/mul.carbon index 5cfb0ea2d818..d36cf7f2cd98 100644 --- a/toolchain/check/testdata/builtins/float/mul.carbon +++ b/toolchain/check/testdata/builtins/float/mul.carbon @@ -94,13 +94,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %a.loc2_8.1: f64 = param a +// CHECK:STDOUT: %a.loc2_8.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Mul.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %b.loc2_16.1: f64 = param b +// CHECK:STDOUT: %b.loc2_16.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @Mul.%b: f64 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] @@ -113,13 +113,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %a.loc4_16.1: f64 = param a +// CHECK:STDOUT: %a.loc4_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %b.loc4_24.1: f64 = param b +// CHECK:STDOUT: %b.loc4_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] @@ -219,7 +219,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %a.loc8_11.1: f64 = param a +// CHECK:STDOUT: %a.loc8_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @TooFew.%a: f64 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] @@ -232,19 +232,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %a.loc13_12.1: f64 = param a +// CHECK:STDOUT: %a.loc13_12.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %b.loc13_20.1: f64 = param b +// CHECK:STDOUT: %b.loc13_20.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %c.loc13_28.1: f64 = param c +// CHECK:STDOUT: %c.loc13_28.1: f64 = param c, runtime_param2 // CHECK:STDOUT: @TooMany.%c: f64 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] @@ -257,13 +257,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %a.loc17_18.1: f64 = param a +// CHECK:STDOUT: %a.loc17_18.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] -// CHECK:STDOUT: %b.loc17_26.1: f64 = param b +// CHECK:STDOUT: %b.loc17_26.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @BadReturnType.%b: f64 = bind_name b, %b.loc17_26.1 // CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] @@ -275,13 +275,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %a.loc18_14.1: f64 = param a +// CHECK:STDOUT: %a.loc18_14.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc18_14.1 // CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %b.loc18_22.1: f64 = param b +// CHECK:STDOUT: %b.loc18_22.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @JustRight.%b: f64 = bind_name b, %b.loc18_22.1 // CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] @@ -294,7 +294,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %a.loc20_22.1: f64 = param a +// CHECK:STDOUT: %a.loc20_22.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc20_22.1 // CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] @@ -307,19 +307,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %a.loc24_23.1: f64 = param a +// CHECK:STDOUT: %a.loc24_23.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc24_23.1 // CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %b.loc24_31.1: f64 = param b +// CHECK:STDOUT: %b.loc24_31.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc24_31.1 // CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %c.loc24_39.1: f64 = param c +// CHECK:STDOUT: %c.loc24_39.1: f64 = param c, runtime_param2 // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc24_39.1 // CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] @@ -332,13 +332,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %a.loc28_29.1: f64 = param a +// CHECK:STDOUT: %a.loc28_29.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc28_29.1 // CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] -// CHECK:STDOUT: %b.loc28_37.1: f64 = param b +// CHECK:STDOUT: %b.loc28_37.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc28_37.1 // CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type.loc28 [template = bool] diff --git a/toolchain/check/testdata/builtins/float/negate.carbon b/toolchain/check/testdata/builtins/float/negate.carbon index 45938da8c766..39f316fb2c39 100644 --- a/toolchain/check/testdata/builtins/float/negate.carbon +++ b/toolchain/check/testdata/builtins/float/negate.carbon @@ -114,7 +114,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%.loc2_14.1) [template = f64] // CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %float.make_type.loc2_14 [template = f64] // CHECK:STDOUT: %.loc2_14.3: type = converted %float.make_type.loc2_14, %.loc2_14.2 [template = f64] -// CHECK:STDOUT: %a.loc2_11.1: f64 = param a +// CHECK:STDOUT: %a.loc2_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: f64 = bind_name a, %a.loc2_11.1 // CHECK:STDOUT: %.loc2_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%.loc2_22.1) [template = f64] @@ -127,13 +127,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %a.loc4_16.1: f64 = param a +// CHECK:STDOUT: %a.loc4_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %b.loc4_24.1: f64 = param b +// CHECK:STDOUT: %b.loc4_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] @@ -238,13 +238,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %a.loc13_12.1: f64 = param a +// CHECK:STDOUT: %a.loc13_12.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %b.loc13_20.1: f64 = param b +// CHECK:STDOUT: %b.loc13_20.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] @@ -257,7 +257,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc18: init type = call constants.%Float(%.loc18_21.1) [template = f64] // CHECK:STDOUT: %.loc18_21.2: type = value_of_initializer %float.make_type.loc18 [template = f64] // CHECK:STDOUT: %.loc18_21.3: type = converted %float.make_type.loc18, %.loc18_21.2 [template = f64] -// CHECK:STDOUT: %a.loc18_18.1: f64 = param a +// CHECK:STDOUT: %a.loc18_18.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc18_18.1 // CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] @@ -269,7 +269,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc19_17: init type = call constants.%Float(%.loc19_17.1) [template = f64] // CHECK:STDOUT: %.loc19_17.2: type = value_of_initializer %float.make_type.loc19_17 [template = f64] // CHECK:STDOUT: %.loc19_17.3: type = converted %float.make_type.loc19_17, %.loc19_17.2 [template = f64] -// CHECK:STDOUT: %a.loc19_14.1: f64 = param a +// CHECK:STDOUT: %a.loc19_14.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc19_14.1 // CHECK:STDOUT: %.loc19_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc19_25: init type = call constants.%Float(%.loc19_25.1) [template = f64] @@ -282,7 +282,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc21_25: init type = call constants.%Float(%.loc21_25.1) [template = f64] // CHECK:STDOUT: %.loc21_25.2: type = value_of_initializer %float.make_type.loc21_25 [template = f64] // CHECK:STDOUT: %.loc21_25.3: type = converted %float.make_type.loc21_25, %.loc21_25.2 [template = f64] -// CHECK:STDOUT: %a.loc21_22.1: f64 = param a +// CHECK:STDOUT: %a.loc21_22.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc21_22.1 // CHECK:STDOUT: %.loc21_33.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc21_33: init type = call constants.%Float(%.loc21_33.1) [template = f64] @@ -295,19 +295,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc32_26: init type = call constants.%Float(%.loc32_26.1) [template = f64] // CHECK:STDOUT: %.loc32_26.2: type = value_of_initializer %float.make_type.loc32_26 [template = f64] // CHECK:STDOUT: %.loc32_26.3: type = converted %float.make_type.loc32_26, %.loc32_26.2 [template = f64] -// CHECK:STDOUT: %a.loc32_23.1: f64 = param a +// CHECK:STDOUT: %a.loc32_23.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc32_23.1 // CHECK:STDOUT: %.loc32_34.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc32_34: init type = call constants.%Float(%.loc32_34.1) [template = f64] // CHECK:STDOUT: %.loc32_34.2: type = value_of_initializer %float.make_type.loc32_34 [template = f64] // CHECK:STDOUT: %.loc32_34.3: type = converted %float.make_type.loc32_34, %.loc32_34.2 [template = f64] -// CHECK:STDOUT: %b.loc32_31.1: f64 = param b +// CHECK:STDOUT: %b.loc32_31.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc32_31.1 // CHECK:STDOUT: %.loc32_42.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc32_42: init type = call constants.%Float(%.loc32_42.1) [template = f64] // CHECK:STDOUT: %.loc32_42.2: type = value_of_initializer %float.make_type.loc32_42 [template = f64] // CHECK:STDOUT: %.loc32_42.3: type = converted %float.make_type.loc32_42, %.loc32_42.2 [template = f64] -// CHECK:STDOUT: %c.loc32_39.1: f64 = param c +// CHECK:STDOUT: %c.loc32_39.1: f64 = param c, runtime_param2 // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc32_39.1 // CHECK:STDOUT: %.loc32_50.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc32_50: init type = call constants.%Float(%.loc32_50.1) [template = f64] @@ -320,13 +320,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc43_32: init type = call constants.%Float(%.loc43_32.1) [template = f64] // CHECK:STDOUT: %.loc43_32.2: type = value_of_initializer %float.make_type.loc43_32 [template = f64] // CHECK:STDOUT: %.loc43_32.3: type = converted %float.make_type.loc43_32, %.loc43_32.2 [template = f64] -// CHECK:STDOUT: %a.loc43_29.1: f64 = param a +// CHECK:STDOUT: %a.loc43_29.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc43_29.1 // CHECK:STDOUT: %.loc43_40.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc43_40: init type = call constants.%Float(%.loc43_40.1) [template = f64] // CHECK:STDOUT: %.loc43_40.2: type = value_of_initializer %float.make_type.loc43_40 [template = f64] // CHECK:STDOUT: %.loc43_40.3: type = converted %float.make_type.loc43_40, %.loc43_40.2 [template = f64] -// CHECK:STDOUT: %b.loc43_37.1: f64 = param b +// CHECK:STDOUT: %b.loc43_37.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc43_37.1 // CHECK:STDOUT: %bool.make_type.loc43: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc43_48.1: type = value_of_initializer %bool.make_type.loc43 [template = bool] @@ -351,10 +351,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a -// CHECK:STDOUT: %TooFew.call: init f64 = call %TooFew.ref() [template = ] -// CHECK:STDOUT: %.loc29_19.1: f64 = value_of_initializer %TooFew.call [template = ] -// CHECK:STDOUT: %.loc29_19.2: f64 = converted %TooFew.call, %.loc29_19.1 [template = ] -// CHECK:STDOUT: return %.loc29_19.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: f64, %b: f64, %c: f64) -> f64 { @@ -363,10 +360,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b // CHECK:STDOUT: %c.ref: f64 = name_ref c, %c -// CHECK:STDOUT: %TooMany.call: init f64 = call %TooMany.ref() [template = ] -// CHECK:STDOUT: %.loc40_26.1: f64 = value_of_initializer %TooMany.call [template = ] -// CHECK:STDOUT: %.loc40_26.2: f64 = converted %TooMany.call, %.loc40_26.1 [template = ] -// CHECK:STDOUT: return %.loc40_26.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: f64, %b: f64) -> bool { @@ -374,9 +368,6 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a // CHECK:STDOUT: %b.ref: f64 = name_ref b, %b -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref() [template = ] -// CHECK:STDOUT: %.loc50_29.1: bool = value_of_initializer %BadReturnType.call [template = ] -// CHECK:STDOUT: %.loc50_29.2: bool = converted %BadReturnType.call, %.loc50_29.1 [template = ] -// CHECK:STDOUT: return %.loc50_29.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/neq.carbon b/toolchain/check/testdata/builtins/float/neq.carbon index 54e3b1839346..dc787b039f1f 100644 --- a/toolchain/check/testdata/builtins/float/neq.carbon +++ b/toolchain/check/testdata/builtins/float/neq.carbon @@ -90,13 +90,13 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %a.loc2_8.1: f64 = param a +// CHECK:STDOUT: %a.loc2_8.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Neq.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %b.loc2_16.1: f64 = param b +// CHECK:STDOUT: %b.loc2_16.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @Neq.%b: f64 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -107,10 +107,10 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc7_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -118,13 +118,13 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%.loc12_19.1) [template = f64] // CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %float.make_type.loc12_19 [template = f64] // CHECK:STDOUT: %.loc12_19.3: type = converted %float.make_type.loc12_19, %.loc12_19.2 [template = f64] -// CHECK:STDOUT: %a.loc12_16.1: f64 = param a +// CHECK:STDOUT: %a.loc12_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc12_16.1 // CHECK:STDOUT: %.loc12_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%.loc12_27.1) [template = f64] // CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %float.make_type.loc12_27 [template = f64] // CHECK:STDOUT: %.loc12_27.3: type = converted %float.make_type.loc12_27, %.loc12_27.2 [template = f64] -// CHECK:STDOUT: %b.loc12_24.1: f64 = param b +// CHECK:STDOUT: %b.loc12_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc12_24.1 // CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] @@ -240,13 +240,13 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%.loc7_19.1) [template = f64] // CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %float.make_type.loc7_19 [template = f64] // CHECK:STDOUT: %.loc7_19.3: type = converted %float.make_type.loc7_19, %.loc7_19.2 [template = f64] -// CHECK:STDOUT: %a.loc7_16.1: f64 = param a +// CHECK:STDOUT: %a.loc7_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @WrongResult.%a: f64 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %.loc7_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%.loc7_27.1) [template = f64] // CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %float.make_type.loc7_27 [template = f64] // CHECK:STDOUT: %.loc7_27.3: type = converted %float.make_type.loc7_27, %.loc7_27.2 [template = f64] -// CHECK:STDOUT: %b.loc7_24.1: f64 = param b +// CHECK:STDOUT: %b.loc7_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @WrongResult.%b: f64 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %.loc7_35.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%.loc7_35.1) [template = f64] diff --git a/toolchain/check/testdata/builtins/float/sub.carbon b/toolchain/check/testdata/builtins/float/sub.carbon index 0af648a6ccc2..18bfced36cc3 100644 --- a/toolchain/check/testdata/builtins/float/sub.carbon +++ b/toolchain/check/testdata/builtins/float/sub.carbon @@ -94,13 +94,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %a.loc2_8.1: f64 = param a +// CHECK:STDOUT: %a.loc2_8.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: f64 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %b.loc2_16.1: f64 = param b +// CHECK:STDOUT: %b.loc2_16.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: f64 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] @@ -113,13 +113,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %a.loc4_16.1: f64 = param a +// CHECK:STDOUT: %a.loc4_16.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: f64 = bind_name a, %a.loc4_16.1 // CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %b.loc4_24.1: f64 = param b +// CHECK:STDOUT: %b.loc4_24.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: f64 = bind_name b, %b.loc4_24.1 // CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] @@ -219,7 +219,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %a.loc8_11.1: f64 = param a +// CHECK:STDOUT: %a.loc8_11.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @TooFew.%a: f64 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] @@ -232,19 +232,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %a.loc13_12.1: f64 = param a +// CHECK:STDOUT: %a.loc13_12.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @TooMany.%a: f64 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %b.loc13_20.1: f64 = param b +// CHECK:STDOUT: %b.loc13_20.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @TooMany.%b: f64 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %c.loc13_28.1: f64 = param c +// CHECK:STDOUT: %c.loc13_28.1: f64 = param c, runtime_param2 // CHECK:STDOUT: @TooMany.%c: f64 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] @@ -257,13 +257,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %a.loc17_18.1: f64 = param a +// CHECK:STDOUT: %a.loc17_18.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @BadReturnType.%a: f64 = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] -// CHECK:STDOUT: %b.loc17_26.1: f64 = param b +// CHECK:STDOUT: %b.loc17_26.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @BadReturnType.%b: f64 = bind_name b, %b.loc17_26.1 // CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] @@ -275,13 +275,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %a.loc18_14.1: f64 = param a +// CHECK:STDOUT: %a.loc18_14.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @JustRight.%a: f64 = bind_name a, %a.loc18_14.1 // CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %b.loc18_22.1: f64 = param b +// CHECK:STDOUT: %b.loc18_22.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @JustRight.%b: f64 = bind_name b, %b.loc18_22.1 // CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] @@ -294,7 +294,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %a.loc20_22.1: f64 = param a +// CHECK:STDOUT: %a.loc20_22.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooFew.%a: f64 = bind_name a, %a.loc20_22.1 // CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] @@ -307,19 +307,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %a.loc24_23.1: f64 = param a +// CHECK:STDOUT: %a.loc24_23.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooMany.%a: f64 = bind_name a, %a.loc24_23.1 // CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %b.loc24_31.1: f64 = param b +// CHECK:STDOUT: %b.loc24_31.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallTooMany.%b: f64 = bind_name b, %b.loc24_31.1 // CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %c.loc24_39.1: f64 = param c +// CHECK:STDOUT: %c.loc24_39.1: f64 = param c, runtime_param2 // CHECK:STDOUT: @RuntimeCallTooMany.%c: f64 = bind_name c, %c.loc24_39.1 // CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] @@ -332,13 +332,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %a.loc28_29.1: f64 = param a +// CHECK:STDOUT: %a.loc28_29.1: f64 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: f64 = bind_name a, %a.loc28_29.1 // CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] -// CHECK:STDOUT: %b.loc28_37.1: f64 = param b +// CHECK:STDOUT: %b.loc28_37.1: f64 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: f64 = bind_name b, %b.loc28_37.1 // CHECK:STDOUT: %bool.make_type.loc28: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type.loc28 [template = bool] diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index a58a8a75cd5b..1560cf330164 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -64,12 +64,12 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @And.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @And.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -96,12 +96,12 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index 43d2728611be..f8ba805057ec 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -69,7 +69,7 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] -// CHECK:STDOUT: %a.loc2_15.1: i32 = param a +// CHECK:STDOUT: %a.loc2_15.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Complement.%a: i32 = bind_name a, %a.loc2_15.1 // CHECK:STDOUT: %int.make_type_32.loc2_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_32.loc2_26 [template = i32] @@ -80,12 +80,12 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc3_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_11.1: type = value_of_initializer %int.make_type_32.loc3_11 [template = i32] // CHECK:STDOUT: %.loc3_11.2: type = converted %int.make_type_32.loc3_11, %.loc3_11.1 [template = i32] -// CHECK:STDOUT: %a.loc3_8.1: i32 = param a +// CHECK:STDOUT: %a.loc3_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @And.%a: i32 = bind_name a, %a.loc3_8.1 // CHECK:STDOUT: %int.make_type_32.loc3_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_19.1: type = value_of_initializer %int.make_type_32.loc3_19 [template = i32] // CHECK:STDOUT: %.loc3_19.2: type = converted %int.make_type_32.loc3_19, %.loc3_19.1 [template = i32] -// CHECK:STDOUT: %b.loc3_16.1: i32 = param b +// CHECK:STDOUT: %b.loc3_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @And.%b: i32 = bind_name b, %b.loc3_16.1 // CHECK:STDOUT: %int.make_type_32.loc3_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_27.1: type = value_of_initializer %int.make_type_32.loc3_27 [template = i32] @@ -116,7 +116,7 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc8_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int.make_type_32.loc8_19 [template = i32] // CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_32.loc8_19, %.loc8_19.1 [template = i32] -// CHECK:STDOUT: %a.loc8_16.1: i32 = param a +// CHECK:STDOUT: %a.loc8_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc8_16.1 // CHECK:STDOUT: %int.make_type_32.loc8_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_32.loc8_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index f1a55598eb56..617100b3b910 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -88,12 +88,12 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %int.make_type_32.loc2_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_32.loc2_10 [template = i32] // CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_32.loc2_10, %.loc2_10.1 [template = i32] -// CHECK:STDOUT: %a.loc2_7.1: i32 = param a +// CHECK:STDOUT: %a.loc2_7.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Eq.%a: i32 = bind_name a, %a.loc2_7.1 // CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] -// CHECK:STDOUT: %b.loc2_15.1: i32 = param b +// CHECK:STDOUT: %b.loc2_15.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Eq.%b: i32 = bind_name b, %b.loc2_15.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -104,22 +104,22 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc7_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_32.loc12_19 [template = i32] // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32.loc12_19, %.loc12_19.1 [template = i32] -// CHECK:STDOUT: %a.loc12_16.1: i32 = param a +// CHECK:STDOUT: %a.loc12_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc12_16.1 // CHECK:STDOUT: %int.make_type_32.loc12_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %int.make_type_32.loc12_27 [template = i32] // CHECK:STDOUT: %.loc12_27.2: type = converted %int.make_type_32.loc12_27, %.loc12_27.1 [template = i32] -// CHECK:STDOUT: %b.loc12_24.1: i32 = param b +// CHECK:STDOUT: %b.loc12_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc12_24.1 // CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] @@ -233,12 +233,12 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @WrongResult.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @WrongResult.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/greater.carbon b/toolchain/check/testdata/builtins/int/greater.carbon index d692eacd8790..f5cf1c6df299 100644 --- a/toolchain/check/testdata/builtins/int/greater.carbon +++ b/toolchain/check/testdata/builtins/int/greater.carbon @@ -88,12 +88,12 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.make_type_32.loc2_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_15.1: type = value_of_initializer %int.make_type_32.loc2_15 [template = i32] // CHECK:STDOUT: %.loc2_15.2: type = converted %int.make_type_32.loc2_15, %.loc2_15.1 [template = i32] -// CHECK:STDOUT: %a.loc2_12.1: i32 = param a +// CHECK:STDOUT: %a.loc2_12.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Greater.%a: i32 = bind_name a, %a.loc2_12.1 // CHECK:STDOUT: %int.make_type_32.loc2_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_23.1: type = value_of_initializer %int.make_type_32.loc2_23 [template = i32] // CHECK:STDOUT: %.loc2_23.2: type = converted %int.make_type_32.loc2_23, %.loc2_23.1 [template = i32] -// CHECK:STDOUT: %b.loc2_20.1: i32 = param b +// CHECK:STDOUT: %b.loc2_20.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Greater.%b: i32 = bind_name b, %b.loc2_20.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_31.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -104,7 +104,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] -// CHECK:STDOUT: %a.loc3_11.1: i32 = param a +// CHECK:STDOUT: %a.loc3_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_32.loc3_22 [template = i32] @@ -115,22 +115,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] -// CHECK:STDOUT: %a.loc16_16.1: i32 = param a +// CHECK:STDOUT: %a.loc16_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_32.loc16_27, %.loc16_27.1 [template = i32] -// CHECK:STDOUT: %b.loc16_24.1: i32 = param b +// CHECK:STDOUT: %b.loc16_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc16_24.1 // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index 0842d760d155..b266c0a3a074 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -88,12 +88,12 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.make_type_32.loc2_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_32.loc2_17 [template = i32] // CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_32.loc2_17, %.loc2_17.1 [template = i32] -// CHECK:STDOUT: %a.loc2_14.1: i32 = param a +// CHECK:STDOUT: %a.loc2_14.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @GreaterEq.%a: i32 = bind_name a, %a.loc2_14.1 // CHECK:STDOUT: %int.make_type_32.loc2_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %int.make_type_32.loc2_25 [template = i32] // CHECK:STDOUT: %.loc2_25.2: type = converted %int.make_type_32.loc2_25, %.loc2_25.1 [template = i32] -// CHECK:STDOUT: %b.loc2_22.1: i32 = param b +// CHECK:STDOUT: %b.loc2_22.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @GreaterEq.%b: i32 = bind_name b, %b.loc2_22.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -104,7 +104,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] -// CHECK:STDOUT: %a.loc3_11.1: i32 = param a +// CHECK:STDOUT: %a.loc3_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_32.loc3_22 [template = i32] @@ -115,22 +115,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] -// CHECK:STDOUT: %a.loc16_16.1: i32 = param a +// CHECK:STDOUT: %a.loc16_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_32.loc16_27, %.loc16_27.1 [template = i32] -// CHECK:STDOUT: %b.loc16_24.1: i32 = param b +// CHECK:STDOUT: %b.loc16_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc16_24.1 // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index 02ed96c9987e..d64afa18b016 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -108,12 +108,12 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc2_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_32.loc2_17 [template = i32] // CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_32.loc2_17, %.loc2_17.1 [template = i32] -// CHECK:STDOUT: %a.loc2_14.1: i32 = param a +// CHECK:STDOUT: %a.loc2_14.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @LeftShift.%a: i32 = bind_name a, %a.loc2_14.1 // CHECK:STDOUT: %int.make_type_32.loc2_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %int.make_type_32.loc2_25 [template = i32] // CHECK:STDOUT: %.loc2_25.2: type = converted %int.make_type_32.loc2_25, %.loc2_25.1 [template = i32] -// CHECK:STDOUT: %b.loc2_22.1: i32 = param b +// CHECK:STDOUT: %b.loc2_22.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @LeftShift.%b: i32 = bind_name b, %b.loc2_22.1 // CHECK:STDOUT: %int.make_type_32.loc2_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %int.make_type_32.loc2_33 [template = i32] @@ -140,12 +140,12 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -231,12 +231,12 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc4_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_32.loc4_17 [template = i32] // CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_32.loc4_17, %.loc4_17.1 [template = i32] -// CHECK:STDOUT: %a.loc4_14.1: i32 = param a +// CHECK:STDOUT: %a.loc4_14.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @LeftShift.%a: i32 = bind_name a, %a.loc4_14.1 // CHECK:STDOUT: %int.make_type_32.loc4_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_25.1: type = value_of_initializer %int.make_type_32.loc4_25 [template = i32] // CHECK:STDOUT: %.loc4_25.2: type = converted %int.make_type_32.loc4_25, %.loc4_25.1 [template = i32] -// CHECK:STDOUT: %b.loc4_22.1: i32 = param b +// CHECK:STDOUT: %b.loc4_22.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @LeftShift.%b: i32 = bind_name b, %b.loc4_22.1 // CHECK:STDOUT: %int.make_type_32.loc4_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_33.1: type = value_of_initializer %int.make_type_32.loc4_33 [template = i32] @@ -247,7 +247,7 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc5_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_32.loc5_14 [template = i32] // CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_32.loc5_14, %.loc5_14.1 [template = i32] -// CHECK:STDOUT: %a.loc5_11.1: i32 = param a +// CHECK:STDOUT: %a.loc5_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc5_11.1 // CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_32.loc5_22 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/less.carbon b/toolchain/check/testdata/builtins/int/less.carbon index 1c5360078335..729c6402c7ff 100644 --- a/toolchain/check/testdata/builtins/int/less.carbon +++ b/toolchain/check/testdata/builtins/int/less.carbon @@ -88,12 +88,12 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.make_type_32.loc2_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_12.1: type = value_of_initializer %int.make_type_32.loc2_12 [template = i32] // CHECK:STDOUT: %.loc2_12.2: type = converted %int.make_type_32.loc2_12, %.loc2_12.1 [template = i32] -// CHECK:STDOUT: %a.loc2_9.1: i32 = param a +// CHECK:STDOUT: %a.loc2_9.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Less.%a: i32 = bind_name a, %a.loc2_9.1 // CHECK:STDOUT: %int.make_type_32.loc2_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_20.1: type = value_of_initializer %int.make_type_32.loc2_20 [template = i32] // CHECK:STDOUT: %.loc2_20.2: type = converted %int.make_type_32.loc2_20, %.loc2_20.1 [template = i32] -// CHECK:STDOUT: %b.loc2_17.1: i32 = param b +// CHECK:STDOUT: %b.loc2_17.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Less.%b: i32 = bind_name b, %b.loc2_17.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_28.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -104,7 +104,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] -// CHECK:STDOUT: %a.loc3_11.1: i32 = param a +// CHECK:STDOUT: %a.loc3_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_32.loc3_22 [template = i32] @@ -115,22 +115,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] -// CHECK:STDOUT: %a.loc16_16.1: i32 = param a +// CHECK:STDOUT: %a.loc16_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_32.loc16_27, %.loc16_27.1 [template = i32] -// CHECK:STDOUT: %b.loc16_24.1: i32 = param b +// CHECK:STDOUT: %b.loc16_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc16_24.1 // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index 5e7027ffa435..0f543b38db8d 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -88,12 +88,12 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_32.loc2_14 [template = i32] // CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_32.loc2_14, %.loc2_14.1 [template = i32] -// CHECK:STDOUT: %a.loc2_11.1: i32 = param a +// CHECK:STDOUT: %a.loc2_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @LessEq.%a: i32 = bind_name a, %a.loc2_11.1 // CHECK:STDOUT: %int.make_type_32.loc2_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_32.loc2_22 [template = i32] // CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_32.loc2_22, %.loc2_22.1 [template = i32] -// CHECK:STDOUT: %b.loc2_19.1: i32 = param b +// CHECK:STDOUT: %b.loc2_19.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @LessEq.%b: i32 = bind_name b, %b.loc2_19.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_30.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -104,7 +104,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.make_type_32.loc3_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_32.loc3_14 [template = i32] // CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_32.loc3_14, %.loc3_14.1 [template = i32] -// CHECK:STDOUT: %a.loc3_11.1: i32 = param a +// CHECK:STDOUT: %a.loc3_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc3_11.1 // CHECK:STDOUT: %int.make_type_32.loc3_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_32.loc3_22 [template = i32] @@ -115,22 +115,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc8_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc8_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc8_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc8_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] // CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_32.loc16_19, %.loc16_19.1 [template = i32] -// CHECK:STDOUT: %a.loc16_16.1: i32 = param a +// CHECK:STDOUT: %a.loc16_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc16_16.1 // CHECK:STDOUT: %int.make_type_32.loc16_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_32.loc16_27 [template = i32] // CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_32.loc16_27, %.loc16_27.1 [template = i32] -// CHECK:STDOUT: %b.loc16_24.1: i32 = param b +// CHECK:STDOUT: %b.loc16_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc16_24.1 // CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index f6b9b999be52..10f63efd2729 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -104,7 +104,7 @@ var m: Int(1000000000); // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %n.loc4_8.1: i32 = param n +// CHECK:STDOUT: %n.loc4_8.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @Int.%n: i32 = bind_name n, %n.loc4_8.1 // CHECK:STDOUT: @Int.%return: ref type = var // CHECK:STDOUT: } @@ -168,7 +168,7 @@ var m: Int(1000000000); // CHECK:STDOUT: %int.make_type_signed.loc6_12: init type = call %Int.ref.loc6_9(%.loc6_13) [template = constants.%.3] // CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_12 [template = constants.%.3] // CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_12, %.loc6_15.1 [template = constants.%.3] -// CHECK:STDOUT: %n.loc6_6.1: %.3 = param n +// CHECK:STDOUT: %n.loc6_6.1: %.3 = param n, runtime_param0 // CHECK:STDOUT: @F.%n: %.3 = bind_name n, %n.loc6_6.1 // CHECK:STDOUT: %Int.ref.loc6_21: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc6_25: i32 = int_literal 64 [template = constants.%.2] @@ -183,7 +183,7 @@ var m: Int(1000000000); // CHECK:STDOUT: %int.make_type_signed.loc10_12: init type = call %Int.ref.loc10_9(%.loc10_13) [template = constants.%.5] // CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_12 [template = constants.%.5] // CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_12, %.loc10_15.1 [template = constants.%.5] -// CHECK:STDOUT: %n.loc10_6.1: %.5 = param n +// CHECK:STDOUT: %n.loc10_6.1: %.5 = param n, runtime_param0 // CHECK:STDOUT: @G.%n: %.5 = bind_name n, %n.loc10_6.1 // CHECK:STDOUT: %Int.ref.loc10_21: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %.loc10_25: i32 = int_literal 13 [template = constants.%.4] @@ -196,14 +196,14 @@ var m: Int(1000000000); // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_17.2: type = converted %int.make_type_32, %.loc14_17.1 [template = i32] -// CHECK:STDOUT: %N.loc14_13.1: i32 = param N +// CHECK:STDOUT: %N.loc14_13.1: i32 = param N, runtime_param // CHECK:STDOUT: @Symbolic.%N.loc14: i32 = bind_symbolic_name N 0, %N.loc14_13.1 [symbolic = @Symbolic.%N.1 (constants.%N)] // CHECK:STDOUT: %Int.ref.loc14_25: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_29: i32 = name_ref N, @Symbolic.%N.loc14 [symbolic = @Symbolic.%N.1 (constants.%N)] // CHECK:STDOUT: %int.make_type_signed.loc14_28: init type = call %Int.ref.loc14_25(%N.ref.loc14_29) [symbolic = @Symbolic.%.1 (constants.%.6)] // CHECK:STDOUT: %.loc14_30.1: type = value_of_initializer %int.make_type_signed.loc14_28 [symbolic = @Symbolic.%.1 (constants.%.6)] // CHECK:STDOUT: %.loc14_30.2: type = converted %int.make_type_signed.loc14_28, %.loc14_30.1 [symbolic = @Symbolic.%.1 (constants.%.6)] -// CHECK:STDOUT: %x.loc14_22.1: @Symbolic.%.1 (%.6) = param x +// CHECK:STDOUT: %x.loc14_22.1: @Symbolic.%.1 (%.6) = param x, runtime_param0 // CHECK:STDOUT: @Symbolic.%x: @Symbolic.%.1 (%.6) = bind_name x, %x.loc14_22.1 // CHECK:STDOUT: %Int.ref.loc14_36: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_40: i32 = name_ref N, @Symbolic.%N.loc14 [symbolic = @Symbolic.%N.1 (constants.%N)] @@ -333,7 +333,7 @@ var m: Int(1000000000); // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] -// CHECK:STDOUT: %n.loc6_11.1: i32 = param n +// CHECK:STDOUT: %n.loc6_11.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @Negate.%n: i32 = bind_name n, %n.loc6_11.1 // CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index 806389af6e73..c25127819dfb 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -104,7 +104,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_12.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_12.2: type = converted %int.make_type_32, %.loc4_12.1 [template = i32] -// CHECK:STDOUT: %n.loc4_9.1: i32 = param n +// CHECK:STDOUT: %n.loc4_9.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @UInt.%n: i32 = bind_name n, %n.loc4_9.1 // CHECK:STDOUT: @UInt.%return: ref type = var // CHECK:STDOUT: } @@ -168,7 +168,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: %int.make_type_unsigned.loc6_13: init type = call %UInt.ref.loc6_9(%.loc6_14) [template = constants.%.3] // CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_13 [template = constants.%.3] // CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_13, %.loc6_16.1 [template = constants.%.3] -// CHECK:STDOUT: %n.loc6_6.1: %.3 = param n +// CHECK:STDOUT: %n.loc6_6.1: %.3 = param n, runtime_param0 // CHECK:STDOUT: @F.%n: %.3 = bind_name n, %n.loc6_6.1 // CHECK:STDOUT: %UInt.ref.loc6_22: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc6_27: i32 = int_literal 64 [template = constants.%.2] @@ -183,7 +183,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: %int.make_type_unsigned.loc10_13: init type = call %UInt.ref.loc10_9(%.loc10_14) [template = constants.%.5] // CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_13 [template = constants.%.5] // CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_13, %.loc10_16.1 [template = constants.%.5] -// CHECK:STDOUT: %n.loc10_6.1: %.5 = param n +// CHECK:STDOUT: %n.loc10_6.1: %.5 = param n, runtime_param0 // CHECK:STDOUT: @G.%n: %.5 = bind_name n, %n.loc10_6.1 // CHECK:STDOUT: %UInt.ref.loc10_22: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %.loc10_27: i32 = int_literal 13 [template = constants.%.4] @@ -196,14 +196,14 @@ var m: UInt(1000000000); // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_17.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_17.2: type = converted %int.make_type_32, %.loc14_17.1 [template = i32] -// CHECK:STDOUT: %N.loc14_13.1: i32 = param N +// CHECK:STDOUT: %N.loc14_13.1: i32 = param N, runtime_param // CHECK:STDOUT: @Symbolic.%N.loc14: i32 = bind_symbolic_name N 0, %N.loc14_13.1 [symbolic = @Symbolic.%N.1 (constants.%N)] // CHECK:STDOUT: %UInt.ref.loc14_25: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_30: i32 = name_ref N, @Symbolic.%N.loc14 [symbolic = @Symbolic.%N.1 (constants.%N)] // CHECK:STDOUT: %int.make_type_unsigned.loc14_29: init type = call %UInt.ref.loc14_25(%N.ref.loc14_30) [symbolic = @Symbolic.%.1 (constants.%.6)] // CHECK:STDOUT: %.loc14_31.1: type = value_of_initializer %int.make_type_unsigned.loc14_29 [symbolic = @Symbolic.%.1 (constants.%.6)] // CHECK:STDOUT: %.loc14_31.2: type = converted %int.make_type_unsigned.loc14_29, %.loc14_31.1 [symbolic = @Symbolic.%.1 (constants.%.6)] -// CHECK:STDOUT: %x.loc14_22.1: @Symbolic.%.1 (%.6) = param x +// CHECK:STDOUT: %x.loc14_22.1: @Symbolic.%.1 (%.6) = param x, runtime_param0 // CHECK:STDOUT: @Symbolic.%x: @Symbolic.%.1 (%.6) = bind_name x, %x.loc14_22.1 // CHECK:STDOUT: %UInt.ref.loc14_37: %UInt.type = name_ref UInt, imports.%import_ref.1 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_42: i32 = name_ref N, @Symbolic.%N.loc14 [symbolic = @Symbolic.%N.1 (constants.%N)] @@ -333,7 +333,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] -// CHECK:STDOUT: %n.loc6_11.1: i32 = param n +// CHECK:STDOUT: %n.loc6_11.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @Negate.%n: i32 = bind_name n, %n.loc6_11.1 // CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/neq.carbon b/toolchain/check/testdata/builtins/int/neq.carbon index 84b649924baa..7f476dd221d1 100644 --- a/toolchain/check/testdata/builtins/int/neq.carbon +++ b/toolchain/check/testdata/builtins/int/neq.carbon @@ -79,12 +79,12 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Neq.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Neq.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %bool.make_type.loc2: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %bool.make_type.loc2 [template = bool] @@ -95,22 +95,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %False.decl: type = class_decl @False [template = constants.%False] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %True.ref: type = name_ref True, %True.decl [template = constants.%True] -// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_ +// CHECK:STDOUT: %true_.loc7_6.1: %True = param true_, runtime_param0 // CHECK:STDOUT: @F.%true_: %True = bind_name true_, %true_.loc7_6.1 // CHECK:STDOUT: %False.ref: type = name_ref False, %False.decl [template = constants.%False] -// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_ +// CHECK:STDOUT: %false_.loc7_19.1: %False = param false_, runtime_param1 // CHECK:STDOUT: @F.%false_: %False = bind_name false_, %false_.loc7_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_32.loc12_19 [template = i32] // CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_32.loc12_19, %.loc12_19.1 [template = i32] -// CHECK:STDOUT: %a.loc12_16.1: i32 = param a +// CHECK:STDOUT: %a.loc12_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc12_16.1 // CHECK:STDOUT: %int.make_type_32.loc12_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %int.make_type_32.loc12_27 [template = i32] // CHECK:STDOUT: %.loc12_27.2: type = converted %int.make_type_32.loc12_27, %.loc12_27.1 [template = i32] -// CHECK:STDOUT: %b.loc12_24.1: i32 = param b +// CHECK:STDOUT: %b.loc12_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc12_24.1 // CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index 867706e5d750..6992f30786e6 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -64,12 +64,12 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc2_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_32.loc2_10 [template = i32] // CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_32.loc2_10, %.loc2_10.1 [template = i32] -// CHECK:STDOUT: %a.loc2_7.1: i32 = param a +// CHECK:STDOUT: %a.loc2_7.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Or.%a: i32 = bind_name a, %a.loc2_7.1 // CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] -// CHECK:STDOUT: %b.loc2_15.1: i32 = param b +// CHECK:STDOUT: %b.loc2_15.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Or.%b: i32 = bind_name b, %b.loc2_15.1 // CHECK:STDOUT: %int.make_type_32.loc2_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_32.loc2_26 [template = i32] @@ -96,12 +96,12 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index 9824c0b652a7..5af956319ccf 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -109,12 +109,12 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc2_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_32.loc2_18 [template = i32] // CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_32.loc2_18, %.loc2_18.1 [template = i32] -// CHECK:STDOUT: %a.loc2_15.1: i32 = param a +// CHECK:STDOUT: %a.loc2_15.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RightShift.%a: i32 = bind_name a, %a.loc2_15.1 // CHECK:STDOUT: %int.make_type_32.loc2_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_32.loc2_26 [template = i32] // CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_32.loc2_26, %.loc2_26.1 [template = i32] -// CHECK:STDOUT: %b.loc2_23.1: i32 = param b +// CHECK:STDOUT: %b.loc2_23.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RightShift.%b: i32 = bind_name b, %b.loc2_23.1 // CHECK:STDOUT: %int.make_type_32.loc2_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_34.1: type = value_of_initializer %int.make_type_32.loc2_34 [template = i32] @@ -141,12 +141,12 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -231,12 +231,12 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc6_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_18.1: type = value_of_initializer %int.make_type_32.loc6_18 [template = i32] // CHECK:STDOUT: %.loc6_18.2: type = converted %int.make_type_32.loc6_18, %.loc6_18.1 [template = i32] -// CHECK:STDOUT: %a.loc6_15.1: i32 = param a +// CHECK:STDOUT: %a.loc6_15.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RightShift.%a: i32 = bind_name a, %a.loc6_15.1 // CHECK:STDOUT: %int.make_type_32.loc6_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_26.1: type = value_of_initializer %int.make_type_32.loc6_26 [template = i32] // CHECK:STDOUT: %.loc6_26.2: type = converted %int.make_type_32.loc6_26, %.loc6_26.1 [template = i32] -// CHECK:STDOUT: %b.loc6_23.1: i32 = param b +// CHECK:STDOUT: %b.loc6_23.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RightShift.%b: i32 = bind_name b, %b.loc6_23.1 // CHECK:STDOUT: %int.make_type_32.loc6_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_32.loc6_34 [template = i32] @@ -247,7 +247,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc7_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_14.1: type = value_of_initializer %int.make_type_32.loc7_14 [template = i32] // CHECK:STDOUT: %.loc7_14.2: type = converted %int.make_type_32.loc7_14, %.loc7_14.1 [template = i32] -// CHECK:STDOUT: %a.loc7_11.1: i32 = param a +// CHECK:STDOUT: %a.loc7_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc7_11.1 // CHECK:STDOUT: %int.make_type_32.loc7_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_22.1: type = value_of_initializer %int.make_type_32.loc7_22 [template = i32] @@ -369,12 +369,12 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc4_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_18.1: type = value_of_initializer %int.make_type_32.loc4_18 [template = i32] // CHECK:STDOUT: %.loc4_18.2: type = converted %int.make_type_32.loc4_18, %.loc4_18.1 [template = i32] -// CHECK:STDOUT: %a.loc4_15.1: i32 = param a +// CHECK:STDOUT: %a.loc4_15.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RightShift.%a: i32 = bind_name a, %a.loc4_15.1 // CHECK:STDOUT: %int.make_type_32.loc4_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_26.1: type = value_of_initializer %int.make_type_32.loc4_26 [template = i32] // CHECK:STDOUT: %.loc4_26.2: type = converted %int.make_type_32.loc4_26, %.loc4_26.1 [template = i32] -// CHECK:STDOUT: %b.loc4_23.1: i32 = param b +// CHECK:STDOUT: %b.loc4_23.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RightShift.%b: i32 = bind_name b, %b.loc4_23.1 // CHECK:STDOUT: %int.make_type_32.loc4_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_34.1: type = value_of_initializer %int.make_type_32.loc4_34 [template = i32] @@ -385,7 +385,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.make_type_32.loc5_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_32.loc5_14 [template = i32] // CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_32.loc5_14, %.loc5_14.1 [template = i32] -// CHECK:STDOUT: %a.loc5_11.1: i32 = param a +// CHECK:STDOUT: %a.loc5_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc5_11.1 // CHECK:STDOUT: %int.make_type_32.loc5_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_32.loc5_22 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index 35778923ecff..6847786f5b9d 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -134,12 +134,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -166,12 +166,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -267,7 +267,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc8_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_32.loc8_14 [template = i32] // CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_32.loc8_14, %.loc8_14.1 [template = i32] -// CHECK:STDOUT: %a.loc8_11.1: i32 = param a +// CHECK:STDOUT: %a.loc8_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @TooFew.%a: i32 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %int.make_type_32.loc8_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %int.make_type_32.loc8_22 [template = i32] @@ -278,17 +278,17 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] -// CHECK:STDOUT: %a.loc13_12.1: i32 = param a +// CHECK:STDOUT: %a.loc13_12.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @TooMany.%a: i32 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] -// CHECK:STDOUT: %b.loc13_20.1: i32 = param b +// CHECK:STDOUT: %b.loc13_20.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @TooMany.%b: i32 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13_31 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13_31, %.loc13_31.1 [template = i32] -// CHECK:STDOUT: %c.loc13_28.1: i32 = param c +// CHECK:STDOUT: %c.loc13_28.1: i32 = param c, runtime_param2 // CHECK:STDOUT: @TooMany.%c: i32 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %int.make_type_32.loc13_39: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %int.make_type_32.loc13_39 [template = i32] @@ -299,12 +299,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc18_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18_21 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18_21, %.loc18_21.1 [template = i32] -// CHECK:STDOUT: %a.loc18_18.1: i32 = param a +// CHECK:STDOUT: %a.loc18_18.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @BadReturnType.%a: i32 = bind_name a, %a.loc18_18.1 // CHECK:STDOUT: %int.make_type_32.loc18_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_32.loc18_29 [template = i32] // CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_32.loc18_29, %.loc18_29.1 [template = i32] -// CHECK:STDOUT: %b.loc18_26.1: i32 = param b +// CHECK:STDOUT: %b.loc18_26.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @BadReturnType.%b: i32 = bind_name b, %b.loc18_26.1 // CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] @@ -315,12 +315,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] -// CHECK:STDOUT: %a.loc19_14.1: i32 = param a +// CHECK:STDOUT: %a.loc19_14.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @JustRight.%a: i32 = bind_name a, %a.loc19_14.1 // CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] -// CHECK:STDOUT: %b.loc19_22.1: i32 = param b +// CHECK:STDOUT: %b.loc19_22.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @JustRight.%b: i32 = bind_name b, %b.loc19_22.1 // CHECK:STDOUT: %int.make_type_32.loc19_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_33.1: type = value_of_initializer %int.make_type_32.loc19_33 [template = i32] @@ -353,17 +353,16 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc44_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc44_37: i32 = int_literal 3 [template = constants.%.4] -// CHECK:STDOUT: %int.sadd: init i32 = call %JustRight.ref() [template = ] // CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_32.loc44 [template = i32] // CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_32.loc44, %.loc44_16.1 [template = i32] -// CHECK:STDOUT: %.loc44_39: type = array_type %int.sadd, i32 [template = ] +// CHECK:STDOUT: %.loc44_39: type = array_type , i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var // CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_32.loc46_25 [template = i32] // CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_32.loc46_25, %.loc46_25.1 [template = i32] -// CHECK:STDOUT: %a.loc46_22.1: i32 = param a +// CHECK:STDOUT: %a.loc46_22.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooFew.%a: i32 = bind_name a, %a.loc46_22.1 // CHECK:STDOUT: %int.make_type_32.loc46_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_32.loc46_33 [template = i32] @@ -374,17 +373,17 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc50_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc50_26.1: type = value_of_initializer %int.make_type_32.loc50_26 [template = i32] // CHECK:STDOUT: %.loc50_26.2: type = converted %int.make_type_32.loc50_26, %.loc50_26.1 [template = i32] -// CHECK:STDOUT: %a.loc50_23.1: i32 = param a +// CHECK:STDOUT: %a.loc50_23.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooMany.%a: i32 = bind_name a, %a.loc50_23.1 // CHECK:STDOUT: %int.make_type_32.loc50_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc50_34.1: type = value_of_initializer %int.make_type_32.loc50_34 [template = i32] // CHECK:STDOUT: %.loc50_34.2: type = converted %int.make_type_32.loc50_34, %.loc50_34.1 [template = i32] -// CHECK:STDOUT: %b.loc50_31.1: i32 = param b +// CHECK:STDOUT: %b.loc50_31.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallTooMany.%b: i32 = bind_name b, %b.loc50_31.1 // CHECK:STDOUT: %int.make_type_32.loc50_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc50_42.1: type = value_of_initializer %int.make_type_32.loc50_42 [template = i32] // CHECK:STDOUT: %.loc50_42.2: type = converted %int.make_type_32.loc50_42, %.loc50_42.1 [template = i32] -// CHECK:STDOUT: %c.loc50_39.1: i32 = param c +// CHECK:STDOUT: %c.loc50_39.1: i32 = param c, runtime_param2 // CHECK:STDOUT: @RuntimeCallTooMany.%c: i32 = bind_name c, %c.loc50_39.1 // CHECK:STDOUT: %int.make_type_32.loc50_50: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc50_50.1: type = value_of_initializer %int.make_type_32.loc50_50 [template = i32] @@ -395,12 +394,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc54_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc54_32.1: type = value_of_initializer %int.make_type_32.loc54_32 [template = i32] // CHECK:STDOUT: %.loc54_32.2: type = converted %int.make_type_32.loc54_32, %.loc54_32.1 [template = i32] -// CHECK:STDOUT: %a.loc54_29.1: i32 = param a +// CHECK:STDOUT: %a.loc54_29.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: i32 = bind_name a, %a.loc54_29.1 // CHECK:STDOUT: %int.make_type_32.loc54_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc54_40.1: type = value_of_initializer %int.make_type_32.loc54_40 [template = i32] // CHECK:STDOUT: %.loc54_40.2: type = converted %int.make_type_32.loc54_40, %.loc54_40.1 [template = i32] -// CHECK:STDOUT: %b.loc54_37.1: i32 = param b +// CHECK:STDOUT: %b.loc54_37.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: i32 = bind_name b, %b.loc54_37.1 // CHECK:STDOUT: %bool.make_type.loc54: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc54_48.1: type = value_of_initializer %bool.make_type.loc54 [template = bool] @@ -495,12 +494,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index b46978bf31c9..f4f8f018ff7e 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -102,12 +102,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -134,12 +134,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -220,12 +220,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] @@ -236,12 +236,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] -// CHECK:STDOUT: %a.loc5_8.1: i32 = param a +// CHECK:STDOUT: %a.loc5_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 // CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] -// CHECK:STDOUT: %b.loc5_16.1: i32 = param b +// CHECK:STDOUT: %b.loc5_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 // CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] @@ -252,7 +252,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] -// CHECK:STDOUT: %a.loc6_11.1: i32 = param a +// CHECK:STDOUT: %a.loc6_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc6_11.1 // CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] @@ -373,12 +373,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index ade98c241bd4..a34a0618c8bf 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -105,12 +105,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -137,12 +137,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -224,12 +224,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] @@ -240,12 +240,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] -// CHECK:STDOUT: %a.loc5_8.1: i32 = param a +// CHECK:STDOUT: %a.loc5_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 // CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] -// CHECK:STDOUT: %b.loc5_16.1: i32 = param b +// CHECK:STDOUT: %b.loc5_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 // CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] @@ -256,7 +256,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] -// CHECK:STDOUT: %a.loc6_11.1: i32 = param a +// CHECK:STDOUT: %a.loc6_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc6_11.1 // CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] @@ -377,12 +377,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index b768f6968ab3..6ce2d5f6d867 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -76,12 +76,12 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mul.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mul.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -108,12 +108,12 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -187,12 +187,12 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mul.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mul.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index 1da770a69f60..89bbc9e4fdfe 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -163,7 +163,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_32.loc2_14 [template = i32] // CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_32.loc2_14, %.loc2_14.1 [template = i32] -// CHECK:STDOUT: %a.loc2_11.1: i32 = param a +// CHECK:STDOUT: %a.loc2_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc2_11.1 // CHECK:STDOUT: %int.make_type_32.loc2_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_32.loc2_22 [template = i32] @@ -196,12 +196,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_32.loc9_19 [template = i32] // CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_32.loc9_19, %.loc9_19.1 [template = i32] -// CHECK:STDOUT: %a.loc9_16.1: i32 = param a +// CHECK:STDOUT: %a.loc9_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc9_16.1 // CHECK:STDOUT: %int.make_type_32.loc9_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_27.1: type = value_of_initializer %int.make_type_32.loc9_27 [template = i32] // CHECK:STDOUT: %.loc9_27.2: type = converted %int.make_type_32.loc9_27, %.loc9_27.1 [template = i32] -// CHECK:STDOUT: %b.loc9_24.1: i32 = param b +// CHECK:STDOUT: %b.loc9_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc9_24.1 // CHECK:STDOUT: %int.make_type_32.loc9_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_35.1: type = value_of_initializer %int.make_type_32.loc9_35 [template = i32] @@ -307,12 +307,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] -// CHECK:STDOUT: %a.loc13_12.1: i32 = param a +// CHECK:STDOUT: %a.loc13_12.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @TooMany.%a: i32 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] -// CHECK:STDOUT: %b.loc13_20.1: i32 = param b +// CHECK:STDOUT: %b.loc13_20.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @TooMany.%b: i32 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13_31 [template = i32] @@ -323,7 +323,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18, %.loc18_21.1 [template = i32] -// CHECK:STDOUT: %a.loc18_18.1: i32 = param a +// CHECK:STDOUT: %a.loc18_18.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @BadReturnType.%a: i32 = bind_name a, %a.loc18_18.1 // CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] @@ -334,7 +334,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] -// CHECK:STDOUT: %a.loc19_14.1: i32 = param a +// CHECK:STDOUT: %a.loc19_14.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @JustRight.%a: i32 = bind_name a, %a.loc19_14.1 // CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] @@ -363,17 +363,16 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc44_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_34: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %int.snegate: init i32 = call %JustRight.ref() [template = ] // CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_32.loc44 [template = i32] // CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_32.loc44, %.loc44_16.1 [template = i32] -// CHECK:STDOUT: %.loc44_36: type = array_type %int.snegate, i32 [template = ] +// CHECK:STDOUT: %.loc44_36: type = array_type , i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var // CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_32.loc46_25 [template = i32] // CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_32.loc46_25, %.loc46_25.1 [template = i32] -// CHECK:STDOUT: %a.loc46_22.1: i32 = param a +// CHECK:STDOUT: %a.loc46_22.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooFew.%a: i32 = bind_name a, %a.loc46_22.1 // CHECK:STDOUT: %int.make_type_32.loc46_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_32.loc46_33 [template = i32] @@ -384,17 +383,17 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc57_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_32.loc57_26 [template = i32] // CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_32.loc57_26, %.loc57_26.1 [template = i32] -// CHECK:STDOUT: %a.loc57_23.1: i32 = param a +// CHECK:STDOUT: %a.loc57_23.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooMany.%a: i32 = bind_name a, %a.loc57_23.1 // CHECK:STDOUT: %int.make_type_32.loc57_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_34.1: type = value_of_initializer %int.make_type_32.loc57_34 [template = i32] // CHECK:STDOUT: %.loc57_34.2: type = converted %int.make_type_32.loc57_34, %.loc57_34.1 [template = i32] -// CHECK:STDOUT: %b.loc57_31.1: i32 = param b +// CHECK:STDOUT: %b.loc57_31.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallTooMany.%b: i32 = bind_name b, %b.loc57_31.1 // CHECK:STDOUT: %int.make_type_32.loc57_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_42.1: type = value_of_initializer %int.make_type_32.loc57_42 [template = i32] // CHECK:STDOUT: %.loc57_42.2: type = converted %int.make_type_32.loc57_42, %.loc57_42.1 [template = i32] -// CHECK:STDOUT: %c.loc57_39.1: i32 = param c +// CHECK:STDOUT: %c.loc57_39.1: i32 = param c, runtime_param2 // CHECK:STDOUT: @RuntimeCallTooMany.%c: i32 = bind_name c, %c.loc57_39.1 // CHECK:STDOUT: %int.make_type_32.loc57_50: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_50.1: type = value_of_initializer %int.make_type_32.loc57_50 [template = i32] @@ -405,12 +404,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc68_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_32.loc68_32 [template = i32] // CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_32.loc68_32, %.loc68_32.1 [template = i32] -// CHECK:STDOUT: %a.loc68_29.1: i32 = param a +// CHECK:STDOUT: %a.loc68_29.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: i32 = bind_name a, %a.loc68_29.1 // CHECK:STDOUT: %int.make_type_32.loc68_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_40.1: type = value_of_initializer %int.make_type_32.loc68_40 [template = i32] // CHECK:STDOUT: %.loc68_40.2: type = converted %int.make_type_32.loc68_40, %.loc68_40.1 [template = i32] -// CHECK:STDOUT: %b.loc68_37.1: i32 = param b +// CHECK:STDOUT: %b.loc68_37.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: i32 = bind_name b, %b.loc68_37.1 // CHECK:STDOUT: %bool.make_type.loc68: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type.loc68 [template = bool] @@ -435,10 +434,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a -// CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() [template = ] -// CHECK:STDOUT: %.loc54_19.1: i32 = value_of_initializer %TooFew.call [template = ] -// CHECK:STDOUT: %.loc54_19.2: i32 = converted %TooFew.call, %.loc54_19.1 [template = ] -// CHECK:STDOUT: return %.loc54_19.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { @@ -447,10 +443,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c -// CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref() [template = ] -// CHECK:STDOUT: %.loc65_26.1: i32 = value_of_initializer %TooMany.call [template = ] -// CHECK:STDOUT: %.loc65_26.2: i32 = converted %TooMany.call, %.loc65_26.1 [template = ] -// CHECK:STDOUT: return %.loc65_26.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { @@ -458,10 +451,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref() [template = ] -// CHECK:STDOUT: %.loc76_29.1: bool = value_of_initializer %BadReturnType.call [template = ] -// CHECK:STDOUT: %.loc76_29.2: bool = converted %BadReturnType.call, %.loc76_29.1 [template = ] -// CHECK:STDOUT: return %.loc76_29.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_overflow.carbon @@ -508,7 +498,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc4_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_32.loc4_14 [template = i32] // CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_32.loc4_14, %.loc4_14.1 [template = i32] -// CHECK:STDOUT: %a.loc4_11.1: i32 = param a +// CHECK:STDOUT: %a.loc4_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc4_11.1 // CHECK:STDOUT: %int.make_type_32.loc4_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_32.loc4_22 [template = i32] @@ -519,12 +509,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] -// CHECK:STDOUT: %a.loc5_8.1: i32 = param a +// CHECK:STDOUT: %a.loc5_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 // CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] -// CHECK:STDOUT: %b.loc5_16.1: i32 = param b +// CHECK:STDOUT: %b.loc5_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 // CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index b1e29f6a884a..4baf7878e216 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -77,12 +77,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -109,12 +109,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -190,12 +190,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index 5720203cf045..0a689c42352b 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -131,12 +131,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -163,12 +163,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -264,7 +264,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc8_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_32.loc8_14 [template = i32] // CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_32.loc8_14, %.loc8_14.1 [template = i32] -// CHECK:STDOUT: %a.loc8_11.1: i32 = param a +// CHECK:STDOUT: %a.loc8_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @TooFew.%a: i32 = bind_name a, %a.loc8_11.1 // CHECK:STDOUT: %int.make_type_32.loc8_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %int.make_type_32.loc8_22 [template = i32] @@ -275,17 +275,17 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] -// CHECK:STDOUT: %a.loc13_12.1: i32 = param a +// CHECK:STDOUT: %a.loc13_12.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @TooMany.%a: i32 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] -// CHECK:STDOUT: %b.loc13_20.1: i32 = param b +// CHECK:STDOUT: %b.loc13_20.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @TooMany.%b: i32 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13_31 [template = i32] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_32.loc13_31, %.loc13_31.1 [template = i32] -// CHECK:STDOUT: %c.loc13_28.1: i32 = param c +// CHECK:STDOUT: %c.loc13_28.1: i32 = param c, runtime_param2 // CHECK:STDOUT: @TooMany.%c: i32 = bind_name c, %c.loc13_28.1 // CHECK:STDOUT: %int.make_type_32.loc13_39: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %int.make_type_32.loc13_39 [template = i32] @@ -296,12 +296,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc18_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18_21 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18_21, %.loc18_21.1 [template = i32] -// CHECK:STDOUT: %a.loc18_18.1: i32 = param a +// CHECK:STDOUT: %a.loc18_18.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @BadReturnType.%a: i32 = bind_name a, %a.loc18_18.1 // CHECK:STDOUT: %int.make_type_32.loc18_29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_32.loc18_29 [template = i32] // CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_32.loc18_29, %.loc18_29.1 [template = i32] -// CHECK:STDOUT: %b.loc18_26.1: i32 = param b +// CHECK:STDOUT: %b.loc18_26.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @BadReturnType.%b: i32 = bind_name b, %b.loc18_26.1 // CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] @@ -312,12 +312,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] -// CHECK:STDOUT: %a.loc19_14.1: i32 = param a +// CHECK:STDOUT: %a.loc19_14.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @JustRight.%a: i32 = bind_name a, %a.loc19_14.1 // CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] // CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32] -// CHECK:STDOUT: %b.loc19_22.1: i32 = param b +// CHECK:STDOUT: %b.loc19_22.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @JustRight.%b: i32 = bind_name b, %b.loc19_22.1 // CHECK:STDOUT: %int.make_type_32.loc19_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_33.1: type = value_of_initializer %int.make_type_32.loc19_33 [template = i32] @@ -350,17 +350,16 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc43_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc43_34: i32 = int_literal 2 [template = constants.%.3] // CHECK:STDOUT: %.loc43_37: i32 = int_literal 3 [template = constants.%.4] -// CHECK:STDOUT: %int.uadd: init i32 = call %JustRight.ref() [template = ] // CHECK:STDOUT: %.loc43_16.1: type = value_of_initializer %int.make_type_32.loc43 [template = i32] // CHECK:STDOUT: %.loc43_16.2: type = converted %int.make_type_32.loc43, %.loc43_16.1 [template = i32] -// CHECK:STDOUT: %.loc43_39: type = array_type %int.uadd, i32 [template = ] +// CHECK:STDOUT: %.loc43_39: type = array_type , i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var // CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %int.make_type_32.loc45_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc45_25.1: type = value_of_initializer %int.make_type_32.loc45_25 [template = i32] // CHECK:STDOUT: %.loc45_25.2: type = converted %int.make_type_32.loc45_25, %.loc45_25.1 [template = i32] -// CHECK:STDOUT: %a.loc45_22.1: i32 = param a +// CHECK:STDOUT: %a.loc45_22.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooFew.%a: i32 = bind_name a, %a.loc45_22.1 // CHECK:STDOUT: %int.make_type_32.loc45_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc45_33.1: type = value_of_initializer %int.make_type_32.loc45_33 [template = i32] @@ -371,17 +370,17 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc49_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc49_26.1: type = value_of_initializer %int.make_type_32.loc49_26 [template = i32] // CHECK:STDOUT: %.loc49_26.2: type = converted %int.make_type_32.loc49_26, %.loc49_26.1 [template = i32] -// CHECK:STDOUT: %a.loc49_23.1: i32 = param a +// CHECK:STDOUT: %a.loc49_23.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooMany.%a: i32 = bind_name a, %a.loc49_23.1 // CHECK:STDOUT: %int.make_type_32.loc49_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc49_34.1: type = value_of_initializer %int.make_type_32.loc49_34 [template = i32] // CHECK:STDOUT: %.loc49_34.2: type = converted %int.make_type_32.loc49_34, %.loc49_34.1 [template = i32] -// CHECK:STDOUT: %b.loc49_31.1: i32 = param b +// CHECK:STDOUT: %b.loc49_31.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallTooMany.%b: i32 = bind_name b, %b.loc49_31.1 // CHECK:STDOUT: %int.make_type_32.loc49_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc49_42.1: type = value_of_initializer %int.make_type_32.loc49_42 [template = i32] // CHECK:STDOUT: %.loc49_42.2: type = converted %int.make_type_32.loc49_42, %.loc49_42.1 [template = i32] -// CHECK:STDOUT: %c.loc49_39.1: i32 = param c +// CHECK:STDOUT: %c.loc49_39.1: i32 = param c, runtime_param2 // CHECK:STDOUT: @RuntimeCallTooMany.%c: i32 = bind_name c, %c.loc49_39.1 // CHECK:STDOUT: %int.make_type_32.loc49_50: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc49_50.1: type = value_of_initializer %int.make_type_32.loc49_50 [template = i32] @@ -392,12 +391,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc53_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_32.1: type = value_of_initializer %int.make_type_32.loc53_32 [template = i32] // CHECK:STDOUT: %.loc53_32.2: type = converted %int.make_type_32.loc53_32, %.loc53_32.1 [template = i32] -// CHECK:STDOUT: %a.loc53_29.1: i32 = param a +// CHECK:STDOUT: %a.loc53_29.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: i32 = bind_name a, %a.loc53_29.1 // CHECK:STDOUT: %int.make_type_32.loc53_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc53_40.1: type = value_of_initializer %int.make_type_32.loc53_40 [template = i32] // CHECK:STDOUT: %.loc53_40.2: type = converted %int.make_type_32.loc53_40, %.loc53_40.1 [template = i32] -// CHECK:STDOUT: %b.loc53_37.1: i32 = param b +// CHECK:STDOUT: %b.loc53_37.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: i32 = bind_name b, %b.loc53_37.1 // CHECK:STDOUT: %bool.make_type.loc53: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc53_48.1: type = value_of_initializer %bool.make_type.loc53 [template = bool] @@ -492,12 +491,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index 024bb91f47d9..5e8468e86ff2 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -98,12 +98,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -130,12 +130,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -217,12 +217,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] @@ -233,12 +233,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] -// CHECK:STDOUT: %a.loc5_8.1: i32 = param a +// CHECK:STDOUT: %a.loc5_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 // CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] -// CHECK:STDOUT: %b.loc5_16.1: i32 = param b +// CHECK:STDOUT: %b.loc5_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 // CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] @@ -249,7 +249,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] -// CHECK:STDOUT: %a.loc6_11.1: i32 = param a +// CHECK:STDOUT: %a.loc6_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc6_11.1 // CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] @@ -370,12 +370,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Div.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Div.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index ce37bad3299e..49e61afb58fc 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -100,12 +100,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -132,12 +132,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -219,12 +219,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] @@ -235,12 +235,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] -// CHECK:STDOUT: %a.loc5_8.1: i32 = param a +// CHECK:STDOUT: %a.loc5_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 // CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] -// CHECK:STDOUT: %b.loc5_16.1: i32 = param b +// CHECK:STDOUT: %b.loc5_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 // CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] @@ -251,7 +251,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc6_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_32.loc6_14 [template = i32] // CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_32.loc6_14, %.loc6_14.1 [template = i32] -// CHECK:STDOUT: %a.loc6_11.1: i32 = param a +// CHECK:STDOUT: %a.loc6_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc6_11.1 // CHECK:STDOUT: %int.make_type_32.loc6_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_32.loc6_22 [template = i32] @@ -372,12 +372,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mod.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mod.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index 779b44513de4..d3302d9fc522 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -73,12 +73,12 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mul.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mul.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -105,12 +105,12 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -184,12 +184,12 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Mul.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Mul.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index abad1c9ca449..fe1f46014892 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -159,7 +159,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc2_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_32.loc2_14 [template = i32] // CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_32.loc2_14, %.loc2_14.1 [template = i32] -// CHECK:STDOUT: %a.loc2_11.1: i32 = param a +// CHECK:STDOUT: %a.loc2_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc2_11.1 // CHECK:STDOUT: %int.make_type_32.loc2_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_32.loc2_22 [template = i32] @@ -192,12 +192,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc9_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_32.loc9_19 [template = i32] // CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_32.loc9_19, %.loc9_19.1 [template = i32] -// CHECK:STDOUT: %a.loc9_16.1: i32 = param a +// CHECK:STDOUT: %a.loc9_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc9_16.1 // CHECK:STDOUT: %int.make_type_32.loc9_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_27.1: type = value_of_initializer %int.make_type_32.loc9_27 [template = i32] // CHECK:STDOUT: %.loc9_27.2: type = converted %int.make_type_32.loc9_27, %.loc9_27.1 [template = i32] -// CHECK:STDOUT: %b.loc9_24.1: i32 = param b +// CHECK:STDOUT: %b.loc9_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc9_24.1 // CHECK:STDOUT: %int.make_type_32.loc9_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_35.1: type = value_of_initializer %int.make_type_32.loc9_35 [template = i32] @@ -303,12 +303,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc13_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_32.loc13_15 [template = i32] // CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_32.loc13_15, %.loc13_15.1 [template = i32] -// CHECK:STDOUT: %a.loc13_12.1: i32 = param a +// CHECK:STDOUT: %a.loc13_12.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @TooMany.%a: i32 = bind_name a, %a.loc13_12.1 // CHECK:STDOUT: %int.make_type_32.loc13_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_32.loc13_23 [template = i32] // CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_32.loc13_23, %.loc13_23.1 [template = i32] -// CHECK:STDOUT: %b.loc13_20.1: i32 = param b +// CHECK:STDOUT: %b.loc13_20.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @TooMany.%b: i32 = bind_name b, %b.loc13_20.1 // CHECK:STDOUT: %int.make_type_32.loc13_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_32.loc13_31 [template = i32] @@ -319,7 +319,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] // CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_32.loc18, %.loc18_21.1 [template = i32] -// CHECK:STDOUT: %a.loc18_18.1: i32 = param a +// CHECK:STDOUT: %a.loc18_18.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @BadReturnType.%a: i32 = bind_name a, %a.loc18_18.1 // CHECK:STDOUT: %bool.make_type.loc18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type.loc18 [template = bool] @@ -330,7 +330,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] -// CHECK:STDOUT: %a.loc19_14.1: i32 = param a +// CHECK:STDOUT: %a.loc19_14.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @JustRight.%a: i32 = bind_name a, %a.loc19_14.1 // CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] @@ -359,17 +359,16 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc44_31: i32 = int_literal 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_34: i32 = int_literal 2 [template = constants.%.3] -// CHECK:STDOUT: %int.unegate: init i32 = call %JustRight.ref() [template = ] // CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_32.loc44 [template = i32] // CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_32.loc44, %.loc44_16.1 [template = i32] -// CHECK:STDOUT: %.loc44_36: type = array_type %int.unegate, i32 [template = ] +// CHECK:STDOUT: %.loc44_36: type = array_type , i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var // CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { // CHECK:STDOUT: %int.make_type_32.loc46_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_32.loc46_25 [template = i32] // CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_32.loc46_25, %.loc46_25.1 [template = i32] -// CHECK:STDOUT: %a.loc46_22.1: i32 = param a +// CHECK:STDOUT: %a.loc46_22.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooFew.%a: i32 = bind_name a, %a.loc46_22.1 // CHECK:STDOUT: %int.make_type_32.loc46_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_32.loc46_33 [template = i32] @@ -380,17 +379,17 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc57_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_32.loc57_26 [template = i32] // CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_32.loc57_26, %.loc57_26.1 [template = i32] -// CHECK:STDOUT: %a.loc57_23.1: i32 = param a +// CHECK:STDOUT: %a.loc57_23.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallTooMany.%a: i32 = bind_name a, %a.loc57_23.1 // CHECK:STDOUT: %int.make_type_32.loc57_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_34.1: type = value_of_initializer %int.make_type_32.loc57_34 [template = i32] // CHECK:STDOUT: %.loc57_34.2: type = converted %int.make_type_32.loc57_34, %.loc57_34.1 [template = i32] -// CHECK:STDOUT: %b.loc57_31.1: i32 = param b +// CHECK:STDOUT: %b.loc57_31.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallTooMany.%b: i32 = bind_name b, %b.loc57_31.1 // CHECK:STDOUT: %int.make_type_32.loc57_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_42.1: type = value_of_initializer %int.make_type_32.loc57_42 [template = i32] // CHECK:STDOUT: %.loc57_42.2: type = converted %int.make_type_32.loc57_42, %.loc57_42.1 [template = i32] -// CHECK:STDOUT: %c.loc57_39.1: i32 = param c +// CHECK:STDOUT: %c.loc57_39.1: i32 = param c, runtime_param2 // CHECK:STDOUT: @RuntimeCallTooMany.%c: i32 = bind_name c, %c.loc57_39.1 // CHECK:STDOUT: %int.make_type_32.loc57_50: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_50.1: type = value_of_initializer %int.make_type_32.loc57_50 [template = i32] @@ -401,12 +400,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc68_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_32.loc68_32 [template = i32] // CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_32.loc68_32, %.loc68_32.1 [template = i32] -// CHECK:STDOUT: %a.loc68_29.1: i32 = param a +// CHECK:STDOUT: %a.loc68_29.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCallBadReturnType.%a: i32 = bind_name a, %a.loc68_29.1 // CHECK:STDOUT: %int.make_type_32.loc68_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc68_40.1: type = value_of_initializer %int.make_type_32.loc68_40 [template = i32] // CHECK:STDOUT: %.loc68_40.2: type = converted %int.make_type_32.loc68_40, %.loc68_40.1 [template = i32] -// CHECK:STDOUT: %b.loc68_37.1: i32 = param b +// CHECK:STDOUT: %b.loc68_37.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCallBadReturnType.%b: i32 = bind_name b, %b.loc68_37.1 // CHECK:STDOUT: %bool.make_type.loc68: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type.loc68 [template = bool] @@ -431,10 +430,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, file.%TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a -// CHECK:STDOUT: %TooFew.call: init i32 = call %TooFew.ref() [template = ] -// CHECK:STDOUT: %.loc54_19.1: i32 = value_of_initializer %TooFew.call [template = ] -// CHECK:STDOUT: %.loc54_19.2: i32 = converted %TooFew.call, %.loc54_19.1 [template = ] -// CHECK:STDOUT: return %.loc54_19.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallTooMany(%a: i32, %b: i32, %c: i32) -> i32 { @@ -443,10 +439,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b // CHECK:STDOUT: %c.ref: i32 = name_ref c, %c -// CHECK:STDOUT: %TooMany.call: init i32 = call %TooMany.ref() [template = ] -// CHECK:STDOUT: %.loc65_26.1: i32 = value_of_initializer %TooMany.call [template = ] -// CHECK:STDOUT: %.loc65_26.2: i32 = converted %TooMany.call, %.loc65_26.1 [template = ] -// CHECK:STDOUT: return %.loc65_26.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallBadReturnType(%a: i32, %b: i32) -> bool { @@ -454,10 +447,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, file.%BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %a.ref: i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: i32 = name_ref b, %b -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref() [template = ] -// CHECK:STDOUT: %.loc75_29.1: bool = value_of_initializer %BadReturnType.call [template = ] -// CHECK:STDOUT: %.loc75_29.2: bool = converted %BadReturnType.call, %.loc75_29.1 [template = ] -// CHECK:STDOUT: return %.loc75_29.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- overflow.carbon @@ -504,7 +494,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc4_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_32.loc4_14 [template = i32] // CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_32.loc4_14, %.loc4_14.1 [template = i32] -// CHECK:STDOUT: %a.loc4_11.1: i32 = param a +// CHECK:STDOUT: %a.loc4_11.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Negate.%a: i32 = bind_name a, %a.loc4_11.1 // CHECK:STDOUT: %int.make_type_32.loc4_22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_32.loc4_22 [template = i32] @@ -515,12 +505,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_32.loc5_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_32.loc5_11 [template = i32] // CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_32.loc5_11, %.loc5_11.1 [template = i32] -// CHECK:STDOUT: %a.loc5_8.1: i32 = param a +// CHECK:STDOUT: %a.loc5_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc5_8.1 // CHECK:STDOUT: %int.make_type_32.loc5_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_32.loc5_19 [template = i32] // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_32.loc5_19, %.loc5_19.1 [template = i32] -// CHECK:STDOUT: %b.loc5_16.1: i32 = param b +// CHECK:STDOUT: %b.loc5_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc5_16.1 // CHECK:STDOUT: %int.make_type_32.loc5_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_32.loc5_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index d5be22e0006c..24cd9deb8f8c 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -74,12 +74,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -106,12 +106,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] @@ -187,12 +187,12 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.make_type_32.loc4_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32.loc4_11 [template = i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32.loc4_11, %.loc4_11.1 [template = i32] -// CHECK:STDOUT: %a.loc4_8.1: i32 = param a +// CHECK:STDOUT: %a.loc4_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Sub.%a: i32 = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: %int.make_type_32.loc4_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_32.loc4_19 [template = i32] // CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_32.loc4_19, %.loc4_19.1 [template = i32] -// CHECK:STDOUT: %b.loc4_16.1: i32 = param b +// CHECK:STDOUT: %b.loc4_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Sub.%b: i32 = bind_name b, %b.loc4_16.1 // CHECK:STDOUT: %int.make_type_32.loc4_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4_27 [template = i32] diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index 58e82f2c9543..f666d79eb37a 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -64,12 +64,12 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc2_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_32.loc2_11 [template = i32] // CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_32.loc2_11, %.loc2_11.1 [template = i32] -// CHECK:STDOUT: %a.loc2_8.1: i32 = param a +// CHECK:STDOUT: %a.loc2_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Xor.%a: i32 = bind_name a, %a.loc2_8.1 // CHECK:STDOUT: %int.make_type_32.loc2_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_32.loc2_19 [template = i32] // CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_32.loc2_19, %.loc2_19.1 [template = i32] -// CHECK:STDOUT: %b.loc2_16.1: i32 = param b +// CHECK:STDOUT: %b.loc2_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Xor.%b: i32 = bind_name b, %b.loc2_16.1 // CHECK:STDOUT: %int.make_type_32.loc2_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_32.loc2_27 [template = i32] @@ -96,12 +96,12 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc7_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_32.loc7_19, %.loc7_19.1 [template = i32] -// CHECK:STDOUT: %a.loc7_16.1: i32 = param a +// CHECK:STDOUT: %a.loc7_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @RuntimeCall.%a: i32 = bind_name a, %a.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_32.loc7_27 [template = i32] // CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_32.loc7_27, %.loc7_27.1 [template = i32] -// CHECK:STDOUT: %b.loc7_24.1: i32 = param b +// CHECK:STDOUT: %b.loc7_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @RuntimeCall.%b: i32 = bind_name b, %b.loc7_24.1 // CHECK:STDOUT: %int.make_type_32.loc7_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_32.loc7_35 [template = i32] diff --git a/toolchain/check/testdata/builtins/print.carbon b/toolchain/check/testdata/builtins/print.carbon index d747509a91c2..ba535edbec34 100644 --- a/toolchain/check/testdata/builtins/print.carbon +++ b/toolchain/check/testdata/builtins/print.carbon @@ -60,7 +60,7 @@ fn Main() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32, %.loc11_13.1 [template = i32] -// CHECK:STDOUT: %a.loc11_10.1: i32 = param a +// CHECK:STDOUT: %a.loc11_10.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Print.1.%a: i32 = bind_name a, %a.loc11_10.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index 424cc4bdfab1..61be884553ea 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -395,7 +395,7 @@ class A { // CHECK:STDOUT: %.loc5_21: %.2 = field_decl radius, element0 [template] // CHECK:STDOUT: %GetRadius.decl: %GetRadius.type = fn_decl @GetRadius [template = constants.%GetRadius] { // CHECK:STDOUT: %Self.ref.loc7: type = name_ref Self, constants.%Circle [template = constants.%Circle] -// CHECK:STDOUT: %self.loc7_16.1: %Circle = param self +// CHECK:STDOUT: %self.loc7_16.1: %Circle = param self, runtime_param0 // CHECK:STDOUT: %self.loc7_16.2: %Circle = bind_name self, %self.loc7_16.1 // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_33.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32] @@ -410,7 +410,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %Compute.decl: %Compute.type = fn_decl @Compute [template = constants.%Compute] { // CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, constants.%Circle [template = constants.%Circle] -// CHECK:STDOUT: %self.loc15_14.1: %Circle = param self +// CHECK:STDOUT: %self.loc15_14.1: %Circle = param self, runtime_param0 // CHECK:STDOUT: %self.loc15_14.2: %Circle = bind_name self, %self.loc15_14.1 // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_31.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] diff --git a/toolchain/check/testdata/class/adapt.carbon b/toolchain/check/testdata/class/adapt.carbon index 591e88a635c9..78c30f8a5c13 100644 --- a/toolchain/check/testdata/class/adapt.carbon +++ b/toolchain/check/testdata/class/adapt.carbon @@ -166,7 +166,7 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: %AdaptNotExtend.decl: type = class_decl @AdaptNotExtend [template = constants.%AdaptNotExtend] {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %AdaptNotExtend.ref: type = name_ref AdaptNotExtend, %AdaptNotExtend.decl [template = constants.%AdaptNotExtend] -// CHECK:STDOUT: %a.loc12_6.1: %AdaptNotExtend = param a +// CHECK:STDOUT: %a.loc12_6.1: %AdaptNotExtend = param a, runtime_param0 // CHECK:STDOUT: @F.2.%a: %AdaptNotExtend = bind_name a, %a.loc12_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index 5ac7a5516470..5f2f33856b41 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -89,7 +89,7 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %Derived.ref.loc25: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.loc25_11.1: %Derived = param d +// CHECK:STDOUT: %d.loc25_11.1: %Derived = param d, runtime_param0 // CHECK:STDOUT: @Access.%d: %Derived = bind_name d, %d.loc25_11.1 // CHECK:STDOUT: %int.make_type_32.loc25_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc25_32: init type = call constants.%Int32() [template = i32] diff --git a/toolchain/check/testdata/class/base_field.carbon b/toolchain/check/testdata/class/base_field.carbon index 3efcf5b0254f..61399eca8acb 100644 --- a/toolchain/check/testdata/class/base_field.carbon +++ b/toolchain/check/testdata/class/base_field.carbon @@ -76,7 +76,7 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc24_21: type = ptr_type %Derived [template = constants.%.8] -// CHECK:STDOUT: %p.loc24_11.1: %.8 = param p +// CHECK:STDOUT: %p.loc24_11.1: %.8 = param p, runtime_param0 // CHECK:STDOUT: @Access.%p: %.8 = bind_name p, %p.loc24_11.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_30.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index ed7ab9b46925..527854420b14 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -77,7 +77,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %.loc17_26: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.loc17_16.1: %.3 = param self +// CHECK:STDOUT: %self.loc17_16.1: %.3 = param self, runtime_param0 // CHECK:STDOUT: @F.%self: %.3 = bind_name self, %self.loc17_16.1 // CHECK:STDOUT: @F.%.loc17: %.3 = addr_pattern @F.%self // CHECK:STDOUT: } @@ -85,7 +85,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc25: type = ptr_type %Derived [template = constants.%.9] -// CHECK:STDOUT: %p.loc25_9.1: %.9 = param p +// CHECK:STDOUT: %p.loc25_9.1: %.9 = param p, runtime_param0 // CHECK:STDOUT: @Call.%p: %.9 = bind_name p, %p.loc25_9.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -98,7 +98,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %.loc14_23: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.loc14_13.1: %.3 = param self +// CHECK:STDOUT: %self.loc14_13.1: %.3 = param self, runtime_param0 // CHECK:STDOUT: %self.loc14_13.3: %.3 = bind_name self, %self.loc14_13.1 // CHECK:STDOUT: %.loc14_8: %.3 = addr_pattern %self.loc14_13.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/base_method_qualified.carbon b/toolchain/check/testdata/class/base_method_qualified.carbon index 45547a658c0a..0e28dc09fb1b 100644 --- a/toolchain/check/testdata/class/base_method_qualified.carbon +++ b/toolchain/check/testdata/class/base_method_qualified.carbon @@ -102,7 +102,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %Derived.decl.loc18: type = class_decl @Derived [template = constants.%Derived] {} // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Derived.ref.loc25: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %a.loc25_9.1: %Derived = param a +// CHECK:STDOUT: %a.loc25_9.1: %Derived = param a, runtime_param0 // CHECK:STDOUT: @Call.%a: %Derived = bind_name a, %a.loc25_9.1 // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_24.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] @@ -112,7 +112,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [template = constants.%CallIndirect] { // CHECK:STDOUT: %Derived.ref.loc29: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %.loc29_27: type = ptr_type %Derived [template = constants.%.8] -// CHECK:STDOUT: %p.loc29_17.1: %.8 = param p +// CHECK:STDOUT: %p.loc29_17.1: %.8 = param p, runtime_param0 // CHECK:STDOUT: @CallIndirect.%p: %.8 = bind_name p, %p.loc29_17.1 // CHECK:STDOUT: %int.make_type_32.loc29: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_33.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] @@ -121,7 +121,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %PassDerivedToBase.decl: %PassDerivedToBase.type = fn_decl @PassDerivedToBase [template = constants.%PassDerivedToBase] { // CHECK:STDOUT: %Derived.ref.loc33: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %a.loc33_22.1: %Derived = param a +// CHECK:STDOUT: %a.loc33_22.1: %Derived = param a, runtime_param0 // CHECK:STDOUT: @PassDerivedToBase.%a: %Derived = bind_name a, %a.loc33_22.1 // CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_37.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] @@ -131,7 +131,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %PassDerivedToBaseIndirect.decl: %PassDerivedToBaseIndirect.type = fn_decl @PassDerivedToBaseIndirect [template = constants.%PassDerivedToBaseIndirect] { // CHECK:STDOUT: %Derived.ref.loc37: type = name_ref Derived, %Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %.loc37_40: type = ptr_type %Derived [template = constants.%.8] -// CHECK:STDOUT: %p.loc37_30.1: %.8 = param p +// CHECK:STDOUT: %p.loc37_30.1: %.8 = param p, runtime_param0 // CHECK:STDOUT: @PassDerivedToBaseIndirect.%p: %.8 = bind_name p, %p.loc37_30.1 // CHECK:STDOUT: %int.make_type_32.loc37: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc37_46.1: type = value_of_initializer %int.make_type_32.loc37 [template = i32] @@ -145,12 +145,12 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %.loc19: %.4 = base_decl %Base, element0 [template] // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Derived [template = constants.%Derived] -// CHECK:STDOUT: %self.loc21_8.1: %Derived = param self +// CHECK:STDOUT: %self.loc21_8.1: %Derived = param self, runtime_param0 // CHECK:STDOUT: %self.loc21_8.2: %Derived = bind_name self, %self.loc21_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %Self.ref.loc22: type = name_ref Self, constants.%Derived [template = constants.%Derived] -// CHECK:STDOUT: %self.loc22_8.1: %Derived = param self +// CHECK:STDOUT: %self.loc22_8.1: %Derived = param self, runtime_param0 // CHECK:STDOUT: %self.loc22_8.2: %Derived = bind_name self, %self.loc22_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -165,7 +165,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: class @Base { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %self.loc14_8.1: %Base = param self +// CHECK:STDOUT: %self.loc14_8.1: %Base = param self, runtime_param0 // CHECK:STDOUT: %self.loc14_8.2: %Base = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] @@ -174,7 +174,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %self.loc15_8.1: %Derived = param self +// CHECK:STDOUT: %self.loc15_8.1: %Derived = param self, runtime_param0 // CHECK:STDOUT: %self.loc15_8.2: %Derived = bind_name self, %self.loc15_8.1 // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_28.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] diff --git a/toolchain/check/testdata/class/base_method_shadow.carbon b/toolchain/check/testdata/class/base_method_shadow.carbon index 8895add30375..1797652342f1 100644 --- a/toolchain/check/testdata/class/base_method_shadow.carbon +++ b/toolchain/check/testdata/class/base_method_shadow.carbon @@ -96,19 +96,19 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc29_13: type = ptr_type %A [template = constants.%.1] -// CHECK:STDOUT: %a.loc29_9.1: %.1 = param a +// CHECK:STDOUT: %a.loc29_9.1: %.1 = param a, runtime_param0 // CHECK:STDOUT: @Call.%a: %.1 = bind_name a, %a.loc29_9.1 // CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %.loc29_20: type = ptr_type %B [template = constants.%.6] -// CHECK:STDOUT: %b.loc29_16.1: %.6 = param b +// CHECK:STDOUT: %b.loc29_16.1: %.6 = param b, runtime_param1 // CHECK:STDOUT: @Call.%b: %.6 = bind_name b, %b.loc29_16.1 // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc29_27: type = ptr_type %C [template = constants.%.11] -// CHECK:STDOUT: %c.loc29_23.1: %.11 = param c +// CHECK:STDOUT: %c.loc29_23.1: %.11 = param c, runtime_param2 // CHECK:STDOUT: @Call.%c: %.11 = bind_name c, %c.loc29_23.1 // CHECK:STDOUT: %D.ref: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %.loc29_34: type = ptr_type %D [template = constants.%.14] -// CHECK:STDOUT: %d.loc29_30.1: %.14 = param d +// CHECK:STDOUT: %d.loc29_30.1: %.14 = param d, runtime_param3 // CHECK:STDOUT: @Call.%d: %.14 = bind_name d, %d.loc29_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -117,7 +117,7 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [template = constants.%A] // CHECK:STDOUT: %.loc12_23: type = ptr_type %A [template = constants.%.1] -// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self +// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_13.3: %.1 = bind_name self, %self.loc12_13.1 // CHECK:STDOUT: %.loc12_8: %.1 = addr_pattern %self.loc12_13.3 // CHECK:STDOUT: } @@ -133,7 +133,7 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] // CHECK:STDOUT: %.loc17_23: type = ptr_type %B [template = constants.%.6] -// CHECK:STDOUT: %self.loc17_13.1: %.6 = param self +// CHECK:STDOUT: %self.loc17_13.1: %.6 = param self, runtime_param0 // CHECK:STDOUT: %self.loc17_13.3: %.6 = bind_name self, %self.loc17_13.1 // CHECK:STDOUT: %.loc17_8: %.6 = addr_pattern %self.loc17_13.3 // CHECK:STDOUT: } @@ -151,7 +151,7 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %.loc22_23: type = ptr_type %C [template = constants.%.11] -// CHECK:STDOUT: %self.loc22_13.1: %.11 = param self +// CHECK:STDOUT: %self.loc22_13.1: %.11 = param self, runtime_param0 // CHECK:STDOUT: %self.loc22_13.3: %.11 = bind_name self, %self.loc22_13.1 // CHECK:STDOUT: %.loc22_8: %.11 = addr_pattern %self.loc22_13.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index f0d1d113dc87..f1e23316f8f1 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -72,7 +72,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc21_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_15.1: type = value_of_initializer %int.make_type_32.loc21_15 [template = i32] // CHECK:STDOUT: %.loc21_15.2: type = converted %int.make_type_32.loc21_15, %.loc21_15.1 [template = i32] -// CHECK:STDOUT: %n.loc21_12.1: i32 = param n +// CHECK:STDOUT: %n.loc21_12.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @G.%n: i32 = bind_name n, %n.loc21_12.1 // CHECK:STDOUT: %int.make_type_32.loc21_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %int.make_type_32.loc21_23 [template = i32] @@ -92,7 +92,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc12_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_32.loc12_11 [template = i32] // CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_32.loc12_11, %.loc12_11.1 [template = i32] -// CHECK:STDOUT: %n.loc12_8.1: i32 = param n +// CHECK:STDOUT: %n.loc12_8.1: i32 = param n, runtime_param0 // CHECK:STDOUT: %n.loc12_8.2: i32 = bind_name n, %n.loc12_8.1 // CHECK:STDOUT: %int.make_type_32.loc12_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_32.loc12_19 [template = i32] @@ -103,7 +103,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %int.make_type_32.loc16_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_32.loc16_11 [template = i32] // CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_32.loc16_11, %.loc16_11.1 [template = i32] -// CHECK:STDOUT: %n.loc16_8.1: i32 = param n +// CHECK:STDOUT: %n.loc16_8.1: i32 = param n, runtime_param0 // CHECK:STDOUT: %n.loc16_8.2: i32 = bind_name n, %n.loc16_8.1 // CHECK:STDOUT: %int.make_type_32.loc16_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_32.loc16_19 [template = i32] diff --git a/toolchain/check/testdata/class/complete_in_member_fn.carbon b/toolchain/check/testdata/class/complete_in_member_fn.carbon index 17ac16f5215e..44bfc58af413 100644 --- a/toolchain/check/testdata/class/complete_in_member_fn.carbon +++ b/toolchain/check/testdata/class/complete_in_member_fn.carbon @@ -55,7 +55,7 @@ class C { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc12_8.1: %C = param c +// CHECK:STDOUT: %c.loc12_8.1: %C = param c, runtime_param0 // CHECK:STDOUT: %c.loc12_8.2: %C = bind_name c, %c.loc12_8.1 // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] diff --git a/toolchain/check/testdata/class/compound_field.carbon b/toolchain/check/testdata/class/compound_field.carbon index a42759f1a736..9c42115e087b 100644 --- a/toolchain/check/testdata/class/compound_field.carbon +++ b/toolchain/check/testdata/class/compound_field.carbon @@ -96,7 +96,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} // CHECK:STDOUT: %AccessDerived.decl: %AccessDerived.type = fn_decl @AccessDerived [template = constants.%AccessDerived] { // CHECK:STDOUT: %Derived.ref.loc24: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.loc24_18.1: %Derived = param d +// CHECK:STDOUT: %d.loc24_18.1: %Derived = param d, runtime_param0 // CHECK:STDOUT: @AccessDerived.%d: %Derived = bind_name d, %d.loc24_18.1 // CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_33.1: type = value_of_initializer %int.make_type_32.loc24 [template = i32] @@ -105,7 +105,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: %AccessBase.decl: %AccessBase.type = fn_decl @AccessBase [template = constants.%AccessBase] { // CHECK:STDOUT: %Derived.ref.loc28: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.loc28_15.1: %Derived = param d +// CHECK:STDOUT: %d.loc28_15.1: %Derived = param d, runtime_param0 // CHECK:STDOUT: @AccessBase.%d: %Derived = bind_name d, %d.loc28_15.1 // CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc28_30.1: type = value_of_initializer %int.make_type_32.loc28 [template = i32] @@ -115,7 +115,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %AccessDerivedIndirect.decl: %AccessDerivedIndirect.type = fn_decl @AccessDerivedIndirect [template = constants.%AccessDerivedIndirect] { // CHECK:STDOUT: %Derived.ref.loc32: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc32_36: type = ptr_type %Derived [template = constants.%.11] -// CHECK:STDOUT: %p.loc32_26.1: %.11 = param p +// CHECK:STDOUT: %p.loc32_26.1: %.11 = param p, runtime_param0 // CHECK:STDOUT: @AccessDerivedIndirect.%p: %.11 = bind_name p, %p.loc32_26.1 // CHECK:STDOUT: %int.make_type_32.loc32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_45.1: type = value_of_initializer %int.make_type_32.loc32 [template = i32] @@ -126,7 +126,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %AccessBaseIndirect.decl: %AccessBaseIndirect.type = fn_decl @AccessBaseIndirect [template = constants.%AccessBaseIndirect] { // CHECK:STDOUT: %Derived.ref.loc36: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc36_33: type = ptr_type %Derived [template = constants.%.11] -// CHECK:STDOUT: %p.loc36_23.1: %.11 = param p +// CHECK:STDOUT: %p.loc36_23.1: %.11 = param p, runtime_param0 // CHECK:STDOUT: @AccessBaseIndirect.%p: %.11 = bind_name p, %p.loc36_23.1 // CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc36_42.1: type = value_of_initializer %int.make_type_32.loc36 [template = i32] diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index 04b7947a4a0b..f639a02da413 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -122,7 +122,7 @@ fn ConvertInit() { // CHECK:STDOUT: %ConvertCToB.decl: %ConvertCToB.type = fn_decl @ConvertCToB [template = constants.%ConvertCToB] { // CHECK:STDOUT: %C.ref.loc25: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc25_20: type = ptr_type %C [template = constants.%.14] -// CHECK:STDOUT: %p.loc25_16.1: %.14 = param p +// CHECK:STDOUT: %p.loc25_16.1: %.14 = param p, runtime_param0 // CHECK:STDOUT: @ConvertCToB.%p: %.14 = bind_name p, %p.loc25_16.1 // CHECK:STDOUT: %B.ref.loc25: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %.loc25_27: type = ptr_type %B [template = constants.%.15] @@ -131,7 +131,7 @@ fn ConvertInit() { // CHECK:STDOUT: %ConvertBToA.decl: %ConvertBToA.type = fn_decl @ConvertBToA [template = constants.%ConvertBToA] { // CHECK:STDOUT: %B.ref.loc26: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %.loc26_20: type = ptr_type %B [template = constants.%.15] -// CHECK:STDOUT: %p.loc26_16.1: %.15 = param p +// CHECK:STDOUT: %p.loc26_16.1: %.15 = param p, runtime_param0 // CHECK:STDOUT: @ConvertBToA.%p: %.15 = bind_name p, %p.loc26_16.1 // CHECK:STDOUT: %A.ref.loc26: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc26_27: type = ptr_type %A [template = constants.%.19] @@ -140,7 +140,7 @@ fn ConvertInit() { // CHECK:STDOUT: %ConvertCToA.decl: %ConvertCToA.type = fn_decl @ConvertCToA [template = constants.%ConvertCToA] { // CHECK:STDOUT: %C.ref.loc27: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc27_20: type = ptr_type %C [template = constants.%.14] -// CHECK:STDOUT: %p.loc27_16.1: %.14 = param p +// CHECK:STDOUT: %p.loc27_16.1: %.14 = param p, runtime_param0 // CHECK:STDOUT: @ConvertCToA.%p: %.14 = bind_name p, %p.loc27_16.1 // CHECK:STDOUT: %A.ref.loc27: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc27_27: type = ptr_type %A [template = constants.%.19] @@ -148,13 +148,13 @@ fn ConvertInit() { // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertValue.decl: %ConvertValue.type = fn_decl @ConvertValue [template = constants.%ConvertValue] { // CHECK:STDOUT: %C.ref.loc29: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc29_17.1: %C = param c +// CHECK:STDOUT: %c.loc29_17.1: %C = param c, runtime_param0 // CHECK:STDOUT: @ConvertValue.%c: %C = bind_name c, %c.loc29_17.1 // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertRef.decl: %ConvertRef.type = fn_decl @ConvertRef [template = constants.%ConvertRef] { // CHECK:STDOUT: %C.ref.loc33: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc33_19: type = ptr_type %C [template = constants.%.14] -// CHECK:STDOUT: %c.loc33_15.1: %.14 = param c +// CHECK:STDOUT: %c.loc33_15.1: %.14 = param c, runtime_param0 // CHECK:STDOUT: @ConvertRef.%c: %.14 = bind_name c, %c.loc33_15.1 // CHECK:STDOUT: %A.ref.loc33: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc33_26: type = ptr_type %A [template = constants.%.19] diff --git a/toolchain/check/testdata/class/extend_adapt.carbon b/toolchain/check/testdata/class/extend_adapt.carbon index 54a29e896b28..3d66737006e3 100644 --- a/toolchain/check/testdata/class/extend_adapt.carbon +++ b/toolchain/check/testdata/class/extend_adapt.carbon @@ -146,12 +146,12 @@ class StructAdapter { // CHECK:STDOUT: %SomeClassAdapter.decl.loc15: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} // CHECK:STDOUT: %TestStaticMemberFunction.decl: %TestStaticMemberFunction.type = fn_decl @TestStaticMemberFunction [template = constants.%TestStaticMemberFunction] { // CHECK:STDOUT: %SomeClassAdapter.ref.loc19: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %a.loc19_29.1: %SomeClassAdapter = param a +// CHECK:STDOUT: %a.loc19_29.1: %SomeClassAdapter = param a, runtime_param0 // CHECK:STDOUT: @TestStaticMemberFunction.%a: %SomeClassAdapter = bind_name a, %a.loc19_29.1 // CHECK:STDOUT: } // CHECK:STDOUT: %TestAdapterMethod.decl: %TestAdapterMethod.type = fn_decl @TestAdapterMethod [template = constants.%TestAdapterMethod] { // CHECK:STDOUT: %SomeClassAdapter.ref.loc23: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %a.loc23_22.1: %SomeClassAdapter = param a +// CHECK:STDOUT: %a.loc23_22.1: %SomeClassAdapter = param a, runtime_param0 // CHECK:STDOUT: @TestAdapterMethod.%a: %SomeClassAdapter = bind_name a, %a.loc23_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -177,7 +177,7 @@ class StructAdapter { // CHECK:STDOUT: %StaticMemberFunction.decl: %StaticMemberFunction.type = fn_decl @StaticMemberFunction [template = constants.%StaticMemberFunction] {} // CHECK:STDOUT: %AdapterMethod.decl: %AdapterMethod.type = fn_decl @AdapterMethod [template = constants.%AdapterMethod] { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %self.loc12_20.1: %SomeClassAdapter = param self +// CHECK:STDOUT: %self.loc12_20.1: %SomeClassAdapter = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_20.2: %SomeClassAdapter = bind_name self, %self.loc12_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -274,7 +274,7 @@ class StructAdapter { // CHECK:STDOUT: %SomeClassAdapter.decl: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %a.loc12_6.1: %SomeClassAdapter = param a +// CHECK:STDOUT: %a.loc12_6.1: %SomeClassAdapter = param a, runtime_param0 // CHECK:STDOUT: @F.2.%a: %SomeClassAdapter = bind_name a, %a.loc12_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -301,7 +301,7 @@ class StructAdapter { // CHECK:STDOUT: class @SomeClass { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SomeClass [template = constants.%SomeClass] -// CHECK:STDOUT: %self.loc5_8.1: %SomeClass = param self +// CHECK:STDOUT: %self.loc5_8.1: %SomeClass = param self, runtime_param0 // CHECK:STDOUT: %self.loc5_8.2: %SomeClass = bind_name self, %self.loc5_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -326,7 +326,7 @@ class StructAdapter { // CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a // CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @SomeClass.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %.loc23_4: = bound_method %a.ref, %F.ref -// CHECK:STDOUT: %.loc23_6.1: init type = call constants.%ImplicitAs(constants.%SomeClass) [template = constants.%.7] +// CHECK:STDOUT: %.loc23_6.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%SomeClass) [template = constants.%.7] // CHECK:STDOUT: %.loc23_6.2: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%SomeClass) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc23_6.2 [template = constants.%.9] // CHECK:STDOUT: %.loc23_6.3: %SomeClass = converted %a.ref, [template = ] @@ -437,7 +437,7 @@ class StructAdapter { // CHECK:STDOUT: %SomeClassAdapter.decl: type = class_decl @SomeClassAdapter [template = constants.%SomeClassAdapter] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, %SomeClassAdapter.decl [template = constants.%SomeClassAdapter] -// CHECK:STDOUT: %a.loc13_6.1: %SomeClassAdapter = param a +// CHECK:STDOUT: %a.loc13_6.1: %SomeClassAdapter = param a, runtime_param0 // CHECK:STDOUT: @F.%a: %SomeClassAdapter = bind_name a, %a.loc13_6.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -496,7 +496,7 @@ class StructAdapter { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a // CHECK:STDOUT: %b.ref: %.2 = name_ref b, @SomeClass.%.loc6_8 [template = @SomeClass.%.loc6_8] -// CHECK:STDOUT: %.loc21_11.1: init type = call constants.%ImplicitAs(constants.%SomeClass) [template = constants.%.8] +// CHECK:STDOUT: %.loc21_11.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%SomeClass) [template = constants.%.8] // CHECK:STDOUT: %.loc21_11.2: %.9 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%SomeClass) [template = constants.%.10] // CHECK:STDOUT: %Convert.ref: %.9 = name_ref Convert, %.loc21_11.2 [template = constants.%.10] // CHECK:STDOUT: %.loc21_11.3: %SomeClass = converted %a.ref, [template = ] diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index 51951824e62e..43559eaf94f4 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -91,7 +91,7 @@ fn Access(d: Derived) -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { // CHECK:STDOUT: %Derived.ref.loc29: type = name_ref Derived, %Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.loc29_11.1: %Derived = param d +// CHECK:STDOUT: %d.loc29_11.1: %Derived = param d, runtime_param0 // CHECK:STDOUT: @Access.%d: %Derived = bind_name d, %d.loc29_11.1 // CHECK:STDOUT: %int.make_type_32.loc29_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc29_32: init type = call constants.%Int32() [template = i32] diff --git a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon index 21e0917e8a67..3f67a030456f 100644 --- a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon +++ b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon @@ -158,7 +158,7 @@ class C { // CHECK:STDOUT: %Bad.decl: type = class_decl @Bad [template = constants.%Bad] {} // CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [template = constants.%Use] { // CHECK:STDOUT: %Bad.ref: type = name_ref Bad, %Bad.decl [template = constants.%Bad] -// CHECK:STDOUT: %b.loc19_8.1: %Bad = param b +// CHECK:STDOUT: %b.loc19_8.1: %Bad = param b, runtime_param0 // CHECK:STDOUT: @Use.%b: %Bad = bind_name b, %b.loc19_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -184,7 +184,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: class @Bad { // CHECK:STDOUT: %.loc12_9: i32 = int_literal 100 [template = constants.%.1] -// CHECK:STDOUT: %.loc12_12.1: init type = call constants.%ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_12.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] // CHECK:STDOUT: %.loc12_12.2: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc12_12.2 [template = constants.%.8] // CHECK:STDOUT: %.loc12_12.3: type = converted %.loc12_9, [template = ] @@ -295,7 +295,7 @@ class C { // CHECK:STDOUT: %Bad.decl: type = class_decl @Bad [template = constants.%Bad] {} // CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [template = constants.%Use] { // CHECK:STDOUT: %Bad.ref: type = name_ref Bad, %Bad.decl [template = constants.%Bad] -// CHECK:STDOUT: %b.loc16_8.1: %Bad = param b +// CHECK:STDOUT: %b.loc16_8.1: %Bad = param b, runtime_param0 // CHECK:STDOUT: @Use.%b: %Bad = bind_name b, %b.loc16_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -321,7 +321,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: class @Bad { // CHECK:STDOUT: %.loc12_16: i32 = int_literal 100 [template = constants.%.1] -// CHECK:STDOUT: %.loc12_19.1: init type = call constants.%ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_19.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] // CHECK:STDOUT: %.loc12_19.2: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc12_19.2 [template = constants.%.8] // CHECK:STDOUT: %.loc12_19.3: type = converted %.loc12_16, [template = ] diff --git a/toolchain/check/testdata/class/fail_addr_not_self.carbon b/toolchain/check/testdata/class/fail_addr_not_self.carbon index f764dfe62524..4b3f69a5f066 100644 --- a/toolchain/check/testdata/class/fail_addr_not_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_not_self.carbon @@ -60,13 +60,13 @@ class Class { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Class.ref.loc16: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %a.loc16_13.1: %.1 = param a +// CHECK:STDOUT: %a.loc16_13.1: %.1 = param a, runtime_param0 // CHECK:STDOUT: %a.loc16_13.2: %.1 = bind_name a, %a.loc16_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref.loc21: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc21: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %b.loc21_13.1: %.1 = param b +// CHECK:STDOUT: %b.loc21_13.1: %.1 = param b, runtime_param0 // CHECK:STDOUT: %b.loc21_13.2: %.1 = bind_name b, %b.loc21_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_addr_self.carbon b/toolchain/check/testdata/class/fail_addr_self.carbon index c9c9ddcded7e..f616994e6ae3 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -109,11 +109,11 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Class.ref.loc16_9: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc16_6.1: %Class = param c +// CHECK:STDOUT: %c.loc16_6.1: %Class = param c, runtime_param0 // CHECK:STDOUT: @F.2.%c: %Class = bind_name c, %c.loc16_6.1 // CHECK:STDOUT: %Class.ref.loc16_19: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %p.loc16_16.1: %.1 = param p +// CHECK:STDOUT: %p.loc16_16.1: %.1 = param p, runtime_param1 // CHECK:STDOUT: @F.2.%p: %.1 = bind_name p, %p.loc16_16.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -141,13 +141,13 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Class.ref.loc12: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc12_24: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self +// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_13.3: %.1 = bind_name self, %self.loc12_13.1 // CHECK:STDOUT: %.loc12_8: %.1 = addr_pattern %self.loc12_13.3 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref.loc13: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %self.loc13_13.1: %Class = param self +// CHECK:STDOUT: %self.loc13_13.1: %Class = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_13.3: %Class = bind_name self, %self.loc13_13.1 // CHECK:STDOUT: %.loc13: %Class = addr_pattern %self.loc13_13.3 // CHECK:STDOUT: } @@ -183,7 +183,7 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %G.ref.loc47: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc47_7: = bound_method %.loc47_4.1, %G.ref.loc47 // CHECK:STDOUT: %.loc47_4.2: %.1 = addr_of %.loc47_4.1 -// CHECK:STDOUT: %.loc47_9.1: init type = call constants.%ImplicitAs(constants.%Class) [template = constants.%.8] +// CHECK:STDOUT: %.loc47_9.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%Class) [template = constants.%.8] // CHECK:STDOUT: %.loc47_9.2: %.9 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%Class) [template = constants.%.10] // CHECK:STDOUT: %Convert.ref: %.9 = name_ref Convert, %.loc47_9.2 [template = constants.%.10] // CHECK:STDOUT: %.loc47_9.3: %Class = converted %.loc47_4.2, [template = ] diff --git a/toolchain/check/testdata/class/fail_base_bad_type.carbon b/toolchain/check/testdata/class/fail_base_bad_type.carbon index 9adf604b7216..761f3faab160 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -309,7 +309,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %AccessMemberWithInvalidBaseError.decl: %AccessMemberWithInvalidBaseError.type = fn_decl @AccessMemberWithInvalidBaseError [template = constants.%AccessMemberWithInvalidBaseError] { // CHECK:STDOUT: %DeriveFromError.ref: type = name_ref DeriveFromError, %DeriveFromError.decl [template = constants.%DeriveFromError] // CHECK:STDOUT: %.loc25_55: type = ptr_type %DeriveFromError [template = constants.%.5] -// CHECK:STDOUT: %p.loc25_37.1: %.5 = param p +// CHECK:STDOUT: %p.loc25_37.1: %.5 = param p, runtime_param0 // CHECK:STDOUT: @AccessMemberWithInvalidBaseError.%p: %.5 = bind_name p, %p.loc25_37.1 // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_61.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] @@ -320,7 +320,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.decl: %AccessMemberWithInvalidBasNonType.type = fn_decl @AccessMemberWithInvalidBasNonType [template = constants.%AccessMemberWithInvalidBasNonType] { // CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, %DeriveFromNonType.decl [template = constants.%DeriveFromNonType] // CHECK:STDOUT: %.loc38_58: type = ptr_type %DeriveFromNonType [template = constants.%.14] -// CHECK:STDOUT: %p.loc38_38.1: %.14 = param p +// CHECK:STDOUT: %p.loc38_38.1: %.14 = param p, runtime_param0 // CHECK:STDOUT: @AccessMemberWithInvalidBasNonType.%p: %.14 = bind_name p, %p.loc38_38.1 // CHECK:STDOUT: %int.make_type_32.loc38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_64.1: type = value_of_initializer %int.make_type_32.loc38 [template = i32] @@ -331,7 +331,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %ConvertToBadBasei32.decl: %ConvertToBadBasei32.type = fn_decl @ConvertToBadBasei32 [template = constants.%ConvertToBadBasei32] { // CHECK:STDOUT: %DeriveFromi32.ref.loc57: type = name_ref DeriveFromi32, %DeriveFromi32.decl [template = constants.%DeriveFromi32] // CHECK:STDOUT: %.loc57_40: type = ptr_type %DeriveFromi32 [template = constants.%.15] -// CHECK:STDOUT: %p.loc57_24.1: %.15 = param p +// CHECK:STDOUT: %p.loc57_24.1: %.15 = param p, runtime_param0 // CHECK:STDOUT: @ConvertToBadBasei32.%p: %.15 = bind_name p, %p.loc57_24.1 // CHECK:STDOUT: %int.make_type_32.loc57: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc57_49.1: type = value_of_initializer %int.make_type_32.loc57 [template = i32] @@ -342,7 +342,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %AccessMemberWithInvalidBasei32.decl: %AccessMemberWithInvalidBasei32.type = fn_decl @AccessMemberWithInvalidBasei32 [template = constants.%AccessMemberWithInvalidBasei32] { // CHECK:STDOUT: %DeriveFromi32.ref.loc59: type = name_ref DeriveFromi32, %DeriveFromi32.decl [template = constants.%DeriveFromi32] // CHECK:STDOUT: %.loc59_51: type = ptr_type %DeriveFromi32 [template = constants.%.15] -// CHECK:STDOUT: %p.loc59_35.1: %.15 = param p +// CHECK:STDOUT: %p.loc59_35.1: %.15 = param p, runtime_param0 // CHECK:STDOUT: @AccessMemberWithInvalidBasei32.%p: %.15 = bind_name p, %p.loc59_35.1 // CHECK:STDOUT: %int.make_type_32.loc59: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc59_57.1: type = value_of_initializer %int.make_type_32.loc59 [template = i32] @@ -353,7 +353,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %ConvertToBadBaseTuple.decl: %ConvertToBadBaseTuple.type = fn_decl @ConvertToBadBaseTuple [template = constants.%ConvertToBadBaseTuple] { // CHECK:STDOUT: %DeriveFromTuple.ref.loc76: type = name_ref DeriveFromTuple, %DeriveFromTuple.decl [template = constants.%DeriveFromTuple] // CHECK:STDOUT: %.loc76_44: type = ptr_type %DeriveFromTuple [template = constants.%.24] -// CHECK:STDOUT: %p.loc76_26.1: %.24 = param p +// CHECK:STDOUT: %p.loc76_26.1: %.24 = param p, runtime_param0 // CHECK:STDOUT: @ConvertToBadBaseTuple.%p: %.24 = bind_name p, %p.loc76_26.1 // CHECK:STDOUT: %Base.ref: type = name_ref Base, %Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc76_56: %.20 = tuple_literal (%Base.ref) @@ -364,7 +364,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.decl: %AccessMemberWithInvalidBaseTuple.type = fn_decl @AccessMemberWithInvalidBaseTuple [template = constants.%AccessMemberWithInvalidBaseTuple] { // CHECK:STDOUT: %DeriveFromTuple.ref.loc78: type = name_ref DeriveFromTuple, %DeriveFromTuple.decl [template = constants.%DeriveFromTuple] // CHECK:STDOUT: %.loc78_55: type = ptr_type %DeriveFromTuple [template = constants.%.24] -// CHECK:STDOUT: %p.loc78_37.1: %.24 = param p +// CHECK:STDOUT: %p.loc78_37.1: %.24 = param p, runtime_param0 // CHECK:STDOUT: @AccessMemberWithInvalidBaseTuple.%p: %.24 = bind_name p, %p.loc78_37.1 // CHECK:STDOUT: %int.make_type_32.loc78: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc78_61.1: type = value_of_initializer %int.make_type_32.loc78 [template = i32] @@ -375,7 +375,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %ConvertToBadBaseStruct.decl: %ConvertToBadBaseStruct.type = fn_decl @ConvertToBadBaseStruct [template = constants.%ConvertToBadBaseStruct] { // CHECK:STDOUT: %DeriveFromStruct.ref.loc97: type = name_ref DeriveFromStruct, %DeriveFromStruct.decl [template = constants.%DeriveFromStruct] // CHECK:STDOUT: %.loc97_46: type = ptr_type %DeriveFromStruct [template = constants.%.31] -// CHECK:STDOUT: %p.loc97_27.1: %.31 = param p +// CHECK:STDOUT: %p.loc97_27.1: %.31 = param p, runtime_param0 // CHECK:STDOUT: @ConvertToBadBaseStruct.%p: %.31 = bind_name p, %p.loc97_27.1 // CHECK:STDOUT: %int.make_type_32.loc97_57: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc97_57.1: type = value_of_initializer %int.make_type_32.loc97_57 [template = i32] @@ -390,7 +390,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %AccessMemberWithInvalidBaseStruct.decl: %AccessMemberWithInvalidBaseStruct.type = fn_decl @AccessMemberWithInvalidBaseStruct [template = constants.%AccessMemberWithInvalidBaseStruct] { // CHECK:STDOUT: %DeriveFromStruct.ref.loc100: type = name_ref DeriveFromStruct, %DeriveFromStruct.decl [template = constants.%DeriveFromStruct] // CHECK:STDOUT: %.loc100_57: type = ptr_type %DeriveFromStruct [template = constants.%.31] -// CHECK:STDOUT: %p.loc100_38.1: %.31 = param p +// CHECK:STDOUT: %p.loc100_38.1: %.31 = param p, runtime_param0 // CHECK:STDOUT: @AccessMemberWithInvalidBaseStruct.%p: %.31 = bind_name p, %p.loc100_38.1 // CHECK:STDOUT: %int.make_type_32.loc100: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc100_63.1: type = value_of_initializer %int.make_type_32.loc100 [template = i32] @@ -402,7 +402,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %ConvertToBadBaseIncomplete.decl: %ConvertToBadBaseIncomplete.type = fn_decl @ConvertToBadBaseIncomplete [template = constants.%ConvertToBadBaseIncomplete] { // CHECK:STDOUT: %DeriveFromIncomplete.ref.loc122: type = name_ref DeriveFromIncomplete, %DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] // CHECK:STDOUT: %.loc122_54: type = ptr_type %DeriveFromIncomplete [template = constants.%.35] -// CHECK:STDOUT: %p.loc122_31.1: %.35 = param p +// CHECK:STDOUT: %p.loc122_31.1: %.35 = param p, runtime_param0 // CHECK:STDOUT: @ConvertToBadBaseIncomplete.%p: %.35 = bind_name p, %p.loc122_31.1 // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] // CHECK:STDOUT: %.loc122_70: type = ptr_type %Incomplete [template = constants.%.36] @@ -411,7 +411,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.decl: %AccessMemberWithInvalidBaseIncomplete.type = fn_decl @AccessMemberWithInvalidBaseIncomplete [template = constants.%AccessMemberWithInvalidBaseIncomplete] { // CHECK:STDOUT: %DeriveFromIncomplete.ref.loc124: type = name_ref DeriveFromIncomplete, %DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] // CHECK:STDOUT: %.loc124_65: type = ptr_type %DeriveFromIncomplete [template = constants.%.35] -// CHECK:STDOUT: %p.loc124_42.1: %.35 = param p +// CHECK:STDOUT: %p.loc124_42.1: %.35 = param p, runtime_param0 // CHECK:STDOUT: @AccessMemberWithInvalidBaseIncomplete.%p: %.35 = bind_name p, %p.loc124_42.1 // CHECK:STDOUT: %int.make_type_32.loc124: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc124_71.1: type = value_of_initializer %int.make_type_32.loc124 [template = i32] @@ -422,7 +422,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %ConvertToBadBaseFinal.decl: %ConvertToBadBaseFinal.type = fn_decl @ConvertToBadBaseFinal [template = constants.%ConvertToBadBaseFinal] { // CHECK:STDOUT: %DeriveFromFinal.ref.loc135: type = name_ref DeriveFromFinal, %DeriveFromFinal.decl [template = constants.%DeriveFromFinal] // CHECK:STDOUT: %.loc135_44: type = ptr_type %DeriveFromFinal [template = constants.%.43] -// CHECK:STDOUT: %p.loc135_26.1: %.43 = param p +// CHECK:STDOUT: %p.loc135_26.1: %.43 = param p, runtime_param0 // CHECK:STDOUT: @ConvertToBadBaseFinal.%p: %.43 = bind_name p, %p.loc135_26.1 // CHECK:STDOUT: %Final.ref: type = name_ref Final, %Final.decl [template = constants.%Final] // CHECK:STDOUT: %.loc135_55: type = ptr_type %Final [template = constants.%.44] @@ -431,7 +431,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_WithMember.decl: %AccessMemberWithInvalidBaseFinal_WithMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_WithMember [template = constants.%AccessMemberWithInvalidBaseFinal_WithMember] { // CHECK:STDOUT: %DeriveFromFinal.ref.loc139: type = name_ref DeriveFromFinal, %DeriveFromFinal.decl [template = constants.%DeriveFromFinal] // CHECK:STDOUT: %.loc139_66: type = ptr_type %DeriveFromFinal [template = constants.%.43] -// CHECK:STDOUT: %p.loc139_48.1: %.43 = param p +// CHECK:STDOUT: %p.loc139_48.1: %.43 = param p, runtime_param0 // CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_WithMember.%p: %.43 = bind_name p, %p.loc139_48.1 // CHECK:STDOUT: %int.make_type_32.loc139: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc139_72.1: type = value_of_initializer %int.make_type_32.loc139 [template = i32] @@ -441,7 +441,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %AccessMemberWithInvalidBaseFinal_NoMember.decl: %AccessMemberWithInvalidBaseFinal_NoMember.type = fn_decl @AccessMemberWithInvalidBaseFinal_NoMember [template = constants.%AccessMemberWithInvalidBaseFinal_NoMember] { // CHECK:STDOUT: %DeriveFromFinal.ref.loc143: type = name_ref DeriveFromFinal, %DeriveFromFinal.decl [template = constants.%DeriveFromFinal] // CHECK:STDOUT: %.loc143_64: type = ptr_type %DeriveFromFinal [template = constants.%.43] -// CHECK:STDOUT: %p.loc143_46.1: %.43 = param p +// CHECK:STDOUT: %p.loc143_46.1: %.43 = param p, runtime_param0 // CHECK:STDOUT: @AccessMemberWithInvalidBaseFinal_NoMember.%p: %.43 = bind_name p, %p.loc143_46.1 // CHECK:STDOUT: %int.make_type_32.loc143: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc143_70.1: type = value_of_initializer %int.make_type_32.loc143 [template = i32] @@ -497,7 +497,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromNonType { // CHECK:STDOUT: %.loc35_16.1: i32 = int_literal 32 [template = constants.%.6] -// CHECK:STDOUT: %.loc35_16.2: init type = call constants.%ImplicitAs(type) [template = constants.%.10] +// CHECK:STDOUT: %.loc35_16.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.10] // CHECK:STDOUT: %.loc35_16.3: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.12] // CHECK:STDOUT: %Convert.ref: %.11 = name_ref Convert, %.loc35_16.3 [template = constants.%.12] // CHECK:STDOUT: %.loc35_16.4: type = converted %.loc35_16.1, [template = ] @@ -600,7 +600,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @ConvertToBadBasei32(%p: %.15) -> %.16 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.15 = name_ref p, %p -// CHECK:STDOUT: %.loc57_61.1: init type = call constants.%ImplicitAs(constants.%.16) [template = constants.%.17] +// CHECK:STDOUT: %.loc57_61.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.16) [template = constants.%.17] // CHECK:STDOUT: %.loc57_61.2: %.18 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.16) [template = constants.%.19] // CHECK:STDOUT: %Convert.ref: %.18 = name_ref Convert, %.loc57_61.2 [template = constants.%.19] // CHECK:STDOUT: %.loc57_61.3: %.16 = converted %p.ref, [template = ] @@ -618,7 +618,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @ConvertToBadBaseTuple(%p: %.24) -> %.25 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.24 = name_ref p, %p -// CHECK:STDOUT: %.loc76_69.1: init type = call constants.%ImplicitAs(constants.%.25) [template = constants.%.26] +// CHECK:STDOUT: %.loc76_69.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.25) [template = constants.%.26] // CHECK:STDOUT: %.loc76_69.2: %.27 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.25) [template = constants.%.28] // CHECK:STDOUT: %Convert.ref: %.27 = name_ref Convert, %.loc76_69.2 [template = constants.%.28] // CHECK:STDOUT: %.loc76_69.3: %.25 = converted %p.ref, [template = ] @@ -636,7 +636,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p: %.31) -> %.30 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.31 = name_ref p, %p -// CHECK:STDOUT: %.loc97_82.1: init type = call constants.%ImplicitAs(constants.%.30) [template = constants.%.32] +// CHECK:STDOUT: %.loc97_82.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.30) [template = constants.%.32] // CHECK:STDOUT: %.loc97_82.2: %.33 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.30) [template = constants.%.34] // CHECK:STDOUT: %Convert.ref: %.33 = name_ref Convert, %.loc97_82.2 [template = constants.%.34] // CHECK:STDOUT: %.loc97_82.3: %.30 = converted %p.ref, [template = ] @@ -654,7 +654,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @ConvertToBadBaseIncomplete(%p: %.35) -> %.36 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.35 = name_ref p, %p -// CHECK:STDOUT: %.loc122_82.1: init type = call constants.%ImplicitAs(constants.%.36) [template = constants.%.37] +// CHECK:STDOUT: %.loc122_82.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.36) [template = constants.%.37] // CHECK:STDOUT: %.loc122_82.2: %.38 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.36) [template = constants.%.39] // CHECK:STDOUT: %Convert.ref: %.38 = name_ref Convert, %.loc122_82.2 [template = constants.%.39] // CHECK:STDOUT: %.loc122_82.3: %.36 = converted %p.ref, [template = ] diff --git a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon index de2d7a1d3ea0..9ffa9d66da53 100644 --- a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon +++ b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon @@ -94,7 +94,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %AccessBInA.decl: %AccessBInA.type = fn_decl @AccessBInA [template = constants.%AccessBInA] { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %a.loc19_15.1: %A = param a +// CHECK:STDOUT: %a.loc19_15.1: %A = param a, runtime_param0 // CHECK:STDOUT: @AccessBInA.%a: %A = bind_name a, %a.loc19_15.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -151,7 +151,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %b.ref: %.4 = name_ref b, @B.%.loc16_8 [template = @B.%.loc16_8] -// CHECK:STDOUT: %.loc26_11.1: init type = call constants.%ImplicitAs(constants.%B) [template = constants.%.11] +// CHECK:STDOUT: %.loc26_11.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%B) [template = constants.%.11] // CHECK:STDOUT: %.loc26_11.2: %.12 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%B) [template = constants.%.13] // CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc26_11.2 [template = constants.%.13] // CHECK:STDOUT: %.loc26_11.3: %B = converted %a.ref, [template = ] diff --git a/toolchain/check/testdata/class/fail_derived_to_base.carbon b/toolchain/check/testdata/class/fail_derived_to_base.carbon index e70821333030..315090831b31 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -130,7 +130,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %ConvertUnrelated.decl: %ConvertUnrelated.type = fn_decl @ConvertUnrelated [template = constants.%ConvertUnrelated] { // CHECK:STDOUT: %B2.ref: type = name_ref B2, %B2.decl [template = constants.%B2] // CHECK:STDOUT: %.loc31_26: type = ptr_type %B2 [template = constants.%.9] -// CHECK:STDOUT: %p.loc31_21.1: %.9 = param p +// CHECK:STDOUT: %p.loc31_21.1: %.9 = param p, runtime_param0 // CHECK:STDOUT: @ConvertUnrelated.%p: %.9 = bind_name p, %p.loc31_21.1 // CHECK:STDOUT: %A1.ref: type = name_ref A1, %A1.decl [template = constants.%A1] // CHECK:STDOUT: %.loc31_34: type = ptr_type %A1 [template = constants.%.10] @@ -140,7 +140,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %ConvertIncomplete.decl: %ConvertIncomplete.type = fn_decl @ConvertIncomplete [template = constants.%ConvertIncomplete] { // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] // CHECK:STDOUT: %.loc41_35: type = ptr_type %Incomplete [template = constants.%.21] -// CHECK:STDOUT: %p.loc41_22.1: %.21 = param p +// CHECK:STDOUT: %p.loc41_22.1: %.21 = param p, runtime_param0 // CHECK:STDOUT: @ConvertIncomplete.%p: %.21 = bind_name p, %p.loc41_22.1 // CHECK:STDOUT: %A2.ref: type = name_ref A2, %A2.decl [template = constants.%A2] // CHECK:STDOUT: %.loc41_43: type = ptr_type %A2 [template = constants.%.22] @@ -211,7 +211,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: fn @ConvertUnrelated(%p: %.9) -> %.10 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p -// CHECK:STDOUT: %.loc31_46.1: init type = call constants.%ImplicitAs(constants.%.10) [template = constants.%.17] +// CHECK:STDOUT: %.loc31_46.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.10) [template = constants.%.17] // CHECK:STDOUT: %.loc31_46.2: %.18 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.10) [template = constants.%.19] // CHECK:STDOUT: %Convert.ref: %.18 = name_ref Convert, %.loc31_46.2 [template = constants.%.19] // CHECK:STDOUT: %.loc31_46.3: %.10 = converted %p.ref, [template = ] @@ -229,7 +229,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: fn @ConvertIncomplete(%p: %.21) -> %.22 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.21 = name_ref p, %p -// CHECK:STDOUT: %.loc41_55.1: init type = call constants.%ImplicitAs(constants.%.22) [template = constants.%.23] +// CHECK:STDOUT: %.loc41_55.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.22) [template = constants.%.23] // CHECK:STDOUT: %.loc41_55.2: %.24 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.22) [template = constants.%.25] // CHECK:STDOUT: %Convert.ref: %.24 = name_ref Convert, %.loc41_55.2 [template = constants.%.25] // CHECK:STDOUT: %.loc41_55.3: %.22 = converted %p.ref, [template = ] diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index 500e248254bd..0c3ad8525e0d 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -72,20 +72,20 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc11_13.1: type = param T +// CHECK:STDOUT: %T.loc11_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc32_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_32, %.loc32_14.1 [template = i32] -// CHECK:STDOUT: %N.loc32_10.1: i32 = param N +// CHECK:STDOUT: %N.loc32_10.1: i32 = param N, runtime_param // CHECK:STDOUT: %N.loc32_10.2: i32 = bind_symbolic_name N 0, %N.loc32_10.1 [symbolic = @.1.%N (constants.%N)] // CHECK:STDOUT: %Self.ref: = name_ref Self, [template = ] -// CHECK:STDOUT: %self.loc32_21.1: = param self +// CHECK:STDOUT: %self.loc32_21.1: = param self, runtime_param0 // CHECK:STDOUT: @.1.%self: = bind_name self, %self.loc32_21.1 // CHECK:STDOUT: %T.ref: = name_ref T, [template = ] -// CHECK:STDOUT: %n.loc32_33.1: = param n +// CHECK:STDOUT: %n.loc32_33.1: = param n, runtime_param1 // CHECK:STDOUT: @.1.%n: = bind_name n, %n.loc32_33.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -105,10 +105,10 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = %F (constants.%F)] { // CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @F.%Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13 [symbolic = @F.%Class (constants.%Class.2)] -// CHECK:STDOUT: %self.loc13_8.1: @F.%Class (%Class.2) = param self +// CHECK:STDOUT: %self.loc13_8.1: @F.%Class (%Class.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_8.2: @F.%Class (%Class.2) = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, file.%T.loc11_13.2 [symbolic = @F.%T (constants.%T)] -// CHECK:STDOUT: %n.loc13_20.1: @F.%T (%T) = param n +// CHECK:STDOUT: %n.loc13_20.1: @F.%T (%T) = param n, runtime_param1 // CHECK:STDOUT: %n.loc13_20.2: @F.%T (%T) = bind_name n, %n.loc13_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_incomplete.carbon b/toolchain/check/testdata/class/fail_incomplete.carbon index d881fa735a83..11981ae13168 100644 --- a/toolchain/check/testdata/class/fail_incomplete.carbon +++ b/toolchain/check/testdata/class/fail_incomplete.carbon @@ -213,7 +213,7 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref.loc51: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc51_14: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc51_6.1: %.4 = param p +// CHECK:STDOUT: %p.loc51_6.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @G.%p: %.4 = bind_name p, %p.loc51_6.1 // CHECK:STDOUT: %int.make_type_32.loc51: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc51_20.1: type = value_of_initializer %int.make_type_32.loc51 [template = i32] @@ -223,7 +223,7 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: %MemberAccess.decl: %MemberAccess.type = fn_decl @MemberAccess [template = constants.%MemberAccess] { // CHECK:STDOUT: %Class.ref.loc62: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc62_25: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc62_17.1: %.4 = param p +// CHECK:STDOUT: %p.loc62_17.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @MemberAccess.%p: %.4 = bind_name p, %p.loc62_17.1 // CHECK:STDOUT: %int.make_type_32.loc62: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc62_31.1: type = value_of_initializer %int.make_type_32.loc62 [template = i32] @@ -233,7 +233,7 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: %Copy.decl: %Copy.type = fn_decl @Copy [template = constants.%Copy] { // CHECK:STDOUT: %Class.ref.loc80_12: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc80: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc80_9.1: %.4 = param p +// CHECK:STDOUT: %p.loc80_9.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @Copy.%p: %.4 = bind_name p, %p.loc80_9.1 // CHECK:STDOUT: %Class.ref.loc80_23: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: @Copy.%return: ref %Class = var @@ -241,12 +241,12 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: %Let.decl: %Let.type = fn_decl @Let [template = constants.%Let] { // CHECK:STDOUT: %Class.ref.loc84: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc84: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc84_8.1: %.4 = param p +// CHECK:STDOUT: %p.loc84_8.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @Let.%p: %.4 = bind_name p, %p.loc84_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %TakeIncomplete.decl: %TakeIncomplete.type = fn_decl @TakeIncomplete [template = constants.%TakeIncomplete] { // CHECK:STDOUT: %Class.ref.loc95: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc95_19.1: %Class = param c +// CHECK:STDOUT: %c.loc95_19.1: %Class = param c, runtime_param0 // CHECK:STDOUT: @TakeIncomplete.%c: %Class = bind_name c, %c.loc95_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: %ReturnIncomplete.decl: %ReturnIncomplete.type = fn_decl @ReturnIncomplete [template = constants.%ReturnIncomplete] { @@ -256,7 +256,7 @@ fn CallReturnIncomplete() { // CHECK:STDOUT: %CallTakeIncomplete.decl: %CallTakeIncomplete.type = fn_decl @CallTakeIncomplete [template = constants.%CallTakeIncomplete] { // CHECK:STDOUT: %Class.ref.loc99: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc99: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc99_23.1: %.4 = param p +// CHECK:STDOUT: %p.loc99_23.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @CallTakeIncomplete.%p: %.4 = bind_name p, %p.loc99_23.1 // CHECK:STDOUT: } // CHECK:STDOUT: %CallReturnIncomplete.decl: %CallReturnIncomplete.type = fn_decl @CallReturnIncomplete [template = constants.%CallReturnIncomplete] {} diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index 857ea0c6440e..aec3868aa2d4 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -73,7 +73,7 @@ fn F() { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc16: type = ptr_type %Class [template = constants.%.4] -// CHECK:STDOUT: %p.loc16_6.1: %.4 = param p +// CHECK:STDOUT: %p.loc16_6.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @G.%p: %.4 = bind_name p, %p.loc16_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} diff --git a/toolchain/check/testdata/class/fail_memaccess_category.carbon b/toolchain/check/testdata/class/fail_memaccess_category.carbon index 3499000d63ba..fbe638755336 100644 --- a/toolchain/check/testdata/class/fail_memaccess_category.carbon +++ b/toolchain/check/testdata/class/fail_memaccess_category.carbon @@ -83,10 +83,10 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %.loc19: type = struct_type {.a: %A} [template = constants.%.6] -// CHECK:STDOUT: %s.loc19_6.1: %.6 = param s +// CHECK:STDOUT: %s.loc19_6.1: %.6 = param s, runtime_param0 // CHECK:STDOUT: @F.2.%s: %.6 = bind_name s, %s.loc19_6.1 // CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %b.loc19_18.1: %B = param b +// CHECK:STDOUT: %b.loc19_18.1: %B = param b, runtime_param1 // CHECK:STDOUT: @F.2.%b: %B = bind_name b, %b.loc19_18.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -95,7 +95,7 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc12_20: type = ptr_type %A [template = constants.%.1] -// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self +// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_13.3: %.1 = bind_name self, %self.loc12_13.1 // CHECK:STDOUT: %.loc12_8: %.1 = addr_pattern %self.loc12_13.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_method.carbon b/toolchain/check/testdata/class/fail_method.carbon index 7e08d53383ff..5b809b1d7845 100644 --- a/toolchain/check/testdata/class/fail_method.carbon +++ b/toolchain/check/testdata/class/fail_method.carbon @@ -88,7 +88,7 @@ fn F(c: Class) { // CHECK:STDOUT: %A: %WithSelf.type = bind_alias A, @Class.%WithSelf.decl [template = constants.%WithSelf] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Class.ref.loc18: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc18_6.1: %Class = param c +// CHECK:STDOUT: %c.loc18_6.1: %Class = param c, runtime_param0 // CHECK:STDOUT: @F.%c: %Class = bind_name c, %c.loc18_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -97,7 +97,7 @@ fn F(c: Class) { // CHECK:STDOUT: %NoSelf.decl: %NoSelf.type = fn_decl @NoSelf [template = constants.%NoSelf] {} // CHECK:STDOUT: %WithSelf.decl: %WithSelf.type = fn_decl @WithSelf [template = constants.%WithSelf] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %self.loc13_15.1: %Class = param self +// CHECK:STDOUT: %self.loc13_15.1: %Class = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_15.2: %Class = bind_name self, %self.loc13_15.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -129,7 +129,6 @@ fn F(c: Class) { // CHECK:STDOUT: %Class.ref.loc38: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %WithSelf.ref.loc38: %WithSelf.type = name_ref WithSelf, @Class.%WithSelf.decl [template = constants.%WithSelf] // CHECK:STDOUT: %c.ref.loc38: %Class = name_ref c, %c -// CHECK:STDOUT: %WithSelf.call.loc38: init %.1 = call %WithSelf.ref.loc38() [template = ] // CHECK:STDOUT: %A.ref: %WithSelf.type = name_ref A, file.%A [template = constants.%WithSelf] // CHECK:STDOUT: %WithSelf.call.loc46: init %.1 = call %A.ref() [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/fail_method_modifiers.carbon b/toolchain/check/testdata/class/fail_method_modifiers.carbon index 4d85911881b2..10ae2779f654 100644 --- a/toolchain/check/testdata/class/fail_method_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_method_modifiers.carbon @@ -104,12 +104,12 @@ base class BaseClass { // CHECK:STDOUT: class @FinalClass { // CHECK:STDOUT: %Abstract.decl: %Abstract.type.1 = fn_decl @Abstract.1 [template = constants.%Abstract.1] { // CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] -// CHECK:STDOUT: %self.loc20_24.1: %FinalClass = param self +// CHECK:STDOUT: %self.loc20_24.1: %FinalClass = param self, runtime_param0 // CHECK:STDOUT: %self.loc20_24.2: %FinalClass = bind_name self, %self.loc20_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Virtual.decl: %Virtual.type = fn_decl @Virtual [template = constants.%Virtual] { // CHECK:STDOUT: %Self.ref.loc29: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] -// CHECK:STDOUT: %self.loc29_22.1: %FinalClass = param self +// CHECK:STDOUT: %self.loc29_22.1: %FinalClass = param self, runtime_param0 // CHECK:STDOUT: %self.loc29_22.2: %FinalClass = bind_name self, %self.loc29_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -122,12 +122,12 @@ base class BaseClass { // CHECK:STDOUT: class @AbstractClass { // CHECK:STDOUT: %Default.decl: %Default.type = fn_decl @Default [template = constants.%Default] { // CHECK:STDOUT: %Self.ref.loc38: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] -// CHECK:STDOUT: %self.loc38_22.1: %AbstractClass = param self +// CHECK:STDOUT: %self.loc38_22.1: %AbstractClass = param self, runtime_param0 // CHECK:STDOUT: %self.loc38_22.2: %AbstractClass = bind_name self, %self.loc38_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Final.decl: %Final.type = fn_decl @Final [template = constants.%Final] { // CHECK:STDOUT: %Self.ref.loc44: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] -// CHECK:STDOUT: %self.loc44_18.1: %AbstractClass = param self +// CHECK:STDOUT: %self.loc44_18.1: %AbstractClass = param self, runtime_param0 // CHECK:STDOUT: %self.loc44_18.2: %AbstractClass = bind_name self, %self.loc44_18.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -140,7 +140,7 @@ base class BaseClass { // CHECK:STDOUT: class @BaseClass { // CHECK:STDOUT: %Abstract.decl: %Abstract.type.2 = fn_decl @Abstract.2 [template = constants.%Abstract.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%BaseClass [template = constants.%BaseClass] -// CHECK:STDOUT: %self.loc55_24.1: %BaseClass = param self +// CHECK:STDOUT: %self.loc55_24.1: %BaseClass = param self, runtime_param0 // CHECK:STDOUT: %self.loc55_24.2: %BaseClass = bind_name self, %self.loc55_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_self.carbon b/toolchain/check/testdata/class/fail_self.carbon index 5c9d5c749c29..d0418ebb78ad 100644 --- a/toolchain/check/testdata/class/fail_self.carbon +++ b/toolchain/check/testdata/class/fail_self.carbon @@ -120,7 +120,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref.loc25: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc25_12.1: %Class = param self +// CHECK:STDOUT: %self.loc25_12.1: %Class = param self, runtime_param0 // CHECK:STDOUT: @F.1.%self: %Class = bind_name self, %self.loc25_12.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { @@ -130,7 +130,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %WrongSelf.decl: type = class_decl @WrongSelf [template = constants.%WrongSelf] {} // CHECK:STDOUT: %CallWrongSelf.decl: %CallWrongSelf.type = fn_decl @CallWrongSelf [template = constants.%CallWrongSelf] { // CHECK:STDOUT: %WrongSelf.ref: type = name_ref WrongSelf, %WrongSelf.decl [template = constants.%WrongSelf] -// CHECK:STDOUT: %ws.loc45_18.1: %WrongSelf = param ws +// CHECK:STDOUT: %ws.loc45_18.1: %WrongSelf = param ws, runtime_param0 // CHECK:STDOUT: @CallWrongSelf.%ws: %WrongSelf = bind_name ws, %ws.loc45_18.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -157,7 +157,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc16_8.1: %Class = param self +// CHECK:STDOUT: %self.loc16_8.1: %Class = param self, runtime_param0 // CHECK:STDOUT: %self.loc16_8.2: %Class = bind_name self, %self.loc16_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { @@ -174,7 +174,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: class @WrongSelf { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %self.loc42_8.1: %Class = param self +// CHECK:STDOUT: %self.loc42_8.1: %Class = param self, runtime_param0 // CHECK:STDOUT: %self.loc42_8.2: %Class = bind_name self, %self.loc42_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -205,7 +205,7 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %ws.ref: %WrongSelf = name_ref ws, %ws // CHECK:STDOUT: %F.ref: %F.type.2 = name_ref F, @WrongSelf.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %.loc55_5: = bound_method %ws.ref, %F.ref -// CHECK:STDOUT: %.loc55_7.1: init type = call constants.%ImplicitAs(constants.%Class) [template = constants.%.7] +// CHECK:STDOUT: %.loc55_7.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%Class) [template = constants.%.7] // CHECK:STDOUT: %.loc55_7.2: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%Class) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc55_7.2 [template = constants.%.9] // CHECK:STDOUT: %.loc55_7.3: %Class = converted %ws.ref, [template = ] diff --git a/toolchain/check/testdata/class/fail_unknown_member.carbon b/toolchain/check/testdata/class/fail_unknown_member.carbon index 1ad60fc7c493..8be8461b43d8 100644 --- a/toolchain/check/testdata/class/fail_unknown_member.carbon +++ b/toolchain/check/testdata/class/fail_unknown_member.carbon @@ -59,7 +59,7 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc15_6.1: %Class = param c +// CHECK:STDOUT: %c.loc15_6.1: %Class = param c, runtime_param0 // CHECK:STDOUT: @G.%c: %Class = bind_name c, %c.loc15_6.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/class/forward_declared.carbon b/toolchain/check/testdata/class/forward_declared.carbon index 63b1b5f54532..43a5b552d4f7 100644 --- a/toolchain/check/testdata/class/forward_declared.carbon +++ b/toolchain/check/testdata/class/forward_declared.carbon @@ -46,7 +46,7 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Class.ref.loc13_9: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc13_14: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %p.loc13_6.1: %.1 = param p +// CHECK:STDOUT: %p.loc13_6.1: %.1 = param p, runtime_param0 // CHECK:STDOUT: @F.%p: %.1 = bind_name p, %p.loc13_6.1 // CHECK:STDOUT: %Class.ref.loc13_20: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc13_25: type = ptr_type %Class [template = constants.%.1] diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index e3228900e39a..b8ebb6782dee 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -66,11 +66,11 @@ class Declaration(T:! type); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc11_13.1: type = param T +// CHECK:STDOUT: %T.loc11_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Declaration.decl: %Declaration.type = class_decl @Declaration [template = constants.%Declaration.1] { -// CHECK:STDOUT: %T.loc24_19.1: type = param T +// CHECK:STDOUT: %T.loc24_19.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc24_19.2: type = bind_symbolic_name T 0, %T.loc24_19.1 [symbolic = @Declaration.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -91,7 +91,7 @@ class Declaration(T:! type); // CHECK:STDOUT: %.loc12_25: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @GetAddr.%Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, %.loc12_25 [symbolic = @GetAddr.%Class (constants.%Class.2)] // CHECK:STDOUT: %.loc12_29: type = ptr_type %Class.2 [symbolic = @GetAddr.%.1 (constants.%.2)] -// CHECK:STDOUT: %self.loc12_19.1: @GetAddr.%.1 (%.2) = param self +// CHECK:STDOUT: %self.loc12_19.1: @GetAddr.%.1 (%.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_19.3: @GetAddr.%.1 (%.2) = bind_name self, %self.loc12_19.1 // CHECK:STDOUT: %.loc12_14: @GetAddr.%.1 (%.2) = addr_pattern %self.loc12_19.3 // CHECK:STDOUT: %T.ref.loc12: type = name_ref T, file.%T.loc11_13.2 [symbolic = @GetAddr.%T (constants.%T)] @@ -101,7 +101,7 @@ class Declaration(T:! type); // CHECK:STDOUT: %GetValue.decl: @Class.%GetValue.type (%GetValue.type) = fn_decl @GetValue [symbolic = %GetValue (constants.%GetValue)] { // CHECK:STDOUT: %.loc17: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @GetValue.%Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, %.loc17 [symbolic = @GetValue.%Class (constants.%Class.2)] -// CHECK:STDOUT: %self.loc17_15.1: @GetValue.%Class (%Class.2) = param self +// CHECK:STDOUT: %self.loc17_15.1: @GetValue.%Class (%Class.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc17_15.2: @GetValue.%Class (%Class.2) = bind_name self, %self.loc17_15.1 // CHECK:STDOUT: %T.ref.loc17: type = name_ref T, file.%T.loc11_13.2 [symbolic = @GetValue.%T (constants.%T)] // CHECK:STDOUT: %return.var.loc17: ref @GetValue.%T (%T) = var diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index efc19f532447..6b740a8035cf 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -25,10 +25,10 @@ library "[[@TEST_NAME]]"; class Class(T:! type, N:! i32) {} -// CHECK:STDERR: fail_too_few.carbon:[[@LINE+7]]:8: ERROR: 1 argument(s) passed to function expecting 2 argument(s). +// CHECK:STDERR: fail_too_few.carbon:[[@LINE+7]]:8: ERROR: 1 argument(s) passed to generic class expecting 2 argument(s). // CHECK:STDERR: var a: Class(i32*); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: Calling function declared here. +// CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: Calling generic class declared here. // CHECK:STDERR: class Class(T:! type, N:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -40,10 +40,10 @@ library "[[@TEST_NAME]]"; class Class(T:! type, N:! i32) {} -// CHECK:STDERR: fail_too_many.carbon:[[@LINE+7]]:8: ERROR: 3 argument(s) passed to function expecting 2 argument(s). +// CHECK:STDERR: fail_too_many.carbon:[[@LINE+7]]:8: ERROR: 3 argument(s) passed to generic class expecting 2 argument(s). // CHECK:STDERR: var a: Class(i32*, 1, 2); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: Calling function declared here. +// CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: Calling generic class declared here. // CHECK:STDERR: class Class(T:! type, N:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -61,9 +61,9 @@ class Class(T:! type, N:! i32) {} // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+6]]:8: Type `i32` does not implement interface `ImplicitAs`. // CHECK:STDERR: var a: Class(5, i32*); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:1: Initializing parameter 1 of function declared here. +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:13: Initializing generic parameter `T` declared here. // CHECK:STDERR: class Class(T:! type, N:! i32) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: ^ var a: Class(5, i32*); // --- call_in_nested_return_type.carbon @@ -129,12 +129,12 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32] -// CHECK:STDOUT: %N.loc4_23.1: i32 = param N +// CHECK:STDOUT: %N.loc4_23.1: i32 = param N, runtime_param // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = @Class.%N (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref.loc6: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] @@ -143,18 +143,14 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc6_17.2: type = converted %int.make_type_32.loc6, %.loc6_17.1 [template = i32] // CHECK:STDOUT: %.loc6_17.3: type = ptr_type i32 [template = constants.%.3] // CHECK:STDOUT: %.loc6_20: i32 = int_literal 5 [template = constants.%.4] -// CHECK:STDOUT: %.loc6_13: init type = call %Class.ref.loc6(%.loc6_17.3, %.loc6_20) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc6_21.1: type = value_of_initializer %.loc6_13 [template = constants.%Class.3] -// CHECK:STDOUT: %.loc6_21.2: type = converted %.loc6_13, %.loc6_21.1 [template = constants.%Class.3] +// CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%.3, constants.%.4) [template = constants.%Class.3] // CHECK:STDOUT: %a.var: ref %Class.3 = var a // CHECK:STDOUT: %a: ref %Class.3 = bind_name a, %a.var // CHECK:STDOUT: %Class.ref.loc9: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc9_15: %.1 = tuple_literal () // CHECK:STDOUT: %.loc9_18: i32 = int_literal 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_13.1: type = converted %.loc9_15, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc9_13.2: init type = call %Class.ref.loc9(%.loc9_13.1, %.loc9_18) [template = constants.%Class.4] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %.loc9_13.2 [template = constants.%Class.4] -// CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_13.2, %.loc9_19.1 [template = constants.%Class.4] +// CHECK:STDOUT: %.loc9_13: type = converted %.loc9_15, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%.1, constants.%.6) [template = constants.%Class.4] // CHECK:STDOUT: %b.var: ref %Class.4 = var b // CHECK:STDOUT: %b: ref %Class.4 = bind_name b, %b.var // CHECK:STDOUT: } @@ -230,12 +226,12 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32] -// CHECK:STDOUT: %N.loc4_23.1: i32 = param N +// CHECK:STDOUT: %N.loc4_23.1: i32 = param N, runtime_param // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = @Class.%N (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] @@ -243,9 +239,6 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_32.loc13, %.loc13_17.1 [template = i32] // CHECK:STDOUT: %.loc13_17.3: type = ptr_type i32 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_13: init type = call %Class.ref() [template = ] -// CHECK:STDOUT: %.loc13_18.1: type = value_of_initializer %.loc13_13 [template = ] -// CHECK:STDOUT: %.loc13_18.2: type = converted %.loc13_13, %.loc13_18.1 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -309,12 +302,12 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32] -// CHECK:STDOUT: %N.loc4_23.1: i32 = param N +// CHECK:STDOUT: %N.loc4_23.1: i32 = param N, runtime_param // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = @Class.%N (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] @@ -324,9 +317,6 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc13_17.3: type = ptr_type i32 [template = constants.%.3] // CHECK:STDOUT: %.loc13_20: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc13_23: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_13: init type = call %Class.ref() [template = ] -// CHECK:STDOUT: %.loc13_24.1: type = value_of_initializer %.loc13_13 [template = ] -// CHECK:STDOUT: %.loc13_24.2: type = converted %.loc13_13, %.loc13_24.1 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -412,12 +402,12 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_32.loc4, %.loc4_27.1 [template = i32] -// CHECK:STDOUT: %N.loc4_23.1: i32 = param N +// CHECK:STDOUT: %N.loc4_23.1: i32 = param N, runtime_param // CHECK:STDOUT: %N.loc4_23.2: i32 = bind_symbolic_name N 1, %N.loc4_23.1 [symbolic = @Class.%N (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] @@ -426,13 +416,10 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc15_20.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_20.2: type = converted %int.make_type_32.loc15, %.loc15_20.1 [template = i32] // CHECK:STDOUT: %.loc15_20.3: type = ptr_type i32 [template = constants.%.4] -// CHECK:STDOUT: %.loc15_13.1: init type = call constants.%ImplicitAs(type) [template = constants.%.8] +// CHECK:STDOUT: %.loc15_13.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.8] // CHECK:STDOUT: %.loc15_13.2: %.9 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.10] // CHECK:STDOUT: %Convert.ref: %.9 = name_ref Convert, %.loc15_13.2 [template = constants.%.10] // CHECK:STDOUT: %.loc15_13.3: type = converted %.loc15_14, [template = ] -// CHECK:STDOUT: %.loc15_13.4: init type = call %Class.ref() [template = ] -// CHECK:STDOUT: %.loc15_21.1: type = value_of_initializer %.loc15_13.4 [template = ] -// CHECK:STDOUT: %.loc15_21.2: type = converted %.loc15_13.4, %.loc15_21.1 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -522,34 +509,35 @@ class Outer(T:! type) { // CHECK:STDOUT: %Outer.1: %Outer.type = struct_value () [template] // CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic] -// CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner [template] -// CHECK:STDOUT: %Inner.1: %Inner.type = struct_value () [template] +// CHECK:STDOUT: %Inner.type.1: type = generic_class_type @Inner, @Outer(%T) [symbolic] +// CHECK:STDOUT: %Inner.1: %Inner.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %A.type.1: type = fn_type @A, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %A.1: %A.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %Outer.3: type = class_type @Outer, @Outer(%U) [symbolic] // CHECK:STDOUT: %B.type.1: type = fn_type @B, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %B.1: %B.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.3: type = class_type @Inner, @Inner(%T) [symbolic] +// CHECK:STDOUT: %Inner.3: type = class_type @Inner, @Inner(%T, %T) [symbolic] // CHECK:STDOUT: %C.type.1: type = fn_type @C, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %C.1: %C.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.4: type = class_type @Inner, @Inner(%U) [symbolic] // CHECK:STDOUT: %D.type.1: type = fn_type @D, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %D.1: %D.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %.2: type = struct_type {} [template] // CHECK:STDOUT: %.3: type = ptr_type %.2 [template] // CHECK:STDOUT: %struct.1: %Outer.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Inner.type.2: type = generic_class_type @Inner, @Outer(%U) [symbolic] +// CHECK:STDOUT: %Inner.4: %Inner.type.2 = struct_value () [symbolic] // CHECK:STDOUT: %struct.2: %Outer.3 = struct_value () [symbolic] -// CHECK:STDOUT: %struct.3: %Inner.3 = struct_value () [symbolic] -// CHECK:STDOUT: %A.type.2: type = fn_type @A, @Inner(%U, %U) [symbolic] +// CHECK:STDOUT: %A.type.2: type = fn_type @A, @Inner(%T, %T) [symbolic] // CHECK:STDOUT: %A.2: %A.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %B.type.2: type = fn_type @B, @Inner(%U, %U) [symbolic] +// CHECK:STDOUT: %B.type.2: type = fn_type @B, @Inner(%T, %T) [symbolic] // CHECK:STDOUT: %B.2: %B.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %C.type.2: type = fn_type @C, @Inner(%U, %U) [symbolic] +// CHECK:STDOUT: %C.type.2: type = fn_type @C, @Inner(%T, %T) [symbolic] // CHECK:STDOUT: %C.2: %C.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %D.type.2: type = fn_type @D, @Inner(%U, %U) [symbolic] +// CHECK:STDOUT: %D.type.2: type = fn_type @D, @Inner(%T, %T) [symbolic] // CHECK:STDOUT: %D.2: %D.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %struct.4: %Inner.4 = struct_value () [symbolic] +// CHECK:STDOUT: %struct.3: %Inner.3 = struct_value () [symbolic] +// CHECK:STDOUT: %struct.4: %Inner.2 = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -572,7 +560,7 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [template = constants.%Outer.1] { -// CHECK:STDOUT: %T.loc2_13.1: type = param T +// CHECK:STDOUT: %T.loc2_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc2_13.2: type = bind_symbolic_name T 0, %T.loc2_13.1 [symbolic = @Outer.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -581,10 +569,12 @@ class Outer(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T) [symbolic = %Inner.type (constants.%Inner.type.1)] +// CHECK:STDOUT: %Inner: @Outer.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner (constants.%Inner.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %Inner.decl: %Inner.type = class_decl @Inner [template = constants.%Inner.1] { -// CHECK:STDOUT: %U.loc3_15.1: type = param U +// CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.1) = class_decl @Inner [symbolic = %Inner (constants.%Inner.1)] { +// CHECK:STDOUT: %U.loc3_15.1: type = param U, runtime_param // CHECK:STDOUT: %U.loc3_15.2: type = bind_symbolic_name U 1, %U.loc3_15.1 [symbolic = @Inner.%U (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -612,34 +602,28 @@ class Outer(T:! type) { // CHECK:STDOUT: %A.decl: @Inner.%A.type (%A.type.1) = fn_decl @A [symbolic = %A (constants.%A.1)] { // CHECK:STDOUT: %Outer.ref.loc4: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, file.%T.loc2_13.2 [symbolic = @A.%T (constants.%T)] -// CHECK:STDOUT: %.loc4_20: init type = call %Outer.ref.loc4(%T.ref.loc4) [symbolic = @A.%Outer (constants.%Outer.2)] -// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %.loc4_20 [symbolic = @A.%Outer (constants.%Outer.2)] -// CHECK:STDOUT: %.loc4_22.2: type = converted %.loc4_20, %.loc4_22.1 [symbolic = @A.%Outer (constants.%Outer.2)] +// CHECK:STDOUT: %Outer.loc4: type = class_type @Outer, @Outer(constants.%T) [symbolic = @A.%Outer (constants.%Outer.2)] // CHECK:STDOUT: %return.var.loc4: ref @A.%Outer (%Outer.2) = var // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: @Inner.%B.type (%B.type.1) = fn_decl @B [symbolic = %B (constants.%B.1)] { // CHECK:STDOUT: %Outer.ref.loc7: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] // CHECK:STDOUT: %U.ref.loc7: type = name_ref U, @Outer.%U.loc3_15.2 [symbolic = @B.%U (constants.%U)] -// CHECK:STDOUT: %.loc7_20: init type = call %Outer.ref.loc7(%U.ref.loc7) [symbolic = @B.%Outer (constants.%Outer.3)] -// CHECK:STDOUT: %.loc7_22.1: type = value_of_initializer %.loc7_20 [symbolic = @B.%Outer (constants.%Outer.3)] -// CHECK:STDOUT: %.loc7_22.2: type = converted %.loc7_20, %.loc7_22.1 [symbolic = @B.%Outer (constants.%Outer.3)] +// CHECK:STDOUT: %Outer.loc7: type = class_type @Outer, @Outer(constants.%U) [symbolic = @B.%Outer (constants.%Outer.3)] // CHECK:STDOUT: %return.var.loc7: ref @B.%Outer (%Outer.3) = var // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: @Inner.%C.type (%C.type.1) = fn_decl @C [symbolic = %C (constants.%C.1)] { -// CHECK:STDOUT: %Inner.ref.loc10: %Inner.type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner.1] +// CHECK:STDOUT: %.loc10: @C.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = @C.%Inner.1 (constants.%Inner.1)] +// CHECK:STDOUT: %Inner.ref.loc10: @C.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc10 [symbolic = @C.%Inner.1 (constants.%Inner.1)] // CHECK:STDOUT: %T.ref.loc10: type = name_ref T, file.%T.loc2_13.2 [symbolic = @C.%T (constants.%T)] -// CHECK:STDOUT: %.loc10_20: init type = call %Inner.ref.loc10(%T.ref.loc10) [symbolic = @C.%Inner (constants.%Inner.3)] -// CHECK:STDOUT: %.loc10_22.1: type = value_of_initializer %.loc10_20 [symbolic = @C.%Inner (constants.%Inner.3)] -// CHECK:STDOUT: %.loc10_22.2: type = converted %.loc10_20, %.loc10_22.1 [symbolic = @C.%Inner (constants.%Inner.3)] -// CHECK:STDOUT: %return.var.loc10: ref @C.%Inner (%Inner.3) = var +// CHECK:STDOUT: %Inner.loc10: type = class_type @Inner, @Inner(constants.%T, constants.%T) [symbolic = @C.%Inner.2 (constants.%Inner.3)] +// CHECK:STDOUT: %return.var.loc10: ref @C.%Inner.2 (%Inner.3) = var // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: @Inner.%D.type (%D.type.1) = fn_decl @D [symbolic = %D (constants.%D.1)] { -// CHECK:STDOUT: %Inner.ref.loc13: %Inner.type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner.1] +// CHECK:STDOUT: %.loc13: @D.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = @D.%Inner.1 (constants.%Inner.1)] +// CHECK:STDOUT: %Inner.ref.loc13: @D.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc13 [symbolic = @D.%Inner.1 (constants.%Inner.1)] // CHECK:STDOUT: %U.ref.loc13: type = name_ref U, @Outer.%U.loc3_15.2 [symbolic = @D.%U (constants.%U)] -// CHECK:STDOUT: %.loc13_20: init type = call %Inner.ref.loc13(%U.ref.loc13) [symbolic = @D.%Inner (constants.%Inner.4)] -// CHECK:STDOUT: %.loc13_22.1: type = value_of_initializer %.loc13_20 [symbolic = @D.%Inner (constants.%Inner.4)] -// CHECK:STDOUT: %.loc13_22.2: type = converted %.loc13_20, %.loc13_22.1 [symbolic = @D.%Inner (constants.%Inner.4)] -// CHECK:STDOUT: %return.var.loc13: ref @D.%Inner (%Inner.4) = var +// CHECK:STDOUT: %Inner.loc13: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = @D.%Inner.2 (constants.%Inner.2)] +// CHECK:STDOUT: %return.var.loc13: ref @D.%Inner.2 (%Inner.2) = var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -685,32 +669,37 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @C(file.%T.loc2_13.2: type, @Outer.%U.loc3_15.2: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(%T) [symbolic = %Inner (constants.%Inner.3)] +// CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T) [symbolic = %Inner.type (constants.%Inner.type.1)] +// CHECK:STDOUT: %Inner.1: @C.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.1 (constants.%Inner.1)] +// CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%T, %T) [symbolic = %Inner.2 (constants.%Inner.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @C.%Inner (%Inner.3) = struct_value () [symbolic = %struct (constants.%struct.3)] +// CHECK:STDOUT: %struct: @C.%Inner.2 (%Inner.3) = struct_value () [symbolic = %struct (constants.%struct.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @Inner.%return.var.loc10: @C.%Inner (%Inner.3) { +// CHECK:STDOUT: fn() -> @Inner.%return.var.loc10: @C.%Inner.2 (%Inner.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_15.1: %.2 = struct_literal () -// CHECK:STDOUT: %.loc11_15.2: init @C.%Inner (%Inner.3) = class_init (), @Inner.%return.var.loc10 [symbolic = %struct (constants.%struct.3)] -// CHECK:STDOUT: %.loc11_16: init @C.%Inner (%Inner.3) = converted %.loc11_15.1, %.loc11_15.2 [symbolic = %struct (constants.%struct.3)] +// CHECK:STDOUT: %.loc11_15.2: init @C.%Inner.2 (%Inner.3) = class_init (), @Inner.%return.var.loc10 [symbolic = %struct (constants.%struct.3)] +// CHECK:STDOUT: %.loc11_16: init @C.%Inner.2 (%Inner.3) = converted %.loc11_15.1, %.loc11_15.2 [symbolic = %struct (constants.%struct.3)] // CHECK:STDOUT: return %.loc11_16 to @Inner.%return.var.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @D(file.%T.loc2_13.2: type, @Outer.%U.loc3_15.2: type) { +// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T) [symbolic = %Inner.type (constants.%Inner.type.1)] +// CHECK:STDOUT: %Inner.1: @D.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.1 (constants.%Inner.1)] // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(%U) [symbolic = %Inner (constants.%Inner.4)] +// CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%T, %U) [symbolic = %Inner.2 (constants.%Inner.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @D.%Inner (%Inner.4) = struct_value () [symbolic = %struct (constants.%struct.4)] +// CHECK:STDOUT: %struct: @D.%Inner.2 (%Inner.2) = struct_value () [symbolic = %struct (constants.%struct.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @Inner.%return.var.loc13: @D.%Inner (%Inner.4) { +// CHECK:STDOUT: fn() -> @Inner.%return.var.loc13: @D.%Inner.2 (%Inner.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_15.1: %.2 = struct_literal () -// CHECK:STDOUT: %.loc14_15.2: init @D.%Inner (%Inner.4) = class_init (), @Inner.%return.var.loc13 [symbolic = %struct (constants.%struct.4)] -// CHECK:STDOUT: %.loc14_16: init @D.%Inner (%Inner.4) = converted %.loc14_15.1, %.loc14_15.2 [symbolic = %struct (constants.%struct.4)] +// CHECK:STDOUT: %.loc14_15.2: init @D.%Inner.2 (%Inner.2) = class_init (), @Inner.%return.var.loc13 [symbolic = %struct (constants.%struct.4)] +// CHECK:STDOUT: %.loc14_16: init @D.%Inner.2 (%Inner.2) = converted %.loc14_15.1, %.loc14_15.2 [symbolic = %struct (constants.%struct.4)] // CHECK:STDOUT: return %.loc14_16 to @Inner.%return.var.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -719,6 +708,8 @@ class Outer(T:! type) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 +// CHECK:STDOUT: %Inner => constants.%Inner.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%T, constants.%U) { @@ -749,6 +740,8 @@ class Outer(T:! type) { // CHECK:STDOUT: %T => constants.%U // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Inner.type => constants.%Inner.type.2 +// CHECK:STDOUT: %Inner => constants.%Inner.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(@B.%U) { @@ -760,35 +753,11 @@ class Outer(T:! type) { // CHECK:STDOUT: %Outer => constants.%Outer.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(constants.%T) { -// CHECK:STDOUT: %U => constants.%U +// CHECK:STDOUT: specific @Inner(constants.%T, constants.%T) { +// CHECK:STDOUT: %U => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %A.type => constants.%A.type.1 -// CHECK:STDOUT: %A => constants.%A.1 -// CHECK:STDOUT: %B.type => constants.%B.type.1 -// CHECK:STDOUT: %B => constants.%B.1 -// CHECK:STDOUT: %C.type => constants.%C.type.1 -// CHECK:STDOUT: %C => constants.%C.1 -// CHECK:STDOUT: %D.type => constants.%D.type.1 -// CHECK:STDOUT: %D => constants.%D.1 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@C.%T) { -// CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T, constants.%U) { -// CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Inner => constants.%Inner.3 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(constants.%U) { -// CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T => constants.%U // CHECK:STDOUT: %A.type => constants.%A.type.2 // CHECK:STDOUT: %A => constants.%A.2 // CHECK:STDOUT: %B.type => constants.%B.type.2 @@ -799,20 +768,42 @@ class Outer(T:! type) { // CHECK:STDOUT: %D => constants.%D.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(@D.%U) { +// CHECK:STDOUT: specific @Outer(@C.%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Inner(@C.%T, @C.%T) { +// CHECK:STDOUT: %U => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%T, constants.%U) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 +// CHECK:STDOUT: %Inner.1 => constants.%Inner.1 +// CHECK:STDOUT: %Inner.2 => constants.%Inner.3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Outer(@D.%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Inner(@D.%T, @D.%U) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%T, constants.%U) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 +// CHECK:STDOUT: %Inner.1 => constants.%Inner.1 // CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %Inner => constants.%Inner.4 +// CHECK:STDOUT: %Inner.2 => constants.%Inner.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(@Inner.%T, @Inner.%U) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(constants.%U, constants.%U) { -// CHECK:STDOUT: %U => constants.%U +// CHECK:STDOUT: specific @Outer(@Outer.%T) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index fb251c47a30f..b41840c845f0 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -75,7 +75,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc11_13.1: type = param T +// CHECK:STDOUT: %T.loc11_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { @@ -83,10 +83,8 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %int.make_type_32.loc15_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_14.1: type = value_of_initializer %int.make_type_32.loc15_15 [template = i32] // CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_32.loc15_15, %.loc15_14.1 [template = i32] -// CHECK:STDOUT: %.loc15_14.3: init type = call %Class.ref.loc15(%.loc15_14.2) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer %.loc15_14.3 [template = constants.%Class.3] -// CHECK:STDOUT: %.loc15_18.2: type = converted %.loc15_14.3, %.loc15_18.1 [template = constants.%Class.3] -// CHECK:STDOUT: %c.loc15_6.1: %Class.3 = param c +// CHECK:STDOUT: %Class.loc15: type = class_type @Class, @Class(i32) [template = constants.%Class.3] +// CHECK:STDOUT: %c.loc15_6.1: %Class.3 = param c, runtime_param0 // CHECK:STDOUT: @F.%c: %Class.3 = bind_name c, %c.loc15_6.1 // CHECK:STDOUT: %int.make_type_32.loc15_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %int.make_type_32.loc15_24 [template = i32] @@ -94,27 +92,23 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: @F.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %T.loc19_6.1: type = param T +// CHECK:STDOUT: %T.loc19_6.1: type = param T, runtime_param // CHECK:STDOUT: @G.%T.loc19: type = bind_symbolic_name T 0, %T.loc19_6.1 [symbolic = @G.%T.1 (constants.%T)] // CHECK:STDOUT: %Class.ref.loc19: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref.loc19_25: type = name_ref T, @G.%T.loc19 [symbolic = @G.%T.1 (constants.%T)] -// CHECK:STDOUT: %.loc19_24: init type = call %Class.ref.loc19(%T.ref.loc19_25) [symbolic = @G.%Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc19_26.1: type = value_of_initializer %.loc19_24 [symbolic = @G.%Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc19_26.2: type = converted %.loc19_24, %.loc19_26.1 [symbolic = @G.%Class (constants.%Class.2)] -// CHECK:STDOUT: %c.loc19_16.1: @G.%Class (%Class.2) = param c +// CHECK:STDOUT: %Class.loc19: type = class_type @Class, @Class(constants.%T) [symbolic = @G.%Class (constants.%Class.2)] +// CHECK:STDOUT: %c.loc19_16.1: @G.%Class (%Class.2) = param c, runtime_param0 // CHECK:STDOUT: @G.%c: @G.%Class (%Class.2) = bind_name c, %c.loc19_16.1 // CHECK:STDOUT: %T.ref.loc19_32: type = name_ref T, @G.%T.loc19 [symbolic = @G.%T.1 (constants.%T)] // CHECK:STDOUT: @G.%return: ref @G.%T.1 (%T) = var // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { -// CHECK:STDOUT: %U.loc23_6.1: type = param U +// CHECK:STDOUT: %U.loc23_6.1: type = param U, runtime_param // CHECK:STDOUT: @H.%U.loc23: type = bind_symbolic_name U 0, %U.loc23_6.1 [symbolic = @H.%U.1 (constants.%U)] // CHECK:STDOUT: %Class.ref.loc23: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %U.ref.loc23_25: type = name_ref U, @H.%U.loc23 [symbolic = @H.%U.1 (constants.%U)] -// CHECK:STDOUT: %.loc23_24: init type = call %Class.ref.loc23(%U.ref.loc23_25) [symbolic = @H.%Class (constants.%Class.4)] -// CHECK:STDOUT: %.loc23_26.1: type = value_of_initializer %.loc23_24 [symbolic = @H.%Class (constants.%Class.4)] -// CHECK:STDOUT: %.loc23_26.2: type = converted %.loc23_24, %.loc23_26.1 [symbolic = @H.%Class (constants.%Class.4)] -// CHECK:STDOUT: %c.loc23_16.1: @H.%Class (%Class.4) = param c +// CHECK:STDOUT: %Class.loc23: type = class_type @Class, @Class(constants.%U) [symbolic = @H.%Class (constants.%Class.4)] +// CHECK:STDOUT: %c.loc23_16.1: @H.%Class (%Class.4) = param c, runtime_param0 // CHECK:STDOUT: @H.%c: @H.%Class (%Class.4) = bind_name c, %c.loc23_16.1 // CHECK:STDOUT: %U.ref.loc23_32: type = name_ref U, @H.%U.loc23 [symbolic = @H.%U.1 (constants.%U)] // CHECK:STDOUT: @H.%return: ref @H.%U.1 (%U) = var diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 6a46d3a68dcd..4b2abb4edb10 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -133,11 +133,11 @@ class Class(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CompleteClass.decl: %CompleteClass.type = class_decl @CompleteClass [template = constants.%CompleteClass.1] { -// CHECK:STDOUT: %T.loc6_21.1: type = param T +// CHECK:STDOUT: %T.loc6_21.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc6_21.2: type = bind_symbolic_name T 0, %T.loc6_21.1 [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { @@ -145,9 +145,7 @@ class Class(U:! type) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_32, %.loc11_24.1 [template = i32] -// CHECK:STDOUT: %.loc11_24.3: init type = call %CompleteClass.ref(%.loc11_24.2) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc11_28.1: type = value_of_initializer %.loc11_24.3 [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc11_28.2: type = converted %.loc11_24.3, %.loc11_28.1 [template = constants.%CompleteClass.3] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(i32) [template = constants.%CompleteClass.3] // CHECK:STDOUT: @F.2.%return: ref %CompleteClass.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -257,7 +255,7 @@ class Class(U:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: %Class.type = import_ref Main//foo, inst+6, loaded [template = constants.%Class.1] // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+14, loaded [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %import_ref.3: %F.type.2 = import_ref Main//foo, inst+55, loaded [template = constants.%F.2] +// CHECK:STDOUT: %import_ref.3: %F.type.2 = import_ref Main//foo, inst+53, loaded [template = constants.%F.2] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int32 = %import_ref.7 // CHECK:STDOUT: import Core//prelude @@ -286,7 +284,7 @@ class Class(U:! type) { // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { @@ -294,9 +292,7 @@ class Class(U:! type) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc8_24.2: type = converted %int.make_type_32, %.loc8_24.1 [template = i32] -// CHECK:STDOUT: %.loc8_24.3: init type = call %CompleteClass.ref(%.loc8_24.2) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc8_28.1: type = value_of_initializer %.loc8_24.3 [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_24.3, %.loc8_28.1 [template = constants.%CompleteClass.3] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(i32) [template = constants.%CompleteClass.3] // CHECK:STDOUT: @F.2.%return: ref %CompleteClass.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -418,7 +414,7 @@ class Class(U:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+6, unloaded // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+14, loaded [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+55, loaded [template = constants.%F.3] +// CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+53, loaded [template = constants.%F.3] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int32 = %import_ref.4 // CHECK:STDOUT: import Core//prelude @@ -486,9 +482,7 @@ class Class(U:! type) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_23.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc6_23.2: type = converted %int.make_type_32, %.loc6_23.1 [template = i32] -// CHECK:STDOUT: %.loc6_23.3: init type = call %CompleteClass.ref(%.loc6_23.2) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %.loc6_23.3 [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc6_27.2: type = converted %.loc6_23.3, %.loc6_27.1 [template = constants.%CompleteClass.3] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(i32) [template = constants.%CompleteClass.3] // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc6: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] @@ -518,9 +512,7 @@ class Class(U:! type) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_32, %.loc11_23.1 [template = i32] -// CHECK:STDOUT: %.loc11_23.3: init type = call %CompleteClass.ref(%.loc11_23.2) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %.loc11_23.3 [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc11_27.2: type = converted %.loc11_23.3, %.loc11_27.1 [template = constants.%CompleteClass.3] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(i32) [template = constants.%CompleteClass.3] // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] @@ -611,7 +603,7 @@ class Class(U:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+6, unloaded // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+14, loaded [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+55, loaded [template = constants.%F.3] +// CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+53, loaded [template = constants.%F.3] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int32 = %import_ref.7 // CHECK:STDOUT: .ImplicitAs = %import_ref.8 @@ -692,15 +684,13 @@ class Class(U:! type) { // CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_32, %.loc14_27.1 [template = i32] // CHECK:STDOUT: %.loc14_27.3: type = ptr_type i32 [template = constants.%.4] -// CHECK:STDOUT: %.loc14_23: init type = call %CompleteClass.ref(%.loc14_27.3) [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc14_28.1: type = value_of_initializer %.loc14_23 [template = constants.%CompleteClass.3] -// CHECK:STDOUT: %.loc14_28.2: type = converted %.loc14_23, %.loc14_28.1 [template = constants.%CompleteClass.3] +// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%.4) [template = constants.%CompleteClass.3] // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] // CHECK:STDOUT: %.loc14_33.1: ref %CompleteClass.4 = temporary_storage // CHECK:STDOUT: %F.call: init %CompleteClass.4 = call %F.ref() to %.loc14_33.1 -// CHECK:STDOUT: %.loc14_35.1: init type = call constants.%ImplicitAs(constants.%CompleteClass.3) [template = constants.%.11] +// CHECK:STDOUT: %.loc14_35.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%CompleteClass.3) [template = constants.%.11] // CHECK:STDOUT: %.loc14_35.2: %.12 = specific_constant imports.%import_ref.10, @ImplicitAs(constants.%CompleteClass.3) [template = constants.%.13] // CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc14_35.2 [template = constants.%.13] // CHECK:STDOUT: %.loc14_33.2: ref %CompleteClass.4 = temporary %.loc14_33.1, %F.call @@ -810,7 +800,7 @@ class Class(U:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: %Class.type = import_ref Main//foo, inst+6, loaded [template = constants.%Class.1] // CHECK:STDOUT: %import_ref.2 = import_ref Main//foo, inst+14, unloaded -// CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+55, unloaded +// CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+53, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/operators @@ -834,7 +824,7 @@ class Class(U:! type) { // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %U.loc14_13.1: type = param U +// CHECK:STDOUT: %U.loc14_13.1: type = param U, runtime_param // CHECK:STDOUT: %U.loc14_13.2: type = bind_symbolic_name U 0, %U.loc14_13.1 [symbolic = @.1.%U (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 933b2b4e735a..b79b29e0ca32 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -75,14 +75,14 @@ fn InitFromStructSpecific() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc2_13.1: type = param T +// CHECK:STDOUT: %T.loc2_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc2_13.2: type = bind_symbolic_name T 0, %T.loc2_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %InitFromStructGeneric.decl: %InitFromStructGeneric.type = fn_decl @InitFromStructGeneric [template = constants.%InitFromStructGeneric] { -// CHECK:STDOUT: %T.loc6_26.1: type = param T +// CHECK:STDOUT: %T.loc6_26.1: type = param T, runtime_param // CHECK:STDOUT: @InitFromStructGeneric.%T.loc6: type = bind_symbolic_name T 0, %T.loc6_26.1 [symbolic = @InitFromStructGeneric.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc6_39: type = name_ref T, @InitFromStructGeneric.%T.loc6 [symbolic = @InitFromStructGeneric.%T.1 (constants.%T)] -// CHECK:STDOUT: %x.loc6_36.1: @InitFromStructGeneric.%T.1 (%T) = param x +// CHECK:STDOUT: %x.loc6_36.1: @InitFromStructGeneric.%T.1 (%T) = param x, runtime_param0 // CHECK:STDOUT: @InitFromStructGeneric.%x: @InitFromStructGeneric.%T.1 (%T) = bind_name x, %x.loc6_36.1 // CHECK:STDOUT: %T.ref.loc6_45: type = name_ref T, @InitFromStructGeneric.%T.loc6 [symbolic = @InitFromStructGeneric.%T.1 (constants.%T)] // CHECK:STDOUT: @InitFromStructGeneric.%return: ref @InitFromStructGeneric.%T.1 (%T) = var @@ -110,27 +110,25 @@ fn InitFromStructSpecific() -> i32 { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T.1) [symbolic = %Class.1 (constants.%Class.2)] // CHECK:STDOUT: %.1: type = struct_type {.k: @InitFromStructGeneric.%T.1 (%T)} [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %.2: type = unbound_element_type @InitFromStructGeneric.%Class (%Class.2), @InitFromStructGeneric.%T.1 (%T) [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.2: type = unbound_element_type @InitFromStructGeneric.%Class.1 (%Class.2), @InitFromStructGeneric.%T.1 (%T) [symbolic = %.2 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.loc6: type, %x: @InitFromStructGeneric.%T.1 (%T)) -> @InitFromStructGeneric.%T.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_15: init type = call %Class.ref(%T.ref) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc7_17.1: type = value_of_initializer %.loc7_15 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc7_17.2: type = converted %.loc7_15, %.loc7_17.1 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class (%Class.2) = var v -// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class (%Class.2) = bind_name v, %v.var +// CHECK:STDOUT: %Class.loc7: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.1 (constants.%Class.2)] +// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.1 (%Class.2) = var v +// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class.1 (%Class.2) = bind_name v, %v.var // CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.1 (%T) = name_ref x, %x // CHECK:STDOUT: %.loc7_28.1: @InitFromStructGeneric.%.1 (%.3) = struct_literal (%x.ref) // CHECK:STDOUT: %.loc7_28.2: ref @InitFromStructGeneric.%T.1 (%T) = class_element_access %v.var, element0 // CHECK:STDOUT: %.loc7_28.3: init @InitFromStructGeneric.%T.1 (%T) = initialize_from %x.ref to %.loc7_28.2 -// CHECK:STDOUT: %.loc7_28.4: init @InitFromStructGeneric.%Class (%Class.2) = class_init (%.loc7_28.3), %v.var -// CHECK:STDOUT: %.loc7_29: init @InitFromStructGeneric.%Class (%Class.2) = converted %.loc7_28.1, %.loc7_28.4 +// CHECK:STDOUT: %.loc7_28.4: init @InitFromStructGeneric.%Class.1 (%Class.2) = class_init (%.loc7_28.3), %v.var +// CHECK:STDOUT: %.loc7_29: init @InitFromStructGeneric.%Class.1 (%Class.2) = converted %.loc7_28.1, %.loc7_28.4 // CHECK:STDOUT: assign %v.var, %.loc7_29 -// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class (%Class.2) = name_ref v, %v +// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.1 (%Class.2) = name_ref v, %v // CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%.2 (%.2) = name_ref k, @Class.%.loc3 [template = @Class.%.loc3] // CHECK:STDOUT: %.loc8_11.1: ref @InitFromStructGeneric.%T.1 (%T) = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc8_11.2: @InitFromStructGeneric.%T.1 (%T) = bind_value %.loc8_11.1 @@ -225,7 +223,7 @@ fn InitFromStructSpecific() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %InitFromStructSpecific.decl: %InitFromStructSpecific.type = fn_decl @InitFromStructSpecific [template = constants.%InitFromStructSpecific] { @@ -280,14 +278,12 @@ fn InitFromStructSpecific() -> i32 { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_15.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_15.2: type = converted %int.make_type_32, %.loc16_15.1 [template = i32] -// CHECK:STDOUT: %.loc16_15.3: init type = call %Class.ref(%.loc16_15.2) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %.loc16_15.3 [template = constants.%Class.3] -// CHECK:STDOUT: %.loc16_19.2: type = converted %.loc16_15.3, %.loc16_19.1 [template = constants.%Class.3] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(i32) [template = constants.%Class.3] // CHECK:STDOUT: %v.var: ref %Class.3 = var v // CHECK:STDOUT: %v: ref %Class.3 = bind_name v, %v.var // CHECK:STDOUT: %.loc16_29: i32 = int_literal 0 [template = constants.%.6] // CHECK:STDOUT: %.loc16_30.1: %.7 = struct_literal (%.loc16_29) -// CHECK:STDOUT: %.loc16_30.2: init type = call constants.%ImplicitAs(constants.%T) [symbolic = constants.%.11] +// CHECK:STDOUT: %.loc16_30.2: type = interface_type @ImplicitAs, @ImplicitAs(constants.%T) [symbolic = constants.%.11] // CHECK:STDOUT: %.loc16_30.3: %.12 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%T) [symbolic = constants.%.13] // CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc16_30.3 [symbolic = constants.%.13] // CHECK:STDOUT: %.loc16_30.4: %T = converted %.loc16_29, [template = ] diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index 448f96189d15..3daafacbaded 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -108,7 +108,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc2_13.1: type = param T +// CHECK:STDOUT: %T.loc2_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc2_13.2: type = bind_symbolic_name T 0, %T.loc2_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %DirectFieldAccess.decl: %DirectFieldAccess.type = fn_decl @DirectFieldAccess [template = constants.%DirectFieldAccess] { @@ -116,10 +116,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %int.make_type_32.loc10_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_30.1: type = value_of_initializer %int.make_type_32.loc10_31 [template = i32] // CHECK:STDOUT: %.loc10_30.2: type = converted %int.make_type_32.loc10_31, %.loc10_30.1 [template = i32] -// CHECK:STDOUT: %.loc10_30.3: init type = call %Class.ref.loc10(%.loc10_30.2) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc10_34.1: type = value_of_initializer %.loc10_30.3 [template = constants.%Class.3] -// CHECK:STDOUT: %.loc10_34.2: type = converted %.loc10_30.3, %.loc10_34.1 [template = constants.%Class.3] -// CHECK:STDOUT: %x.loc10_22.1: %Class.3 = param x +// CHECK:STDOUT: %Class.loc10: type = class_type @Class, @Class(i32) [template = constants.%Class.3] +// CHECK:STDOUT: %x.loc10_22.1: %Class.3 = param x, runtime_param0 // CHECK:STDOUT: @DirectFieldAccess.%x: %Class.3 = bind_name x, %x.loc10_22.1 // CHECK:STDOUT: %int.make_type_32.loc10_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_40.1: type = value_of_initializer %int.make_type_32.loc10_40 [template = i32] @@ -131,10 +129,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %int.make_type_32.loc14_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %int.make_type_32.loc14_24 [template = i32] // CHECK:STDOUT: %.loc14_23.2: type = converted %int.make_type_32.loc14_24, %.loc14_23.1 [template = i32] -// CHECK:STDOUT: %.loc14_23.3: init type = call %Class.ref.loc14(%.loc14_23.2) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %.loc14_23.3 [template = constants.%Class.3] -// CHECK:STDOUT: %.loc14_27.2: type = converted %.loc14_23.3, %.loc14_27.1 [template = constants.%Class.3] -// CHECK:STDOUT: %x.loc14_15.1: %Class.3 = param x +// CHECK:STDOUT: %Class.loc14: type = class_type @Class, @Class(i32) [template = constants.%Class.3] +// CHECK:STDOUT: %x.loc14_15.1: %Class.3 = param x, runtime_param0 // CHECK:STDOUT: @MethodCall.%x: %Class.3 = bind_name x, %x.loc14_15.1 // CHECK:STDOUT: %int.make_type_32.loc14_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_33.1: type = value_of_initializer %int.make_type_32.loc14_33 [template = i32] @@ -146,11 +142,9 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %int.make_type_32.loc18_28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_27.1: type = value_of_initializer %int.make_type_32.loc18_28 [template = i32] // CHECK:STDOUT: %.loc18_27.2: type = converted %int.make_type_32.loc18_28, %.loc18_27.1 [template = i32] -// CHECK:STDOUT: %.loc18_27.3: init type = call %Class.ref.loc18(%.loc18_27.2) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc18_32.1: type = value_of_initializer %.loc18_27.3 [template = constants.%Class.3] -// CHECK:STDOUT: %.loc18_32.2: type = converted %.loc18_27.3, %.loc18_32.1 [template = constants.%Class.3] -// CHECK:STDOUT: %.loc18_32.3: type = ptr_type %Class.3 [template = constants.%.8] -// CHECK:STDOUT: %p.loc18_19.1: %.8 = param p +// CHECK:STDOUT: %Class.loc18: type = class_type @Class, @Class(i32) [template = constants.%Class.3] +// CHECK:STDOUT: %.loc18_32: type = ptr_type %Class.3 [template = constants.%.8] +// CHECK:STDOUT: %p.loc18_19.1: %.8 = param p, runtime_param0 // CHECK:STDOUT: @AddrMethodCall.%p: %.8 = bind_name p, %p.loc18_19.1 // CHECK:STDOUT: %int.make_type_32.loc18_38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_38.1: type = value_of_initializer %int.make_type_32.loc18_38 [template = i32] @@ -176,7 +170,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Get.decl: @Class.%Get.type (%Get.type.1) = fn_decl @Get [symbolic = %Get (constants.%Get.1)] { // CHECK:STDOUT: %.loc5: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @Get.%Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref.loc5: type = name_ref Self, %.loc5 [symbolic = @Get.%Class (constants.%Class.2)] -// CHECK:STDOUT: %self.loc5_10.1: @Get.%Class (%Class.2) = param self +// CHECK:STDOUT: %self.loc5_10.1: @Get.%Class (%Class.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc5_10.2: @Get.%Class (%Class.2) = bind_name self, %self.loc5_10.1 // CHECK:STDOUT: %T.ref.loc5: type = name_ref T, file.%T.loc2_13.2 [symbolic = @Get.%T (constants.%T)] // CHECK:STDOUT: %return.var.loc5: ref @Get.%T (%T) = var @@ -185,7 +179,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %.loc7_25: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @GetAddr.%Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref.loc7: type = name_ref Self, %.loc7_25 [symbolic = @GetAddr.%Class (constants.%Class.2)] // CHECK:STDOUT: %.loc7_29: type = ptr_type %Class.2 [symbolic = @GetAddr.%.1 (constants.%.3)] -// CHECK:STDOUT: %self.loc7_19.1: @GetAddr.%.1 (%.3) = param self +// CHECK:STDOUT: %self.loc7_19.1: @GetAddr.%.1 (%.3) = param self, runtime_param0 // CHECK:STDOUT: %self.loc7_19.3: @GetAddr.%.1 (%.3) = bind_name self, %self.loc7_19.1 // CHECK:STDOUT: %.loc7_14: @GetAddr.%.1 (%.3) = addr_pattern %self.loc7_19.3 // CHECK:STDOUT: %T.ref.loc7: type = name_ref T, file.%T.loc2_13.2 [symbolic = @GetAddr.%T (constants.%T)] @@ -398,18 +392,16 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %StaticMemberFunctionCall.decl: %StaticMemberFunctionCall.type = fn_decl @StaticMemberFunctionCall [template = constants.%StaticMemberFunctionCall] { -// CHECK:STDOUT: %T.loc8_29.1: type = param T +// CHECK:STDOUT: %T.loc8_29.1: type = param T, runtime_param // CHECK:STDOUT: @StaticMemberFunctionCall.%T.loc8: type = bind_symbolic_name T 0, %T.loc8_29.1 [symbolic = @StaticMemberFunctionCall.%T.1 (constants.%T)] // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref: type = name_ref T, @StaticMemberFunctionCall.%T.loc8 [symbolic = @StaticMemberFunctionCall.%T.1 (constants.%T)] -// CHECK:STDOUT: %.loc8_47: init type = call %Class.ref(%T.ref) [symbolic = @StaticMemberFunctionCall.%Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc8_49.1: type = value_of_initializer %.loc8_47 [symbolic = @StaticMemberFunctionCall.%Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc8_49.2: type = converted %.loc8_47, %.loc8_49.1 [symbolic = @StaticMemberFunctionCall.%Class (constants.%Class.2)] -// CHECK:STDOUT: @StaticMemberFunctionCall.%return: ref @StaticMemberFunctionCall.%Class (%Class.2) = var +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%T) [symbolic = @StaticMemberFunctionCall.%Class.1 (constants.%Class.2)] +// CHECK:STDOUT: @StaticMemberFunctionCall.%return: ref @StaticMemberFunctionCall.%Class.1 (%Class.2) = var // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -443,9 +435,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Make.decl: @Class.%Make.type (%Make.type) = fn_decl @Make [symbolic = %Make (constants.%Make)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_13.2 [symbolic = @Make.%T (constants.%T)] -// CHECK:STDOUT: %.loc5_21: init type = call %Class.ref(%T.ref) [symbolic = @Make.%Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc5_23.1: type = value_of_initializer %.loc5_21 [symbolic = @Make.%Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc5_23.2: type = converted %.loc5_21, %.loc5_23.1 [symbolic = @Make.%Class (constants.%Class.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%T) [symbolic = @Make.%Class (constants.%Class.2)] // CHECK:STDOUT: %return.var: ref @Make.%Class (%Class.2) = var // CHECK:STDOUT: } // CHECK:STDOUT: @@ -473,30 +463,30 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @StaticMemberFunctionCall(%T.loc8: type) { // CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T.1) [symbolic = %Class.1 (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Class(%T.1) [symbolic = %Make.type (constants.%Make.type)] // CHECK:STDOUT: %Make: @StaticMemberFunctionCall.%Make.type (%Make.type) = struct_value () [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Class) [symbolic = %.1 (constants.%.7)] -// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Class) [symbolic = %Convert.type (constants.%Convert.type.2)] +// CHECK:STDOUT: %.1: type = interface_type @ImplicitAs, @ImplicitAs(%Class.1) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Class.1) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %.2: type = assoc_entity_type @StaticMemberFunctionCall.%.1 (%.7), @StaticMemberFunctionCall.%Convert.type (%Convert.type.2) [symbolic = %.2 (constants.%.8)] // CHECK:STDOUT: %.3: @StaticMemberFunctionCall.%.2 (%.8) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.3 (constants.%.9)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.loc8: type) -> %return: @StaticMemberFunctionCall.%Class (%Class.2) { +// CHECK:STDOUT: fn(%T.loc8: type) -> %return: @StaticMemberFunctionCall.%Class.1 (%Class.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc15_15: init type = call %Class.ref(%T.ref) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc15: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.1 (constants.%Class.2)] // CHECK:STDOUT: %.loc15_18: @StaticMemberFunctionCall.%Make.type (%Make.type) = specific_constant @Class.%Make.decl, @Class(constants.%T) [symbolic = %Make (constants.%Make)] // CHECK:STDOUT: %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc15_18 [symbolic = %Make (constants.%Make)] -// CHECK:STDOUT: %.loc15_23.1: ref @StaticMemberFunctionCall.%Class (%Class.2) = temporary_storage -// CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class (%Class.2) = call %Make.ref() to %.loc15_23.1 -// CHECK:STDOUT: %.loc15_25.1: init type = call constants.%ImplicitAs(constants.%Class.2) [symbolic = %.1 (constants.%.7)] +// CHECK:STDOUT: %.loc15_23.1: ref @StaticMemberFunctionCall.%Class.1 (%Class.2) = temporary_storage +// CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class.1 (%Class.2) = call %Make.ref() to %.loc15_23.1 +// CHECK:STDOUT: %.loc15_25.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%Class.2) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: %.loc15_25.2: @StaticMemberFunctionCall.%.2 (%.8) = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%Class.2) [symbolic = %.3 (constants.%.9)] // CHECK:STDOUT: %Convert.ref: @StaticMemberFunctionCall.%.2 (%.8) = name_ref Convert, %.loc15_25.2 [symbolic = %.3 (constants.%.9)] -// CHECK:STDOUT: %.loc15_23.2: ref @StaticMemberFunctionCall.%Class (%Class.2) = temporary %.loc15_23.1, %Make.call -// CHECK:STDOUT: %.loc15_25.3: @StaticMemberFunctionCall.%Class (%Class.2) = converted %Make.call, [template = ] +// CHECK:STDOUT: %.loc15_23.2: ref @StaticMemberFunctionCall.%Class.1 (%Class.2) = temporary %.loc15_23.1, %Make.call +// CHECK:STDOUT: %.loc15_25.3: @StaticMemberFunctionCall.%Class.1 (%Class.2) = converted %Make.call, [template = ] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -536,7 +526,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: specific @StaticMemberFunctionCall(constants.%T) { // CHECK:STDOUT: %T.1 => constants.%T -// CHECK:STDOUT: %Class => constants.%Class.2 +// CHECK:STDOUT: %Class.1 => constants.%Class.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { @@ -569,7 +559,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %.3 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(@StaticMemberFunctionCall.%Class) { +// CHECK:STDOUT: specific @ImplicitAs(@StaticMemberFunctionCall.%Class.1) { // CHECK:STDOUT: %Dest => constants.%Class.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index a011364ff662..1f7be07eaf3f 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -75,7 +75,7 @@ class C(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -94,7 +94,7 @@ class C(T:! type) { // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = %F (constants.%F)] { // CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, file.%T.loc4_13.2 [symbolic = @F.%T (constants.%T)] -// CHECK:STDOUT: %n.loc5_8.1: @F.%T (%T) = param n +// CHECK:STDOUT: %n.loc5_8.1: @F.%T (%T) = param n, runtime_param0 // CHECK:STDOUT: %n.loc5_8.2: @F.%T (%T) = bind_name n, %n.loc5_8.1 // CHECK:STDOUT: %T.ref.loc5_17: type = name_ref T, file.%T.loc4_13.2 [symbolic = @F.%T (constants.%T)] // CHECK:STDOUT: %return.var.loc5: ref @F.%T (%T) = var @@ -102,7 +102,7 @@ class C(T:! type) { // CHECK:STDOUT: %G.decl: @Class.%G.type (%G.type) = fn_decl @G [symbolic = %G (constants.%G)] { // CHECK:STDOUT: %.loc9: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @G.%Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc9 [symbolic = @G.%Class (constants.%Class.2)] -// CHECK:STDOUT: %self.loc9_8.1: @G.%Class (%Class.2) = param self +// CHECK:STDOUT: %self.loc9_8.1: @G.%Class (%Class.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc9_8.2: @G.%Class (%Class.2) = bind_name self, %self.loc9_8.1 // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, file.%T.loc4_13.2 [symbolic = @G.%T (constants.%T)] // CHECK:STDOUT: %return.var.loc9: ref @G.%T (%T) = var @@ -211,7 +211,7 @@ class C(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { -// CHECK:STDOUT: %T.loc4_9.1: type = param T +// CHECK:STDOUT: %T.loc4_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index 19e0e844f642..b72eef214b8b 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -142,24 +142,24 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc4_13.1: type = param T +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { -// CHECK:STDOUT: %T.loc10_10.1: type = param T +// CHECK:STDOUT: %T.loc10_10.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc10_10.2: type = bind_symbolic_name T 0, %T.loc10_10.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10_10.2 [symbolic = constants.%T] -// CHECK:STDOUT: %n.loc10_22.1: %T = param n +// CHECK:STDOUT: %n.loc10_22.1: %T = param n, runtime_param0 // CHECK:STDOUT: @F.%n: %T = bind_name n, %n.loc10_22.1 // CHECK:STDOUT: %T.ref.loc10_31: type = name_ref T, %T.loc10_10.2 [symbolic = constants.%T] // CHECK:STDOUT: @F.%return: ref %T = var // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [symbolic = constants.%G] { -// CHECK:STDOUT: %T.loc14_10.1: type = param T +// CHECK:STDOUT: %T.loc14_10.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc14_10.2: type = bind_symbolic_name T 0, %T.loc14_10.1 [symbolic = constants.%T] // CHECK:STDOUT: %.loc14: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = constants.%Class.2] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14 [symbolic = constants.%Class.2] -// CHECK:STDOUT: %self.loc14_22.1: %Class.2 = param self +// CHECK:STDOUT: %self.loc14_22.1: %Class.2 = param self, runtime_param0 // CHECK:STDOUT: @G.%self: %Class.2 = bind_name self, %self.loc14_22.1 // CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc14_10.2 [symbolic = constants.%T] // CHECK:STDOUT: @G.%return: ref %T = var @@ -180,7 +180,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = %F (constants.%F)] { // CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, file.%T.loc4_13.2 [symbolic = @F.%T (constants.%T)] -// CHECK:STDOUT: %n.loc5_8.1: @F.%T (%T) = param n +// CHECK:STDOUT: %n.loc5_8.1: @F.%T (%T) = param n, runtime_param0 // CHECK:STDOUT: %n.loc5_8.2: @F.%T (%T) = bind_name n, %n.loc5_8.1 // CHECK:STDOUT: %T.ref.loc5_17: type = name_ref T, file.%T.loc4_13.2 [symbolic = @F.%T (constants.%T)] // CHECK:STDOUT: %return.var.loc5: ref @F.%T (%T) = var @@ -188,7 +188,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %G.decl: @Class.%G.type (%G.type) = fn_decl @G [symbolic = %G (constants.%G)] { // CHECK:STDOUT: %.loc6: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @G.%Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6 [symbolic = @G.%Class (constants.%Class.2)] -// CHECK:STDOUT: %self.loc6_8.1: @G.%Class (%Class.2) = param self +// CHECK:STDOUT: %self.loc6_8.1: @G.%Class (%Class.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc6_8.2: @G.%Class (%Class.2) = bind_name self, %self.loc6_8.1 // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, file.%T.loc4_13.2 [symbolic = @G.%T (constants.%T)] // CHECK:STDOUT: %return.var.loc6: ref @G.%T (%T) = var @@ -271,8 +271,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %A.1: %A.type = struct_value () [template] // CHECK:STDOUT: %A.2: type = class_type @A, @A(%T) [symbolic] // CHECK:STDOUT: %N: %T = bind_symbolic_name N 1 [symbolic] -// CHECK:STDOUT: %B.type: type = generic_class_type @B [template] -// CHECK:STDOUT: %B.1: %B.type = struct_value () [template] +// CHECK:STDOUT: %B.type: type = generic_class_type @B, @A(%T) [symbolic] +// CHECK:STDOUT: %B.1: %B.type = struct_value () [symbolic] // CHECK:STDOUT: %B.2: type = class_type @B, @B(%T, %N) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @B(%T, %N) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] @@ -300,21 +300,21 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.1] { -// CHECK:STDOUT: %T.loc4_9.1: type = param T +// CHECK:STDOUT: %T.loc4_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = @A.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { -// CHECK:STDOUT: %T.loc10_6.1: type = param T +// CHECK:STDOUT: %T.loc10_6.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc10_6.2: type = bind_symbolic_name T 0, %T.loc10_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc10_22: type = name_ref T, %T.loc10_6.2 [symbolic = constants.%T] -// CHECK:STDOUT: %N.loc10_18.1: %T = param N +// CHECK:STDOUT: %N.loc10_18.1: %T = param N, runtime_param // CHECK:STDOUT: %N.loc10_18.2: %T = bind_symbolic_name N 1, %N.loc10_18.1 [symbolic = constants.%N] // CHECK:STDOUT: %.loc10: type = specific_constant constants.%B.2, @B(constants.%T, constants.%N) [symbolic = constants.%B.2] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10 [symbolic = constants.%B.2] -// CHECK:STDOUT: %self.loc10_27.1: %B.2 = param self +// CHECK:STDOUT: %self.loc10_27.1: %B.2 = param self, runtime_param0 // CHECK:STDOUT: @F.%self: %B.2 = bind_name self, %self.loc10_27.1 // CHECK:STDOUT: %T.ref.loc10_42: type = name_ref T, %T.loc10_6.2 [symbolic = constants.%T] -// CHECK:STDOUT: %a.loc10_39.1: %T = param a +// CHECK:STDOUT: %a.loc10_39.1: %T = param a, runtime_param1 // CHECK:STDOUT: @F.%a: %T = bind_name a, %a.loc10_39.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -323,11 +323,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %B.type: type = generic_class_type @B, @A(%T) [symbolic = %B.type (constants.%B.type)] +// CHECK:STDOUT: %B: @A.%B.type (%B.type) = struct_value () [symbolic = %B (constants.%B.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %B.decl: %B.type = class_decl @B [template = constants.%B.1] { +// CHECK:STDOUT: %B.decl: @A.%B.type (%B.type) = class_decl @B [symbolic = %B (constants.%B.1)] { // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_9.2 [symbolic = @B.%T (constants.%T)] -// CHECK:STDOUT: %N.loc5_11.1: @B.%T (%T) = param N +// CHECK:STDOUT: %N.loc5_11.1: @B.%T (%T) = param N, runtime_param // CHECK:STDOUT: %N.loc5_11.2: @B.%T (%T) = bind_symbolic_name N 1, %N.loc5_11.1 [symbolic = @B.%N (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -349,10 +351,10 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %F.decl: @B.%F.type (%F.type) = fn_decl @F [symbolic = %F (constants.%F)] { // CHECK:STDOUT: %.loc6: type = specific_constant constants.%B.2, @B(constants.%T, constants.%N) [symbolic = @F.%B (constants.%B.2)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6 [symbolic = @F.%B (constants.%B.2)] -// CHECK:STDOUT: %self.loc6_10.1: @F.%B (%B.2) = param self +// CHECK:STDOUT: %self.loc6_10.1: @F.%B (%B.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc6_10.2: @F.%B (%B.2) = bind_name self, %self.loc6_10.1 // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc4_9.2 [symbolic = @F.%T (constants.%T)] -// CHECK:STDOUT: %a.loc6_22.1: @F.%T (%T) = param a +// CHECK:STDOUT: %a.loc6_22.1: @F.%T (%T) = param a, runtime_param1 // CHECK:STDOUT: %a.loc6_22.2: @F.%T (%T) = bind_name a, %a.loc6_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -379,6 +381,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %B.type => constants.%B.type +// CHECK:STDOUT: %B => constants.%B.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @B(constants.%T, constants.%N) { @@ -406,6 +410,10 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %N => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(@A.%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatched_not_generic_vs_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -440,7 +448,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %NotGeneric.decl: type = class_decl @NotGeneric [template = constants.%NotGeneric] {} // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { -// CHECK:STDOUT: %T.loc15_15.1: type = param T +// CHECK:STDOUT: %T.loc15_15.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc15_15.2: type = bind_symbolic_name T 0, %T.loc15_15.1 [symbolic = @.1.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -505,7 +513,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { -// CHECK:STDOUT: %T.loc4_15.1: type = param T +// CHECK:STDOUT: %T.loc4_15.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = @Generic.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] {} @@ -583,13 +591,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { -// CHECK:STDOUT: %T.loc4_15.1: type = param T +// CHECK:STDOUT: %T.loc4_15.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = @Generic.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { -// CHECK:STDOUT: %T.loc15_12.1: type = param T +// CHECK:STDOUT: %T.loc15_12.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc15_12.2: type = bind_symbolic_name T 0, %T.loc15_12.1 [symbolic = @.1.%T (constants.%T)] -// CHECK:STDOUT: %U.loc15_22.1: type = param U +// CHECK:STDOUT: %U.loc15_22.1: type = param U, runtime_param // CHECK:STDOUT: %U.loc15_22.2: type = bind_symbolic_name U 1, %U.loc15_22.1 [symbolic = @.1.%U (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -678,13 +686,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { -// CHECK:STDOUT: %T.loc4_15.1: type = param T +// CHECK:STDOUT: %T.loc4_15.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = @Generic.%T (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %.loc14_17.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %T.loc14_12.1: %.1 = param T +// CHECK:STDOUT: %T.loc14_12.1: %.1 = param T, runtime_param // CHECK:STDOUT: %T.loc14_12.2: %.1 = bind_symbolic_name T 0, %T.loc14_12.1 [symbolic = @.1.%T (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index b9836fb3a07c..d1655f1aee7f 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -84,16 +84,14 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc14_13.1: type = param T +// CHECK:STDOUT: %T.loc14_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc14_13.2: type = bind_symbolic_name T 0, %T.loc14_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [template = constants.%CallGenericMethod] { // CHECK:STDOUT: %Class.ref.loc19: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %A.ref.loc19_31: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc19_30: init type = call %Class.ref.loc19(%A.ref.loc19_31) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc19_32.1: type = value_of_initializer %.loc19_30 [template = constants.%Class.3] -// CHECK:STDOUT: %.loc19_32.2: type = converted %.loc19_30, %.loc19_32.1 [template = constants.%Class.3] -// CHECK:STDOUT: %c.loc19_22.1: %Class.3 = param c +// CHECK:STDOUT: %Class.loc19: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.3] +// CHECK:STDOUT: %c.loc19_22.1: %Class.3 = param c, runtime_param0 // CHECK:STDOUT: @CallGenericMethod.%c: %Class.3 = bind_name c, %c.loc19_22.1 // CHECK:STDOUT: %A.ref.loc19_39: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc19: type = name_ref B, %B.decl [template = constants.%B] @@ -104,10 +102,8 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %CallGenericMethodWithNonDeducedParam.decl: %CallGenericMethodWithNonDeducedParam.type = fn_decl @CallGenericMethodWithNonDeducedParam [template = constants.%CallGenericMethodWithNonDeducedParam] { // CHECK:STDOUT: %Class.ref.loc23: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %A.ref.loc23_50: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc23_49: init type = call %Class.ref.loc23(%A.ref.loc23_50) [template = constants.%Class.3] -// CHECK:STDOUT: %.loc23_51.1: type = value_of_initializer %.loc23_49 [template = constants.%Class.3] -// CHECK:STDOUT: %.loc23_51.2: type = converted %.loc23_49, %.loc23_51.1 [template = constants.%Class.3] -// CHECK:STDOUT: %c.loc23_41.1: %Class.3 = param c +// CHECK:STDOUT: %Class.loc23: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.3] +// CHECK:STDOUT: %c.loc23_41.1: %Class.3 = param c, runtime_param0 // CHECK:STDOUT: @CallGenericMethodWithNonDeducedParam.%c: %Class.3 = bind_name c, %c.loc23_41.1 // CHECK:STDOUT: %A.ref.loc23_58: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc23: type = name_ref B, %B.decl [template = constants.%B] @@ -138,7 +134,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Get.decl: @Class.%Get.type (%Get.type.1) = fn_decl @Get [symbolic = %Get (constants.%Get.1)] { -// CHECK:STDOUT: %U.loc15_10.1: type = param U +// CHECK:STDOUT: %U.loc15_10.1: type = param U, runtime_param // CHECK:STDOUT: %U.loc15_10.2: type = bind_symbolic_name U 1, %U.loc15_10.1 [symbolic = @Get.%U.1 (constants.%U)] // CHECK:STDOUT: %T.ref.loc15: type = name_ref T, file.%T.loc14_13.2 [symbolic = @Get.%T (constants.%T)] // CHECK:STDOUT: %U.ref.loc15: type = name_ref U, %U.loc15_10.2 [symbolic = @Get.%U.1 (constants.%U)] @@ -148,9 +144,9 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: } // CHECK:STDOUT: %GetNoDeduce.decl: @Class.%GetNoDeduce.type (%GetNoDeduce.type.1) = fn_decl @GetNoDeduce [symbolic = %GetNoDeduce (constants.%GetNoDeduce.1)] { // CHECK:STDOUT: %T.ref.loc16_21: type = name_ref T, file.%T.loc14_13.2 [symbolic = @GetNoDeduce.%T (constants.%T)] -// CHECK:STDOUT: %x.loc16_18.1: @GetNoDeduce.%T (%T) = param x +// CHECK:STDOUT: %x.loc16_18.1: @GetNoDeduce.%T (%T) = param x, runtime_param0 // CHECK:STDOUT: %x.loc16_18.2: @GetNoDeduce.%T (%T) = bind_name x, %x.loc16_18.1 -// CHECK:STDOUT: %U.loc16_24.1: type = param U +// CHECK:STDOUT: %U.loc16_24.1: type = param U, runtime_param // CHECK:STDOUT: %U.loc16_24.2: type = bind_symbolic_name U 1, %U.loc16_24.1 [symbolic = @GetNoDeduce.%U.1 (constants.%U)] // CHECK:STDOUT: %T.ref.loc16_38: type = name_ref T, file.%T.loc14_13.2 [symbolic = @GetNoDeduce.%T (constants.%T)] // CHECK:STDOUT: %U.ref.loc16: type = name_ref U, %U.loc16_24.2 [symbolic = @GetNoDeduce.%U.1 (constants.%U)] @@ -189,7 +185,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %Get.ref: %Get.type.2 = name_ref Get, %.loc20 [template = constants.%Get.2] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc19: ref %.5 = splice_block %return {} -// CHECK:STDOUT: %Get.call: init %.5 = call %Get.ref(%B.ref) to %.loc19 +// CHECK:STDOUT: %Get.call: init %.5 = call %Get.ref() to %.loc19 // CHECK:STDOUT: return %Get.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -206,7 +202,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %.loc24_25.4: ref %A = temporary %.loc24_25.2, %.loc24_25.3 // CHECK:STDOUT: %.loc24_23.1: ref %A = converted %.loc24_25.1, %.loc24_25.4 // CHECK:STDOUT: %.loc24_23.2: %A = bind_value %.loc24_23.1 -// CHECK:STDOUT: %GetNoDeduce.call: init %.5 = call %GetNoDeduce.ref(%.loc24_23.2, %B.ref) to %.loc23 +// CHECK:STDOUT: %GetNoDeduce.call: init %.5 = call %GetNoDeduce.ref(%.loc24_23.2) to %.loc23 // CHECK:STDOUT: return %GetNoDeduce.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 90ccf1b241e1..6aa6592c0b8f 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -117,11 +117,11 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Generic.decl.loc4: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { -// CHECK:STDOUT: %T.loc4_15.1: type = param T +// CHECK:STDOUT: %T.loc4_15.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = @Generic.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Generic.decl.loc6: %Generic.type = class_decl @Generic [template = constants.%Generic.1] { -// CHECK:STDOUT: %T.loc6_15.1: type = param T +// CHECK:STDOUT: %T.loc6_15.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc6_15.2: type = bind_symbolic_name T 0, %T.loc6_15.1 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -174,7 +174,7 @@ class E(U:! type) {} // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %T.loc12_9.1: type = param T +// CHECK:STDOUT: %T.loc12_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = @.1.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -239,14 +239,14 @@ class E(U:! type) {} // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_32, %.loc4_13.1 [template = i32] -// CHECK:STDOUT: %N.loc4_9.1: i32 = param N +// CHECK:STDOUT: %N.loc4_9.1: i32 = param N, runtime_param // CHECK:STDOUT: %N.loc4_9.2: i32 = bind_symbolic_name N 0, %N.loc4_9.1 [symbolic = @B.%N (constants.%N.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %T.loc12_9.1: type = param T +// CHECK:STDOUT: %T.loc12_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = @.1.%T (constants.%T)] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_9.2 [symbolic = @.1.%T (constants.%T)] -// CHECK:STDOUT: %N.loc12_19.1: @.1.%T (%T) = param N +// CHECK:STDOUT: %N.loc12_19.1: @.1.%T (%T) = param N, runtime_param // CHECK:STDOUT: %N.loc12_19.2: @.1.%T (%T) = bind_symbolic_name N 1, %N.loc12_19.1 [symbolic = @.1.%N (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -319,16 +319,16 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { -// CHECK:STDOUT: %T.loc4_9.1: type = param T +// CHECK:STDOUT: %T.loc4_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %T.loc12_9.1: type = param T +// CHECK:STDOUT: %T.loc12_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = @.1.%T (constants.%T)] // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_23.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_23.2: type = converted %int.make_type_32, %.loc12_23.1 [template = i32] -// CHECK:STDOUT: %U.loc12_19.1: i32 = param U +// CHECK:STDOUT: %U.loc12_19.1: i32 = param U, runtime_param // CHECK:STDOUT: %U.loc12_19.2: i32 = bind_symbolic_name U 1, %U.loc12_19.1 [symbolic = @.1.%U (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -401,14 +401,14 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %D.decl: %D.type = class_decl @D [template = constants.%D.1] { -// CHECK:STDOUT: %T.loc4_9.1: type = param T +// CHECK:STDOUT: %T.loc4_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = @D.%T (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_32, %.loc12_13.1 [template = i32] -// CHECK:STDOUT: %T.loc12_9.1: i32 = param T +// CHECK:STDOUT: %T.loc12_9.1: i32 = param T, runtime_param // CHECK:STDOUT: %T.loc12_9.2: i32 = bind_symbolic_name T 0, %T.loc12_9.1 [symbolic = @.1.%T (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -475,11 +475,11 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %E.decl: %E.type = class_decl @E [template = constants.%E.1] { -// CHECK:STDOUT: %T.loc4_9.1: type = param T +// CHECK:STDOUT: %T.loc4_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T 0, %T.loc4_9.1 [symbolic = @E.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %U.loc11_9.1: type = param U +// CHECK:STDOUT: %U.loc11_9.1: type = param U, runtime_param // CHECK:STDOUT: %U.loc11_9.2: type = bind_symbolic_name U 0, %U.loc11_9.1 [symbolic = @.1.%U (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index eaeb7a9e8d4d..0d0a1847ed82 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -57,7 +57,7 @@ class Class(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc11_13.1: type = param T +// CHECK:STDOUT: %T.loc11_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -82,9 +82,7 @@ class Class(T:! type) { // CHECK:STDOUT: %MakeClass.decl: @Class.%MakeClass.type (%MakeClass.type) = fn_decl @MakeClass [symbolic = %MakeClass (constants.%MakeClass)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_13.2 [symbolic = @MakeClass.%T (constants.%T)] -// CHECK:STDOUT: %.loc15_26: init type = call %Class.ref(%T.ref) [symbolic = @MakeClass.%Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc15_28.1: type = value_of_initializer %.loc15_26 [symbolic = @MakeClass.%Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc15_28.2: type = converted %.loc15_26, %.loc15_28.1 [symbolic = @MakeClass.%Class (constants.%Class.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%T) [symbolic = @MakeClass.%Class (constants.%Class.2)] // CHECK:STDOUT: %return.var.loc15: ref @MakeClass.%Class (%Class.2) = var // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = %F (constants.%F)] {} @@ -114,7 +112,7 @@ class Class(T:! type) { // CHECK:STDOUT: generic fn @F(file.%T.loc11_13.2: type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class.2)] +// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T) [symbolic = %Class.1 (constants.%Class.2)] // CHECK:STDOUT: %MakeSelf.type: type = fn_type @MakeSelf, @Class(%T) [symbolic = %MakeSelf.type (constants.%MakeSelf.type)] // CHECK:STDOUT: %MakeSelf: @F.%MakeSelf.type (%MakeSelf.type) = struct_value () [symbolic = %MakeSelf (constants.%MakeSelf)] // CHECK:STDOUT: %MakeClass.type: type = fn_type @MakeClass, @Class(%T) [symbolic = %MakeClass.type (constants.%MakeClass.type)] @@ -124,24 +122,22 @@ class Class(T:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_13.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %.loc17_17: init type = call %Class.ref(%T.ref) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc17_19.1: type = value_of_initializer %.loc17_17 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc17_19.2: type = converted %.loc17_17, %.loc17_19.1 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %c.var: ref @F.%Class (%Class.2) = var c -// CHECK:STDOUT: %c: ref @F.%Class (%Class.2) = bind_name c, %c.var +// CHECK:STDOUT: %Class.loc17: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.1 (constants.%Class.2)] +// CHECK:STDOUT: %c.var: ref @F.%Class.1 (%Class.2) = var c +// CHECK:STDOUT: %c: ref @F.%Class.1 (%Class.2) = bind_name c, %c.var // CHECK:STDOUT: %.loc17_23: @F.%MakeSelf.type (%MakeSelf.type) = specific_constant @Class.%MakeSelf.decl, @Class(constants.%T) [symbolic = %MakeSelf (constants.%MakeSelf)] // CHECK:STDOUT: %MakeSelf.ref: @F.%MakeSelf.type (%MakeSelf.type) = name_ref MakeSelf, %.loc17_23 [symbolic = %MakeSelf (constants.%MakeSelf)] -// CHECK:STDOUT: %.loc17_9: ref @F.%Class (%Class.2) = splice_block %c.var {} -// CHECK:STDOUT: %MakeSelf.call: init @F.%Class (%Class.2) = call %MakeSelf.ref() to %.loc17_9 +// CHECK:STDOUT: %.loc17_9: ref @F.%Class.1 (%Class.2) = splice_block %c.var {} +// CHECK:STDOUT: %MakeSelf.call: init @F.%Class.1 (%Class.2) = call %MakeSelf.ref() to %.loc17_9 // CHECK:STDOUT: assign %c.var, %MakeSelf.call -// CHECK:STDOUT: %.loc18_12: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_12 [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %s.var: ref @F.%Class (%Class.2) = var s -// CHECK:STDOUT: %s: ref @F.%Class (%Class.2) = bind_name s, %s.var +// CHECK:STDOUT: %.loc18_12: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class.1 (constants.%Class.2)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_12 [symbolic = %Class.1 (constants.%Class.2)] +// CHECK:STDOUT: %s.var: ref @F.%Class.1 (%Class.2) = var s +// CHECK:STDOUT: %s: ref @F.%Class.1 (%Class.2) = bind_name s, %s.var // CHECK:STDOUT: %.loc18_19: @F.%MakeClass.type (%MakeClass.type) = specific_constant @Class.%MakeClass.decl, @Class(constants.%T) [symbolic = %MakeClass (constants.%MakeClass)] // CHECK:STDOUT: %MakeClass.ref: @F.%MakeClass.type (%MakeClass.type) = name_ref MakeClass, %.loc18_19 [symbolic = %MakeClass (constants.%MakeClass)] -// CHECK:STDOUT: %.loc18_9: ref @F.%Class (%Class.2) = splice_block %s.var {} -// CHECK:STDOUT: %MakeClass.call: init @F.%Class (%Class.2) = call %MakeClass.ref() to %.loc18_9 +// CHECK:STDOUT: %.loc18_9: ref @F.%Class.1 (%Class.2) = splice_block %s.var {} +// CHECK:STDOUT: %MakeClass.call: init @F.%Class.1 (%Class.2) = call %MakeClass.ref() to %.loc18_9 // CHECK:STDOUT: assign %s.var, %MakeClass.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic_method.carbon b/toolchain/check/testdata/class/generic_method.carbon index 131ff41a62f4..b191aa19cae7 100644 --- a/toolchain/check/testdata/class/generic_method.carbon +++ b/toolchain/check/testdata/class/generic_method.carbon @@ -50,18 +50,18 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] { -// CHECK:STDOUT: %T.loc11_13.1: type = param T +// CHECK:STDOUT: %T.loc11_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @Class.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { -// CHECK:STDOUT: %T.loc16_10.1: type = param T +// CHECK:STDOUT: %T.loc16_10.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc16_10.2: type = bind_symbolic_name T 0, %T.loc16_10.1 [symbolic = constants.%T] // CHECK:STDOUT: %.loc16: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = constants.%Class.2] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc16 [symbolic = constants.%Class.2] -// CHECK:STDOUT: %self.loc16_22.1: %Class.2 = param self +// CHECK:STDOUT: %self.loc16_22.1: %Class.2 = param self, runtime_param0 // CHECK:STDOUT: @F.%self: %Class.2 = bind_name self, %self.loc16_22.1 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc16_10.2 [symbolic = constants.%T] -// CHECK:STDOUT: %n.loc16_34.1: %T = param n +// CHECK:STDOUT: %n.loc16_34.1: %T = param n, runtime_param1 // CHECK:STDOUT: @F.%n: %T = bind_name n, %n.loc16_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -81,10 +81,10 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = %F (constants.%F)] { // CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = @F.%Class (constants.%Class.2)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13 [symbolic = @F.%Class (constants.%Class.2)] -// CHECK:STDOUT: %self.loc13_8.1: @F.%Class (%Class.2) = param self +// CHECK:STDOUT: %self.loc13_8.1: @F.%Class (%Class.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_8.2: @F.%Class (%Class.2) = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, file.%T.loc11_13.2 [symbolic = @F.%T (constants.%T)] -// CHECK:STDOUT: %n.loc13_20.1: @F.%T (%T) = param n +// CHECK:STDOUT: %n.loc13_20.1: @F.%T (%T) = param n, runtime_param1 // CHECK:STDOUT: %n.loc13_20.2: @F.%T (%T) = bind_name n, %n.loc13_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 7a2855b0823d..0ef5a758720c 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -119,13 +119,13 @@ fn Run() { // CHECK:STDOUT: class @ForwardDeclared { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] -// CHECK:STDOUT: %self.loc14_8.1: %ForwardDeclared = param self +// CHECK:STDOUT: %self.loc14_8.1: %ForwardDeclared = param self, runtime_param0 // CHECK:STDOUT: %self.loc14_8.2: %ForwardDeclared = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] // CHECK:STDOUT: %.loc15_23: type = ptr_type %ForwardDeclared [template = constants.%.5] -// CHECK:STDOUT: %self.loc15_13.1: %.5 = param self +// CHECK:STDOUT: %self.loc15_13.1: %.5 = param self, runtime_param0 // CHECK:STDOUT: %self.loc15_13.3: %.5 = bind_name self, %self.loc15_13.1 // CHECK:STDOUT: %.loc15_8: %.5 = addr_pattern %self.loc15_13.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index 992291e71eea..d532f9b33c0a 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -84,12 +84,12 @@ fn Run() { // CHECK:STDOUT: class @Base { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc5: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %self.loc5_8.1: %Base = param self +// CHECK:STDOUT: %self.loc5_8.1: %Base = param self, runtime_param0 // CHECK:STDOUT: %self.loc5_8.2: %Base = bind_name self, %self.loc5_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Unused.decl: %Unused.type = fn_decl @Unused [template = constants.%Unused] { // CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %self.loc6_13.1: %Base = param self +// CHECK:STDOUT: %self.loc6_13.1: %Base = param self, runtime_param0 // CHECK:STDOUT: %self.loc6_13.2: %Base = bind_name self, %self.loc6_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32] diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 5393b3edb2d4..fd40435d811d 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -295,7 +295,7 @@ class B { // CHECK:STDOUT: %.loc10: %.5 = base_decl %Shape, element0 [template] // CHECK:STDOUT: %GetPosition.decl: %GetPosition.type = fn_decl @GetPosition [template = constants.%GetPosition] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] -// CHECK:STDOUT: %self.loc12_18.1: %Circle = param self +// CHECK:STDOUT: %self.loc12_18.1: %Circle = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_18.2: %Circle = bind_name self, %self.loc12_18.1 // CHECK:STDOUT: %int.make_type_32.loc12_36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc12_41: init type = call constants.%Int32() [template = i32] @@ -427,7 +427,7 @@ class B { // CHECK:STDOUT: %.loc14: %.8 = base_decl %B, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %self.loc15_8.1: %C = param self +// CHECK:STDOUT: %self.loc15_8.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc15_8.2: %C = bind_name self, %self.loc15_8.1 // CHECK:STDOUT: %.loc15_26.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc15_26.2: type = converted %.loc15_26.1, constants.%.1 [template = constants.%.1] @@ -635,7 +635,7 @@ class B { // CHECK:STDOUT: %.loc9: %.5 = base_decl %Shape, element0 [template] // CHECK:STDOUT: %GetPosition.decl: %GetPosition.type = fn_decl @GetPosition [template = constants.%GetPosition] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Square [template = constants.%Square] -// CHECK:STDOUT: %self.loc11_18.1: %Square = param self +// CHECK:STDOUT: %self.loc11_18.1: %Square = param self, runtime_param0 // CHECK:STDOUT: %self.loc11_18.2: %Square = bind_name self, %self.loc11_18.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_35.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -1015,7 +1015,7 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: %SomeFunc.decl: %SomeFunc.type = fn_decl @SomeFunc [template = constants.%SomeFunc] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] -// CHECK:STDOUT: %self.loc36_15.1: %B = param self +// CHECK:STDOUT: %self.loc36_15.1: %B = param self, runtime_param0 // CHECK:STDOUT: %self.loc36_15.2: %B = bind_name self, %self.loc36_15.1 // CHECK:STDOUT: %int.make_type_32.loc36: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc36_32.1: type = value_of_initializer %int.make_type_32.loc36 [template = i32] @@ -1112,7 +1112,7 @@ class B { // CHECK:STDOUT: %.loc9: %.5 = base_decl %A, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] -// CHECK:STDOUT: %self.loc10_8.1: %B = param self +// CHECK:STDOUT: %self.loc10_8.1: %B = param self, runtime_param0 // CHECK:STDOUT: %self.loc10_8.2: %B = bind_name self, %self.loc10_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1194,7 +1194,7 @@ class B { // CHECK:STDOUT: %.loc9: %.5 = base_decl %A, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] -// CHECK:STDOUT: %self.loc11_8.1: %B = param self +// CHECK:STDOUT: %self.loc11_8.1: %B = param self, runtime_param0 // CHECK:STDOUT: %self.loc11_8.2: %B = bind_name self, %self.loc11_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/init.carbon b/toolchain/check/testdata/class/init.carbon index e4f6def777c9..c953b3a5b3ec 100644 --- a/toolchain/check/testdata/class/init.carbon +++ b/toolchain/check/testdata/class/init.carbon @@ -68,11 +68,11 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %int.make_type_32.loc16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_12.1: type = value_of_initializer %int.make_type_32.loc16 [template = i32] // CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_32.loc16, %.loc16_12.1 [template = i32] -// CHECK:STDOUT: %n.loc16_9.1: i32 = param n +// CHECK:STDOUT: %n.loc16_9.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @Make.%n: i32 = bind_name n, %n.loc16_9.1 // CHECK:STDOUT: %Class.ref.loc16_23: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc16_28: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %next.loc16_17.1: %.3 = param next +// CHECK:STDOUT: %next.loc16_17.1: %.3 = param next, runtime_param1 // CHECK:STDOUT: @Make.%next: %.3 = bind_name next, %next.loc16_17.1 // CHECK:STDOUT: %Class.ref.loc16_34: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: @Make.%return: ref %Class = var @@ -81,11 +81,11 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_19.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] // CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_32.loc20, %.loc20_19.1 [template = i32] -// CHECK:STDOUT: %n.loc20_16.1: i32 = param n +// CHECK:STDOUT: %n.loc20_16.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @MakeReorder.%n: i32 = bind_name n, %n.loc20_16.1 // CHECK:STDOUT: %Class.ref.loc20_30: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc20_35: type = ptr_type %Class [template = constants.%.3] -// CHECK:STDOUT: %next.loc20_24.1: %.3 = param next +// CHECK:STDOUT: %next.loc20_24.1: %.3 = param next, runtime_param1 // CHECK:STDOUT: @MakeReorder.%next: %.3 = bind_name next, %next.loc20_24.1 // CHECK:STDOUT: %Class.ref.loc20_41: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: @MakeReorder.%return: ref %Class = var diff --git a/toolchain/check/testdata/class/init_adapt.carbon b/toolchain/check/testdata/class/init_adapt.carbon index 0db2eced5014..d42d8ae61e34 100644 --- a/toolchain/check/testdata/class/init_adapt.carbon +++ b/toolchain/check/testdata/class/init_adapt.carbon @@ -404,13 +404,13 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_28.2: %C = bind_value %.loc13_28.1 // CHECK:STDOUT: %a: %C = bind_name a, %.loc13_28.2 // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc24_18.1: init type = call constants.%ImplicitAs(constants.%AdaptC) [template = constants.%.10] +// CHECK:STDOUT: %.loc24_18.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%AdaptC) [template = constants.%.10] // CHECK:STDOUT: %.loc24_18.2: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%AdaptC) [template = constants.%.12] // CHECK:STDOUT: %Convert.ref.loc24: %.11 = name_ref Convert, %.loc24_18.2 [template = constants.%.12] // CHECK:STDOUT: %.loc24_18.3: %AdaptC = converted %a.ref, [template = ] // CHECK:STDOUT: %b: %AdaptC = bind_name b, // CHECK:STDOUT: %b.ref: %AdaptC = name_ref b, %b -// CHECK:STDOUT: %.loc33_13.1: init type = call constants.%ImplicitAs(constants.%C) [template = constants.%.14] +// CHECK:STDOUT: %.loc33_13.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.14] // CHECK:STDOUT: %.loc33_13.2: %.15 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%C) [template = constants.%.16] // CHECK:STDOUT: %Convert.ref.loc33: %.15 = name_ref Convert, %.loc33_13.2 [template = constants.%.16] // CHECK:STDOUT: %.loc33_13.3: %C = converted %b.ref, [template = ] @@ -418,7 +418,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %MakeC.ref: %MakeC.type = name_ref MakeC, file.%MakeC.decl [template = constants.%MakeC] // CHECK:STDOUT: %.loc46_22.1: ref %C = temporary_storage // CHECK:STDOUT: %MakeC.call: init %C = call %MakeC.ref() to %.loc46_22.1 -// CHECK:STDOUT: %.loc46_24.1: init type = call constants.%ImplicitAs(constants.%AdaptC) [template = constants.%.10] +// CHECK:STDOUT: %.loc46_24.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%AdaptC) [template = constants.%.10] // CHECK:STDOUT: %.loc46_24.2: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%AdaptC) [template = constants.%.12] // CHECK:STDOUT: %Convert.ref.loc46: %.11 = name_ref Convert, %.loc46_24.2 [template = constants.%.12] // CHECK:STDOUT: %.loc46_22.2: ref %C = temporary %.loc46_22.1, %MakeC.call @@ -427,7 +427,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %MakeAdaptC.ref: %MakeAdaptC.type = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%MakeAdaptC] // CHECK:STDOUT: %.loc54_22.1: ref %AdaptC = temporary_storage // CHECK:STDOUT: %MakeAdaptC.call: init %AdaptC = call %MakeAdaptC.ref() to %.loc54_22.1 -// CHECK:STDOUT: %.loc54_24.1: init type = call constants.%ImplicitAs(constants.%C) [template = constants.%.14] +// CHECK:STDOUT: %.loc54_24.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.14] // CHECK:STDOUT: %.loc54_24.2: %.15 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%C) [template = constants.%.16] // CHECK:STDOUT: %Convert.ref.loc54: %.15 = name_ref Convert, %.loc54_24.2 [template = constants.%.16] // CHECK:STDOUT: %.loc54_22.2: ref %AdaptC = temporary %.loc54_22.1, %MakeAdaptC.call diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index cb9a8e7a1921..89b01e88b6ee 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -128,7 +128,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc20_12.1: %Class = param self +// CHECK:STDOUT: %self.loc20_12.1: %Class = param self, runtime_param0 // CHECK:STDOUT: @F.%self: %Class = bind_name self, %self.loc20_12.1 // CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_29.1: type = value_of_initializer %int.make_type_32.loc20 [template = i32] @@ -137,7 +137,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Class.ref.loc24: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc24_9.1: %Class = param c +// CHECK:STDOUT: %c.loc24_9.1: %Class = param c, runtime_param0 // CHECK:STDOUT: @Call.%c: %Class = bind_name c, %c.loc24_9.1 // CHECK:STDOUT: %int.make_type_32.loc24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_22.1: type = value_of_initializer %int.make_type_32.loc24 [template = i32] @@ -146,7 +146,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %CallAlias.decl: %CallAlias.type = fn_decl @CallAlias [template = constants.%CallAlias] { // CHECK:STDOUT: %Class.ref.loc30: type = name_ref Class, %Class.decl [template = constants.%Class] -// CHECK:STDOUT: %c.loc30_14.1: %Class = param c +// CHECK:STDOUT: %c.loc30_14.1: %Class = param c, runtime_param0 // CHECK:STDOUT: @CallAlias.%c: %Class = bind_name c, %c.loc30_14.1 // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_27.1: type = value_of_initializer %int.make_type_32.loc30 [template = i32] @@ -168,7 +168,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %CallFThroughPointer.decl: %CallFThroughPointer.type = fn_decl @CallFThroughPointer [template = constants.%CallFThroughPointer] { // CHECK:STDOUT: %Class.ref.loc43: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc43_32: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %p.loc43_24.1: %.2 = param p +// CHECK:STDOUT: %p.loc43_24.1: %.2 = param p, runtime_param0 // CHECK:STDOUT: @CallFThroughPointer.%p: %.2 = bind_name p, %p.loc43_24.1 // CHECK:STDOUT: %int.make_type_32.loc43: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc43_38.1: type = value_of_initializer %int.make_type_32.loc43 [template = i32] @@ -178,7 +178,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %CallGThroughPointer.decl: %CallGThroughPointer.type = fn_decl @CallGThroughPointer [template = constants.%CallGThroughPointer] { // CHECK:STDOUT: %Class.ref.loc47: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc47_32: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %p.loc47_24.1: %.2 = param p +// CHECK:STDOUT: %p.loc47_24.1: %.2 = param p, runtime_param0 // CHECK:STDOUT: @CallGThroughPointer.%p: %.2 = bind_name p, %p.loc47_24.1 // CHECK:STDOUT: %int.make_type_32.loc47: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc47_38.1: type = value_of_initializer %int.make_type_32.loc47 [template = i32] @@ -206,7 +206,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc12_8.1: %Class = param self +// CHECK:STDOUT: %self.loc12_8.1: %Class = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_8.2: %Class = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] @@ -216,7 +216,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc13_23: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %self.loc13_13.1: %.2 = param self +// CHECK:STDOUT: %self.loc13_13.1: %.2 = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_13.3: %.2 = bind_name self, %self.loc13_13.1 // CHECK:STDOUT: %.loc13_8: %.2 = addr_pattern %self.loc13_13.3 // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] diff --git a/toolchain/check/testdata/class/nested.carbon b/toolchain/check/testdata/class/nested.carbon index efc02e57925f..5d07c8698b1c 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -99,7 +99,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, %Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %.loc41: type = ptr_type %Outer [template = constants.%.4] -// CHECK:STDOUT: %a.loc41_6.1: %.4 = param a +// CHECK:STDOUT: %a.loc41_6.1: %.4 = param a, runtime_param0 // CHECK:STDOUT: @F.2.%a: %.4 = bind_name a, %a.loc41_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index e5f317c6a43f..885938e7d528 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -68,7 +68,7 @@ fn G(o: Outer) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Outer.ref.loc17: type = name_ref Outer, %Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %oi.loc17_6.1: %Inner = param oi +// CHECK:STDOUT: %oi.loc17_6.1: %Inner = param oi, runtime_param0 // CHECK:STDOUT: @F.%oi: %Inner = bind_name oi, %oi.loc17_6.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_26.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -77,7 +77,7 @@ fn G(o: Outer) { // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Outer.ref.loc21: type = name_ref Outer, %Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %o.loc21_6.1: %Outer = param o +// CHECK:STDOUT: %o.loc21_6.1: %Outer = param o, runtime_param0 // CHECK:STDOUT: @G.%o: %Outer = bind_name o, %o.loc21_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon index b6737a85803d..60dce3ed7679 100644 --- a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon @@ -72,8 +72,8 @@ fn F(T:! type) { // CHECK:STDOUT: %GenericNoParams.1: type = class_type @GenericNoParams [template] // CHECK:STDOUT: %GenericNoParams.2: type = class_type @GenericNoParams, @GenericNoParams(%T) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic] -// CHECK:STDOUT: %GenericAndParams.type.2: type = generic_class_type @GenericAndParams.2 [template] -// CHECK:STDOUT: %GenericAndParams.3: %GenericAndParams.type.2 = struct_value () [template] +// CHECK:STDOUT: %GenericAndParams.type.2: type = generic_class_type @GenericAndParams.2, @C(%T) [symbolic] +// CHECK:STDOUT: %GenericAndParams.3: %GenericAndParams.type.2 = struct_value () [symbolic] // CHECK:STDOUT: %GenericAndParams.4: type = class_type @GenericAndParams.2, @GenericAndParams.2(%T, %U) [symbolic] // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %.3: type = ptr_type %.1 [template] @@ -82,9 +82,11 @@ fn F(T:! type) { // CHECK:STDOUT: %GenericAndParams.5: type = class_type @GenericAndParams.1, @GenericAndParams.1(%X) [template] // CHECK:STDOUT: %struct.3: %GenericAndParams.5 = struct_value () [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%X) [template] +// CHECK:STDOUT: %GenericAndParams.type.3: type = generic_class_type @GenericAndParams.2, @C(%X) [template] +// CHECK:STDOUT: %GenericAndParams.6: %GenericAndParams.type.3 = struct_value () [template] // CHECK:STDOUT: %struct.4: %GenericNoParams.1 = struct_value () [template] -// CHECK:STDOUT: %GenericAndParams.6: type = class_type @GenericAndParams.2, @GenericAndParams.2(%X) [template] -// CHECK:STDOUT: %struct.5: %GenericAndParams.6 = struct_value () [template] +// CHECK:STDOUT: %GenericAndParams.7: type = class_type @GenericAndParams.2, @GenericAndParams.2(%X, %X) [template] +// CHECK:STDOUT: %struct.5: %GenericAndParams.7 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -103,11 +105,11 @@ fn F(T:! type) { // CHECK:STDOUT: %NotGenericNoParams.decl: type = class_decl @NotGenericNoParams [template = constants.%NotGenericNoParams] {} // CHECK:STDOUT: %NotGenericButParams.decl: %NotGenericButParams.type = class_decl @NotGenericButParams [template = constants.%NotGenericButParams.1] {} // CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.1 = class_decl @GenericAndParams.1 [template = constants.%GenericAndParams.1] { -// CHECK:STDOUT: %T.loc6_24.1: type = param T +// CHECK:STDOUT: %T.loc6_24.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc6_24.2: type = bind_symbolic_name T 0, %T.loc6_24.1 [symbolic = @GenericAndParams.1.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { -// CHECK:STDOUT: %T.loc8_9.1: type = param T +// CHECK:STDOUT: %T.loc8_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc8_9.2: type = bind_symbolic_name T 0, %T.loc8_9.1 [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} @@ -115,34 +117,29 @@ fn F(T:! type) { // CHECK:STDOUT: %a.var: ref %NotGenericNoParams = var a // CHECK:STDOUT: %a: ref %NotGenericNoParams = bind_name a, %a.var // CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type = name_ref NotGenericButParams, %NotGenericButParams.decl [template = constants.%NotGenericButParams.1] -// CHECK:STDOUT: %.loc16_27: init type = call %NotGenericButParams.ref() [template = constants.%NotGenericButParams.2] -// CHECK:STDOUT: %.loc16_28.1: type = value_of_initializer %.loc16_27 [template = constants.%NotGenericButParams.2] -// CHECK:STDOUT: %.loc16_28.2: type = converted %.loc16_27, %.loc16_28.1 [template = constants.%NotGenericButParams.2] +// CHECK:STDOUT: %NotGenericButParams: type = class_type @NotGenericButParams [template = constants.%NotGenericButParams.2] // CHECK:STDOUT: %b.var: ref %NotGenericButParams.2 = var b // CHECK:STDOUT: %b: ref %NotGenericButParams.2 = bind_name b, %b.var // CHECK:STDOUT: %GenericAndParams.ref.loc17: %GenericAndParams.type.1 = name_ref GenericAndParams, %GenericAndParams.decl [template = constants.%GenericAndParams.1] // CHECK:STDOUT: %X.ref.loc17: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc17_24: init type = call %GenericAndParams.ref.loc17(%X.ref.loc17) [template = constants.%GenericAndParams.5] -// CHECK:STDOUT: %.loc17_26.1: type = value_of_initializer %.loc17_24 [template = constants.%GenericAndParams.5] -// CHECK:STDOUT: %.loc17_26.2: type = converted %.loc17_24, %.loc17_26.1 [template = constants.%GenericAndParams.5] +// CHECK:STDOUT: %GenericAndParams.loc17: type = class_type @GenericAndParams.1, @GenericAndParams.1(constants.%X) [template = constants.%GenericAndParams.5] // CHECK:STDOUT: %c.var: ref %GenericAndParams.5 = var c // CHECK:STDOUT: %c: ref %GenericAndParams.5 = bind_name c, %c.var // CHECK:STDOUT: %C.ref.loc18: %C.type = name_ref C, %C.decl [template = constants.%C.1] // CHECK:STDOUT: %X.ref.loc18: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc18: init type = call %C.ref.loc18(%X.ref.loc18) [template = constants.%C.3] +// CHECK:STDOUT: %C.loc18: type = class_type @C, @C(constants.%X) [template = constants.%C.3] // CHECK:STDOUT: %GenericNoParams.ref: type = name_ref GenericNoParams, @C.%GenericNoParams.decl [template = constants.%GenericNoParams.1] // CHECK:STDOUT: %d.var: ref %GenericNoParams.1 = var d // CHECK:STDOUT: %d: ref %GenericNoParams.1 = bind_name d, %d.var // CHECK:STDOUT: %C.ref.loc19: %C.type = name_ref C, %C.decl [template = constants.%C.1] // CHECK:STDOUT: %X.ref.loc19_10: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc19_9: init type = call %C.ref.loc19(%X.ref.loc19_10) [template = constants.%C.3] -// CHECK:STDOUT: %GenericAndParams.ref.loc19: %GenericAndParams.type.2 = name_ref GenericAndParams, @C.%GenericAndParams.decl [template = constants.%GenericAndParams.3] +// CHECK:STDOUT: %C.loc19: type = class_type @C, @C(constants.%X) [template = constants.%C.3] +// CHECK:STDOUT: %.loc19: %GenericAndParams.type.3 = specific_constant @C.%GenericAndParams.decl, @C(constants.%X) [template = constants.%GenericAndParams.6] +// CHECK:STDOUT: %GenericAndParams.ref.loc19: %GenericAndParams.type.3 = name_ref GenericAndParams, %.loc19 [template = constants.%GenericAndParams.6] // CHECK:STDOUT: %X.ref.loc19_30: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc19_29: init type = call %GenericAndParams.ref.loc19(%X.ref.loc19_30) [template = constants.%GenericAndParams.6] -// CHECK:STDOUT: %.loc19_31.1: type = value_of_initializer %.loc19_29 [template = constants.%GenericAndParams.6] -// CHECK:STDOUT: %.loc19_31.2: type = converted %.loc19_29, %.loc19_31.1 [template = constants.%GenericAndParams.6] -// CHECK:STDOUT: %e.var: ref %GenericAndParams.6 = var e -// CHECK:STDOUT: %e: ref %GenericAndParams.6 = bind_name e, %e.var +// CHECK:STDOUT: %GenericAndParams.loc19: type = class_type @GenericAndParams.2, @GenericAndParams.2(constants.%X, constants.%X) [template = constants.%GenericAndParams.7] +// CHECK:STDOUT: %e.var: ref %GenericAndParams.7 = var e +// CHECK:STDOUT: %e: ref %GenericAndParams.7 = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NotGenericNoParams { @@ -170,11 +167,13 @@ fn F(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %GenericAndParams.type: type = generic_class_type @GenericAndParams.2, @C(%T) [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.2)] +// CHECK:STDOUT: %GenericAndParams: @C.%GenericAndParams.type (%GenericAndParams.type.2) = struct_value () [symbolic = %GenericAndParams (constants.%GenericAndParams.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %GenericNoParams.decl: type = class_decl @GenericNoParams [template = constants.%GenericNoParams.1] {} -// CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.2 = class_decl @GenericAndParams.2 [template = constants.%GenericAndParams.3] { -// CHECK:STDOUT: %U.loc10_26.1: type = param U +// CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.2) = class_decl @GenericAndParams.2 [symbolic = %GenericAndParams (constants.%GenericAndParams.3)] { +// CHECK:STDOUT: %U.loc10_26.1: type = param U, runtime_param // CHECK:STDOUT: %U.loc10_26.2: type = bind_symbolic_name U 1, %U.loc10_26.1 [symbolic = @GenericAndParams.2.%U (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -229,8 +228,8 @@ fn F(T:! type) { // CHECK:STDOUT: %.loc18_33: init %GenericNoParams.1 = converted %.loc18_32.1, %.loc18_32.2 [template = constants.%struct.4] // CHECK:STDOUT: assign file.%d.var, %.loc18_33 // CHECK:STDOUT: %.loc19_36.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc19_36.2: init %GenericAndParams.6 = class_init (), file.%e.var [template = constants.%struct.5] -// CHECK:STDOUT: %.loc19_37: init %GenericAndParams.6 = converted %.loc19_36.1, %.loc19_36.2 [template = constants.%struct.5] +// CHECK:STDOUT: %.loc19_36.2: init %GenericAndParams.7 = class_init (), file.%e.var [template = constants.%struct.5] +// CHECK:STDOUT: %.loc19_37: init %GenericAndParams.7 = converted %.loc19_36.1, %.loc19_36.2 [template = constants.%struct.5] // CHECK:STDOUT: assign file.%e.var, %.loc19_37 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -249,6 +248,10 @@ fn F(T:! type) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @C(@C.%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.1(constants.%X) { // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: @@ -259,10 +262,12 @@ fn F(T:! type) { // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.3 +// CHECK:STDOUT: %GenericAndParams => constants.%GenericAndParams.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericAndParams.2(constants.%X) { -// CHECK:STDOUT: %U => constants.%U +// CHECK:STDOUT: specific @GenericAndParams.2(constants.%X, constants.%X) { +// CHECK:STDOUT: %U => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -282,7 +287,7 @@ fn F(T:! type) { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.1] { -// CHECK:STDOUT: %T.loc8_9.1: type = param T +// CHECK:STDOUT: %T.loc8_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc8_9.2: type = bind_name T, %T.loc8_9.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -311,11 +316,11 @@ fn F(T:! type) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.1] { -// CHECK:STDOUT: %T.loc7_9.1: type = param T +// CHECK:STDOUT: %T.loc7_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc7_9.2: type = bind_name T, %T.loc7_9.1 // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc10_6.1: type = param T +// CHECK:STDOUT: %T.loc10_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc10: type = bind_symbolic_name T 0, %T.loc10_6.1 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -334,7 +339,7 @@ fn F(T:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc11: init type = call %A.ref() [template = ] +// CHECK:STDOUT: %A: type = class_type @A [template = constants.%A.2] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/import_access.carbon b/toolchain/check/testdata/class/no_prelude/import_access.carbon index 834663ed469b..b432566e0505 100644 --- a/toolchain/check/testdata/class/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/class/no_prelude/import_access.carbon @@ -404,7 +404,7 @@ private class Redecl {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: type = name_ref Forward, imports.%import_ref [template = constants.%Forward] // CHECK:STDOUT: %.loc4: type = ptr_type %Forward [template = constants.%.1] -// CHECK:STDOUT: %c.loc4_6.1: %.1 = param c +// CHECK:STDOUT: %c.loc4_6.1: %.1 = param c, runtime_param0 // CHECK:STDOUT: @F.%c: %.1 = bind_name c, %c.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Forward.decl: type = class_decl @Forward [template = constants.%Forward] {} @@ -436,7 +436,7 @@ private class Redecl {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc10: type = ptr_type [template = ] -// CHECK:STDOUT: %c.loc10_6.1: = param c +// CHECK:STDOUT: %c.loc10_6.1: = param c, runtime_param0 // CHECK:STDOUT: @F.%c: = bind_name c, %c.loc10_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -470,7 +470,7 @@ private class Redecl {} // CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc9: type = ptr_type [template = ] -// CHECK:STDOUT: %c.loc9_6.1: = param c +// CHECK:STDOUT: %c.loc9_6.1: = param c, runtime_param0 // CHECK:STDOUT: @F.%c: = bind_name c, %c.loc9_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon index 41ed1f25fac8..a644a09c8167 100644 --- a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon @@ -206,22 +206,22 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_11.1: %C = param a +// CHECK:STDOUT: %a.loc7_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a 0, %a.loc7_11.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc8_11.1: %C = param a +// CHECK:STDOUT: %a.loc8_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc8_11.2: %C = bind_symbolic_name a 0, %a.loc8_11.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = class_decl @Bar [template = constants.%Bar.1] { // CHECK:STDOUT: %D.ref.loc10: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc10_11.1: %C = param a +// CHECK:STDOUT: %a.loc10_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc10_11.2: %C = bind_symbolic_name a 0, %a.loc10_11.1 [symbolic = @Bar.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = class_decl @Bar [template = constants.%Bar.1] { // CHECK:STDOUT: %D.ref.loc11: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc11_11.1: %C = param a +// CHECK:STDOUT: %a.loc11_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc11_11.2: %C = bind_symbolic_name a 0, %a.loc11_11.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -281,12 +281,12 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_17.1: %C = param a +// CHECK:STDOUT: %a.loc6_17.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6_17.2: %C = bind_symbolic_name a 0, %a.loc6_17.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_13.1: %C = param a +// CHECK:STDOUT: %a.loc7_13.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_13.2: %C = bind_symbolic_name a 0, %a.loc7_13.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -334,12 +334,12 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_11.1: %C = param a +// CHECK:STDOUT: %a.loc6_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a 0, %a.loc6_11.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc14_11.1: %C = param a +// CHECK:STDOUT: %a.loc14_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc14_11.2: %C = bind_symbolic_name a 0, %a.loc14_11.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -394,12 +394,12 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_11.1: %C = param a +// CHECK:STDOUT: %a.loc6_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a 0, %a.loc6_11.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_11.1: %C = param a +// CHECK:STDOUT: %a.loc7_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a 0, %a.loc7_11.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -451,12 +451,12 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_11.1: %C = param a +// CHECK:STDOUT: %a.loc7_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a 0, %a.loc7_11.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.1] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc8_11.1: %C = param a +// CHECK:STDOUT: %a.loc8_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc8_11.2: %C = bind_symbolic_name a 0, %a.loc8_11.1 [symbolic = @Bar.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -520,12 +520,12 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %a.loc4_11.1: %C = param a +// CHECK:STDOUT: %a.loc4_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc4_11.2: %C = bind_symbolic_name a 0, %a.loc4_11.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.1] { // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %a.loc5_11.1: %C = param a +// CHECK:STDOUT: %a.loc5_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc5_11.2: %C = bind_symbolic_name a 0, %a.loc5_11.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -592,12 +592,12 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_11.1: %C = param a +// CHECK:STDOUT: %a.loc7_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a 0, %a.loc7_11.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %b.loc15_11.1: %C = param b +// CHECK:STDOUT: %b.loc15_11.1: %C = param b, runtime_param // CHECK:STDOUT: %b.loc15_11.2: %C = bind_symbolic_name b 0, %b.loc15_11.1 [symbolic = @.1.%b (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -658,12 +658,12 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_11.1: %C = param a +// CHECK:STDOUT: %a.loc7_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a 0, %a.loc7_11.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc15_11.1: %C = param a +// CHECK:STDOUT: %a.loc15_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc15_11.2: %C = bind_symbolic_name a 0, %a.loc15_11.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -724,12 +724,12 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_11.1: %C = param a +// CHECK:STDOUT: %a.loc7_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a 0, %a.loc7_11.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc15_11.1: %C = param a +// CHECK:STDOUT: %a.loc15_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc15_11.2: %C = bind_symbolic_name a 0, %a.loc15_11.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -784,7 +784,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_11.1: %C = param a +// CHECK:STDOUT: %a.loc6_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a 0, %a.loc6_11.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -834,7 +834,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %D: type = bind_alias D, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc6_11.1: %C = param a +// CHECK:STDOUT: %a.loc6_11.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a 0, %a.loc6_11.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -884,14 +884,14 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [template = constants.%Foo.1] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc6: type = const_type %C [template = constants.%.2] -// CHECK:STDOUT: %a.loc6_11.1: %.2 = param a +// CHECK:STDOUT: %a.loc6_11.1: %.2 = param a, runtime_param // CHECK:STDOUT: %a.loc6_11.2: %.2 = bind_symbolic_name a 0, %a.loc6_11.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %C.ref.loc18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc18_22: type = const_type %C [template = constants.%.2] // CHECK:STDOUT: %.loc18_15: type = const_type %.2 [template = constants.%.2] -// CHECK:STDOUT: %a.loc18_11.1: %.2 = param a +// CHECK:STDOUT: %a.loc18_11.1: %.2 = param a, runtime_param // CHECK:STDOUT: %a.loc18_11.2: %.2 = bind_symbolic_name a 0, %a.loc18_11.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -950,7 +950,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] { // CHECK:STDOUT: %Base.ref: type = name_ref Base, %Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc16_26: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.loc16_16.1: %.3 = param self +// CHECK:STDOUT: %self.loc16_16.1: %.3 = param self, runtime_param0 // CHECK:STDOUT: @.1.%self: %.3 = bind_name self, %self.loc16_16.1 // CHECK:STDOUT: @.1.%.loc16: %.3 = addr_pattern @.1.%self // CHECK:STDOUT: } @@ -963,7 +963,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %.loc7_23: type = ptr_type %Base [template = constants.%.3] -// CHECK:STDOUT: %self.loc7_13.1: %.3 = param self +// CHECK:STDOUT: %self.loc7_13.1: %.3 = param self, runtime_param0 // CHECK:STDOUT: %self.loc7_13.3: %.3 = bind_name self, %self.loc7_13.1 // CHECK:STDOUT: %.loc7_8: %.3 = addr_pattern %self.loc7_13.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/raw_self.carbon b/toolchain/check/testdata/class/raw_self.carbon index 8bdaff0a6f59..1c7d8fd8de13 100644 --- a/toolchain/check/testdata/class/raw_self.carbon +++ b/toolchain/check/testdata/class/raw_self.carbon @@ -67,23 +67,23 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc17_27: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %self.loc17_17.1: %.1 = param self +// CHECK:STDOUT: %self.loc17_17.1: %.1 = param self, runtime_param0 // CHECK:STDOUT: @F.%self.loc17_17: %.1 = bind_name self, %self.loc17_17.1 // CHECK:STDOUT: @F.%.loc17: %.1 = addr_pattern @F.%self.loc17_17 // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_38.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_38.2: type = converted %int.make_type_32.loc17, %.loc17_38.1 [template = i32] -// CHECK:STDOUT: %self.loc17_30.1: i32 = param r#self +// CHECK:STDOUT: %self.loc17_30.1: i32 = param r#self, runtime_param1 // CHECK:STDOUT: @F.%self.loc17_30: i32 = bind_name r#self, %self.loc17_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc21_12.1: %Class = param self +// CHECK:STDOUT: %self.loc21_12.1: %Class = param self, runtime_param0 // CHECK:STDOUT: @G.%self.loc21_12: %Class = bind_name self, %self.loc21_12.1 // CHECK:STDOUT: %int.make_type_32.loc21_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_32.1: type = value_of_initializer %int.make_type_32.loc21_32 [template = i32] // CHECK:STDOUT: %.loc21_32.2: type = converted %int.make_type_32.loc21_32, %.loc21_32.1 [template = i32] -// CHECK:STDOUT: %self.loc21_24.1: i32 = param r#self +// CHECK:STDOUT: %self.loc21_24.1: i32 = param r#self, runtime_param1 // CHECK:STDOUT: @G.%self.loc21_24: i32 = bind_name r#self, %self.loc21_24.1 // CHECK:STDOUT: %int.make_type_32.loc21_41: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc21_46: init type = call constants.%Int32() [template = i32] @@ -101,23 +101,23 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc12_23: type = ptr_type %Class [template = constants.%.1] -// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self +// CHECK:STDOUT: %self.loc12_13.1: %.1 = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_13.3: %.1 = bind_name self, %self.loc12_13.1 // CHECK:STDOUT: %.loc12_8: %.1 = addr_pattern %self.loc12_13.3 // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_34.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_34.2: type = converted %int.make_type_32.loc12, %.loc12_34.1 [template = i32] -// CHECK:STDOUT: %self.loc12_26.1: i32 = param r#self +// CHECK:STDOUT: %self.loc12_26.1: i32 = param r#self, runtime_param1 // CHECK:STDOUT: %self.loc12_26.2: i32 = bind_name r#self, %self.loc12_26.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc13_8.1: %Class = param self +// CHECK:STDOUT: %self.loc13_8.1: %Class = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_8.2: %Class = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: %int.make_type_32.loc13_28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_28.1: type = value_of_initializer %int.make_type_32.loc13_28 [template = i32] // CHECK:STDOUT: %.loc13_28.2: type = converted %int.make_type_32.loc13_28, %.loc13_28.1 [template = i32] -// CHECK:STDOUT: %self.loc13_20.1: i32 = param r#self +// CHECK:STDOUT: %self.loc13_20.1: i32 = param r#self, runtime_param1 // CHECK:STDOUT: %self.loc13_20.2: i32 = bind_name r#self, %self.loc13_20.1 // CHECK:STDOUT: %int.make_type_32.loc13_37: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %int.make_type_32.loc13_42: init type = call constants.%Int32() [template = i32] diff --git a/toolchain/check/testdata/class/raw_self_type.carbon b/toolchain/check/testdata/class/raw_self_type.carbon index f1aa7c6d3d02..6ebe4923591b 100644 --- a/toolchain/check/testdata/class/raw_self_type.carbon +++ b/toolchain/check/testdata/class/raw_self_type.carbon @@ -63,10 +63,10 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %MemberNamedSelf.decl: type = class_decl @MemberNamedSelf [template = constants.%MemberNamedSelf] {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref.loc24_25: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] -// CHECK:STDOUT: %x.loc24_22.1: %MemberNamedSelf = param x +// CHECK:STDOUT: %x.loc24_22.1: %MemberNamedSelf = param x, runtime_param0 // CHECK:STDOUT: @F.2.%x: %MemberNamedSelf = bind_name x, %x.loc24_22.1 // CHECK:STDOUT: %Self.ref.loc24_34: type = name_ref r#Self, @MemberNamedSelf.%Self.decl [template = constants.%Self] -// CHECK:STDOUT: %y.loc24_31.1: %Self = param y +// CHECK:STDOUT: %y.loc24_31.1: %Self = param y, runtime_param1 // CHECK:STDOUT: @F.2.%y: %Self = bind_name y, %y.loc24_31.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -83,10 +83,10 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %Self.decl: type = class_decl @Self [template = constants.%Self] {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref.loc21_11: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] -// CHECK:STDOUT: %x.loc21_8.1: %MemberNamedSelf = param x +// CHECK:STDOUT: %x.loc21_8.1: %MemberNamedSelf = param x, runtime_param0 // CHECK:STDOUT: %x.loc21_8.2: %MemberNamedSelf = bind_name x, %x.loc21_8.1 // CHECK:STDOUT: %Self.ref.loc21_20: type = name_ref r#Self, %Self.decl [template = constants.%Self] -// CHECK:STDOUT: %y.loc21_17.1: %Self = param y +// CHECK:STDOUT: %y.loc21_17.1: %Self = param y, runtime_param1 // CHECK:STDOUT: %y.loc21_17.2: %Self = bind_name y, %y.loc21_17.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/redeclaration.carbon b/toolchain/check/testdata/class/redeclaration.carbon index e223854be6fc..7d337161032e 100644 --- a/toolchain/check/testdata/class/redeclaration.carbon +++ b/toolchain/check/testdata/class/redeclaration.carbon @@ -54,12 +54,12 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: %Class.decl.loc13: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc17_12.1: %Class = param self +// CHECK:STDOUT: %self.loc17_12.1: %Class = param self, runtime_param0 // CHECK:STDOUT: @F.%self: %Class = bind_name self, %self.loc17_12.1 // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_27.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_27.2: type = converted %bool.make_type, %.loc17_27.1 [template = bool] -// CHECK:STDOUT: %b.loc17_24.1: bool = param b +// CHECK:STDOUT: %b.loc17_24.1: bool = param b, runtime_param1 // CHECK:STDOUT: @F.%b: bool = bind_name b, %b.loc17_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -67,12 +67,12 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc14_8.1: %Class = param self +// CHECK:STDOUT: %self.loc14_8.1: %Class = param self, runtime_param0 // CHECK:STDOUT: %self.loc14_8.2: %Class = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_23.2: type = converted %bool.make_type, %.loc14_23.1 [template = bool] -// CHECK:STDOUT: %b.loc14_20.1: bool = param b +// CHECK:STDOUT: %b.loc14_20.1: bool = param b, runtime_param1 // CHECK:STDOUT: %b.loc14_20.2: bool = bind_name b, %b.loc14_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index 16f449bb52a2..d00fd3206a98 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -64,7 +64,7 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc18: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc18_12.1: %Class = param self +// CHECK:STDOUT: %self.loc18_12.1: %Class = param self, runtime_param0 // CHECK:STDOUT: @F.%self: %Class = bind_name self, %self.loc18_12.1 // CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32] @@ -74,7 +74,7 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc22: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc22_27: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %self.loc22_17.1: %.2 = param self +// CHECK:STDOUT: %self.loc22_17.1: %.2 = param self, runtime_param0 // CHECK:STDOUT: @G.%self: %.2 = bind_name self, %self.loc22_17.1 // CHECK:STDOUT: @G.%.loc22: %.2 = addr_pattern @G.%self // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] @@ -87,7 +87,7 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc12_8.1: %Class = param self +// CHECK:STDOUT: %self.loc12_8.1: %Class = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_8.2: %Class = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] @@ -97,7 +97,7 @@ fn Class.G[addr self: Self*]() -> i32 { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %.loc13_23: type = ptr_type %Class [template = constants.%.2] -// CHECK:STDOUT: %self.loc13_13.1: %.2 = param self +// CHECK:STDOUT: %self.loc13_13.1: %.2 = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_13.3: %.2 = bind_name self, %self.loc13_13.1 // CHECK:STDOUT: %.loc13_8: %.2 = addr_pattern %self.loc13_13.3 // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index d89747433bdd..d79de6b1e8c0 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -85,7 +85,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} // CHECK:STDOUT: %SelfBase.decl: %SelfBase.type = fn_decl @SelfBase [template = constants.%SelfBase] { // CHECK:STDOUT: %Base.ref.loc22: type = name_ref Base, %Base.decl [template = constants.%Base] -// CHECK:STDOUT: %self.loc22_21.1: %Base = param self +// CHECK:STDOUT: %self.loc22_21.1: %Base = param self, runtime_param0 // CHECK:STDOUT: @SelfBase.%self: %Base = bind_name self, %self.loc22_21.1 // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_38.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] @@ -95,14 +95,14 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { // CHECK:STDOUT: %Base.ref.loc26: type = name_ref Base, %Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc26_40: type = ptr_type %Base [template = constants.%.6] -// CHECK:STDOUT: %self.loc26_30.1: %.6 = param self +// CHECK:STDOUT: %self.loc26_30.1: %.6 = param self, runtime_param0 // CHECK:STDOUT: @AddrSelfBase.%self: %.6 = bind_name self, %self.loc26_30.1 // CHECK:STDOUT: @AddrSelfBase.%.loc26: %.6 = addr_pattern @AddrSelfBase.%self // CHECK:STDOUT: } // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, %Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %.loc30_19: type = ptr_type %Derived [template = constants.%.9] -// CHECK:STDOUT: %p.loc30_9.1: %.9 = param p +// CHECK:STDOUT: %p.loc30_9.1: %.9 = param p, runtime_param0 // CHECK:STDOUT: @Call.%p: %.9 = bind_name p, %p.loc30_9.1 // CHECK:STDOUT: %int.make_type_32.loc30: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc30_25.1: type = value_of_initializer %int.make_type_32.loc30 [template = i32] @@ -127,7 +127,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %.loc16: %.5 = base_decl %Base, element0 [template] // CHECK:STDOUT: %SelfBase.decl: %SelfBase.type = fn_decl @SelfBase [template = constants.%SelfBase] { // CHECK:STDOUT: %Base.ref.loc18: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %self.loc18_15.1: %Base = param self +// CHECK:STDOUT: %self.loc18_15.1: %Base = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_15.2: %Base = bind_name self, %self.loc18_15.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_32.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -137,7 +137,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { // CHECK:STDOUT: %Base.ref.loc19: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc19_34: type = ptr_type %Base [template = constants.%.6] -// CHECK:STDOUT: %self.loc19_24.1: %.6 = param self +// CHECK:STDOUT: %self.loc19_24.1: %.6 = param self, runtime_param0 // CHECK:STDOUT: %self.loc19_24.3: %.6 = bind_name self, %self.loc19_24.1 // CHECK:STDOUT: %.loc19_19: %.6 = addr_pattern %self.loc19_24.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/self_type.carbon b/toolchain/check/testdata/class/self_type.carbon index d1b0afc2955f..77801b288d44 100644 --- a/toolchain/check/testdata/class/self_type.carbon +++ b/toolchain/check/testdata/class/self_type.carbon @@ -63,7 +63,7 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc21_12.1: %Class = param self +// CHECK:STDOUT: %self.loc21_12.1: %Class = param self, runtime_param0 // CHECK:STDOUT: @F.%self: %Class = bind_name self, %self.loc21_12.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_29.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -75,7 +75,7 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %self.loc12_8.1: %Class = param self +// CHECK:STDOUT: %self.loc12_8.1: %Class = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_8.2: %Class = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index fd299e756d89..916657295225 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -73,25 +73,21 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc2_13.2: type = converted %int.make_type_32, %.loc2_13.1 [template = i32] -// CHECK:STDOUT: %a.loc2_9.1: i32 = param a +// CHECK:STDOUT: %a.loc2_9.1: i32 = param a, runtime_param // CHECK:STDOUT: %a.loc2_9.2: i32 = bind_symbolic_name a 0, %a.loc2_9.1 [symbolic = @C.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl.loc3: %D.type = class_decl @D [template = constants.%D.1] { // CHECK:STDOUT: %C.ref.loc3: %C.type = name_ref C, %C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc3_15: i32 = int_literal 1000 [template = constants.%.3] -// CHECK:STDOUT: %.loc3_14: init type = call %C.ref.loc3(%.loc3_15) [template = constants.%C.3] -// CHECK:STDOUT: %.loc3_20.1: type = value_of_initializer %.loc3_14 [template = constants.%C.3] -// CHECK:STDOUT: %.loc3_20.2: type = converted %.loc3_14, %.loc3_20.1 [template = constants.%C.3] -// CHECK:STDOUT: %b.loc3_9.1: %C.3 = param b +// CHECK:STDOUT: %.loc3: i32 = int_literal 1000 [template = constants.%.3] +// CHECK:STDOUT: %C.loc3: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] +// CHECK:STDOUT: %b.loc3_9.1: %C.3 = param b, runtime_param // CHECK:STDOUT: %b.loc3_9.2: %C.3 = bind_symbolic_name b 0, %b.loc3_9.1 [symbolic = @D.%b (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl.loc4: %D.type = class_decl @D [template = constants.%D.1] { // CHECK:STDOUT: %C.ref.loc4: %C.type = name_ref C, %C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc4_15: i32 = int_literal 1000 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_14: init type = call %C.ref.loc4(%.loc4_15) [template = constants.%C.3] -// CHECK:STDOUT: %.loc4_20.1: type = value_of_initializer %.loc4_14 [template = constants.%C.3] -// CHECK:STDOUT: %.loc4_20.2: type = converted %.loc4_14, %.loc4_20.1 [template = constants.%C.3] -// CHECK:STDOUT: %b.loc4_9.1: %C.3 = param b +// CHECK:STDOUT: %.loc4: i32 = int_literal 1000 [template = constants.%.3] +// CHECK:STDOUT: %C.loc4: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] +// CHECK:STDOUT: %b.loc4_9.1: %C.3 = param b, runtime_param // CHECK:STDOUT: %b.loc4_9.2: %C.3 = bind_symbolic_name b 0, %b.loc4_9.1 [symbolic = constants.%b] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -180,25 +176,21 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc2_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc2_13.2: type = converted %int.make_type_32, %.loc2_13.1 [template = i32] -// CHECK:STDOUT: %a.loc2_9.1: i32 = param a +// CHECK:STDOUT: %a.loc2_9.1: i32 = param a, runtime_param // CHECK:STDOUT: %a.loc2_9.2: i32 = bind_symbolic_name a 0, %a.loc2_9.1 [symbolic = @C.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = class_decl @D [template = constants.%D.1] { // CHECK:STDOUT: %C.ref.loc3: %C.type = name_ref C, %C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc3_15: i32 = int_literal 1000 [template = constants.%.3] -// CHECK:STDOUT: %.loc3_14: init type = call %C.ref.loc3(%.loc3_15) [template = constants.%C.3] -// CHECK:STDOUT: %.loc3_19.1: type = value_of_initializer %.loc3_14 [template = constants.%C.3] -// CHECK:STDOUT: %.loc3_19.2: type = converted %.loc3_14, %.loc3_19.1 [template = constants.%C.3] -// CHECK:STDOUT: %b.loc3_9.1: %C.3 = param b +// CHECK:STDOUT: %.loc3: i32 = int_literal 1000 [template = constants.%.3] +// CHECK:STDOUT: %C.loc3: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] +// CHECK:STDOUT: %b.loc3_9.1: %C.3 = param b, runtime_param // CHECK:STDOUT: %b.loc3_9.2: %C.3 = bind_symbolic_name b 0, %b.loc3_9.1 [symbolic = @D.%b (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, %C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_15: i32 = int_literal 1000 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_14: init type = call %C.ref.loc10(%.loc10_15) [template = constants.%C.3] -// CHECK:STDOUT: %.loc10_20.1: type = value_of_initializer %.loc10_14 [template = constants.%C.3] -// CHECK:STDOUT: %.loc10_20.2: type = converted %.loc10_14, %.loc10_20.1 [template = constants.%C.3] -// CHECK:STDOUT: %b.loc10_9.1: %C.3 = param b +// CHECK:STDOUT: %.loc10: i32 = int_literal 1000 [template = constants.%.3] +// CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] +// CHECK:STDOUT: %b.loc10_9.1: %C.3 = param b, runtime_param // CHECK:STDOUT: %b.loc10_9.2: %C.3 = bind_symbolic_name b 0, %b.loc10_9.1 [symbolic = @.1.%b (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/const/basic.carbon b/toolchain/check/testdata/const/basic.carbon index 30659d68fcfb..396fc8f054ba 100644 --- a/toolchain/check/testdata/const/basic.carbon +++ b/toolchain/check/testdata/const/basic.carbon @@ -62,7 +62,7 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: %.loc11_9.3: type = const_type i32 [template = constants.%.2] // CHECK:STDOUT: %.loc11_18: type = ptr_type %.2 [template = constants.%.3] // CHECK:STDOUT: %.loc11_19: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.loc11_6.1: %.4 = param p +// CHECK:STDOUT: %p.loc11_6.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @A.%p: %.4 = bind_name p, %p.loc11_6.1 // CHECK:STDOUT: %int.make_type_32.loc11_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32.loc11_31 [template = i32] @@ -78,7 +78,7 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_32.loc15_16, %.loc15_19.1 [template = i32] // CHECK:STDOUT: %.loc15_19.3: type = ptr_type i32 [template = constants.%.5] // CHECK:STDOUT: %.loc15_9: type = const_type %.5 [template = constants.%.6] -// CHECK:STDOUT: %p.loc15_6.1: %.6 = param p +// CHECK:STDOUT: %p.loc15_6.1: %.6 = param p, runtime_param0 // CHECK:STDOUT: @B.%p: %.6 = bind_name p, %p.loc15_6.1 // CHECK:STDOUT: %int.make_type_32.loc15_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_32.loc15_33 [template = i32] diff --git a/toolchain/check/testdata/const/collapse.carbon b/toolchain/check/testdata/const/collapse.carbon index 954bebb90747..40c48c50405b 100644 --- a/toolchain/check/testdata/const/collapse.carbon +++ b/toolchain/check/testdata/const/collapse.carbon @@ -57,7 +57,7 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: %.loc15_9.3: type = const_type i32 [template = constants.%.2] // CHECK:STDOUT: %.loc15_18: type = ptr_type %.2 [template = constants.%.3] // CHECK:STDOUT: %.loc15_19: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.loc15_6.1: %.4 = param p +// CHECK:STDOUT: %p.loc15_6.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @F.%p: %.4 = bind_name p, %p.loc15_6.1 // CHECK:STDOUT: %int.make_type_32.loc15_38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %int.make_type_32.loc15_38 [template = i32] diff --git a/toolchain/check/testdata/const/fail_collapse.carbon b/toolchain/check/testdata/const/fail_collapse.carbon index e4ac1828dc09..b32d71502c0e 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -89,7 +89,7 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: %.loc15_9: type = const_type %.2 [template = constants.%.2] // CHECK:STDOUT: %.loc15_26: type = ptr_type %.2 [template = constants.%.3] // CHECK:STDOUT: %.loc15_27: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.loc15_6.1: %.4 = param p +// CHECK:STDOUT: %p.loc15_6.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @G.%p: %.4 = bind_name p, %p.loc15_6.1 // CHECK:STDOUT: %int.make_type_32.loc15_33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_32.loc15_33 [template = i32] @@ -124,7 +124,7 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: fn @G(%p: %.4) -> %.6 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.4 = name_ref p, %p -// CHECK:STDOUT: %.loc22_11.1: init type = call constants.%ImplicitAs(constants.%.6) [template = constants.%.10] +// CHECK:STDOUT: %.loc22_11.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.6) [template = constants.%.10] // CHECK:STDOUT: %.loc22_11.2: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.6) [template = constants.%.12] // CHECK:STDOUT: %Convert.ref: %.11 = name_ref Convert, %.loc22_11.2 [template = constants.%.12] // CHECK:STDOUT: %.loc22_11.3: %.6 = converted %p.ref, [template = ] diff --git a/toolchain/check/testdata/eval/fail_symbolic.carbon b/toolchain/check/testdata/eval/fail_symbolic.carbon index e5c0f2167bf6..a2df9f5f1280 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -52,7 +52,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_32, %.loc12_10.1 [template = i32] -// CHECK:STDOUT: %N.loc12_6.1: i32 = param N +// CHECK:STDOUT: %N.loc12_6.1: i32 = param N, runtime_param // CHECK:STDOUT: @G.%N.loc12: i32 = bind_symbolic_name N 0, %N.loc12_6.1 [symbolic = @G.%N.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/eval/symbolic.carbon b/toolchain/check/testdata/eval/symbolic.carbon index ecc09cb11f3a..5a2a2f2d356d 100644 --- a/toolchain/check/testdata/eval/symbolic.carbon +++ b/toolchain/check/testdata/eval/symbolic.carbon @@ -54,7 +54,7 @@ fn F(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc12_6.1: type = param T +// CHECK:STDOUT: %T.loc12_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc12: type = bind_symbolic_name T 0, %T.loc12_6.1 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index d350b8c6524d..b1ceed45d575 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -53,12 +53,12 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] -// CHECK:STDOUT: %b.loc11_16.1: i32 = param b +// CHECK:STDOUT: %b.loc11_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: %int.make_type_32.loc11_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_32.loc11_27 [template = i32] diff --git a/toolchain/check/testdata/function/builtin/definition.carbon b/toolchain/check/testdata/function/builtin/definition.carbon index 7798732e2c70..211afc44f6b7 100644 --- a/toolchain/check/testdata/function/builtin/definition.carbon +++ b/toolchain/check/testdata/function/builtin/definition.carbon @@ -45,12 +45,12 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Add.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] -// CHECK:STDOUT: %b.loc11_16.1: i32 = param b +// CHECK:STDOUT: %b.loc11_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Add.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: %int.make_type_32.loc11_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_32.loc11_27 [template = i32] diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index 711c6c15d37d..75a16c7408d3 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -78,12 +78,12 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32] -// CHECK:STDOUT: %n.loc11_6.1: i32 = param n +// CHECK:STDOUT: %n.loc11_6.1: i32 = param n, runtime_param0 // CHECK:STDOUT: %n.loc11_6.2: i32 = bind_name n, %n.loc11_6.1 // CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_32.loc11_17 [template = i32] // CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_32.loc11_17, %.loc11_17.1 [template = i32] -// CHECK:STDOUT: %m.loc11_14.1: i32 = param m +// CHECK:STDOUT: %m.loc11_14.1: i32 = param m, runtime_param1 // CHECK:STDOUT: %m.loc11_14.2: i32 = bind_name m, %m.loc11_14.1 // CHECK:STDOUT: %int.make_type_32.loc11_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32.loc11_25 [template = i32] @@ -94,12 +94,12 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %int.make_type_32.loc19_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_32.loc19_9 [template = i32] // CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_32.loc19_9, %.loc19_9.1 [template = i32] -// CHECK:STDOUT: %n.loc19_6.1: i32 = param n +// CHECK:STDOUT: %n.loc19_6.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @A.%n: i32 = bind_name n, %n.loc19_6.1 // CHECK:STDOUT: %int.make_type_32.loc19_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_32.loc19_17 [template = i32] // CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_32.loc19_17, %.loc19_17.1 [template = i32] -// CHECK:STDOUT: %m.loc19_14.1: i32 = param m +// CHECK:STDOUT: %m.loc19_14.1: i32 = param m, runtime_param1 // CHECK:STDOUT: @A.%m: i32 = bind_name m, %m.loc19_14.1 // CHECK:STDOUT: %int.make_type_32.loc19_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_32.loc19_25 [template = i32] @@ -110,12 +110,12 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %int.make_type_32.loc21_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_9.1: type = value_of_initializer %int.make_type_32.loc21_9 [template = i32] // CHECK:STDOUT: %.loc21_9.2: type = converted %int.make_type_32.loc21_9, %.loc21_9.1 [template = i32] -// CHECK:STDOUT: %n.loc21_6.1: i32 = param n +// CHECK:STDOUT: %n.loc21_6.1: i32 = param n, runtime_param0 // CHECK:STDOUT: %n.loc21_6.2: i32 = bind_name n, %n.loc21_6.1 // CHECK:STDOUT: %int.make_type_32.loc21_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %int.make_type_32.loc21_17 [template = i32] // CHECK:STDOUT: %.loc21_17.2: type = converted %int.make_type_32.loc21_17, %.loc21_17.1 [template = i32] -// CHECK:STDOUT: %m.loc21_14.1: i32 = param m +// CHECK:STDOUT: %m.loc21_14.1: i32 = param m, runtime_param1 // CHECK:STDOUT: %m.loc21_14.2: i32 = bind_name m, %m.loc21_14.1 // CHECK:STDOUT: %int.make_type_32.loc21_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %int.make_type_32.loc21_25 [template = i32] @@ -126,12 +126,12 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %int.make_type_32.loc29_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_9.1: type = value_of_initializer %int.make_type_32.loc29_9 [template = i32] // CHECK:STDOUT: %.loc29_9.2: type = converted %int.make_type_32.loc29_9, %.loc29_9.1 [template = i32] -// CHECK:STDOUT: %n.loc29_6.1: i32 = param n +// CHECK:STDOUT: %n.loc29_6.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @B.%n: i32 = bind_name n, %n.loc29_6.1 // CHECK:STDOUT: %int.make_type_32.loc29_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_17.1: type = value_of_initializer %int.make_type_32.loc29_17 [template = i32] // CHECK:STDOUT: %.loc29_17.2: type = converted %int.make_type_32.loc29_17, %.loc29_17.1 [template = i32] -// CHECK:STDOUT: %m.loc29_14.1: i32 = param m +// CHECK:STDOUT: %m.loc29_14.1: i32 = param m, runtime_param1 // CHECK:STDOUT: @B.%m: i32 = bind_name m, %m.loc29_14.1 // CHECK:STDOUT: %int.make_type_32.loc29_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc29_25.1: type = value_of_initializer %int.make_type_32.loc29_25 [template = i32] @@ -142,12 +142,12 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %int.make_type_32.loc31_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_9.1: type = value_of_initializer %int.make_type_32.loc31_9 [template = i32] // CHECK:STDOUT: %.loc31_9.2: type = converted %int.make_type_32.loc31_9, %.loc31_9.1 [template = i32] -// CHECK:STDOUT: %n.loc31_6.1: i32 = param n +// CHECK:STDOUT: %n.loc31_6.1: i32 = param n, runtime_param0 // CHECK:STDOUT: %n.loc31_6.2: i32 = bind_name n, %n.loc31_6.1 // CHECK:STDOUT: %int.make_type_32.loc31_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_17.1: type = value_of_initializer %int.make_type_32.loc31_17 [template = i32] // CHECK:STDOUT: %.loc31_17.2: type = converted %int.make_type_32.loc31_17, %.loc31_17.1 [template = i32] -// CHECK:STDOUT: %m.loc31_14.1: i32 = param m +// CHECK:STDOUT: %m.loc31_14.1: i32 = param m, runtime_param1 // CHECK:STDOUT: %m.loc31_14.2: i32 = bind_name m, %m.loc31_14.1 // CHECK:STDOUT: %int.make_type_32.loc31_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_25.1: type = value_of_initializer %int.make_type_32.loc31_25 [template = i32] @@ -158,12 +158,12 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %int.make_type_32.loc38_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_9.1: type = value_of_initializer %int.make_type_32.loc38_9 [template = i32] // CHECK:STDOUT: %.loc38_9.2: type = converted %int.make_type_32.loc38_9, %.loc38_9.1 [template = i32] -// CHECK:STDOUT: %n.loc38_6.1: i32 = param n +// CHECK:STDOUT: %n.loc38_6.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @C.%n: i32 = bind_name n, %n.loc38_6.1 // CHECK:STDOUT: %int.make_type_32.loc38_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_17.1: type = value_of_initializer %int.make_type_32.loc38_17 [template = i32] // CHECK:STDOUT: %.loc38_17.2: type = converted %int.make_type_32.loc38_17, %.loc38_17.1 [template = i32] -// CHECK:STDOUT: %m.loc38_14.1: i32 = param m +// CHECK:STDOUT: %m.loc38_14.1: i32 = param m, runtime_param1 // CHECK:STDOUT: @C.%m: i32 = bind_name m, %m.loc38_14.1 // CHECK:STDOUT: %int.make_type_32.loc38_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_25.1: type = value_of_initializer %int.make_type_32.loc38_25 [template = i32] diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index 7c25a7d17d8f..b2529e62e2bd 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -91,12 +91,12 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %Self.ref.loc12_14: %.1 = name_ref Self, %Self [symbolic = @F.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = @F.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = @F.1.%Self (constants.%Self)] -// CHECK:STDOUT: %self.loc12_8.1: @F.1.%Self (%Self) = param self +// CHECK:STDOUT: %self.loc12_8.1: @F.1.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_8.2: @F.1.%Self (%Self) = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: %Self.ref.loc12_27: %.1 = name_ref Self, %Self [symbolic = @F.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_27.1: type = facet_type_access %Self.ref.loc12_27 [symbolic = @F.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_27.2: type = converted %Self.ref.loc12_27, %.loc12_27.1 [symbolic = @F.1.%Self (constants.%Self)] -// CHECK:STDOUT: %other.loc12_20.1: @F.1.%Self (%Self) = param other +// CHECK:STDOUT: %other.loc12_20.1: @F.1.%Self (%Self) = param other, runtime_param1 // CHECK:STDOUT: %other.loc12_20.2: @F.1.%Self (%Self) = bind_name other, %other.loc12_20.1 // CHECK:STDOUT: %Self.ref.loc12_36: %.1 = name_ref Self, %Self [symbolic = @F.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_36.1: type = facet_type_access %Self.ref.loc12_36 [symbolic = @F.1.%Self (constants.%Self)] @@ -116,12 +116,12 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %int.make_type_32.loc16_14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_14.1: type = value_of_initializer %int.make_type_32.loc16_14 [template = i32] // CHECK:STDOUT: %.loc16_14.2: type = converted %int.make_type_32.loc16_14, %.loc16_14.1 [template = i32] -// CHECK:STDOUT: %self.loc16_8.1: i32 = param self +// CHECK:STDOUT: %self.loc16_8.1: i32 = param self, runtime_param0 // CHECK:STDOUT: %self.loc16_8.2: i32 = bind_name self, %self.loc16_8.1 // CHECK:STDOUT: %int.make_type_32.loc16_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_26.1: type = value_of_initializer %int.make_type_32.loc16_26 [template = i32] // CHECK:STDOUT: %.loc16_26.2: type = converted %int.make_type_32.loc16_26, %.loc16_26.1 [template = i32] -// CHECK:STDOUT: %other.loc16_19.1: i32 = param other +// CHECK:STDOUT: %other.loc16_19.1: i32 = param other, runtime_param1 // CHECK:STDOUT: %other.loc16_19.2: i32 = bind_name other, %other.loc16_19.1 // CHECK:STDOUT: %int.make_type_32.loc16_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_34.1: type = value_of_initializer %int.make_type_32.loc16_34 [template = i32] diff --git a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon index df00bb9aa1f2..adbb072fb2ba 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon @@ -61,12 +61,12 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %Self.ref.loc7_15: %.2 = name_ref Self, %Self [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc7_15.1: type = facet_type_access %Self.ref.loc7_15 [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc7_15.2: type = converted %Self.ref.loc7_15, %.loc7_15.1 [symbolic = @Op.%Self (constants.%Self)] -// CHECK:STDOUT: %self.loc7_9.1: @Op.%Self (%Self) = param self +// CHECK:STDOUT: %self.loc7_9.1: @Op.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self.loc7_9.2: @Op.%Self (%Self) = bind_name self, %self.loc7_9.1 // CHECK:STDOUT: %Self.ref.loc7_28: %.2 = name_ref Self, %Self [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc7_28.1: type = facet_type_access %Self.ref.loc7_28 [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc7_28.2: type = converted %Self.ref.loc7_28, %.loc7_28.1 [symbolic = @Op.%Self (constants.%Self)] -// CHECK:STDOUT: %other.loc7_21.1: @Op.%Self (%Self) = param other +// CHECK:STDOUT: %other.loc7_21.1: @Op.%Self (%Self) = param other, runtime_param1 // CHECK:STDOUT: %other.loc7_21.2: @Op.%Self (%Self) = bind_name other, %other.loc7_21.1 // CHECK:STDOUT: %Self.ref.loc7_37: %.2 = name_ref Self, %Self [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc7_37.1: type = facet_type_access %Self.ref.loc7_37 [symbolic = @Op.%Self (constants.%Self)] @@ -173,10 +173,10 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: impl @impl: i32 as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, i32 [template = i32] -// CHECK:STDOUT: %self.loc7_9.1: i32 = param self +// CHECK:STDOUT: %self.loc7_9.1: i32 = param self, runtime_param0 // CHECK:STDOUT: %self.loc7_9.2: i32 = bind_name self, %self.loc7_9.1 // CHECK:STDOUT: %Self.ref.loc7_28: type = name_ref Self, i32 [template = i32] -// CHECK:STDOUT: %other.loc7_21.1: i32 = param other +// CHECK:STDOUT: %other.loc7_21.1: i32 = param other, runtime_param1 // CHECK:STDOUT: %other.loc7_21.2: i32 = bind_name other, %other.loc7_21.1 // CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, i32 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var diff --git a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon index c094d11ec98a..827dfd83ead6 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon @@ -43,12 +43,12 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3); // CHECK:STDOUT: %int.make_type_32.loc5_15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_32.loc5_15 [template = i32] // CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_32.loc5_15, %.loc5_15.1 [template = i32] -// CHECK:STDOUT: %a.loc5_12.1: i32 = param a +// CHECK:STDOUT: %a.loc5_12.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @TestAdd.%a: i32 = bind_name a, %a.loc5_12.1 // CHECK:STDOUT: %int.make_type_32.loc5_23: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_23.1: type = value_of_initializer %int.make_type_32.loc5_23 [template = i32] // CHECK:STDOUT: %.loc5_23.2: type = converted %int.make_type_32.loc5_23, %.loc5_23.1 [template = i32] -// CHECK:STDOUT: %b.loc5_20.1: i32 = param b +// CHECK:STDOUT: %b.loc5_20.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @TestAdd.%b: i32 = bind_name b, %b.loc5_20.1 // CHECK:STDOUT: %int.make_type_32.loc5_31: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_31.1: type = value_of_initializer %int.make_type_32.loc5_31 [template = i32] diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index 103712284cf1..0e9110926b36 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -111,19 +111,19 @@ fn Main() { // CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_12.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32] // CHECK:STDOUT: %.loc12_12.2: type = converted %int.make_type_32.loc12, %.loc12_12.1 [template = i32] -// CHECK:STDOUT: %a.loc12_9.1: i32 = param a +// CHECK:STDOUT: %a.loc12_9.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Run1.%a: i32 = bind_name a, %a.loc12_9.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Run2.decl: %Run2.type = fn_decl @Run2 [template = constants.%Run2] { // CHECK:STDOUT: %int.make_type_32.loc13_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_32.loc13_12 [template = i32] // CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_32.loc13_12, %.loc13_12.1 [template = i32] -// CHECK:STDOUT: %a.loc13_9.1: i32 = param a +// CHECK:STDOUT: %a.loc13_9.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Run2.%a: i32 = bind_name a, %a.loc13_9.1 // CHECK:STDOUT: %int.make_type_32.loc13_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_20.1: type = value_of_initializer %int.make_type_32.loc13_20 [template = i32] // CHECK:STDOUT: %.loc13_20.2: type = converted %int.make_type_32.loc13_20, %.loc13_20.1 [template = i32] -// CHECK:STDOUT: %b.loc13_17.1: i32 = param b +// CHECK:STDOUT: %b.loc13_17.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Run2.%b: i32 = bind_name b, %b.loc13_17.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} @@ -150,22 +150,16 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Run0.ref.loc23: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0] // CHECK:STDOUT: %.loc23: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Run0.call.loc23: init %.1 = call %Run0.ref.loc23() [template = ] // CHECK:STDOUT: %Run0.ref.loc31: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0] // CHECK:STDOUT: %.loc31_8: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc31_11: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Run0.call.loc31: init %.1 = call %Run0.ref.loc31() [template = ] // CHECK:STDOUT: %Run1.ref.loc40: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1] -// CHECK:STDOUT: %Run1.call.loc40: init %.1 = call %Run1.ref.loc40() [template = ] // CHECK:STDOUT: %Run1.ref.loc48: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1] // CHECK:STDOUT: %.loc48_8: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: %.loc48_11: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %Run1.call.loc48: init %.1 = call %Run1.ref.loc48() [template = ] // CHECK:STDOUT: %Run2.ref.loc57: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2] -// CHECK:STDOUT: %Run2.call.loc57: init %.1 = call %Run2.ref.loc57() [template = ] // CHECK:STDOUT: %Run2.ref.loc64: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2] // CHECK:STDOUT: %.loc64: i32 = int_literal 0 [template = constants.%.3] -// CHECK:STDOUT: %Run2.call.loc64: init %.1 = call %Run2.ref.loc64() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/fail_param_type.carbon b/toolchain/check/testdata/function/call/fail_param_type.carbon index c8e2156943e2..aa4f5f21ba54 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -85,7 +85,7 @@ fn F() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32, %.loc11_9.1 [template = i32] -// CHECK:STDOUT: %a.loc11_6.1: i32 = param a +// CHECK:STDOUT: %a.loc11_6.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @G.%a: i32 = bind_name a, %a.loc11_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} @@ -121,7 +121,7 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc23_5: f64 = float_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc23_4.1: init type = call constants.%ImplicitAs(i32) [template = constants.%.6] +// CHECK:STDOUT: %.loc23_4.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.6] // CHECK:STDOUT: %.loc23_4.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc23_4.2 [template = constants.%.8] // CHECK:STDOUT: %.loc23_4.3: i32 = converted %.loc23_5, [template = ] diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index 5092bf5b6a55..2efef06a47af 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -129,7 +129,7 @@ fn Run() { // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %Foo.call: init f64 = call %Foo.ref() -// CHECK:STDOUT: %.loc20_21.1: init type = call constants.%ImplicitAs(i32) [template = constants.%.7] +// CHECK:STDOUT: %.loc20_21.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.7] // CHECK:STDOUT: %.loc20_21.2: %.8 = specific_constant imports.%import_ref.5, @ImplicitAs(i32) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc20_21.2 [template = constants.%.9] // CHECK:STDOUT: %.loc20_19.1: ref f64 = temporary_storage diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index c3391e5e9850..6dccbd5c190a 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -55,7 +55,7 @@ fn Main() { // CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32] // CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11_12, %.loc11_12.1 [template = i32] -// CHECK:STDOUT: %a.loc11_9.1: i32 = param a +// CHECK:STDOUT: %a.loc11_9.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Echo.%a: i32 = bind_name a, %a.loc11_9.1 // CHECK:STDOUT: %int.make_type_32.loc11_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %int.make_type_32.loc11_20 [template = i32] diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index 6a07213e472d..85d67eb97580 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -60,12 +60,12 @@ fn Main() { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] -// CHECK:STDOUT: %b.loc11_16.1: i32 = param b +// CHECK:STDOUT: %b.loc11_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} diff --git a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon index c028fcf2e77c..c7f57e415bd1 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon @@ -36,7 +36,7 @@ fn Main() { // CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] { // CHECK:STDOUT: %.loc11_13.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.loc11_9.1: %.1 = param a +// CHECK:STDOUT: %a.loc11_9.1: %.1 = param a, runtime_param0 // CHECK:STDOUT: @Echo.%a: %.1 = bind_name a, %a.loc11_9.1 // CHECK:STDOUT: %.loc11_20.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1] diff --git a/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon b/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon index e9618a02b4d4..917ac926aa50 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon @@ -35,7 +35,7 @@ fn Main() { // CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] { // CHECK:STDOUT: %.loc11_13.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %a.loc11_9.1: %.1 = param a +// CHECK:STDOUT: %a.loc11_9.1: %.1 = param a, runtime_param0 // CHECK:STDOUT: @Echo.%a: %.1 = bind_name a, %a.loc11_9.1 // CHECK:STDOUT: %.loc11_20.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1] diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index abc9eea42814..fd663b37adc0 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -53,7 +53,7 @@ fn Main() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index f9156d8aa122..5f5001b96aa6 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -54,7 +54,7 @@ fn Main() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index cfd9d889c539..b0e68ad29234 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -54,12 +54,12 @@ fn Main() { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] -// CHECK:STDOUT: %b.loc11_16.1: i32 = param b +// CHECK:STDOUT: %b.loc11_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index 717062035518..b949c498ba8f 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -55,12 +55,12 @@ fn Main() { // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] -// CHECK:STDOUT: %b.loc11_16.1: i32 = param b +// CHECK:STDOUT: %b.loc11_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} diff --git a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon index 805dc628a04f..73d6b73ab7ca 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon @@ -48,12 +48,12 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32] // CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32.loc14_9, %.loc14_9.1 [template = i32] -// CHECK:STDOUT: %n.loc14_6.1: i32 = param n +// CHECK:STDOUT: %n.loc14_6.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @F.%n: i32 = bind_name n, %n.loc14_6.1 // CHECK:STDOUT: %int.make_type_32.loc14_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %n.ref: i32 = name_ref n, @F.%n // CHECK:STDOUT: %.loc14_25: type = ptr_type [template = ] -// CHECK:STDOUT: %a.loc14_14.1: = param a +// CHECK:STDOUT: %a.loc14_14.1: = param a, runtime_param1 // CHECK:STDOUT: @F.%a: = bind_name a, %a.loc14_14.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon index 0e0024e738b0..f1130a843d31 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon @@ -51,12 +51,12 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: %int.make_type_32.loc17_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_9.1: type = value_of_initializer %int.make_type_32.loc17_9 [template = i32] // CHECK:STDOUT: %.loc17_9.2: type = converted %int.make_type_32.loc17_9, %.loc17_9.1 [template = i32] -// CHECK:STDOUT: %n.loc17_6.1: i32 = param n +// CHECK:STDOUT: %n.loc17_6.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @F.%n.loc17_6: i32 = bind_name n, %n.loc17_6.1 // CHECK:STDOUT: %int.make_type_32.loc17_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_17.1: type = value_of_initializer %int.make_type_32.loc17_17 [template = i32] // CHECK:STDOUT: %.loc17_17.2: type = converted %int.make_type_32.loc17_17, %.loc17_17.1 [template = i32] -// CHECK:STDOUT: %n.loc17_14.1: i32 = param n +// CHECK:STDOUT: %n.loc17_14.1: i32 = param n, runtime_param1 // CHECK:STDOUT: @F.%n.loc17_14: i32 = bind_name n, %n.loc17_14.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index 8334c3746b9a..3a13afae5df0 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -356,7 +356,7 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_32.loc5_9 [template = i32] // CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_32.loc5_9, %.loc5_9.1 [template = i32] -// CHECK:STDOUT: %b.loc5_6.1: i32 = param b +// CHECK:STDOUT: %b.loc5_6.1: i32 = param b, runtime_param0 // CHECK:STDOUT: @B.%b: i32 = bind_name b, %b.loc5_6.1 // CHECK:STDOUT: %int.make_type_32.loc5_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_32.loc5_17 [template = i32] @@ -369,7 +369,7 @@ import library "extern_api"; // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32] // CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %c.loc6_6.1: %.3 = param c +// CHECK:STDOUT: %c.loc6_6.1: %.3 = param c, runtime_param0 // CHECK:STDOUT: @C.%c: %.3 = bind_name c, %c.loc6_6.1 // CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32] @@ -447,7 +447,7 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_32.loc5_44: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_32.loc5_44 [template = i32] // CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_32.loc5_44, %.loc5_44.1 [template = i32] -// CHECK:STDOUT: %b.loc5_41.1: i32 = param b +// CHECK:STDOUT: %b.loc5_41.1: i32 = param b, runtime_param0 // CHECK:STDOUT: @B.%b: i32 = bind_name b, %b.loc5_41.1 // CHECK:STDOUT: %int.make_type_32.loc5_52: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_52.1: type = value_of_initializer %int.make_type_32.loc5_52 [template = i32] @@ -460,7 +460,7 @@ import library "extern_api"; // CHECK:STDOUT: %.loc6_49.2: type = value_of_initializer %int.make_type_32.loc6_45 [template = i32] // CHECK:STDOUT: %.loc6_49.3: type = converted %int.make_type_32.loc6_45, %.loc6_49.2 [template = i32] // CHECK:STDOUT: %.loc6_49.4: type = converted %.loc6_49.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %c.loc6_41.1: %.3 = param c +// CHECK:STDOUT: %c.loc6_41.1: %.3 = param c, runtime_param0 // CHECK:STDOUT: @C.%c: %.3 = bind_name c, %c.loc6_41.1 // CHECK:STDOUT: %int.make_type_32.loc6_60: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_60.1: type = value_of_initializer %int.make_type_32.loc6_60 [template = i32] @@ -680,7 +680,7 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_32.loc27_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_16.1: type = value_of_initializer %int.make_type_32.loc27_16 [template = i32] // CHECK:STDOUT: %.loc27_16.2: type = converted %int.make_type_32.loc27_16, %.loc27_16.1 [template = i32] -// CHECK:STDOUT: %b.loc27_13.1: i32 = param b +// CHECK:STDOUT: %b.loc27_13.1: i32 = param b, runtime_param0 // CHECK:STDOUT: %b.loc27_13.2: i32 = bind_name b, %b.loc27_13.1 // CHECK:STDOUT: %int.make_type_32.loc27_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_24.1: type = value_of_initializer %int.make_type_32.loc27_24 [template = i32] @@ -693,7 +693,7 @@ import library "extern_api"; // CHECK:STDOUT: %.loc38_21.2: type = value_of_initializer %int.make_type_32.loc38_17 [template = i32] // CHECK:STDOUT: %.loc38_21.3: type = converted %int.make_type_32.loc38_17, %.loc38_21.2 [template = i32] // CHECK:STDOUT: %.loc38_21.4: type = converted %.loc38_21.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %c.loc38_13.1: %.3 = param c +// CHECK:STDOUT: %c.loc38_13.1: %.3 = param c, runtime_param0 // CHECK:STDOUT: %c.loc38_13.2: %.3 = bind_name c, %c.loc38_13.1 // CHECK:STDOUT: %int.make_type_32.loc38_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc38_32.1: type = value_of_initializer %int.make_type_32.loc38_32 [template = i32] @@ -834,7 +834,7 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_32.loc7_16: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_32.loc7_16 [template = i32] // CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_32.loc7_16, %.loc7_16.1 [template = i32] -// CHECK:STDOUT: %b.loc7_13.1: i32 = param b +// CHECK:STDOUT: %b.loc7_13.1: i32 = param b, runtime_param0 // CHECK:STDOUT: %b.loc7_13.2: i32 = bind_name b, %b.loc7_13.1 // CHECK:STDOUT: %int.make_type_32.loc7_24: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_24.1: type = value_of_initializer %int.make_type_32.loc7_24 [template = i32] @@ -847,7 +847,7 @@ import library "extern_api"; // CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_32.loc8_17 [template = i32] // CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_32.loc8_17, %.loc8_21.2 [template = i32] // CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %c.loc8_13.1: %.3 = param c +// CHECK:STDOUT: %c.loc8_13.1: %.3 = param c, runtime_param0 // CHECK:STDOUT: %c.loc8_13.2: %.3 = bind_name c, %c.loc8_13.1 // CHECK:STDOUT: %int.make_type_32.loc8_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_32.loc8_32 [template = i32] diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon index 02d0af65de14..9a95b8828983 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon @@ -174,7 +174,7 @@ class C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %self.loc13_15.1: %C = param self +// CHECK:STDOUT: %self.loc13_15.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_15.2: %C = bind_name self, %self.loc13_15.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon new file mode 100644 index 000000000000..484b39e6fbf5 --- /dev/null +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon @@ -0,0 +1,23 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon + +// CHECK:STDERR: fail_pattern_in_signature.carbon:[[@LINE+7]]:6: ERROR: Expected binding pattern. +// CHECK:STDERR: fn F((a: {}, b: {}), c: {}); +// CHECK:STDERR: ^ +// CHECK:STDERR: +// CHECK:STDERR: fail_pattern_in_signature.carbon:[[@LINE+3]]:6: ERROR: Semantics TODO: `Error recovery from keyword name.`. +// CHECK:STDERR: fn F((a: {}, b: {}), c: {}); +// CHECK:STDERR: ^ +fn F((a: {}, b: {}), c: {}); + +// CHECK:STDOUT: --- fail_pattern_in_signature.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: file {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon index ef488e64ff51..9d43a458fd5f 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon @@ -88,20 +88,20 @@ fn E() {} // CHECK:STDOUT: %B.decl.loc21: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc21_6.1: %.1 = param x +// CHECK:STDOUT: %x.loc21_6.1: %.1 = param x, runtime_param0 // CHECK:STDOUT: @B.%x: %.1 = bind_name x, %x.loc21_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %.loc29_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc29_6.1: %.1 = param x +// CHECK:STDOUT: %x.loc29_6.1: %.1 = param x, runtime_param0 // CHECK:STDOUT: %x.loc29_6.2: %.1 = bind_name x, %x.loc29_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %.loc39_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc39_6.1: %.1 = param x +// CHECK:STDOUT: %x.loc39_6.1: %.1 = param x, runtime_param0 // CHECK:STDOUT: @.1.%x: %.1 = bind_name x, %x.loc39_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl.loc41: %D.type = fn_decl @D [template = constants.%D] {} diff --git a/toolchain/check/testdata/function/declaration/param_same_name.carbon b/toolchain/check/testdata/function/declaration/param_same_name.carbon index 279c5545fc4d..01931ce90b51 100644 --- a/toolchain/check/testdata/function/declaration/param_same_name.carbon +++ b/toolchain/check/testdata/function/declaration/param_same_name.carbon @@ -50,14 +50,14 @@ fn G(a: i32); // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32] -// CHECK:STDOUT: %a.loc11_6.1: i32 = param a +// CHECK:STDOUT: %a.loc11_6.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc11_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_9.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_9.2: type = converted %int.make_type_32.loc13, %.loc13_9.1 [template = i32] -// CHECK:STDOUT: %a.loc13_6.1: i32 = param a +// CHECK:STDOUT: %a.loc13_6.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @G.%a: i32 = bind_name a, %a.loc13_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index f01f46570fac..fcb66f391488 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -168,7 +168,7 @@ fn D() {} // CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_32.loc5_9 [template = i32] // CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_32.loc5_9, %.loc5_9.1 [template = i32] -// CHECK:STDOUT: %b.loc5_6.1: i32 = param b +// CHECK:STDOUT: %b.loc5_6.1: i32 = param b, runtime_param0 // CHECK:STDOUT: @B.%b: i32 = bind_name b, %b.loc5_6.1 // CHECK:STDOUT: %int.make_type_32.loc5_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_32.loc5_17 [template = i32] @@ -181,7 +181,7 @@ fn D() {} // CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32] // CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32] // CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3] -// CHECK:STDOUT: %c.loc6_6.1: %.3 = param c +// CHECK:STDOUT: %c.loc6_6.1: %.3 = param c, runtime_param0 // CHECK:STDOUT: @C.%c: %.3 = bind_name c, %c.loc6_6.1 // CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32] @@ -390,7 +390,7 @@ fn D() {} // CHECK:STDOUT: %int.make_type_32.loc27_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_9.1: type = value_of_initializer %int.make_type_32.loc27_9 [template = i32] // CHECK:STDOUT: %.loc27_9.2: type = converted %int.make_type_32.loc27_9, %.loc27_9.1 [template = i32] -// CHECK:STDOUT: %b.loc27_6.1: i32 = param b +// CHECK:STDOUT: %b.loc27_6.1: i32 = param b, runtime_param0 // CHECK:STDOUT: %b.loc27_6.2: i32 = bind_name b, %b.loc27_6.1 // CHECK:STDOUT: %int.make_type_32.loc27_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_17.1: type = value_of_initializer %int.make_type_32.loc27_17 [template = i32] diff --git a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon index e1f870fcc407..d5006930eb40 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon @@ -110,24 +110,24 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: %.decl.loc19: %.type.1 = fn_decl @.1 [template = constants.%.2] { // CHECK:STDOUT: %.loc19_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc19_6.1: %.1 = param x +// CHECK:STDOUT: %x.loc19_6.1: %.1 = param x, runtime_param0 // CHECK:STDOUT: @.1.%x: %.1 = bind_name x, %x.loc19_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc21_6.1: %.1 = param x +// CHECK:STDOUT: %x.loc21_6.1: %.1 = param x, runtime_param0 // CHECK:STDOUT: @G.%x: %.1 = bind_name x, %x.loc21_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc29: %.type.2 = fn_decl @.2 [template = constants.%.3] {} // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { // CHECK:STDOUT: %.loc31_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc31_6.1: %.1 = param x +// CHECK:STDOUT: %x.loc31_6.1: %.1 = param x, runtime_param0 // CHECK:STDOUT: @H.%x: %.1 = bind_name x, %x.loc31_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc36: %.type.3 = fn_decl @.3 [template = constants.%.4] { -// CHECK:STDOUT: %x.loc36_6.1: = param x +// CHECK:STDOUT: %x.loc36_6.1: = param x, runtime_param0 // CHECK:STDOUT: @.3.%x: = bind_name x, %x.loc36_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: %I.type = fn_decl @I [template = constants.%I] {} diff --git a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon index 586845e52117..59c7859848ee 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon @@ -193,22 +193,22 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_8.1: %C = param a +// CHECK:STDOUT: %a.loc7_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: %a.loc7_8.2: %C = bind_name a, %a.loc7_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc8_8.1: %C = param a +// CHECK:STDOUT: %a.loc8_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc8_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %D.ref.loc10: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc10_8.1: %C = param a +// CHECK:STDOUT: %a.loc10_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: %a.loc10_8.2: %C = bind_name a, %a.loc10_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %D.ref.loc11: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc11_8.1: %C = param a +// CHECK:STDOUT: %a.loc11_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Bar.%a: %C = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -247,12 +247,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_14.1: %C = param a +// CHECK:STDOUT: %a.loc6_14.1: %C = param a, runtime_param0 // CHECK:STDOUT: %a.loc6_14.2: %C = bind_name a, %a.loc6_14.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_10.1: %C = param a +// CHECK:STDOUT: %a.loc7_10.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc7_10.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -288,12 +288,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_8.1: %C = param a +// CHECK:STDOUT: %a.loc6_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc6_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc14_8.1: %C = param a +// CHECK:STDOUT: %a.loc14_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @.1.%a: %C = bind_name a, %a.loc14_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -329,12 +329,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_8.1: %C = param a +// CHECK:STDOUT: %a.loc6_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: %a.loc6_8.2: %C = bind_name a, %a.loc6_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_8.1: %C = param a +// CHECK:STDOUT: %a.loc7_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc7_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -373,12 +373,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_8.1: %C = param a +// CHECK:STDOUT: %a.loc7_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc7_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc8_8.1: %C = param a +// CHECK:STDOUT: %a.loc8_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Bar.%a: %C = bind_name a, %a.loc8_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -424,12 +424,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %a.loc4_8.1: %C = param a +// CHECK:STDOUT: %a.loc4_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc4_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %a.loc5_8.1: %C = param a +// CHECK:STDOUT: %a.loc5_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Bar.%a: %C = bind_name a, %a.loc5_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -473,12 +473,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_8.1: %C = param a +// CHECK:STDOUT: %a.loc7_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc7_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %b.loc15_8.1: %C = param b +// CHECK:STDOUT: %b.loc15_8.1: %C = param b, runtime_param0 // CHECK:STDOUT: @.1.%b: %C = bind_name b, %b.loc15_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -519,12 +519,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_8.1: %C = param a +// CHECK:STDOUT: %a.loc7_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc7_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc15_8.1: %C = param a +// CHECK:STDOUT: %a.loc15_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @.1.%a: %C = bind_name a, %a.loc15_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -565,12 +565,12 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_8.1: %C = param a +// CHECK:STDOUT: %a.loc7_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc7_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc15_8.1: %C = param a +// CHECK:STDOUT: %a.loc15_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @.1.%a: %C = bind_name a, %a.loc15_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -649,7 +649,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_8.1: %C = param a +// CHECK:STDOUT: %a.loc6_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc6_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -690,7 +690,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc6_8.1: %C = param a +// CHECK:STDOUT: %a.loc6_8.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %C = bind_name a, %a.loc6_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -728,14 +728,14 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc6: type = const_type %C [template = constants.%.2] -// CHECK:STDOUT: %a.loc6_8.1: %.2 = param a +// CHECK:STDOUT: %a.loc6_8.1: %.2 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: %.2 = bind_name a, %a.loc6_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc17_18: type = const_type %C [template = constants.%.2] // CHECK:STDOUT: %.loc17_11: type = const_type %.2 [template = constants.%.2] -// CHECK:STDOUT: %a.loc17_8.1: %.2 = param a +// CHECK:STDOUT: %a.loc17_8.1: %.2 = param a, runtime_param0 // CHECK:STDOUT: @.1.%a: %.2 = bind_name a, %a.loc17_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_one.carbon b/toolchain/check/testdata/function/definition/params_one.carbon index 19eea7418d63..665f1baf3193 100644 --- a/toolchain/check/testdata/function/definition/params_one.carbon +++ b/toolchain/check/testdata/function/definition/params_one.carbon @@ -45,7 +45,7 @@ fn Foo(a: i32) {} // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_one_comma.carbon b/toolchain/check/testdata/function/definition/params_one_comma.carbon index 0d0bdcbd2d5d..8f939fb28d45 100644 --- a/toolchain/check/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_one_comma.carbon @@ -45,7 +45,7 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_two.carbon b/toolchain/check/testdata/function/definition/params_two.carbon index 2d5f323f9f39..a9b95adbbe56 100644 --- a/toolchain/check/testdata/function/definition/params_two.carbon +++ b/toolchain/check/testdata/function/definition/params_two.carbon @@ -45,12 +45,12 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] -// CHECK:STDOUT: %b.loc11_16.1: i32 = param b +// CHECK:STDOUT: %b.loc11_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_two_comma.carbon b/toolchain/check/testdata/function/definition/params_two_comma.carbon index 6cf10f9585d7..c08512b92e4e 100644 --- a/toolchain/check/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_two_comma.carbon @@ -45,12 +45,12 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32] -// CHECK:STDOUT: %a.loc11_8.1: i32 = param a +// CHECK:STDOUT: %a.loc11_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32] // CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_32.loc11_19, %.loc11_19.1 [template = i32] -// CHECK:STDOUT: %b.loc11_16.1: i32 = param b +// CHECK:STDOUT: %b.loc11_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index a55ccec7221a..b1eb1e616ea4 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -42,17 +42,13 @@ fn CallExplicitAndAlsoDeduced(n: i32) -> i32* { return ExplicitAndAlsoDeduced(A, {}); } -// --- fail_todo_deduce_implicit.carbon +// --- deduce_implicit.carbon library "[[@TEST_NAME]]"; fn ImplicitGenericParam[T:! type](x: T) -> T*; fn CallImplicitGenericParam(n: i32) -> i32* { - // CHECK:STDERR: fail_todo_deduce_implicit.carbon:[[@LINE+4]]:10: ERROR: Semantics TODO: `Call with implicit parameters`. - // CHECK:STDERR: return ImplicitGenericParam(n); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: return ImplicitGenericParam(n); } @@ -164,7 +160,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ExplicitGenericParam.decl: %ExplicitGenericParam.type = fn_decl @ExplicitGenericParam [template = constants.%ExplicitGenericParam] { -// CHECK:STDOUT: %T.loc4_25.1: type = param T +// CHECK:STDOUT: %T.loc4_25.1: type = param T, runtime_param // CHECK:STDOUT: @ExplicitGenericParam.%T.loc4: type = bind_symbolic_name T 0, %T.loc4_25.1 [symbolic = @ExplicitGenericParam.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, @ExplicitGenericParam.%T.loc4 [symbolic = @ExplicitGenericParam.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc4: type = ptr_type %T [symbolic = @ExplicitGenericParam.%.1 (constants.%.1)] @@ -178,7 +174,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: @CallExplicitGenericParam.%return: ref %.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg.decl: %CallExplicitGenericParamWithGenericArg.type = fn_decl @CallExplicitGenericParamWithGenericArg [template = constants.%CallExplicitGenericParamWithGenericArg] { -// CHECK:STDOUT: %T.loc10_43.1: type = param T +// CHECK:STDOUT: %T.loc10_43.1: type = param T, runtime_param // CHECK:STDOUT: @CallExplicitGenericParamWithGenericArg.%T.loc10: type = bind_symbolic_name T 0, %T.loc10_43.1 [symbolic = @CallExplicitGenericParamWithGenericArg.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc10: type = name_ref T, @CallExplicitGenericParamWithGenericArg.%T.loc10 [symbolic = @CallExplicitGenericParamWithGenericArg.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc10_62: type = struct_type {.a: %T} [symbolic = @CallExplicitGenericParamWithGenericArg.%.1 (constants.%.4)] @@ -202,7 +198,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_32, %.loc7_30.1 [template = i32] -// CHECK:STDOUT: %ExplicitGenericParam.call: init %.3 = call %ExplicitGenericParam.ref(%.loc7_30.2) +// CHECK:STDOUT: %ExplicitGenericParam.call: init %.3 = call %ExplicitGenericParam.ref() // CHECK:STDOUT: %.loc7_35.1: %.3 = value_of_initializer %ExplicitGenericParam.call // CHECK:STDOUT: %.loc7_35.2: %.3 = converted %ExplicitGenericParam.call, %.loc7_35.1 // CHECK:STDOUT: return %.loc7_35.2 @@ -220,7 +216,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %.loc11_37: type = struct_type {.a: %T} [symbolic = %.1 (constants.%.4)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamWithGenericArg.%.2 (%.5) = call %ExplicitGenericParam.ref(%.loc11_37) +// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamWithGenericArg.%.2 (%.5) = call %ExplicitGenericParam.ref() // CHECK:STDOUT: %.loc11_39.1: @CallExplicitGenericParamWithGenericArg.%.2 (%.5) = value_of_initializer %ExplicitGenericParam.call // CHECK:STDOUT: %.loc11_39.2: @CallExplicitGenericParamWithGenericArg.%.2 (%.5) = converted %ExplicitGenericParam.call, %.loc11_39.1 // CHECK:STDOUT: return %.loc11_39.2 @@ -290,10 +286,10 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} // CHECK:STDOUT: %ExplicitAndAlsoDeduced.decl: %ExplicitAndAlsoDeduced.type = fn_decl @ExplicitAndAlsoDeduced [template = constants.%ExplicitAndAlsoDeduced] { -// CHECK:STDOUT: %T.loc6_27.1: type = param T +// CHECK:STDOUT: %T.loc6_27.1: type = param T, runtime_param // CHECK:STDOUT: @ExplicitAndAlsoDeduced.%T.loc6: type = bind_symbolic_name T 0, %T.loc6_27.1 [symbolic = @ExplicitAndAlsoDeduced.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc6_40: type = name_ref T, @ExplicitAndAlsoDeduced.%T.loc6 [symbolic = @ExplicitAndAlsoDeduced.%T.1 (constants.%T)] -// CHECK:STDOUT: %x.loc6_37.1: @ExplicitAndAlsoDeduced.%T.1 (%T) = param x +// CHECK:STDOUT: %x.loc6_37.1: @ExplicitAndAlsoDeduced.%T.1 (%T) = param x, runtime_param0 // CHECK:STDOUT: @ExplicitAndAlsoDeduced.%x: @ExplicitAndAlsoDeduced.%T.1 (%T) = bind_name x, %x.loc6_37.1 // CHECK:STDOUT: %T.ref.loc6_46: type = name_ref T, @ExplicitAndAlsoDeduced.%T.loc6 [symbolic = @ExplicitAndAlsoDeduced.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc6: type = ptr_type %T [symbolic = @ExplicitAndAlsoDeduced.%.1 (constants.%.2)] @@ -303,7 +299,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %int.make_type_32.loc9_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_34.1: type = value_of_initializer %int.make_type_32.loc9_34 [template = i32] // CHECK:STDOUT: %.loc9_34.2: type = converted %int.make_type_32.loc9_34, %.loc9_34.1 [template = i32] -// CHECK:STDOUT: %n.loc9_31.1: i32 = param n +// CHECK:STDOUT: %n.loc9_31.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @CallExplicitAndAlsoDeduced.%n: i32 = bind_name n, %n.loc9_31.1 // CHECK:STDOUT: %int.make_type_32.loc9_42: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc9_45.1: type = value_of_initializer %int.make_type_32.loc9_42 [template = i32] @@ -340,7 +336,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.1 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_deduce_implicit.carbon +// CHECK:STDOUT: --- deduce_implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] @@ -378,10 +374,10 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ImplicitGenericParam.decl: %ImplicitGenericParam.type = fn_decl @ImplicitGenericParam [template = constants.%ImplicitGenericParam] { -// CHECK:STDOUT: %T.loc4_25.1: type = param T +// CHECK:STDOUT: %T.loc4_25.1: type = param T, runtime_param // CHECK:STDOUT: @ImplicitGenericParam.%T.loc4: type = bind_symbolic_name T 0, %T.loc4_25.1 [symbolic = @ImplicitGenericParam.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, @ImplicitGenericParam.%T.loc4 [symbolic = @ImplicitGenericParam.%T.1 (constants.%T)] -// CHECK:STDOUT: %x.loc4_35.1: @ImplicitGenericParam.%T.1 (%T) = param x +// CHECK:STDOUT: %x.loc4_35.1: @ImplicitGenericParam.%T.1 (%T) = param x, runtime_param0 // CHECK:STDOUT: @ImplicitGenericParam.%x: @ImplicitGenericParam.%T.1 (%T) = bind_name x, %x.loc4_35.1 // CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, @ImplicitGenericParam.%T.loc4 [symbolic = @ImplicitGenericParam.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc4: type = ptr_type %T [symbolic = @ImplicitGenericParam.%.1 (constants.%.1)] @@ -391,7 +387,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %int.make_type_32.loc6_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_32.1: type = value_of_initializer %int.make_type_32.loc6_32 [template = i32] // CHECK:STDOUT: %.loc6_32.2: type = converted %int.make_type_32.loc6_32, %.loc6_32.1 [template = i32] -// CHECK:STDOUT: %n.loc6_29.1: i32 = param n +// CHECK:STDOUT: %n.loc6_29.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @CallImplicitGenericParam.%n: i32 = bind_name n, %n.loc6_29.1 // CHECK:STDOUT: %int.make_type_32.loc6_40: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc6_43.1: type = value_of_initializer %int.make_type_32.loc6_40 [template = i32] @@ -414,10 +410,10 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitGenericParam.ref: %ImplicitGenericParam.type = name_ref ImplicitGenericParam, file.%ImplicitGenericParam.decl [template = constants.%ImplicitGenericParam] // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n -// CHECK:STDOUT: %ImplicitGenericParam.call: init %.3 = call %ImplicitGenericParam.ref() [template = ] -// CHECK:STDOUT: %.loc11_33.1: %.3 = value_of_initializer %ImplicitGenericParam.call [template = ] -// CHECK:STDOUT: %.loc11_33.2: %.3 = converted %ImplicitGenericParam.call, %.loc11_33.1 [template = ] -// CHECK:STDOUT: return %.loc11_33.2 +// CHECK:STDOUT: %ImplicitGenericParam.call: init %.3 = call %ImplicitGenericParam.ref(%n.ref) +// CHECK:STDOUT: %.loc7_33.1: %.3 = value_of_initializer %ImplicitGenericParam.call +// CHECK:STDOUT: %.loc7_33.2: %.3 = converted %ImplicitGenericParam.call, %.loc7_33.1 +// CHECK:STDOUT: return %.loc7_33.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitGenericParam(constants.%T) { @@ -479,7 +475,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %TupleParam.decl: %TupleParam.type = fn_decl @TupleParam [template = constants.%TupleParam] { -// CHECK:STDOUT: %T.loc4_15.1: type = param T +// CHECK:STDOUT: %T.loc4_15.1: type = param T, runtime_param // CHECK:STDOUT: @TupleParam.%T.loc4: type = bind_symbolic_name T 0, %T.loc4_15.1 [symbolic = @TupleParam.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, @TupleParam.%T.loc4 [symbolic = @TupleParam.%T.1 (constants.%T)] // CHECK:STDOUT: %int.make_type_32.loc4: init type = call constants.%Int32() [template = i32] @@ -487,19 +483,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %int.make_type_32.loc4 [template = i32] // CHECK:STDOUT: %.loc4_35.3: type = converted %int.make_type_32.loc4, %.loc4_35.2 [template = i32] // CHECK:STDOUT: %.loc4_35.4: type = converted %.loc4_35.1, constants.%.3 [symbolic = @TupleParam.%.1 (constants.%.3)] -// CHECK:STDOUT: %x.loc4_25.1: @TupleParam.%.1 (%.3) = param x +// CHECK:STDOUT: %x.loc4_25.1: @TupleParam.%.1 (%.3) = param x, runtime_param0 // CHECK:STDOUT: @TupleParam.%x: @TupleParam.%.1 (%.3) = bind_name x, %x.loc4_25.1 // CHECK:STDOUT: } // CHECK:STDOUT: %CallTupleParam.decl: %CallTupleParam.type = fn_decl @CallTupleParam [template = constants.%CallTupleParam] {} // CHECK:STDOUT: %StructParam.decl: %StructParam.type = fn_decl @StructParam [template = constants.%StructParam] { -// CHECK:STDOUT: %T.loc17_16.1: type = param T +// CHECK:STDOUT: %T.loc17_16.1: type = param T, runtime_param // CHECK:STDOUT: @StructParam.%T.loc17: type = bind_symbolic_name T 0, %T.loc17_16.1 [symbolic = @StructParam.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc17: type = name_ref T, @StructParam.%T.loc17 [symbolic = @StructParam.%T.1 (constants.%T)] // CHECK:STDOUT: %int.make_type_32.loc17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_41.1: type = value_of_initializer %int.make_type_32.loc17 [template = i32] // CHECK:STDOUT: %.loc17_41.2: type = converted %int.make_type_32.loc17, %.loc17_41.1 [template = i32] // CHECK:STDOUT: %.loc17_44: type = struct_type {.a: %T, .b: i32} [symbolic = @StructParam.%.1 (constants.%.7)] -// CHECK:STDOUT: %x.loc17_26.1: @StructParam.%.1 (%.7) = param x +// CHECK:STDOUT: %x.loc17_26.1: @StructParam.%.1 (%.7) = param x, runtime_param0 // CHECK:STDOUT: @StructParam.%x: @StructParam.%.1 (%.7) = bind_name x, %x.loc17_26.1 // CHECK:STDOUT: } // CHECK:STDOUT: %CallStructParam.decl: %CallStructParam.type = fn_decl @CallStructParam [template = constants.%CallStructParam] {} @@ -583,12 +579,12 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ImplicitNotDeducible.decl: %ImplicitNotDeducible.type = fn_decl @ImplicitNotDeducible [template = constants.%ImplicitNotDeducible] { -// CHECK:STDOUT: %T.loc6_25.1: type = param T +// CHECK:STDOUT: %T.loc6_25.1: type = param T, runtime_param // CHECK:STDOUT: @ImplicitNotDeducible.%T.loc6: type = bind_symbolic_name T 0, %T.loc6_25.1 [symbolic = @ImplicitNotDeducible.%T.1 (constants.%T)] -// CHECK:STDOUT: %U.loc6_35.1: type = param U +// CHECK:STDOUT: %U.loc6_35.1: type = param U, runtime_param // CHECK:STDOUT: @ImplicitNotDeducible.%U.loc6: type = bind_symbolic_name U 1, %U.loc6_35.1 [symbolic = @ImplicitNotDeducible.%U.1 (constants.%U)] // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitNotDeducible.%T.loc6 [symbolic = @ImplicitNotDeducible.%T.1 (constants.%T)] -// CHECK:STDOUT: %x.loc6_45.1: @ImplicitNotDeducible.%T.1 (%T) = param x +// CHECK:STDOUT: %x.loc6_45.1: @ImplicitNotDeducible.%T.1 (%T) = param x, runtime_param0 // CHECK:STDOUT: @ImplicitNotDeducible.%x: @ImplicitNotDeducible.%T.1 (%T) = bind_name x, %x.loc6_45.1 // CHECK:STDOUT: %U.ref: type = name_ref U, @ImplicitNotDeducible.%U.loc6 [symbolic = @ImplicitNotDeducible.%U.1 (constants.%U)] // CHECK:STDOUT: @ImplicitNotDeducible.%return: ref @ImplicitNotDeducible.%U.1 (%U) = var @@ -650,13 +646,13 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ImplicitNotDeducible.decl: %ImplicitNotDeducible.type = fn_decl @ImplicitNotDeducible [template = constants.%ImplicitNotDeducible] { -// CHECK:STDOUT: %T.loc4_25.1: type = param T +// CHECK:STDOUT: %T.loc4_25.1: type = param T, runtime_param // CHECK:STDOUT: @ImplicitNotDeducible.%T.loc4: type = bind_symbolic_name T 0, %T.loc4_25.1 [symbolic = @ImplicitNotDeducible.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, @ImplicitNotDeducible.%T.loc4 [symbolic = @ImplicitNotDeducible.%T.1 (constants.%T)] -// CHECK:STDOUT: %x.loc4_35.1: @ImplicitNotDeducible.%T.1 (%T) = param x +// CHECK:STDOUT: %x.loc4_35.1: @ImplicitNotDeducible.%T.1 (%T) = param x, runtime_param0 // CHECK:STDOUT: @ImplicitNotDeducible.%x: @ImplicitNotDeducible.%T.1 (%T) = bind_name x, %x.loc4_35.1 // CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, @ImplicitNotDeducible.%T.loc4 [symbolic = @ImplicitNotDeducible.%T.1 (constants.%T)] -// CHECK:STDOUT: %y.loc4_41.1: @ImplicitNotDeducible.%T.1 (%T) = param y +// CHECK:STDOUT: %y.loc4_41.1: @ImplicitNotDeducible.%T.1 (%T) = param y, runtime_param1 // CHECK:STDOUT: @ImplicitNotDeducible.%y: @ImplicitNotDeducible.%T.1 (%T) = bind_name y, %y.loc4_41.1 // CHECK:STDOUT: %T.ref.loc4_50: type = name_ref T, @ImplicitNotDeducible.%T.loc4 [symbolic = @ImplicitNotDeducible.%T.1 (constants.%T)] // CHECK:STDOUT: @ImplicitNotDeducible.%return: ref @ImplicitNotDeducible.%T.1 (%T) = var diff --git a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon index 17318cd933b7..9b6b270b82c8 100644 --- a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon @@ -49,7 +49,7 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: %int.make_type_32.loc14_10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14_10 [template = i32] // CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14_10, %.loc14_10.1 [template = i32] -// CHECK:STDOUT: %N.loc14_6.1: i32 = param N +// CHECK:STDOUT: %N.loc14_6.1: i32 = param N, runtime_param // CHECK:STDOUT: @F.%N.loc14: i32 = bind_symbolic_name N 0, %N.loc14_6.1 [symbolic = @F.%N.1 (constants.%N)] // CHECK:STDOUT: %int.make_type_32.loc14_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %N.ref: i32 = name_ref N, @F.%N.loc14 [symbolic = @F.%N.1 (constants.%N)] @@ -57,7 +57,7 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_32.loc14_19, %.loc14_19.1 [template = i32] // CHECK:STDOUT: %.loc14_25: type = array_type %N.ref, i32 [template = ] // CHECK:STDOUT: %.loc14_26: type = ptr_type [template = ] -// CHECK:STDOUT: %a.loc14_15.1: = param a +// CHECK:STDOUT: %a.loc14_15.1: = param a, runtime_param0 // CHECK:STDOUT: @F.%a: = bind_name a, %a.loc14_15.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/no_prelude/call.carbon b/toolchain/check/testdata/function/generic/no_prelude/call.carbon new file mode 100644 index 000000000000..fb75b685fb5a --- /dev/null +++ b/toolchain/check/testdata/function/generic/no_prelude/call.carbon @@ -0,0 +1,350 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/generic/no_prelude/call.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/generic/no_prelude/call.carbon + +// --- explicit.carbon + +library "[[@TEST_NAME]]"; + +fn Function(T:! type, x: T) -> T { + return x; +} + +fn CallGeneric(T:! type, x: T) -> T { + return Function(T, x); +} + +fn CallGenericPtr(T:! type, x: T*) -> T* { + return Function(T*, x); +} + +class C {} + +fn CallSpecific(x: C) -> C { + return Function(C, x); +} + +// --- deduced.carbon + +library "[[@TEST_NAME]]"; + +fn Function[T:! type](x: T) -> T { + return x; +} + +fn CallGeneric(T:! type, x: T) -> T { + return Function(x); +} + +fn CallGenericPtr(T:! type, x: T*) -> T* { + return Function(x); +} + +class C {} + +fn CallSpecific(x: C) -> C { + return Function(x); +} + +// CHECK:STDOUT: --- explicit.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] +// CHECK:STDOUT: %Function.type: type = fn_type @Function [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %Function: %Function.type = struct_value () [template] +// CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [template] +// CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %CallGenericPtr.type: type = fn_type @CallGenericPtr [template] +// CHECK:STDOUT: %CallGenericPtr: %CallGenericPtr.type = struct_value () [template] +// CHECK:STDOUT: %C: type = class_type @C [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %CallSpecific.type: type = fn_type @CallSpecific [template] +// CHECK:STDOUT: %CallSpecific: %CallSpecific.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [template] { +// CHECK:STDOUT: .Function = %Function.decl +// CHECK:STDOUT: .CallGeneric = %CallGeneric.decl +// CHECK:STDOUT: .CallGenericPtr = %CallGenericPtr.decl +// CHECK:STDOUT: .C = %C.decl +// CHECK:STDOUT: .CallSpecific = %CallSpecific.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [template = constants.%Function] { +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param +// CHECK:STDOUT: @Function.%T.loc4: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Function.%T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, @Function.%T.loc4 [symbolic = @Function.%T.1 (constants.%T)] +// CHECK:STDOUT: %x.loc4_23.1: @Function.%T.1 (%T) = param x, runtime_param0 +// CHECK:STDOUT: @Function.%x: @Function.%T.1 (%T) = bind_name x, %x.loc4_23.1 +// CHECK:STDOUT: %T.ref.loc4_32: type = name_ref T, @Function.%T.loc4 [symbolic = @Function.%T.1 (constants.%T)] +// CHECK:STDOUT: @Function.%return: ref @Function.%T.1 (%T) = var +// CHECK:STDOUT: } +// CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [template = constants.%CallGeneric] { +// CHECK:STDOUT: %T.loc8_16.1: type = param T, runtime_param +// CHECK:STDOUT: @CallGeneric.%T.loc8: type = bind_symbolic_name T 0, %T.loc8_16.1 [symbolic = @CallGeneric.%T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, @CallGeneric.%T.loc8 [symbolic = @CallGeneric.%T.1 (constants.%T)] +// CHECK:STDOUT: %x.loc8_26.1: @CallGeneric.%T.1 (%T) = param x, runtime_param0 +// CHECK:STDOUT: @CallGeneric.%x: @CallGeneric.%T.1 (%T) = bind_name x, %x.loc8_26.1 +// CHECK:STDOUT: %T.ref.loc8_35: type = name_ref T, @CallGeneric.%T.loc8 [symbolic = @CallGeneric.%T.1 (constants.%T)] +// CHECK:STDOUT: @CallGeneric.%return: ref @CallGeneric.%T.1 (%T) = var +// CHECK:STDOUT: } +// CHECK:STDOUT: %CallGenericPtr.decl: %CallGenericPtr.type = fn_decl @CallGenericPtr [template = constants.%CallGenericPtr] { +// CHECK:STDOUT: %T.loc12_19.1: type = param T, runtime_param +// CHECK:STDOUT: @CallGenericPtr.%T.loc12: type = bind_symbolic_name T 0, %T.loc12_19.1 [symbolic = @CallGenericPtr.%T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, @CallGenericPtr.%T.loc12 [symbolic = @CallGenericPtr.%T.1 (constants.%T)] +// CHECK:STDOUT: %.loc12_33: type = ptr_type %T [symbolic = @CallGenericPtr.%.1 (constants.%.2)] +// CHECK:STDOUT: %x.loc12_29.1: @CallGenericPtr.%.1 (%.2) = param x, runtime_param0 +// CHECK:STDOUT: @CallGenericPtr.%x: @CallGenericPtr.%.1 (%.2) = bind_name x, %x.loc12_29.1 +// CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, @CallGenericPtr.%T.loc12 [symbolic = @CallGenericPtr.%T.1 (constants.%T)] +// CHECK:STDOUT: %.loc12_40: type = ptr_type %T [symbolic = @CallGenericPtr.%.1 (constants.%.2)] +// CHECK:STDOUT: @CallGenericPtr.%return: ref @CallGenericPtr.%.1 (%.2) = var +// CHECK:STDOUT: } +// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %CallSpecific.decl: %CallSpecific.type = fn_decl @CallSpecific [template = constants.%CallSpecific] { +// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, %C.decl [template = constants.%C] +// CHECK:STDOUT: %x.loc18_17.1: %C = param x, runtime_param0 +// CHECK:STDOUT: @CallSpecific.%x: %C = bind_name x, %x.loc18_17.1 +// CHECK:STDOUT: %C.ref.loc18_26: type = name_ref C, %C.decl [template = constants.%C] +// CHECK:STDOUT: @CallSpecific.%return: ref %C = var +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @C { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Function(%T.loc4: type) { +// CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%T.loc4: type, %x: @Function.%T.1 (%T)) -> @Function.%T.1 (%T) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %x.ref: @Function.%T.1 (%T) = name_ref x, %x +// CHECK:STDOUT: return %x.ref +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @CallGeneric(%T.loc8: type) { +// CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%T.loc8: type, %x: @CallGeneric.%T.1 (%T)) -> @CallGeneric.%T.1 (%T) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %x.ref: @CallGeneric.%T.1 (%T) = name_ref x, %x +// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.1 (%T) = call %Function.ref(%x.ref) +// CHECK:STDOUT: %.loc9_24.1: @CallGeneric.%T.1 (%T) = value_of_initializer %Function.call +// CHECK:STDOUT: %.loc9_24.2: @CallGeneric.%T.1 (%T) = converted %Function.call, %.loc9_24.1 +// CHECK:STDOUT: return %.loc9_24.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc12: type) { +// CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %.1: type = ptr_type @CallGenericPtr.%T.1 (%T) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%T.loc12: type, %x: @CallGenericPtr.%.1 (%.2)) -> @CallGenericPtr.%.1 (%.2) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %.loc13_20: type = ptr_type %T [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %x.ref: @CallGenericPtr.%.1 (%.2) = name_ref x, %x +// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%.1 (%.2) = call %Function.ref(%x.ref) +// CHECK:STDOUT: %.loc13_25.1: @CallGenericPtr.%.1 (%.2) = value_of_initializer %Function.call +// CHECK:STDOUT: %.loc13_25.2: @CallGenericPtr.%.1 (%.2) = converted %Function.call, %.loc13_25.1 +// CHECK:STDOUT: return %.loc13_25.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @CallSpecific(%x: %C) -> %return: %C { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %x.ref: %C = name_ref x, %x +// CHECK:STDOUT: %.loc18: ref %C = splice_block %return {} +// CHECK:STDOUT: %Function.call: init %C = call %Function.ref(%x.ref) to %.loc18 +// CHECK:STDOUT: return %Function.call to %return +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Function(constants.%T) { +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @CallGeneric(constants.%T) { +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @CallGenericPtr(constants.%T) { +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Function(constants.%.2) { +// CHECK:STDOUT: %T.1 => constants.%.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Function(constants.%C) { +// CHECK:STDOUT: %T.1 => constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- deduced.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic] +// CHECK:STDOUT: %Function.type: type = fn_type @Function [template] +// CHECK:STDOUT: %.1: type = tuple_type () [template] +// CHECK:STDOUT: %Function: %Function.type = struct_value () [template] +// CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [template] +// CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [template] +// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %CallGenericPtr.type: type = fn_type @CallGenericPtr [template] +// CHECK:STDOUT: %CallGenericPtr: %CallGenericPtr.type = struct_value () [template] +// CHECK:STDOUT: %C: type = class_type @C [template] +// CHECK:STDOUT: %.3: type = struct_type {} [template] +// CHECK:STDOUT: %CallSpecific.type: type = fn_type @CallSpecific [template] +// CHECK:STDOUT: %CallSpecific: %CallSpecific.type = struct_value () [template] +// CHECK:STDOUT: %.4: type = ptr_type %.3 [template] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [template] { +// CHECK:STDOUT: .Function = %Function.decl +// CHECK:STDOUT: .CallGeneric = %CallGeneric.decl +// CHECK:STDOUT: .CallGenericPtr = %CallGenericPtr.decl +// CHECK:STDOUT: .C = %C.decl +// CHECK:STDOUT: .CallSpecific = %CallSpecific.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [template = constants.%Function] { +// CHECK:STDOUT: %T.loc4_13.1: type = param T, runtime_param +// CHECK:STDOUT: @Function.%T.loc4: type = bind_symbolic_name T 0, %T.loc4_13.1 [symbolic = @Function.%T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, @Function.%T.loc4 [symbolic = @Function.%T.1 (constants.%T)] +// CHECK:STDOUT: %x.loc4_23.1: @Function.%T.1 (%T) = param x, runtime_param0 +// CHECK:STDOUT: @Function.%x: @Function.%T.1 (%T) = bind_name x, %x.loc4_23.1 +// CHECK:STDOUT: %T.ref.loc4_32: type = name_ref T, @Function.%T.loc4 [symbolic = @Function.%T.1 (constants.%T)] +// CHECK:STDOUT: @Function.%return: ref @Function.%T.1 (%T) = var +// CHECK:STDOUT: } +// CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [template = constants.%CallGeneric] { +// CHECK:STDOUT: %T.loc8_16.1: type = param T, runtime_param +// CHECK:STDOUT: @CallGeneric.%T.loc8: type = bind_symbolic_name T 0, %T.loc8_16.1 [symbolic = @CallGeneric.%T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, @CallGeneric.%T.loc8 [symbolic = @CallGeneric.%T.1 (constants.%T)] +// CHECK:STDOUT: %x.loc8_26.1: @CallGeneric.%T.1 (%T) = param x, runtime_param0 +// CHECK:STDOUT: @CallGeneric.%x: @CallGeneric.%T.1 (%T) = bind_name x, %x.loc8_26.1 +// CHECK:STDOUT: %T.ref.loc8_35: type = name_ref T, @CallGeneric.%T.loc8 [symbolic = @CallGeneric.%T.1 (constants.%T)] +// CHECK:STDOUT: @CallGeneric.%return: ref @CallGeneric.%T.1 (%T) = var +// CHECK:STDOUT: } +// CHECK:STDOUT: %CallGenericPtr.decl: %CallGenericPtr.type = fn_decl @CallGenericPtr [template = constants.%CallGenericPtr] { +// CHECK:STDOUT: %T.loc12_19.1: type = param T, runtime_param +// CHECK:STDOUT: @CallGenericPtr.%T.loc12: type = bind_symbolic_name T 0, %T.loc12_19.1 [symbolic = @CallGenericPtr.%T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, @CallGenericPtr.%T.loc12 [symbolic = @CallGenericPtr.%T.1 (constants.%T)] +// CHECK:STDOUT: %.loc12_33: type = ptr_type %T [symbolic = @CallGenericPtr.%.1 (constants.%.2)] +// CHECK:STDOUT: %x.loc12_29.1: @CallGenericPtr.%.1 (%.2) = param x, runtime_param0 +// CHECK:STDOUT: @CallGenericPtr.%x: @CallGenericPtr.%.1 (%.2) = bind_name x, %x.loc12_29.1 +// CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, @CallGenericPtr.%T.loc12 [symbolic = @CallGenericPtr.%T.1 (constants.%T)] +// CHECK:STDOUT: %.loc12_40: type = ptr_type %T [symbolic = @CallGenericPtr.%.1 (constants.%.2)] +// CHECK:STDOUT: @CallGenericPtr.%return: ref @CallGenericPtr.%.1 (%.2) = var +// CHECK:STDOUT: } +// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} +// CHECK:STDOUT: %CallSpecific.decl: %CallSpecific.type = fn_decl @CallSpecific [template = constants.%CallSpecific] { +// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, %C.decl [template = constants.%C] +// CHECK:STDOUT: %x.loc18_17.1: %C = param x, runtime_param0 +// CHECK:STDOUT: @CallSpecific.%x: %C = bind_name x, %x.loc18_17.1 +// CHECK:STDOUT: %C.ref.loc18_26: type = name_ref C, %C.decl [template = constants.%C] +// CHECK:STDOUT: @CallSpecific.%return: ref %C = var +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @C { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Function(%T.loc4: type) { +// CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn[%T.loc4: type](%x: @Function.%T.1 (%T)) -> @Function.%T.1 (%T) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %x.ref: @Function.%T.1 (%T) = name_ref x, %x +// CHECK:STDOUT: return %x.ref +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @CallGeneric(%T.loc8: type) { +// CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%T.loc8: type, %x: @CallGeneric.%T.1 (%T)) -> @CallGeneric.%T.1 (%T) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] +// CHECK:STDOUT: %x.ref: @CallGeneric.%T.1 (%T) = name_ref x, %x +// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.1 (%T) = call %Function.ref(%x.ref) +// CHECK:STDOUT: %.loc9_21.1: @CallGeneric.%T.1 (%T) = value_of_initializer %Function.call +// CHECK:STDOUT: %.loc9_21.2: @CallGeneric.%T.1 (%T) = converted %Function.call, %.loc9_21.1 +// CHECK:STDOUT: return %.loc9_21.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc12: type) { +// CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %.1: type = ptr_type @CallGenericPtr.%T.1 (%T) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%T.loc12: type, %x: @CallGenericPtr.%.1 (%.2)) -> @CallGenericPtr.%.1 (%.2) { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] +// CHECK:STDOUT: %x.ref: @CallGenericPtr.%.1 (%.2) = name_ref x, %x +// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%.1 (%.2) = call %Function.ref(%x.ref) +// CHECK:STDOUT: %.loc13_21.1: @CallGenericPtr.%.1 (%.2) = value_of_initializer %Function.call +// CHECK:STDOUT: %.loc13_21.2: @CallGenericPtr.%.1 (%.2) = converted %Function.call, %.loc13_21.1 +// CHECK:STDOUT: return %.loc13_21.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @CallSpecific(%x: %C) -> %return: %C { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [template = constants.%Function] +// CHECK:STDOUT: %x.ref: %C = name_ref x, %x +// CHECK:STDOUT: %.loc18: ref %C = splice_block %return {} +// CHECK:STDOUT: %Function.call: init %C = call %Function.ref(%x.ref) to %.loc18 +// CHECK:STDOUT: return %Function.call to %return +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Function(constants.%T) { +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @CallGeneric(constants.%T) { +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @CallGenericPtr(constants.%T) { +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: %.1 => constants.%.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Function(constants.%.2) { +// CHECK:STDOUT: %T.1 => constants.%.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Function(constants.%C) { +// CHECK:STDOUT: %T.1 => constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon index a85e90706f31..33cc17d7a928 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon @@ -32,9 +32,9 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc11_6.1: type = param T +// CHECK:STDOUT: %T.loc11_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc11: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = @F.%T.1 (constants.%T)] -// CHECK:STDOUT: %U.loc11_16.1: type = param U +// CHECK:STDOUT: %U.loc11_16.1: type = param U, runtime_param // CHECK:STDOUT: @F.%U.loc11: type = bind_symbolic_name U 1, %U.loc11_16.1 [symbolic = @F.%U.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/no_prelude/forward_decl.carbon b/toolchain/check/testdata/function/generic/no_prelude/forward_decl.carbon index c8ea4608f256..bb24f7b0155c 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/forward_decl.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/forward_decl.carbon @@ -24,7 +24,7 @@ fn F(T:! type); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc11_6.1: type = param T +// CHECK:STDOUT: %T.loc11_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc11: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon b/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon index b0981e84e921..9219af68f8a8 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon @@ -28,12 +28,12 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc11_6.1: type = param T +// CHECK:STDOUT: %T.loc11_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc11: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, @F.%T.loc11 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc11_20: type = ptr_type %T [symbolic = @F.%.1 (constants.%.1)] // CHECK:STDOUT: %.loc11_21: type = ptr_type %.1 [symbolic = @F.%.2 (constants.%.2)] -// CHECK:STDOUT: %p.loc11_16.1: @F.%.2 (%.2) = param p +// CHECK:STDOUT: %p.loc11_16.1: @F.%.2 (%.2) = param p, runtime_param0 // CHECK:STDOUT: @F.%p: @F.%.2 (%.2) = bind_name p, %p.loc11_16.1 // CHECK:STDOUT: %T.ref.loc11_27: type = name_ref T, @F.%T.loc11 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc11_28: type = ptr_type %T [symbolic = @F.%.1 (constants.%.1)] diff --git a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon index 56d005540bdc..e8ff1b7c1c00 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon @@ -28,7 +28,7 @@ fn F(T:! type) { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc11_6.1: type = param T +// CHECK:STDOUT: %T.loc11_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc11: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon b/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon index 9980f745deb4..bd42cf1bb25c 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon @@ -27,10 +27,10 @@ fn F(T:! type, n: T) -> T { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc11_6.1: type = param T +// CHECK:STDOUT: %T.loc11_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc11: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, @F.%T.loc11 [symbolic = @F.%T.1 (constants.%T)] -// CHECK:STDOUT: %n.loc11_16.1: @F.%T.1 (%T) = param n +// CHECK:STDOUT: %n.loc11_16.1: @F.%T.1 (%T) = param n, runtime_param0 // CHECK:STDOUT: @F.%n: @F.%T.1 (%T) = bind_name n, %n.loc11_16.1 // CHECK:STDOUT: %T.ref.loc11_25: type = name_ref T, @F.%T.loc11 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: @F.%return: ref @F.%T.1 (%T) = var diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index 72e363c2c23a..bdea341e8733 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -32,12 +32,10 @@ fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn F(T:! type, U:! type) -> U* { - // TODO: This diagnostic is not very good. We should check the arity in a - // function call before, or as part of, deduction. - // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:10: ERROR: Cannot deduce value for generic parameter `T`. + // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:10: ERROR: 1 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-15]]:1: While deducing parameters of generic declared here. + // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-13]]:1: Calling function declared here. // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -58,10 +56,10 @@ fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^ // CHECK:STDERR: fn F(U:! type, T:! type) -> T* { - // CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:10: ERROR: Cannot deduce value for generic parameter `T`. + // CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:10: ERROR: 1 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_reorder.carbon:[[@LINE-13]]:1: While deducing parameters of generic declared here. + // CHECK:STDERR: fail_reorder.carbon:[[@LINE-13]]:1: Calling function declared here. // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -82,10 +80,10 @@ fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^ // CHECK:STDERR: fn F(U:! type, T:! type) -> U* { - // CHECK:STDERR: fail_rename.carbon:[[@LINE+6]]:10: ERROR: Cannot deduce value for generic parameter `T`. + // CHECK:STDERR: fail_rename.carbon:[[@LINE+6]]:10: ERROR: 1 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_rename.carbon:[[@LINE-13]]:1: While deducing parameters of generic declared here. + // CHECK:STDERR: fail_rename.carbon:[[@LINE-13]]:1: Calling function declared here. // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return F(T); @@ -121,14 +119,14 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc4_6.1: type = param T +// CHECK:STDOUT: %T.loc4_6.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_6.2 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc4: type = ptr_type %T [symbolic = @F.%.1 (constants.%.1)] // CHECK:STDOUT: %return.var.loc4: ref @F.%.1 (%.1) = var // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc6: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc6_6.1: type = param T +// CHECK:STDOUT: %T.loc6_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc6: type = bind_symbolic_name T 0, %T.loc6_6.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, @F.%T.loc6 [symbolic = constants.%T] // CHECK:STDOUT: %.loc6: type = ptr_type %T [symbolic = constants.%.1] @@ -146,7 +144,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl.loc4 [template = constants.%F] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %F.call: init @F.%.1 (%.1) = call %F.ref(%T.ref) +// CHECK:STDOUT: %F.call: init @F.%.1 (%.1) = call %F.ref() // CHECK:STDOUT: %.loc7_14.1: @F.%.1 (%.1) = value_of_initializer %F.call // CHECK:STDOUT: %.loc7_14.2: @F.%.1 (%.1) = converted %F.call, %.loc7_14.1 // CHECK:STDOUT: return %.loc7_14.2 @@ -192,18 +190,18 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc4_6.1: type = param T +// CHECK:STDOUT: %T.loc4_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc4: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = @F.%T.1 (constants.%T)] -// CHECK:STDOUT: %U.loc4_16.1: type = param U +// CHECK:STDOUT: %U.loc4_16.1: type = param U, runtime_param // CHECK:STDOUT: @F.%U.loc4: type = bind_symbolic_name U 1, %U.loc4_16.1 [symbolic = @F.%U.1 (constants.%U)] // CHECK:STDOUT: %T.ref: type = name_ref T, @F.%T.loc4 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc4: type = ptr_type %T [symbolic = @F.%.1 (constants.%.1)] // CHECK:STDOUT: @F.%return: ref @F.%.1 (%.1) = var // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { -// CHECK:STDOUT: %T.loc13_6.1: type = param T +// CHECK:STDOUT: %T.loc13_6.1: type = param T, runtime_param // CHECK:STDOUT: @.1.%T.loc13: type = bind_symbolic_name T 0, %T.loc13_6.1 [symbolic = @.1.%T.1 (constants.%T)] -// CHECK:STDOUT: %U.loc13_16.1: type = param U +// CHECK:STDOUT: %U.loc13_16.1: type = param U, runtime_param // CHECK:STDOUT: @.1.%U.loc13: type = bind_symbolic_name U 1, %U.loc13_16.1 [symbolic = @.1.%U.1 (constants.%U)] // CHECK:STDOUT: %U.ref: type = name_ref U, @.1.%U.loc13 [symbolic = @.1.%U.1 (constants.%U)] // CHECK:STDOUT: %.loc13: type = ptr_type %U [symbolic = @.1.%.1 (constants.%.3)] @@ -282,18 +280,18 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc4_6.1: type = param T +// CHECK:STDOUT: %T.loc4_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc4: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = @F.%T.1 (constants.%T.1)] -// CHECK:STDOUT: %U.loc4_16.1: type = param U +// CHECK:STDOUT: %U.loc4_16.1: type = param U, runtime_param // CHECK:STDOUT: @F.%U.loc4: type = bind_symbolic_name U 1, %U.loc4_16.1 [symbolic = @F.%U.1 (constants.%U.1)] // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, @F.%T.loc4 [symbolic = @F.%T.1 (constants.%T.1)] // CHECK:STDOUT: %.loc4: type = ptr_type %T.1 [symbolic = @F.%.1 (constants.%.1)] // CHECK:STDOUT: @F.%return: ref @F.%.1 (%.1) = var // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { -// CHECK:STDOUT: %U.loc13_6.1: type = param U +// CHECK:STDOUT: %U.loc13_6.1: type = param U, runtime_param // CHECK:STDOUT: @.1.%U.loc13: type = bind_symbolic_name U 0, %U.loc13_6.1 [symbolic = @.1.%U.1 (constants.%U.2)] -// CHECK:STDOUT: %T.loc13_16.1: type = param T +// CHECK:STDOUT: %T.loc13_16.1: type = param T, runtime_param // CHECK:STDOUT: @.1.%T.loc13: type = bind_symbolic_name T 1, %T.loc13_16.1 [symbolic = @.1.%T.1 (constants.%T.2)] // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, @.1.%T.loc13 [symbolic = @.1.%T.1 (constants.%T.2)] // CHECK:STDOUT: %.loc13: type = ptr_type %T.2 [symbolic = @.1.%.1 (constants.%.3)] @@ -372,18 +370,18 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc4_6.1: type = param T +// CHECK:STDOUT: %T.loc4_6.1: type = param T, runtime_param // CHECK:STDOUT: @F.%T.loc4: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = @F.%T.1 (constants.%T.1)] -// CHECK:STDOUT: %U.loc4_16.1: type = param U +// CHECK:STDOUT: %U.loc4_16.1: type = param U, runtime_param // CHECK:STDOUT: @F.%U.loc4: type = bind_symbolic_name U 1, %U.loc4_16.1 [symbolic = @F.%U.1 (constants.%U.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @F.%T.loc4 [symbolic = @F.%T.1 (constants.%T.1)] // CHECK:STDOUT: %.loc4: type = ptr_type %T.1 [symbolic = @F.%.1 (constants.%.1)] // CHECK:STDOUT: @F.%return: ref @F.%.1 (%.1) = var // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] { -// CHECK:STDOUT: %U.loc13_6.1: type = param U +// CHECK:STDOUT: %U.loc13_6.1: type = param U, runtime_param // CHECK:STDOUT: @.1.%U.loc13: type = bind_symbolic_name U 0, %U.loc13_6.1 [symbolic = @.1.%U.1 (constants.%U.2)] -// CHECK:STDOUT: %T.loc13_16.1: type = param T +// CHECK:STDOUT: %T.loc13_16.1: type = param T, runtime_param // CHECK:STDOUT: @.1.%T.loc13: type = bind_symbolic_name T 1, %T.loc13_16.1 [symbolic = @.1.%T.1 (constants.%T.2)] // CHECK:STDOUT: %U.ref: type = name_ref U, @.1.%U.loc13 [symbolic = @.1.%U.1 (constants.%U.2)] // CHECK:STDOUT: %.loc13: type = ptr_type %U.2 [symbolic = @.1.%.1 (constants.%.3)] diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 96d579fc4a5c..9812224df91e 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -79,7 +79,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Wrap.decl: %Wrap.type = class_decl @Wrap [template = constants.%Wrap.1] { -// CHECK:STDOUT: %T.loc11_12.1: type = param T +// CHECK:STDOUT: %T.loc11_12.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc11_12.2: type = bind_symbolic_name T 0, %T.loc11_12.1 [symbolic = @Wrap.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} @@ -137,7 +137,7 @@ fn G() { // CHECK:STDOUT: %int.make_type_32.loc18_21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_20.1: type = value_of_initializer %int.make_type_32.loc18_21 [template = i32] // CHECK:STDOUT: %.loc18_20.2: type = converted %int.make_type_32.loc18_21, %.loc18_20.1 [template = i32] -// CHECK:STDOUT: %.loc18_20.3: init type = call %Wrap.ref.loc18(%.loc18_20.2) [template = constants.%Wrap.3] +// CHECK:STDOUT: %Wrap.loc18: type = class_type @Wrap, @Wrap(i32) [template = constants.%Wrap.3] // CHECK:STDOUT: %.loc18_25: %Make.type.2 = specific_constant @Wrap.%Make.decl, @Wrap(i32) [template = constants.%Make.2] // CHECK:STDOUT: %Make.ref.loc18: %Make.type.2 = name_ref Make, %.loc18_25 [template = constants.%Make.2] // CHECK:STDOUT: %Make.call.loc18: init i32 = call %Make.ref.loc18() @@ -148,8 +148,8 @@ fn G() { // CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var // CHECK:STDOUT: %Wrap.ref.loc19: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.1] // CHECK:STDOUT: %.loc19_21: %.1 = tuple_literal () -// CHECK:STDOUT: %.loc19_19.1: type = converted %.loc19_21, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %.loc19_19.2: init type = call %Wrap.ref.loc19(%.loc19_19.1) [template = constants.%Wrap.4] +// CHECK:STDOUT: %.loc19_19: type = converted %.loc19_21, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %Wrap.loc19: type = class_type @Wrap, @Wrap(constants.%.1) [template = constants.%Wrap.4] // CHECK:STDOUT: %.loc19_23: %Make.type.3 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%.1) [template = constants.%Make.3] // CHECK:STDOUT: %Make.ref.loc19: %Make.type.3 = name_ref Make, %.loc19_23 [template = constants.%Make.3] // CHECK:STDOUT: %Make.call.loc19: init %.1 = call %Make.ref.loc19() @@ -159,7 +159,7 @@ fn G() { // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %Wrap.ref.loc20: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.1] // CHECK:STDOUT: %C.ref.loc20_19: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc20_18: init type = call %Wrap.ref.loc20(%C.ref.loc20_19) [template = constants.%Wrap.5] +// CHECK:STDOUT: %Wrap.loc20: type = class_type @Wrap, @Wrap(constants.%C) [template = constants.%Wrap.5] // CHECK:STDOUT: %.loc20_21: %Make.type.4 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%C) [template = constants.%Make.4] // CHECK:STDOUT: %Make.ref.loc20: %Make.type.4 = name_ref Make, %.loc20_21 [template = constants.%Make.4] // CHECK:STDOUT: %.loc20_7: ref %C = splice_block %c.var {} diff --git a/toolchain/check/testdata/if/else.carbon b/toolchain/check/testdata/if/else.carbon index db82f87fed73..3b1e05d49efb 100644 --- a/toolchain/check/testdata/if/else.carbon +++ b/toolchain/check/testdata/if/else.carbon @@ -68,7 +68,7 @@ fn If(b: bool) { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc15_10.2: type = converted %bool.make_type, %.loc15_10.1 [template = bool] -// CHECK:STDOUT: %b.loc15_7.1: bool = param b +// CHECK:STDOUT: %b.loc15_7.1: bool = param b, runtime_param0 // CHECK:STDOUT: @If.%b: bool = bind_name b, %b.loc15_7.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index e5344c6885b3..c26de406fc7a 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -86,7 +86,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11, %.loc11_11.1 [template = bool] -// CHECK:STDOUT: %b.loc11_8.1: bool = param b +// CHECK:STDOUT: %b.loc11_8.1: bool = param b, runtime_param0 // CHECK:STDOUT: @If1.%b: bool = bind_name b, %b.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32] @@ -97,7 +97,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] // CHECK:STDOUT: %.loc22_11.2: type = converted %bool.make_type.loc22, %.loc22_11.1 [template = bool] -// CHECK:STDOUT: %b.loc22_8.1: bool = param b +// CHECK:STDOUT: %b.loc22_8.1: bool = param b, runtime_param0 // CHECK:STDOUT: @If2.%b: bool = bind_name b, %b.loc22_8.1 // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_20.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] @@ -108,7 +108,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type.loc33: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc33_11.1: type = value_of_initializer %bool.make_type.loc33 [template = bool] // CHECK:STDOUT: %.loc33_11.2: type = converted %bool.make_type.loc33, %.loc33_11.1 [template = bool] -// CHECK:STDOUT: %b.loc33_8.1: bool = param b +// CHECK:STDOUT: %b.loc33_8.1: bool = param b, runtime_param0 // CHECK:STDOUT: @If3.%b: bool = bind_name b, %b.loc33_8.1 // CHECK:STDOUT: %int.make_type_32.loc33: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc33_20.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index 1fd220b7f2d8..8e38708fb2a7 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -59,7 +59,7 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_16.2: type = converted %bool.make_type, %.loc11_16.1 [template = bool] -// CHECK:STDOUT: %b.loc11_13.1: bool = param b +// CHECK:STDOUT: %b.loc11_13.1: bool = param b, runtime_param0 // CHECK:STDOUT: @VarScope.%b: bool = bind_name b, %b.loc11_13.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/if/no_else.carbon b/toolchain/check/testdata/if/no_else.carbon index ae0dc00e9688..947e9d8e9b6c 100644 --- a/toolchain/check/testdata/if/no_else.carbon +++ b/toolchain/check/testdata/if/no_else.carbon @@ -61,7 +61,7 @@ fn If(b: bool) { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_10.2: type = converted %bool.make_type, %.loc14_10.1 [template = bool] -// CHECK:STDOUT: %b.loc14_7.1: bool = param b +// CHECK:STDOUT: %b.loc14_7.1: bool = param b, runtime_param0 // CHECK:STDOUT: @If.%b: bool = bind_name b, %b.loc14_7.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index f4a7e5334198..d533ae62c88b 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -58,7 +58,7 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_10.2: type = converted %bool.make_type, %.loc11_10.1 [template = bool] -// CHECK:STDOUT: %b.loc11_7.1: bool = param b +// CHECK:STDOUT: %b.loc11_7.1: bool = param b, runtime_param0 // CHECK:STDOUT: @If.%b: bool = bind_name b, %b.loc11_7.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 02f5173e51dd..8fca5de0bc75 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -58,17 +58,17 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] -// CHECK:STDOUT: %b.loc11_6.1: bool = param b +// CHECK:STDOUT: %b.loc11_6.1: bool = param b, runtime_param0 // CHECK:STDOUT: @F.%b: bool = bind_name b, %b.loc11_6.1 // CHECK:STDOUT: %int.make_type_32.loc11_18: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_32.loc11_18 [template = i32] // CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_32.loc11_18, %.loc11_18.1 [template = i32] -// CHECK:STDOUT: %n.loc11_15.1: i32 = param n +// CHECK:STDOUT: %n.loc11_15.1: i32 = param n, runtime_param1 // CHECK:STDOUT: @F.%n: i32 = bind_name n, %n.loc11_15.1 // CHECK:STDOUT: %int.make_type_32.loc11_26: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_26.1: type = value_of_initializer %int.make_type_32.loc11_26 [template = i32] // CHECK:STDOUT: %.loc11_26.2: type = converted %int.make_type_32.loc11_26, %.loc11_26.1 [template = i32] -// CHECK:STDOUT: %m.loc11_23.1: i32 = param m +// CHECK:STDOUT: %m.loc11_23.1: i32 = param m, runtime_param2 // CHECK:STDOUT: @F.%m: i32 = bind_name m, %m.loc11_23.1 // CHECK:STDOUT: %int.make_type_32.loc11_34: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_34.1: type = value_of_initializer %int.make_type_32.loc11_34 [template = i32] diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index d76fe9f91735..c1850229ecd0 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -113,7 +113,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: @Constant.%return: ref i32 = var // CHECK:STDOUT: } // CHECK:STDOUT: %PartiallyConstant.decl: %PartiallyConstant.type = fn_decl @PartiallyConstant [template = constants.%PartiallyConstant] { -// CHECK:STDOUT: %t.loc28_22.1: type = param t +// CHECK:STDOUT: %t.loc28_22.1: type = param t, runtime_param0 // CHECK:STDOUT: @PartiallyConstant.%t: type = bind_name t, %t.loc28_22.1 // CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc28_34.1: type = value_of_initializer %int.make_type_32.loc28 [template = i32] diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index c18fc5d3a949..e3bc9244c519 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -74,7 +74,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_9.2: type = converted %bool.make_type, %.loc14_9.1 [template = bool] -// CHECK:STDOUT: %b.loc14_6.1: bool = param b +// CHECK:STDOUT: %b.loc14_6.1: bool = param b, runtime_param0 // CHECK:STDOUT: @F.%b: bool = bind_name b, %b.loc14_6.1 // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_18.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index 7a09fe451b35..7f6033a4a440 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -79,7 +79,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_30.2: type = converted %bool.make_type, %.loc4_30.1 [template = bool] -// CHECK:STDOUT: %b.loc4_27.1: bool = param b +// CHECK:STDOUT: %b.loc4_27.1: bool = param b, runtime_param0 // CHECK:STDOUT: @ConditionIsNonConstant.%b: bool = bind_name b, %b.loc4_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -149,7 +149,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ChosenBranchIsNonConstant.decl: %ChosenBranchIsNonConstant.type = fn_decl @ChosenBranchIsNonConstant [template = constants.%ChosenBranchIsNonConstant] { -// CHECK:STDOUT: %t.loc4_30.1: type = param t +// CHECK:STDOUT: %t.loc4_30.1: type = param t, runtime_param0 // CHECK:STDOUT: @ChosenBranchIsNonConstant.%t: type = bind_name t, %t.loc4_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index 9f73137e0747..ae082feb0110 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -55,17 +55,17 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %bool.make_type.loc11_9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type.loc11_9 [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type.loc11_9, %.loc11_9.1 [template = bool] -// CHECK:STDOUT: %a.loc11_6.1: bool = param a +// CHECK:STDOUT: %a.loc11_6.1: bool = param a, runtime_param0 // CHECK:STDOUT: @F.%a: bool = bind_name a, %a.loc11_6.1 // CHECK:STDOUT: %bool.make_type.loc11_18: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %bool.make_type.loc11_18 [template = bool] // CHECK:STDOUT: %.loc11_18.2: type = converted %bool.make_type.loc11_18, %.loc11_18.1 [template = bool] -// CHECK:STDOUT: %b.loc11_15.1: bool = param b +// CHECK:STDOUT: %b.loc11_15.1: bool = param b, runtime_param1 // CHECK:STDOUT: @F.%b: bool = bind_name b, %b.loc11_15.1 // CHECK:STDOUT: %bool.make_type.loc11_27: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %bool.make_type.loc11_27 [template = bool] // CHECK:STDOUT: %.loc11_27.2: type = converted %bool.make_type.loc11_27, %.loc11_27.1 [template = bool] -// CHECK:STDOUT: %c.loc11_24.1: bool = param c +// CHECK:STDOUT: %c.loc11_24.1: bool = param c, runtime_param2 // CHECK:STDOUT: @F.%c: bool = bind_name c, %c.loc11_24.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_36.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index e134393b3bd6..63091dbe81f5 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -66,14 +66,14 @@ fn F(cond: bool) { // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_32.loc11_23 [template = i32] // CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_32.loc11_23, %.loc11_23.1 [template = i32] // CHECK:STDOUT: %.loc11_26: type = struct_type {.a: i32, .b: i32} [template = constants.%.2] -// CHECK:STDOUT: %s.loc11_6.1: %.2 = param s +// CHECK:STDOUT: %s.loc11_6.1: %.2 = param s, runtime_param0 // CHECK:STDOUT: @G.%s: %.2 = bind_name s, %s.loc11_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc13_12.2: type = converted %bool.make_type, %.loc13_12.1 [template = bool] -// CHECK:STDOUT: %cond.loc13_6.1: bool = param cond +// CHECK:STDOUT: %cond.loc13_6.1: bool = param cond, runtime_param0 // CHECK:STDOUT: @F.%cond: bool = bind_name cond, %cond.loc13_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 30e693eb3df9..47095c05bc32 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -102,14 +102,14 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_23.2: type = converted %int.make_type_32.loc21, %.loc21_23.1 [template = i32] -// CHECK:STDOUT: %n.loc21_20.1: i32 = param n +// CHECK:STDOUT: %n.loc21_20.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @NonInstanceCall.%n: i32 = bind_name n, %n.loc21_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [template = constants.%InstanceCall] { // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_20.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_20.2: type = converted %int.make_type_32.loc25, %.loc25_20.1 [template = i32] -// CHECK:STDOUT: %n.loc25_17.1: i32 = param n +// CHECK:STDOUT: %n.loc25_17.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @InstanceCall.%n: i32 = bind_name n, %n.loc25_17.1 // CHECK:STDOUT: } // CHECK:STDOUT: %NonInstanceCallIndirect.decl: %NonInstanceCallIndirect.type = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] { @@ -117,7 +117,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %.loc29_34.1: type = value_of_initializer %int.make_type_32.loc29 [template = i32] // CHECK:STDOUT: %.loc29_34.2: type = converted %int.make_type_32.loc29, %.loc29_34.1 [template = i32] // CHECK:STDOUT: %.loc29_34.3: type = ptr_type i32 [template = constants.%.8] -// CHECK:STDOUT: %p.loc29_28.1: %.8 = param p +// CHECK:STDOUT: %p.loc29_28.1: %.8 = param p, runtime_param0 // CHECK:STDOUT: @NonInstanceCallIndirect.%p: %.8 = bind_name p, %p.loc29_28.1 // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCallIndirect.decl: %InstanceCallIndirect.type = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] { @@ -125,7 +125,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %.loc33_31.1: type = value_of_initializer %int.make_type_32.loc33 [template = i32] // CHECK:STDOUT: %.loc33_31.2: type = converted %int.make_type_32.loc33, %.loc33_31.1 [template = i32] // CHECK:STDOUT: %.loc33_31.3: type = ptr_type i32 [template = constants.%.8] -// CHECK:STDOUT: %p.loc33_25.1: %.8 = param p +// CHECK:STDOUT: %p.loc33_25.1: %.8 = param p, runtime_param0 // CHECK:STDOUT: @InstanceCallIndirect.%p: %.8 = bind_name p, %p.loc33_25.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -138,7 +138,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, %Self [symbolic = @G.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc13_14.1: type = facet_type_access %Self.ref [symbolic = @G.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref, %.loc13_14.1 [symbolic = @G.1.%Self (constants.%Self)] -// CHECK:STDOUT: %self.loc13_8.1: @G.1.%Self (%Self) = param self +// CHECK:STDOUT: %self.loc13_8.1: @G.1.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_8.2: @G.1.%Self (%Self) = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc13_21: %.5 = assoc_entity element1, %G.decl [template = constants.%.6] @@ -156,7 +156,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc18_14.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc18_14.2: type = converted %int.make_type_32, %.loc18_14.1 [template = i32] -// CHECK:STDOUT: %self.loc18_8.1: i32 = param self +// CHECK:STDOUT: %self.loc18_8.1: i32 = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_8.2: i32 = bind_name self, %self.loc18_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc16: = interface_witness (%F.decl, %G.decl) [template = constants.%.7] diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index 253207dffcd2..d178cc9fa832 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -68,7 +68,7 @@ fn G(c: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc21_6.1: %C = param c +// CHECK:STDOUT: %c.loc21_6.1: %C = param c, runtime_param0 // CHECK:STDOUT: @G.%c: %C = bind_name c, %c.loc21_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index e28a3d538fd7..afd292f6d83e 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -74,7 +74,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %int.make_type_32.loc22: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc22_20.1: type = value_of_initializer %int.make_type_32.loc22 [template = i32] // CHECK:STDOUT: %.loc22_20.2: type = converted %int.make_type_32.loc22, %.loc22_20.1 [template = i32] -// CHECK:STDOUT: %n.loc22_17.1: i32 = param n +// CHECK:STDOUT: %n.loc22_17.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @InstanceCall.%n: i32 = bind_name n, %n.loc22_17.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -85,7 +85,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, %Self [symbolic = @G.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref [symbolic = @G.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref, %.loc12_14.1 [symbolic = @G.1.%Self (constants.%Self)] -// CHECK:STDOUT: %self.loc12_8.1: @G.1.%Self (%Self) = param self +// CHECK:STDOUT: %self.loc12_8.1: @G.1.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_8.2: @G.1.%Self (%Self) = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc12_21: %.3 = assoc_entity element0, %G.decl [template = constants.%.4] @@ -99,7 +99,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: impl @impl: i32 as %.1 { // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %Undeclared.ref: = name_ref Undeclared, [template = ] -// CHECK:STDOUT: %self.loc19_8.1: = param self +// CHECK:STDOUT: %self.loc19_8.1: = param self, runtime_param0 // CHECK:STDOUT: %self.loc19_8.2: = bind_name self, %self.loc19_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc15: = interface_witness () [template = ] diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index dbd9a76969ca..02c5b6d3ebc8 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -62,7 +62,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type = interface_decl @GenericInterface [template = constants.%GenericInterface] { -// CHECK:STDOUT: %T.loc11_28.1: type = param T +// CHECK:STDOUT: %T.loc11_28.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc11_28.2: type = bind_symbolic_name T 0, %T.loc11_28.1 [symbolic = @GenericInterface.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} @@ -83,7 +83,7 @@ class C { // CHECK:STDOUT: %Self.1: @GenericInterface.%.1 (%.2) = bind_symbolic_name Self 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @GenericInterface.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = %F (constants.%F.1)] { // CHECK:STDOUT: %T.ref: type = name_ref T, file.%T.loc11_28.2 [symbolic = @F.1.%T (constants.%T)] -// CHECK:STDOUT: %x.loc12_8.1: @F.1.%T (%T) = param x +// CHECK:STDOUT: %x.loc12_8.1: @F.1.%T (%T) = param x, runtime_param0 // CHECK:STDOUT: %x.loc12_8.2: @F.1.%T (%T) = bind_name x, %x.loc12_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc12: @GenericInterface.%.2 (%.3) = assoc_entity element0, %F.decl [symbolic = %.3 (constants.%.4)] @@ -98,7 +98,7 @@ class C { // CHECK:STDOUT: impl @impl: %C as %.2 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %T.ref: type = name_ref T, @C.%T.loc19_23.2 [symbolic = @F.2.%T (constants.%T)] -// CHECK:STDOUT: %x.loc20_10.1: @F.2.%T (%T) = param x +// CHECK:STDOUT: %x.loc20_10.1: @F.2.%T (%T) = param x, runtime_param0 // CHECK:STDOUT: %x.loc20_10.2: @F.2.%T (%T) = bind_name x, %x.loc20_10.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.5] @@ -109,14 +109,12 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc19_54.1: type = value_of_initializer %.loc19_52 [symbolic = constants.%.2] -// CHECK:STDOUT: %.loc19_54.2: type = converted %.loc19_52, %.loc19_54.1 [symbolic = constants.%.2] // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %T.loc19_23.1: type = param T +// CHECK:STDOUT: %T.loc19_23.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc19_23.2: type = bind_symbolic_name T 0, %T.loc19_23.1 [symbolic = constants.%T] // CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_23.2 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc19_52: init type = call %GenericInterface.ref(%T.ref) [symbolic = constants.%.2] +// CHECK:STDOUT: %.loc19: type = interface_type @GenericInterface, @GenericInterface(constants.%T) [symbolic = constants.%.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index ad75e07943db..25048fef4c16 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -379,12 +379,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %bool.make_type.loc93_26: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc93_26.1: type = value_of_initializer %bool.make_type.loc93_26 [template = bool] // CHECK:STDOUT: %.loc93_26.2: type = converted %bool.make_type.loc93_26, %.loc93_26.1 [template = bool] -// CHECK:STDOUT: %self.loc93_20.1: bool = param self +// CHECK:STDOUT: %self.loc93_20.1: bool = param self, runtime_param0 // CHECK:STDOUT: %self.loc93_20.2: bool = bind_name self, %self.loc93_20.1 // CHECK:STDOUT: %bool.make_type.loc93_35: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc93_35.1: type = value_of_initializer %bool.make_type.loc93_35 [template = bool] // CHECK:STDOUT: %.loc93_35.2: type = converted %bool.make_type.loc93_35, %.loc93_35.1 [template = bool] -// CHECK:STDOUT: %b.loc93_32.1: bool = param b +// CHECK:STDOUT: %b.loc93_32.1: bool = param b, runtime_param1 // CHECK:STDOUT: %b.loc93_32.2: bool = bind_name b, %b.loc93_32.1 // CHECK:STDOUT: %bool.make_type.loc93_44: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc93_44.1: type = value_of_initializer %bool.make_type.loc93_44 [template = bool] @@ -415,7 +415,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc188_37: type = struct_type {.x: %Self.3, .y: i32} [symbolic = @F.13.%.2 (constants.%.11)] // CHECK:STDOUT: %.loc188_38.1: %.12 = tuple_literal (%.loc188_16.3, %.loc188_37) // CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%.13 [symbolic = @F.13.%.3 (constants.%.13)] -// CHECK:STDOUT: %x.loc188_8.1: @F.13.%.3 (%.13) = param x +// CHECK:STDOUT: %x.loc188_8.1: @F.13.%.3 (%.13) = param x, runtime_param0 // CHECK:STDOUT: %x.loc188_8.2: @F.13.%.3 (%.13) = bind_name x, %x.loc188_8.1 // CHECK:STDOUT: %Self.ref.loc188_45: %.9 = name_ref Self, %Self [symbolic = @F.13.%Self (constants.%Self.3)] // CHECK:STDOUT: %.loc188_51: i32 = int_literal 4 [template = constants.%.14] @@ -463,7 +463,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc62_13.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc62_13.2: type = converted %bool.make_type, %.loc62_13.1 [template = bool] -// CHECK:STDOUT: %b.loc62_10.1: bool = param b +// CHECK:STDOUT: %b.loc62_10.1: bool = param b, runtime_param0 // CHECK:STDOUT: %b.loc62_10.2: bool = bind_name b, %b.loc62_10.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc54: = interface_witness () [template = ] @@ -476,7 +476,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: impl @impl.5: %FExtraImplicitParam as %.1 { // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.4] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [template = constants.%FExtraImplicitParam] -// CHECK:STDOUT: %self.loc75_10.1: %FExtraImplicitParam = param self +// CHECK:STDOUT: %self.loc75_10.1: %FExtraImplicitParam = param self, runtime_param0 // CHECK:STDOUT: %self.loc75_10.2: %FExtraImplicitParam = bind_name self, %self.loc75_10.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc67: = interface_witness () [template = ] @@ -505,7 +505,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %bool.make_type.loc104_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc104_16.1: type = value_of_initializer %bool.make_type.loc104_16 [template = bool] // CHECK:STDOUT: %.loc104_16.2: type = converted %bool.make_type.loc104_16, %.loc104_16.1 [template = bool] -// CHECK:STDOUT: %self.loc104_10.1: bool = param self +// CHECK:STDOUT: %self.loc104_10.1: bool = param self, runtime_param0 // CHECK:STDOUT: %self.loc104_10.2: bool = bind_name self, %self.loc104_10.1 // CHECK:STDOUT: %bool.make_type.loc104_27: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc104_27.1: type = value_of_initializer %bool.make_type.loc104_27 [template = bool] @@ -524,7 +524,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %bool.make_type.loc117_13: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc117_13.1: type = value_of_initializer %bool.make_type.loc117_13 [template = bool] // CHECK:STDOUT: %.loc117_13.2: type = converted %bool.make_type.loc117_13, %.loc117_13.1 [template = bool] -// CHECK:STDOUT: %b.loc117_10.1: bool = param b +// CHECK:STDOUT: %b.loc117_10.1: bool = param b, runtime_param0 // CHECK:STDOUT: %b.loc117_10.2: bool = bind_name b, %b.loc117_10.1 // CHECK:STDOUT: %bool.make_type.loc117_22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc117_22.1: type = value_of_initializer %bool.make_type.loc117_22 [template = bool] @@ -543,12 +543,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %bool.make_type.loc130_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc130_16.1: type = value_of_initializer %bool.make_type.loc130_16 [template = bool] // CHECK:STDOUT: %.loc130_16.2: type = converted %bool.make_type.loc130_16, %.loc130_16.1 [template = bool] -// CHECK:STDOUT: %self.loc130_10.1: bool = param self +// CHECK:STDOUT: %self.loc130_10.1: bool = param self, runtime_param0 // CHECK:STDOUT: %self.loc130_10.2: bool = bind_name self, %self.loc130_10.1 // CHECK:STDOUT: %bool.make_type.loc130_25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc130_25.1: type = value_of_initializer %bool.make_type.loc130_25 [template = bool] // CHECK:STDOUT: %.loc130_25.2: type = converted %bool.make_type.loc130_25, %.loc130_25.1 [template = bool] -// CHECK:STDOUT: %b.loc130_22.1: bool = param b +// CHECK:STDOUT: %b.loc130_22.1: bool = param b, runtime_param1 // CHECK:STDOUT: %b.loc130_22.2: bool = bind_name b, %b.loc130_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc122: = interface_witness () [template = ] @@ -563,10 +563,10 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %bool.make_type.loc143_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc143_16.1: type = value_of_initializer %bool.make_type.loc143_16 [template = bool] // CHECK:STDOUT: %.loc143_16.2: type = converted %bool.make_type.loc143_16, %.loc143_16.1 [template = bool] -// CHECK:STDOUT: %self.loc143_10.1: bool = param self +// CHECK:STDOUT: %self.loc143_10.1: bool = param self, runtime_param0 // CHECK:STDOUT: %self.loc143_10.2: bool = bind_name self, %self.loc143_10.1 // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [template = constants.%FDifferentParamType] -// CHECK:STDOUT: %b.loc143_22.1: %FDifferentParamType = param b +// CHECK:STDOUT: %b.loc143_22.1: %FDifferentParamType = param b, runtime_param1 // CHECK:STDOUT: %b.loc143_22.2: %FDifferentParamType = bind_name b, %b.loc143_22.1 // CHECK:STDOUT: %bool.make_type.loc143_34: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc143_34.1: type = value_of_initializer %bool.make_type.loc143_34 [template = bool] @@ -583,12 +583,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: impl @impl.11: %FDifferentImplicitParamType as %.6 { // CHECK:STDOUT: %F.decl: %F.type.10 = fn_decl @F.10 [template = constants.%F.11] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] -// CHECK:STDOUT: %self.loc156_10.1: %FDifferentImplicitParamType = param self +// CHECK:STDOUT: %self.loc156_10.1: %FDifferentImplicitParamType = param self, runtime_param0 // CHECK:STDOUT: %self.loc156_10.2: %FDifferentImplicitParamType = bind_name self, %self.loc156_10.1 // CHECK:STDOUT: %bool.make_type.loc156_25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc156_25.1: type = value_of_initializer %bool.make_type.loc156_25 [template = bool] // CHECK:STDOUT: %.loc156_25.2: type = converted %bool.make_type.loc156_25, %.loc156_25.1 [template = bool] -// CHECK:STDOUT: %b.loc156_22.1: bool = param b +// CHECK:STDOUT: %b.loc156_22.1: bool = param b, runtime_param1 // CHECK:STDOUT: %b.loc156_22.2: bool = bind_name b, %b.loc156_22.1 // CHECK:STDOUT: %bool.make_type.loc156_34: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc156_34.1: type = value_of_initializer %bool.make_type.loc156_34 [template = bool] @@ -607,12 +607,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %bool.make_type.loc169_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc169_16.1: type = value_of_initializer %bool.make_type.loc169_16 [template = bool] // CHECK:STDOUT: %.loc169_16.2: type = converted %bool.make_type.loc169_16, %.loc169_16.1 [template = bool] -// CHECK:STDOUT: %self.loc169_10.1: bool = param self +// CHECK:STDOUT: %self.loc169_10.1: bool = param self, runtime_param0 // CHECK:STDOUT: %self.loc169_10.2: bool = bind_name self, %self.loc169_10.1 // CHECK:STDOUT: %bool.make_type.loc169_25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc169_25.1: type = value_of_initializer %bool.make_type.loc169_25 [template = bool] // CHECK:STDOUT: %.loc169_25.2: type = converted %bool.make_type.loc169_25, %.loc169_25.1 [template = bool] -// CHECK:STDOUT: %b.loc169_22.1: bool = param b +// CHECK:STDOUT: %b.loc169_22.1: bool = param b, runtime_param1 // CHECK:STDOUT: %b.loc169_22.2: bool = bind_name b, %b.loc169_22.1 // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [template = constants.%FDifferentReturnType] // CHECK:STDOUT: %return.var: ref %FDifferentReturnType = var @@ -629,12 +629,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %bool.make_type.loc183_16: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc183_16.1: type = value_of_initializer %bool.make_type.loc183_16 [template = bool] // CHECK:STDOUT: %.loc183_16.2: type = converted %bool.make_type.loc183_16, %.loc183_16.1 [template = bool] -// CHECK:STDOUT: %self.loc183_10.1: bool = param self +// CHECK:STDOUT: %self.loc183_10.1: bool = param self, runtime_param0 // CHECK:STDOUT: %self.loc183_10.2: bool = bind_name self, %self.loc183_10.1 // CHECK:STDOUT: %bool.make_type.loc183_29: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc183_29.1: type = value_of_initializer %bool.make_type.loc183_29 [template = bool] // CHECK:STDOUT: %.loc183_29.2: type = converted %bool.make_type.loc183_29, %.loc183_29.1 [template = bool] -// CHECK:STDOUT: %not_b.loc183_22.1: bool = param not_b +// CHECK:STDOUT: %not_b.loc183_22.1: bool = param not_b, runtime_param1 // CHECK:STDOUT: %not_b.loc183_22.2: bool = bind_name not_b, %not_b.loc183_22.1 // CHECK:STDOUT: %bool.make_type.loc183_38: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc183_38.1: type = value_of_initializer %bool.make_type.loc183_38 [template = bool] @@ -661,7 +661,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc200_52: type = struct_type {.x: i32, .y: i32} [template = constants.%.19] // CHECK:STDOUT: %.loc200_53.1: %.12 = tuple_literal (%.loc200_32, %.loc200_52) // CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%.20 [template = constants.%.20] -// CHECK:STDOUT: %x.loc200_10.1: %.20 = param x +// CHECK:STDOUT: %x.loc200_10.1: %.20 = param x, runtime_param0 // CHECK:STDOUT: %x.loc200_10.2: %.20 = bind_name x, %x.loc200_10.1 // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_60: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %.loc200_80: i32 = int_literal 4 [template = constants.%.14] @@ -686,7 +686,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc212_77: type = struct_type {.x: %SelfNestedBadReturnType, .y: i32} [template = constants.%.25] // CHECK:STDOUT: %.loc212_78.1: %.12 = tuple_literal (%.loc212_37, %.loc212_77) // CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%.26 [template = constants.%.26] -// CHECK:STDOUT: %x.loc212_10.1: %.26 = param x +// CHECK:STDOUT: %x.loc212_10.1: %.26 = param x, runtime_param0 // CHECK:STDOUT: %x.loc212_10.2: %.26 = bind_name x, %x.loc212_10.1 // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %.loc212_105: i32 = int_literal 4 [template = constants.%.14] diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index d6c903a66e98..54602adfc887 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -72,7 +72,7 @@ impl i32 as false {} // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc21_13.1: init type = call constants.%ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %.loc21_13.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] // CHECK:STDOUT: %.loc21_13.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(type) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc21_13.2 [template = constants.%.8] // CHECK:STDOUT: %.loc21_13.3: type = converted %.loc21_13.4, [template = ] diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index a44de793dbd4..807e989d5bd6 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -53,7 +53,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%.1] {} // CHECK:STDOUT: impl_decl @impl { -// CHECK:STDOUT: %T.loc15_14.1: type = param T +// CHECK:STDOUT: %T.loc15_14.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc15_14.2: type = bind_symbolic_name T 0, %T.loc15_14.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_14.2 [symbolic = constants.%T] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, %Simple.decl [template = constants.%.1] diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index f0c44031c276..73ba2e16e010 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -74,7 +74,7 @@ fn G(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %C.ref.loc23: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc23_6.1: %C = param c +// CHECK:STDOUT: %c.loc23_6.1: %C = param c, runtime_param0 // CHECK:STDOUT: @G.%c: %C = bind_name c, %c.loc23_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon index 99fa54d30ba0..37172c9869f2 100644 --- a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon @@ -70,7 +70,7 @@ fn F(c: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %c.loc19_6.1: %C = param c +// CHECK:STDOUT: %c.loc19_6.1: %C = param c, runtime_param0 // CHECK:STDOUT: @F.2.%c: %C = bind_name c, %c.loc19_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index 2437ebe25490..a1df36d78841 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -171,7 +171,7 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Impl.ref: = name_ref Impl, imports.%Impl [template = imports.%Impl] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.6 [template = constants.%C] -// CHECK:STDOUT: %c.loc4_6.1: %C = param c +// CHECK:STDOUT: %c.loc4_6.1: %C = param c, runtime_param0 // CHECK:STDOUT: @G.%c: %C = bind_name c, %c.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 782f9f1dae18..27d12030f844 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -74,7 +74,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %C.decl.loc17: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl.loc11 [template = constants.%C] -// CHECK:STDOUT: %c.loc23_6.1: %C = param c +// CHECK:STDOUT: %c.loc23_6.1: %C = param c, runtime_param0 // CHECK:STDOUT: @F.3.%c: %C = bind_name c, %c.loc23_6.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc23_15.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -89,7 +89,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %Self.ref: %.1 = name_ref Self, %Self [symbolic = @F.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc14_14.1: type = facet_type_access %Self.ref [symbolic = @F.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %.loc14_14.1 [symbolic = @F.1.%Self (constants.%Self)] -// CHECK:STDOUT: %self.loc14_8.1: @F.1.%Self (%Self) = param self +// CHECK:STDOUT: %self.loc14_8.1: @F.1.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self.loc14_8.2: @F.1.%Self (%Self) = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -107,7 +107,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: impl @impl: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %self.loc19_10.1: %C = param self +// CHECK:STDOUT: %self.loc19_10.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc19_10.2: %C = bind_name self, %self.loc19_10.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_27.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index 65c17f3ce5a2..45439134cbc7 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -144,7 +144,7 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Impl.ref: = name_ref Impl, imports.%Impl [template = imports.%Impl] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.6 [template = constants.%C] -// CHECK:STDOUT: %c.loc4_6.1: %C = param c +// CHECK:STDOUT: %c.loc4_6.1: %C = param c, runtime_param0 // CHECK:STDOUT: @G.%c: %C = bind_name c, %c.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index 4cdc5db9d8ae..e942e73534a5 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -55,12 +55,12 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %Self.ref.loc5_15: %.1 = name_ref Self, %Self [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc5_15.1: type = facet_type_access %Self.ref.loc5_15 [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref.loc5_15, %.loc5_15.1 [symbolic = @Op.%Self (constants.%Self)] -// CHECK:STDOUT: %self.loc5_9.1: @Op.%Self (%Self) = param self +// CHECK:STDOUT: %self.loc5_9.1: @Op.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self.loc5_9.2: @Op.%Self (%Self) = bind_name self, %self.loc5_9.1 // CHECK:STDOUT: %Self.ref.loc5_28: %.1 = name_ref Self, %Self [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc5_28.1: type = facet_type_access %Self.ref.loc5_28 [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc5_28.2: type = converted %Self.ref.loc5_28, %.loc5_28.1 [symbolic = @Op.%Self (constants.%Self)] -// CHECK:STDOUT: %other.loc5_21.1: @Op.%Self (%Self) = param other +// CHECK:STDOUT: %other.loc5_21.1: @Op.%Self (%Self) = param other, runtime_param1 // CHECK:STDOUT: %other.loc5_21.2: @Op.%Self (%Self) = bind_name other, %other.loc5_21.1 // CHECK:STDOUT: %Self.ref.loc5_37: %.1 = name_ref Self, %Self [symbolic = @Op.%Self (constants.%Self)] // CHECK:STDOUT: %.loc5_37.1: type = facet_type_access %Self.ref.loc5_37 [symbolic = @Op.%Self (constants.%Self)] @@ -125,11 +125,11 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %.loc10_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc10_6.1: %.1 = param x +// CHECK:STDOUT: %x.loc10_6.1: %.1 = param x, runtime_param0 // CHECK:STDOUT: @F.%x: %.1 = bind_name x, %x.loc10_6.1 // CHECK:STDOUT: %.loc10_17.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc10_17.2: type = converted %.loc10_17.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %y.loc10_13.1: %.1 = param y +// CHECK:STDOUT: %y.loc10_13.1: %.1 = param y, runtime_param1 // CHECK:STDOUT: @F.%y: %.1 = bind_name y, %y.loc10_13.1 // CHECK:STDOUT: %.loc10_24.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc10_24.2: type = converted %.loc10_24.1, constants.%.1 [template = constants.%.1] @@ -147,10 +147,10 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: impl @impl: %.1 as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %self.loc7_9.1: %.1 = param self +// CHECK:STDOUT: %self.loc7_9.1: %.1 = param self, runtime_param0 // CHECK:STDOUT: %self.loc7_9.2: %.1 = bind_name self, %self.loc7_9.1 // CHECK:STDOUT: %Self.ref.loc7_28: type = name_ref Self, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %other.loc7_21.1: %.1 = param other +// CHECK:STDOUT: %other.loc7_21.1: %.1 = param other, runtime_param1 // CHECK:STDOUT: %other.loc7_21.2: %.1 = bind_name other, %other.loc7_21.1 // CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %return.var: ref %.1 = var diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index 0fd44514e684..c7960491d75d 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -117,23 +117,21 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Action.decl: %Action.type = interface_decl @Action [template = constants.%Action] { -// CHECK:STDOUT: %T.loc4_18.1: type = param T +// CHECK:STDOUT: %T.loc4_18.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_18.2: type = bind_symbolic_name T 0, %T.loc4_18.1 [symbolic = @Action.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %.loc12_17 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_19.2: type = converted %.loc12_17, %.loc12_19.1 [template = constants.%.6] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %A.ref.loc12: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %Action.ref: %Action.type = name_ref Action, %Action.decl [template = constants.%Action] // CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc12_17: init type = call %Action.ref(%B.ref) [template = constants.%.6] +// CHECK:STDOUT: %.loc12: type = interface_type @Action, @Action(constants.%B) [template = constants.%.6] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %A.ref.loc16: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %a.loc16_6.1: %A = param a +// CHECK:STDOUT: %a.loc16_6.1: %A = param a, runtime_param0 // CHECK:STDOUT: @F.%a: %A = bind_name a, %a.loc16_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -200,7 +198,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %Action.ref: %Action.type = name_ref Action, file.%Action.decl [template = constants.%Action] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc16_23: init type = call %Action.ref(%B.ref) [template = constants.%.6] +// CHECK:STDOUT: %.loc16_23: type = interface_type @Action, @Action(constants.%B) [template = constants.%.6] // CHECK:STDOUT: %.loc16_26: %.7 = specific_constant @Action.%.loc5, @Action(constants.%B) [template = constants.%.8] // CHECK:STDOUT: %Op.ref: %.7 = name_ref Op, %.loc16_26 [template = constants.%.8] // CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access @impl.%.loc12, element0 [template = constants.%Op.2] @@ -268,7 +266,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+24, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//action, inst+27, loaded [template = constants.%B] // CHECK:STDOUT: %import_ref.4 = import_ref Main//action, inst+29, unloaded -// CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+52, unloaded +// CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+50, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+25, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+28, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//action, inst+10, unloaded @@ -276,7 +274,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+12, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Main//action, inst+12, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Main//action, inst+12, unloaded -// CHECK:STDOUT: %import_ref.13: = import_ref Main//action, inst+46, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.13: = import_ref Main//action, inst+44, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.14 = import_ref Main//action, inst+12, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -293,7 +291,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] -// CHECK:STDOUT: %a.loc4_6.1: %A = param a +// CHECK:STDOUT: %a.loc4_6.1: %A = param a, runtime_param0 // CHECK:STDOUT: @G.%a: %A = bind_name a, %a.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -342,7 +340,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %Action.ref: %Action.type = name_ref Action, imports.%import_ref.1 [template = constants.%Action] // CHECK:STDOUT: %B.ref: type = name_ref B, imports.%import_ref.3 [template = constants.%B] -// CHECK:STDOUT: %.loc4_23: init type = call %Action.ref(%B.ref) [template = constants.%.4] +// CHECK:STDOUT: %.loc4_23: type = interface_type @Action, @Action(constants.%B) [template = constants.%.4] // CHECK:STDOUT: %.loc4_26: %.7 = specific_constant imports.%import_ref.9, @Action(constants.%B) [template = constants.%.8] // CHECK:STDOUT: %Op.ref: %.7 = name_ref Op, %.loc4_26 [template = constants.%.8] // CHECK:STDOUT: %.loc4_15: %Op.type.2 = interface_witness_access imports.%import_ref.13, element0 [template = constants.%Op.3] @@ -413,7 +411,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+24, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3 = import_ref Main//action, inst+27, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref Main//action, inst+29, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+52, unloaded +// CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+50, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+25, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+28, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//action, inst+10, unloaded @@ -421,7 +419,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+12, unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Main//action, inst+12, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Main//action, inst+12, unloaded -// CHECK:STDOUT: %import_ref.13 = import_ref Main//action, inst+46, unloaded +// CHECK:STDOUT: %import_ref.13 = import_ref Main//action, inst+44, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Main//action, inst+30, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//action, inst+12, unloaded // CHECK:STDOUT: } @@ -439,7 +437,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] -// CHECK:STDOUT: %a.loc8_6.1: %A = param a +// CHECK:STDOUT: %a.loc8_6.1: %A = param a, runtime_param0 // CHECK:STDOUT: @G.%a: %A = bind_name a, %a.loc8_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -493,7 +491,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %Action.ref: %Action.type = name_ref Action, imports.%import_ref.1 [template = constants.%Action] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.4 [template = constants.%C] -// CHECK:STDOUT: %.loc8_23: init type = call %Action.ref(%C.ref) [template = constants.%.10] +// CHECK:STDOUT: %.loc8_23: type = interface_type @Action, @Action(constants.%C) [template = constants.%.10] // CHECK:STDOUT: %.loc8_26: %.11 = specific_constant imports.%import_ref.9, @Action(constants.%C) [template = constants.%.12] // CHECK:STDOUT: %Op.ref: %.11 = name_ref Op, %.loc8_26 [template = constants.%.12] // CHECK:STDOUT: return @@ -566,18 +564,16 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Factory.decl: %Factory.type = interface_decl @Factory [template = constants.%Factory] { -// CHECK:STDOUT: %T.loc4_19.1: type = param T +// CHECK:STDOUT: %T.loc4_19.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T 0, %T.loc4_19.1 [symbolic = @Factory.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} -// CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %.loc11_18 [template = constants.%.6] -// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_18, %.loc11_20.1 [template = constants.%.6] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %Factory.ref: %Factory.type = name_ref Factory, %Factory.decl [template = constants.%Factory] // CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc11_18: init type = call %Factory.ref(%B.ref) [template = constants.%.6] +// CHECK:STDOUT: %.loc11: type = interface_type @Factory, @Factory(constants.%B) [template = constants.%.6] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -707,7 +703,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+14, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//factory, inst+14, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//factory, inst+14, unloaded -// CHECK:STDOUT: %import_ref.11: = import_ref Main//factory, inst+49, loaded [template = constants.%.11] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//factory, inst+47, loaded [template = constants.%.11] // CHECK:STDOUT: %import_ref.12 = import_ref Main//factory, inst+14, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -722,7 +718,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %MakeB.decl: %MakeB.type = fn_decl @MakeB [template = constants.%MakeB] { // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] -// CHECK:STDOUT: %a.loc4_10.1: %A = param a +// CHECK:STDOUT: %a.loc4_10.1: %A = param a, runtime_param0 // CHECK:STDOUT: @MakeB.%a: %A = bind_name a, %a.loc4_10.1 // CHECK:STDOUT: %B.ref: type = name_ref B, imports.%import_ref.3 [template = constants.%B] // CHECK:STDOUT: @MakeB.%return: ref %B = var @@ -774,7 +770,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %Factory.ref: %Factory.type = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] // CHECK:STDOUT: %B.ref: type = name_ref B, imports.%import_ref.3 [template = constants.%B] -// CHECK:STDOUT: %.loc5_20: init type = call %Factory.ref(%B.ref) [template = constants.%.4] +// CHECK:STDOUT: %.loc5_20: type = interface_type @Factory, @Factory(constants.%B) [template = constants.%.4] // CHECK:STDOUT: %.loc5_23: %.7 = specific_constant imports.%import_ref.7, @Factory(constants.%B) [template = constants.%.8] // CHECK:STDOUT: %Make.ref: %.7 = name_ref Make, %.loc5_23 [template = constants.%.8] // CHECK:STDOUT: %.loc5_11: %Make.type.2 = interface_witness_access imports.%import_ref.11, element0 [template = constants.%Make.3] @@ -854,7 +850,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+14, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//factory, inst+14, unloaded // CHECK:STDOUT: %import_ref.10 = import_ref Main//factory, inst+14, unloaded -// CHECK:STDOUT: %import_ref.11 = import_ref Main//factory, inst+49, unloaded +// CHECK:STDOUT: %import_ref.11 = import_ref Main//factory, inst+47, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Main//factory, inst+14, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -871,7 +867,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %MakeC.decl: %MakeC.type = fn_decl @MakeC [template = constants.%MakeC] { // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] -// CHECK:STDOUT: %a.loc6_10.1: %A = param a +// CHECK:STDOUT: %a.loc6_10.1: %A = param a, runtime_param0 // CHECK:STDOUT: @MakeC.%a: %A = bind_name a, %a.loc6_10.1 // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @MakeC.%return: ref %C = var @@ -928,7 +924,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %Factory.ref: %Factory.type = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc10_20: init type = call %Factory.ref(%C.ref) [template = constants.%.10] +// CHECK:STDOUT: %.loc10_20: type = interface_type @Factory, @Factory(constants.%C) [template = constants.%.10] // CHECK:STDOUT: %.loc10_23: %.11 = specific_constant imports.%import_ref.7, @Factory(constants.%C) [template = constants.%.12] // CHECK:STDOUT: %Make.ref: %.11 = name_ref Make, %.loc10_23 [template = constants.%.12] // CHECK:STDOUT: return to %return diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon index 6d9d7f106e58..03ae456d0a40 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -117,12 +117,12 @@ impl D as SelfNested { // CHECK:STDOUT: %Self.ref.loc12_14: %.1 = name_ref Self, %Self [symbolic = @F.1.%Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = @F.1.%Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = @F.1.%Self (constants.%Self.1)] -// CHECK:STDOUT: %self.loc12_8.1: @F.1.%Self (%Self.1) = param self +// CHECK:STDOUT: %self.loc12_8.1: @F.1.%Self (%Self.1) = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_8.2: @F.1.%Self (%Self.1) = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: %Self.ref.loc12_23: %.1 = name_ref Self, %Self [symbolic = @F.1.%Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_23.1: type = facet_type_access %Self.ref.loc12_23 [symbolic = @F.1.%Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_23.2: type = converted %Self.ref.loc12_23, %.loc12_23.1 [symbolic = @F.1.%Self (constants.%Self.1)] -// CHECK:STDOUT: %x.loc12_20.1: @F.1.%Self (%Self.1) = param x +// CHECK:STDOUT: %x.loc12_20.1: @F.1.%Self (%Self.1) = param x, runtime_param1 // CHECK:STDOUT: %x.loc12_20.2: @F.1.%Self (%Self.1) = bind_name x, %x.loc12_20.1 // CHECK:STDOUT: %Self.ref.loc12_32: %.1 = name_ref Self, %Self [symbolic = @F.1.%Self (constants.%Self.1)] // CHECK:STDOUT: %.loc12_32.1: type = facet_type_access %Self.ref.loc12_32 [symbolic = @F.1.%Self (constants.%Self.1)] @@ -152,7 +152,7 @@ impl D as SelfNested { // CHECK:STDOUT: %.loc28_36: type = struct_type {.x: %Self.2, .y: %.2} [symbolic = @F.4.%.2 (constants.%.11)] // CHECK:STDOUT: %.loc28_37.1: %.12 = tuple_literal (%.loc28_16.3, %.loc28_36) // CHECK:STDOUT: %.loc28_37.2: type = converted %.loc28_37.1, constants.%.13 [symbolic = @F.4.%.3 (constants.%.13)] -// CHECK:STDOUT: %x.loc28_8.1: @F.4.%.3 (%.13) = param x +// CHECK:STDOUT: %x.loc28_8.1: @F.4.%.3 (%.13) = param x, runtime_param0 // CHECK:STDOUT: %x.loc28_8.2: @F.4.%.3 (%.13) = bind_name x, %x.loc28_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc28_39: %.14 = assoc_entity element0, %F.decl [template = constants.%.15] @@ -166,10 +166,10 @@ impl D as SelfNested { // CHECK:STDOUT: impl @impl.1: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %C.ref.loc20_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc20_8.1: %C = param self +// CHECK:STDOUT: %self.loc20_8.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc20_8.2: %C = bind_name self, %self.loc20_8.1 // CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %x.loc20_17.1: %C = param x +// CHECK:STDOUT: %x.loc20_17.1: %C = param x, runtime_param1 // CHECK:STDOUT: %x.loc20_17.2: %C = bind_name x, %x.loc20_17.1 // CHECK:STDOUT: %C.ref.loc20_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -184,10 +184,10 @@ impl D as SelfNested { // CHECK:STDOUT: impl @impl.2: %D as %.1 { // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %Self.ref.loc24_14: type = name_ref Self, constants.%D [template = constants.%D] -// CHECK:STDOUT: %self.loc24_8.1: %D = param self +// CHECK:STDOUT: %self.loc24_8.1: %D = param self, runtime_param0 // CHECK:STDOUT: %self.loc24_8.2: %D = bind_name self, %self.loc24_8.1 // CHECK:STDOUT: %Self.ref.loc24_23: type = name_ref Self, constants.%D [template = constants.%D] -// CHECK:STDOUT: %x.loc24_20.1: %D = param x +// CHECK:STDOUT: %x.loc24_20.1: %D = param x, runtime_param1 // CHECK:STDOUT: %x.loc24_20.2: %D = bind_name x, %x.loc24_20.1 // CHECK:STDOUT: %Self.ref.loc24_32: type = name_ref Self, constants.%D [template = constants.%D] // CHECK:STDOUT: %return.var: ref %D = var @@ -209,7 +209,7 @@ impl D as SelfNested { // CHECK:STDOUT: %.loc32_30: type = struct_type {.x: %C, .y: %.2} [template = constants.%.17] // CHECK:STDOUT: %.loc32_31.1: %.12 = tuple_literal (%.loc32_13, %.loc32_30) // CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%.18 [template = constants.%.18] -// CHECK:STDOUT: %x.loc32_8.1: %.18 = param x +// CHECK:STDOUT: %x.loc32_8.1: %.18 = param x, runtime_param0 // CHECK:STDOUT: %x.loc32_8.2: %.18 = bind_name x, %x.loc32_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc31: = interface_witness (%F.decl) [template = constants.%.19] @@ -229,7 +229,7 @@ impl D as SelfNested { // CHECK:STDOUT: %.loc36_36: type = struct_type {.x: %D, .y: %.2} [template = constants.%.21] // CHECK:STDOUT: %.loc36_37.1: %.12 = tuple_literal (%.loc36_16, %.loc36_36) // CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%.22 [template = constants.%.22] -// CHECK:STDOUT: %x.loc36_8.1: %.22 = param x +// CHECK:STDOUT: %x.loc36_8.1: %.22 = param x, runtime_param0 // CHECK:STDOUT: %x.loc36_8.2: %.22 = bind_name x, %x.loc36_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc35: = interface_witness (%F.decl) [template = constants.%.23] diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index f257141d99e5..2ed51bc49110 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -89,7 +89,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_16: type = array_type %.loc13_15, i32 [template = constants.%.3] -// CHECK:STDOUT: %b.loc13_6.1: %.3 = param b +// CHECK:STDOUT: %b.loc13_6.1: %.3 = param b, runtime_param0 // CHECK:STDOUT: @G.%b: %.3 = bind_name b, %b.loc13_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %ValueBinding.decl: %ValueBinding.type = fn_decl @ValueBinding [template = constants.%ValueBinding] { @@ -98,7 +98,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc21_21.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] // CHECK:STDOUT: %.loc21_21.2: type = converted %int.make_type_32.loc21, %.loc21_21.1 [template = i32] // CHECK:STDOUT: %.loc21_27: type = array_type %.loc21_26, i32 [template = constants.%.3] -// CHECK:STDOUT: %b.loc21_17.1: %.3 = param b +// CHECK:STDOUT: %b.loc21_17.1: %.3 = param b, runtime_param0 // CHECK:STDOUT: @ValueBinding.%b: %.3 = bind_name b, %b.loc21_17.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index 5b31717239b4..4761b296e58b 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -133,7 +133,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: assign file.%a.var, %.loc11_24 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc18_16.1: f64 = float_literal 2.6000000000000001 [template = constants.%.8] -// CHECK:STDOUT: %.loc18_16.2: init type = call constants.%ImplicitAs(i32) [template = constants.%.12] +// CHECK:STDOUT: %.loc18_16.2: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.12] // CHECK:STDOUT: %.loc18_16.3: %.13 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.14] // CHECK:STDOUT: %Convert.ref: %.13 = name_ref Convert, %.loc18_16.3 [template = constants.%.14] // CHECK:STDOUT: %.loc18_16.4: i32 = converted %.loc18_16.1, [template = ] diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 5e90cd8ed124..64152ed266f2 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -90,7 +90,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32] // CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_32.loc13, %.loc13_10.1 [template = i32] // CHECK:STDOUT: %.loc13_16: type = array_type %.loc13_15, i32 [template = constants.%.3] -// CHECK:STDOUT: %b.loc13_6.1: %.3 = param b +// CHECK:STDOUT: %b.loc13_6.1: %.3 = param b, runtime_param0 // CHECK:STDOUT: @G.%b: %.3 = bind_name b, %b.loc13_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon index 500a5264533b..2808b4f7fd2c 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -77,7 +77,7 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %.loc18_18: i32 = int_literal 42 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_20.1: init type = call constants.%ImplicitAs(type) [template = constants.%.7] +// CHECK:STDOUT: %.loc18_20.1: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.7] // CHECK:STDOUT: %.loc18_20.2: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc18_20.2 [template = constants.%.9] // CHECK:STDOUT: %.loc18_20.3: type = converted %.loc18_18, [template = ] diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon index a481463d6284..ebd8e1d917c5 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon @@ -71,12 +71,12 @@ interface Interface { // CHECK:STDOUT: %int.make_type_32.loc21_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_19.1: type = value_of_initializer %int.make_type_32.loc21_19 [template = i32] // CHECK:STDOUT: %.loc21_19.2: type = converted %int.make_type_32.loc21_19, %.loc21_19.1 [template = i32] -// CHECK:STDOUT: %a.loc21_16.1: i32 = param a +// CHECK:STDOUT: %a.loc21_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: %a.loc21_16.2: i32 = bind_name a, %a.loc21_16.1 // CHECK:STDOUT: %int.make_type_32.loc21_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_27.1: type = value_of_initializer %int.make_type_32.loc21_27 [template = i32] // CHECK:STDOUT: %.loc21_27.2: type = converted %int.make_type_32.loc21_27, %.loc21_27.1 [template = i32] -// CHECK:STDOUT: %b.loc21_24.1: i32 = param b +// CHECK:STDOUT: %b.loc21_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: %b.loc21_24.2: i32 = bind_name b, %b.loc21_24.1 // CHECK:STDOUT: %int.make_type_32.loc21_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_35.1: type = value_of_initializer %int.make_type_32.loc21_35 [template = i32] diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index d76c86791111..19a2c2b255a9 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -112,12 +112,12 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %int.make_type_32.loc31_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_19.1: type = value_of_initializer %int.make_type_32.loc31_19 [template = i32] // CHECK:STDOUT: %.loc31_19.2: type = converted %int.make_type_32.loc31_19, %.loc31_19.1 [template = i32] -// CHECK:STDOUT: %a.loc31_16.1: i32 = param a +// CHECK:STDOUT: %a.loc31_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @.2.%a: i32 = bind_name a, %a.loc31_16.1 // CHECK:STDOUT: %int.make_type_32.loc31_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_27.1: type = value_of_initializer %int.make_type_32.loc31_27 [template = i32] // CHECK:STDOUT: %.loc31_27.2: type = converted %int.make_type_32.loc31_27, %.loc31_27.1 [template = i32] -// CHECK:STDOUT: %b.loc31_24.1: i32 = param b +// CHECK:STDOUT: %b.loc31_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: @.2.%b: i32 = bind_name b, %b.loc31_24.1 // CHECK:STDOUT: %int.make_type_32.loc31_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_35.1: type = value_of_initializer %int.make_type_32.loc31_35 [template = i32] @@ -134,12 +134,12 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %int.make_type_32.loc13_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_19.1: type = value_of_initializer %int.make_type_32.loc13_19 [template = i32] // CHECK:STDOUT: %.loc13_19.2: type = converted %int.make_type_32.loc13_19, %.loc13_19.1 [template = i32] -// CHECK:STDOUT: %a.loc13_16.1: i32 = param a +// CHECK:STDOUT: %a.loc13_16.1: i32 = param a, runtime_param0 // CHECK:STDOUT: %a.loc13_16.2: i32 = bind_name a, %a.loc13_16.1 // CHECK:STDOUT: %int.make_type_32.loc13_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_27.1: type = value_of_initializer %int.make_type_32.loc13_27 [template = i32] // CHECK:STDOUT: %.loc13_27.2: type = converted %int.make_type_32.loc13_27, %.loc13_27.1 [template = i32] -// CHECK:STDOUT: %b.loc13_24.1: i32 = param b +// CHECK:STDOUT: %b.loc13_24.1: i32 = param b, runtime_param1 // CHECK:STDOUT: %b.loc13_24.2: i32 = bind_name b, %b.loc13_24.1 // CHECK:STDOUT: %int.make_type_32.loc13_35: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc13_35.1: type = value_of_initializer %int.make_type_32.loc13_35 [template = i32] @@ -227,12 +227,12 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] { // CHECK:STDOUT: %.loc20: type = specific_constant constants.%C.2, @C(constants.%Self) [symbolic = constants.%C.2] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc20 [symbolic = constants.%C.2] -// CHECK:STDOUT: %self.loc20_18.1: %C.2 = param self +// CHECK:STDOUT: %self.loc20_18.1: %C.2 = param self, runtime_param0 // CHECK:STDOUT: @F.%self: %C.2 = bind_name self, %self.loc20_18.1 -// CHECK:STDOUT: %U.loc20_30.1: type = param U +// CHECK:STDOUT: %U.loc20_30.1: type = param U, runtime_param // CHECK:STDOUT: @F.%U.loc20: type = bind_symbolic_name U 1, %U.loc20_30.1 [symbolic = constants.%U] // CHECK:STDOUT: %U.ref.loc20_43: type = name_ref U, @F.%U.loc20 [symbolic = constants.%U] -// CHECK:STDOUT: %u.loc20_40.1: %U = param u +// CHECK:STDOUT: %u.loc20_40.1: %U = param u, runtime_param1 // CHECK:STDOUT: @F.%u: %U = bind_name u, %u.loc20_40.1 // CHECK:STDOUT: %U.ref.loc20_49: type = name_ref U, @F.%U.loc20 [symbolic = constants.%U] // CHECK:STDOUT: @F.%return: ref %U = var @@ -259,12 +259,12 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %F.decl: @C.%F.type (%F.type) = fn_decl @F [symbolic = %F (constants.%F)] { // CHECK:STDOUT: %.loc14: type = specific_constant constants.%C.2, @C(constants.%Self) [symbolic = @F.%C (constants.%C.2)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14 [symbolic = @F.%C (constants.%C.2)] -// CHECK:STDOUT: %self.loc14_10.1: @F.%C (%C.2) = param self +// CHECK:STDOUT: %self.loc14_10.1: @F.%C (%C.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc14_10.2: @F.%C (%C.2) = bind_name self, %self.loc14_10.1 -// CHECK:STDOUT: %U.loc14_22.1: type = param U +// CHECK:STDOUT: %U.loc14_22.1: type = param U, runtime_param // CHECK:STDOUT: %U.loc14_22.2: type = bind_symbolic_name U 1, %U.loc14_22.1 [symbolic = @F.%U.1 (constants.%U)] // CHECK:STDOUT: %U.ref.loc14_35: type = name_ref U, %U.loc14_22.2 [symbolic = @F.%U.1 (constants.%U)] -// CHECK:STDOUT: %u.loc14_32.1: @F.%U.1 (%U) = param u +// CHECK:STDOUT: %u.loc14_32.1: @F.%U.1 (%U) = param u, runtime_param1 // CHECK:STDOUT: %u.loc14_32.2: @F.%U.1 (%U) = bind_name u, %u.loc14_32.1 // CHECK:STDOUT: %U.ref.loc14_41: type = name_ref U, %U.loc14_22.2 [symbolic = @F.%U.1 (constants.%U)] // CHECK:STDOUT: %return.var: ref @F.%U.1 (%U) = var diff --git a/toolchain/check/testdata/interface/no_prelude/as_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type.carbon index 5463f53c1afb..7e3b42ad3222 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type.carbon @@ -30,7 +30,7 @@ fn F(e: Empty) {} // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %Empty.decl [template = constants.%.1] -// CHECK:STDOUT: %e.loc13_6.1: %.1 = param e +// CHECK:STDOUT: %e.loc13_6.1: %.1 = param e, runtime_param0 // CHECK:STDOUT: @F.%e: %.1 = bind_name e, %e.loc13_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon index 412a346df82f..e7615eaef576 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon @@ -33,7 +33,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %Empty.decl [template = constants.%.1] -// CHECK:STDOUT: %T.loc13_6.1: %.1 = param T +// CHECK:STDOUT: %T.loc13_6.1: %.1 = param T, runtime_param // CHECK:STDOUT: @F.%T.loc13: %.1 = bind_symbolic_name T 0, %T.loc13_6.1 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/export_name.carbon b/toolchain/check/testdata/interface/no_prelude/export_name.carbon index 2b80aa713a74..c0838fd2b7e1 100644 --- a/toolchain/check/testdata/interface/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/interface/no_prelude/export_name.carbon @@ -109,7 +109,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UseEmpty.decl: %UseEmpty.type = fn_decl @UseEmpty [template = constants.%UseEmpty] { // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %i.loc6_13.1: %.1 = param i +// CHECK:STDOUT: %i.loc6_13.1: %.1 = param i, runtime_param0 // CHECK:STDOUT: @UseEmpty.%i: %.1 = bind_name i, %i.loc6_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon index 8cc289584969..88183e0a0f4d 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon @@ -153,7 +153,7 @@ interface Class { } // CHECK:STDOUT: %Self.ref: %.2 = name_ref Self, %Self [symbolic = @F.%Self (constants.%Self.2)] // CHECK:STDOUT: %.loc14_14.1: type = facet_type_access %Self.ref [symbolic = @F.%Self (constants.%Self.2)] // CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %.loc14_14.1 [symbolic = @F.%Self (constants.%Self.2)] -// CHECK:STDOUT: %self.loc14_8.1: @F.%Self (%Self.2) = param self +// CHECK:STDOUT: %self.loc14_8.1: @F.%Self (%Self.2) = param self, runtime_param0 // CHECK:STDOUT: %self.loc14_8.2: @F.%Self (%Self.2) = bind_name self, %self.loc14_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc14_21: %.4 = assoc_entity element0, %F.decl [template = constants.%.5] diff --git a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon index 999fa270858f..dd5d11057882 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon @@ -68,22 +68,22 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: } // CHECK:STDOUT: %NotGeneric.decl: type = interface_decl @NotGeneric [template = constants.%.1] {} // CHECK:STDOUT: %.decl.loc19: %.type.1 = interface_decl @.1 [template = constants.%.3] { -// CHECK:STDOUT: %T.loc19_22.1: type = param T +// CHECK:STDOUT: %T.loc19_22.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc19_22.2: type = bind_symbolic_name T 0, %T.loc19_22.1 [symbolic = @.1.%T (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %Generic.decl: %Generic.type = interface_decl @Generic [template = constants.%Generic] { -// CHECK:STDOUT: %T.loc21_19.1: type = param T +// CHECK:STDOUT: %T.loc21_19.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc21_19.2: type = bind_symbolic_name T 0, %T.loc21_19.1 [symbolic = @Generic.%T (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc29: type = interface_decl @.2 [template = constants.%.5] {} // CHECK:STDOUT: %DifferentParams.decl: %DifferentParams.type = interface_decl @DifferentParams [template = constants.%DifferentParams] { -// CHECK:STDOUT: %T.loc31_27.1: type = param T +// CHECK:STDOUT: %T.loc31_27.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc31_27.2: type = bind_symbolic_name T 0, %T.loc31_27.1 [symbolic = @DifferentParams.%T (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc38: %.type.2 = interface_decl @.3 [template = constants.%.6] { // CHECK:STDOUT: %.loc38_32.1: %.2 = tuple_literal () // CHECK:STDOUT: %.loc38_32.2: type = converted %.loc38_32.1, constants.%.2 [template = constants.%.2] -// CHECK:STDOUT: %T.loc38_27.1: %.2 = param T +// CHECK:STDOUT: %T.loc38_27.1: %.2 = param T, runtime_param // CHECK:STDOUT: %T.loc38_27.2: %.2 = bind_symbolic_name T 0, %T.loc38_27.1 [symbolic = @.3.%T (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon index f338beb0a3b0..51c70ba0d2e4 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon @@ -51,17 +51,17 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [template = constants.%.1] {} // CHECK:STDOUT: %CallStatic.decl: %CallStatic.type = fn_decl @CallStatic [template = constants.%CallStatic] { // CHECK:STDOUT: %Interface.ref.loc13: type = name_ref Interface, %Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %T.loc13_15.1: %.1 = param T +// CHECK:STDOUT: %T.loc13_15.1: %.1 = param T, runtime_param // CHECK:STDOUT: @CallStatic.%T.loc13: %.1 = bind_symbolic_name T 0, %T.loc13_15.1 [symbolic = @CallStatic.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallFacet.decl: %CallFacet.type = fn_decl @CallFacet [template = constants.%CallFacet] { // CHECK:STDOUT: %Interface.ref.loc21: type = name_ref Interface, %Interface.decl [template = constants.%.1] -// CHECK:STDOUT: %T.loc21_14.1: %.1 = param T +// CHECK:STDOUT: %T.loc21_14.1: %.1 = param T, runtime_param // CHECK:STDOUT: @CallFacet.%T.loc21: %.1 = bind_symbolic_name T 0, %T.loc21_14.1 [symbolic = @CallFacet.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref: %.1 = name_ref T, @CallFacet.%T.loc21 [symbolic = @CallFacet.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc21_32.1: type = facet_type_access %T.ref [symbolic = @CallFacet.%T.1 (constants.%T)] // CHECK:STDOUT: %.loc21_32.2: type = converted %T.ref, %.loc21_32.1 [symbolic = @CallFacet.%T.1 (constants.%T)] -// CHECK:STDOUT: %x.loc21_29.1: @CallFacet.%T.1 (%T) = param x +// CHECK:STDOUT: %x.loc21_29.1: @CallFacet.%T.1 (%T) = param x, runtime_param0 // CHECK:STDOUT: @CallFacet.%x: @CallFacet.%T.1 (%T) = bind_name x, %x.loc21_29.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon index 530ba21f8c3d..8a20f77bc15a 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon @@ -43,17 +43,17 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: %I.type = interface_decl @I [template = constants.%I] { -// CHECK:STDOUT: %T.loc11_13.1: type = param T +// CHECK:STDOUT: %T.loc11_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [symbolic = constants.%.5] { -// CHECK:STDOUT: %T.loc22_6.1: type = param T +// CHECK:STDOUT: %T.loc22_6.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc22_6.2: type = bind_symbolic_name T 0, %T.loc22_6.1 [symbolic = @.1.%T (constants.%T)] // CHECK:STDOUT: %.loc22_24.1: @.1.%.1 (%.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = @.1.%Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc22_24: @.1.%.1 (%.2) = name_ref Self, %.loc22_24.1 [symbolic = @.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc22_24.2: type = facet_type_access %Self.ref.loc22_24 [symbolic = @.1.%Self (constants.%Self)] // CHECK:STDOUT: %.loc22_24.3: type = converted %Self.ref.loc22_24, %.loc22_24.2 [symbolic = @.1.%Self (constants.%Self)] -// CHECK:STDOUT: %self.loc22_18.1: @.1.%Self (%Self) = param self +// CHECK:STDOUT: %self.loc22_18.1: @.1.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: @.1.%self: @.1.%Self (%Self) = bind_name self, %self.loc22_18.1 // CHECK:STDOUT: %.loc22_35.1: @.1.%.1 (%.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = @.1.%Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc22_35: @.1.%.1 (%.2) = name_ref Self, %.loc22_35.1 [symbolic = @.1.%Self (constants.%Self)] @@ -81,7 +81,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %Self.ref.loc13_14: @F.%.1 (%.2) = name_ref Self, %.loc13_14.1 [symbolic = @F.%Self (constants.%Self)] // CHECK:STDOUT: %.loc13_14.2: type = facet_type_access %Self.ref.loc13_14 [symbolic = @F.%Self (constants.%Self)] // CHECK:STDOUT: %.loc13_14.3: type = converted %Self.ref.loc13_14, %.loc13_14.2 [symbolic = @F.%Self (constants.%Self)] -// CHECK:STDOUT: %self.loc13_8.1: @F.%Self (%Self) = param self +// CHECK:STDOUT: %self.loc13_8.1: @F.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self.loc13_8.2: @F.%Self (%Self) = bind_name self, %self.loc13_8.1 // CHECK:STDOUT: %.loc13_25.1: @F.%.1 (%.2) = specific_constant %Self.1, @I(constants.%T) [symbolic = @F.%Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc13_25: @F.%.1 (%.2) = name_ref Self, %.loc13_25.1 [symbolic = @F.%Self (constants.%Self)] diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index 040136ef8c65..b1b599e4e987 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -52,9 +52,9 @@ fn G(T:! Generic(B)) { // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+6]]:3: ERROR: Package `Core` implicitly referenced here, but not found. // CHECK:STDERR: F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:1: Initializing parameter 1 of function declared here. + // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:6: Initializing generic parameter `T` declared here. // CHECK:STDERR: fn F(T:! Generic(A)); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: ^ F(T); } @@ -111,38 +111,34 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: .Pass = %Pass.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Simple.decl: %Simple.type = interface_decl @Simple [template = constants.%Simple] { -// CHECK:STDOUT: %T.loc4_18.1: type = param T +// CHECK:STDOUT: %T.loc4_18.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_18.2: type = bind_symbolic_name T 0, %T.loc4_18.1 [symbolic = @Simple.%T (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} // CHECK:STDOUT: %WithAssocFn.decl: %WithAssocFn.type = interface_decl @WithAssocFn [template = constants.%WithAssocFn] { -// CHECK:STDOUT: %T.loc8_23.1: type = param T +// CHECK:STDOUT: %T.loc8_23.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc8_23.2: type = bind_symbolic_name T 0, %T.loc8_23.1 [symbolic = @WithAssocFn.%T (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %WithImplicitArgs.decl: %WithImplicitArgs.type = interface_decl @WithImplicitArgs [template = constants.%WithImplicitArgs] { -// CHECK:STDOUT: %T.loc22_28.1: type = param T +// CHECK:STDOUT: %T.loc22_28.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc22_28.2: type = bind_symbolic_name T 0, %T.loc22_28.1 [symbolic = @WithImplicitArgs.%T (constants.%T.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc22_28.2 [symbolic = @WithImplicitArgs.%T (constants.%T.1)] -// CHECK:STDOUT: %N.loc22_38.1: @WithImplicitArgs.%T (%T.1) = param N +// CHECK:STDOUT: %N.loc22_38.1: @WithImplicitArgs.%T (%T.1) = param N, runtime_param // CHECK:STDOUT: %N.loc22_38.2: @WithImplicitArgs.%T (%T.1) = bind_symbolic_name N 1, %N.loc22_38.1 [symbolic = @WithImplicitArgs.%N (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Receive.decl: %Receive.type = fn_decl @Receive [template = constants.%Receive] { // CHECK:STDOUT: %Simple.ref.loc24: %Simple.type = name_ref Simple, %Simple.decl [template = constants.%Simple] // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc24_22: init type = call %Simple.ref.loc24(%C.ref.loc24) [template = constants.%.7] -// CHECK:STDOUT: %.loc24_24.1: type = value_of_initializer %.loc24_22 [template = constants.%.7] -// CHECK:STDOUT: %.loc24_24.2: type = converted %.loc24_22, %.loc24_24.1 [template = constants.%.7] -// CHECK:STDOUT: %T.loc24_12.1: %.7 = param T +// CHECK:STDOUT: %.loc24: type = interface_type @Simple, @Simple(constants.%C) [template = constants.%.7] +// CHECK:STDOUT: %T.loc24_12.1: %.7 = param T, runtime_param // CHECK:STDOUT: @Receive.%T.loc24: %.7 = bind_symbolic_name T 0, %T.loc24_12.1 [symbolic = @Receive.%T.1 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Pass.decl: %Pass.type = fn_decl @Pass [template = constants.%Pass] { // CHECK:STDOUT: %Simple.ref.loc25: %Simple.type = name_ref Simple, %Simple.decl [template = constants.%Simple] // CHECK:STDOUT: %C.ref.loc25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc25_19: init type = call %Simple.ref.loc25(%C.ref.loc25) [template = constants.%.7] -// CHECK:STDOUT: %.loc25_21.1: type = value_of_initializer %.loc25_19 [template = constants.%.7] -// CHECK:STDOUT: %.loc25_21.2: type = converted %.loc25_19, %.loc25_21.1 [template = constants.%.7] -// CHECK:STDOUT: %T.loc25_9.1: %.7 = param T +// CHECK:STDOUT: %.loc25: type = interface_type @Simple, @Simple(constants.%C) [template = constants.%.7] +// CHECK:STDOUT: %T.loc25_9.1: %.7 = param T, runtime_param // CHECK:STDOUT: @Pass.%T.loc25: %.7 = bind_symbolic_name T 0, %T.loc25_9.1 [symbolic = @Pass.%T.1 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -221,19 +217,15 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %.loc14_17 [template = constants.%.7] -// CHECK:STDOUT: %.loc14_19.2: type = converted %.loc14_17, %.loc14_19.1 [template = constants.%.7] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %Simple.ref: %Simple.type = name_ref Simple, file.%Simple.decl [template = constants.%Simple] // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc14_17: init type = call %Simple.ref(%C.ref.loc14) [template = constants.%.7] +// CHECK:STDOUT: %.loc14: type = interface_type @Simple, @Simple(constants.%C) [template = constants.%.7] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %.loc15_22 [template = constants.%.9] -// CHECK:STDOUT: %.loc15_24.2: type = converted %.loc15_22, %.loc15_24.1 [template = constants.%.9] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %WithAssocFn.ref: %WithAssocFn.type = name_ref WithAssocFn, file.%WithAssocFn.decl [template = constants.%WithAssocFn] // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc15_22: init type = call %WithAssocFn.ref(%C.ref.loc15) [template = constants.%.9] +// CHECK:STDOUT: %.loc15: type = interface_type @WithAssocFn, @WithAssocFn(constants.%C) [template = constants.%.9] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -268,7 +260,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Receive.ref: %Receive.type = name_ref Receive, file.%Receive.decl [template = constants.%Receive] // CHECK:STDOUT: %T.ref: %.7 = name_ref T, %T.loc25 [symbolic = %T.1 (constants.%T.2)] -// CHECK:STDOUT: %Receive.call: init %.1 = call %Receive.ref(%T.ref) +// CHECK:STDOUT: %Receive.call: init %.1 = call %Receive.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -357,7 +349,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Generic.decl: %Generic.type = interface_decl @Generic [template = constants.%Generic] { -// CHECK:STDOUT: %T.loc4_19.1: type = param T +// CHECK:STDOUT: %T.loc4_19.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T 0, %T.loc4_19.1 [symbolic = @Generic.%T (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} @@ -365,19 +357,15 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Generic.ref.loc9: %Generic.type = name_ref Generic, %Generic.decl [template = constants.%Generic] // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc9_17: init type = call %Generic.ref.loc9(%A.ref) [template = constants.%.4] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %.loc9_17 [template = constants.%.4] -// CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_17, %.loc9_19.1 [template = constants.%.4] -// CHECK:STDOUT: %T.loc9_6.1: %.4 = param T +// CHECK:STDOUT: %.loc9: type = interface_type @Generic, @Generic(constants.%A) [template = constants.%.4] +// CHECK:STDOUT: %T.loc9_6.1: %.4 = param T, runtime_param // CHECK:STDOUT: @F.%T.loc9: %.4 = bind_symbolic_name T 0, %T.loc9_6.1 [symbolic = @F.%T.1 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %Generic.ref.loc10: %Generic.type = name_ref Generic, %Generic.decl [template = constants.%Generic] // CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc10_17: init type = call %Generic.ref.loc10(%B.ref) [template = constants.%.5] -// CHECK:STDOUT: %.loc10_19.1: type = value_of_initializer %.loc10_17 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_19.2: type = converted %.loc10_17, %.loc10_19.1 [template = constants.%.5] -// CHECK:STDOUT: %T.loc10_6.1: %.5 = param T +// CHECK:STDOUT: %.loc10: type = interface_type @Generic, @Generic(constants.%B) [template = constants.%.5] +// CHECK:STDOUT: %T.loc10_6.1: %.5 = param T, runtime_param // CHECK:STDOUT: @G.%T.loc10: %.5 = bind_symbolic_name T 0, %T.loc10_6.1 [symbolic = @G.%T.1 (constants.%T.3)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -424,7 +412,6 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %T.ref: %.5 = name_ref T, %T.loc10 [symbolic = %T.1 (constants.%T.3)] // CHECK:STDOUT: %.loc18: %.4 = converted %T.ref, [template = ] -// CHECK:STDOUT: %F.call: init %.1 = call %F.ref() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -453,7 +440,3 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.1 => constants.%T.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.3) { -// CHECK:STDOUT: %T.1 => constants.%T.3 -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon b/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon index 60cb463ec298..8233be7d7ed4 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_binding_after_assoc_const.carbon @@ -45,14 +45,14 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %T.loc12_8.1: type = param T +// CHECK:STDOUT: %T.loc12_8.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc12_8.2: type = bind_symbolic_name T 1, %T.loc12_8.1 [symbolic = @F.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc12: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: %U: type = assoc_const_decl U [template] // CHECK:STDOUT: %.loc13: %.5 = assoc_entity element1, %U [template = constants.%.6] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %T.loc16_8.1: type = param T +// CHECK:STDOUT: %T.loc16_8.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc16_8.2: type = bind_symbolic_name T 1, %T.loc16_8.1 [symbolic = @G.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc16: %.7 = assoc_entity element2, %G.decl [template = constants.%.8] diff --git a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon index ff4116ab2212..55de8e31ffaa 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon @@ -47,7 +47,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: .AddWith = %AddWith.decl // CHECK:STDOUT: } // CHECK:STDOUT: %AddWith.decl: %AddWith.type = interface_decl @AddWith [template = constants.%AddWith] { -// CHECK:STDOUT: %T.loc4_19.1: type = param T +// CHECK:STDOUT: %T.loc4_19.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T 0, %T.loc4_19.1 [symbolic = @AddWith.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -131,13 +131,11 @@ impl C as AddWith(C) { // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} -// CHECK:STDOUT: %.loc7_20.1: type = value_of_initializer %.loc7_18 [template = constants.%.6] -// CHECK:STDOUT: %.loc7_20.2: type = converted %.loc7_18, %.loc7_20.1 [template = constants.%.6] // CHECK:STDOUT: impl_decl @impl { // CHECK:STDOUT: %C.ref.loc7_6: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %AddWith.ref: %AddWith.type = name_ref AddWith, imports.%import_ref.1 [template = constants.%AddWith] // CHECK:STDOUT: %C.ref.loc7_19: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc7_18: init type = call %AddWith.ref(%C.ref.loc7_19) [template = constants.%.6] +// CHECK:STDOUT: %.loc7: type = interface_type @AddWith, @AddWith(constants.%C) [template = constants.%.6] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon index 8dc3b040eb42..1d5ae16e38a9 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon @@ -69,8 +69,8 @@ interface A(T: type) {} // CHECK:STDOUT: %.6: type = interface_type @GenericNoParams, @GenericNoParams(%T) [symbolic] // CHECK:STDOUT: %Self.4: %.6 = bind_symbolic_name Self 1 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic] -// CHECK:STDOUT: %GenericAndParams.type.2: type = generic_interface_type @GenericAndParams.2 [template] -// CHECK:STDOUT: %GenericAndParams.2: %GenericAndParams.type.2 = struct_value () [template] +// CHECK:STDOUT: %GenericAndParams.type.2: type = generic_interface_type @GenericAndParams.2, @C(%T) [symbolic] +// CHECK:STDOUT: %GenericAndParams.2: %GenericAndParams.type.2 = struct_value () [symbolic] // CHECK:STDOUT: %.7: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%T, %U) [symbolic] // CHECK:STDOUT: %Self.5: %.7 = bind_symbolic_name Self 2 [symbolic] // CHECK:STDOUT: %.8: type = struct_type {} [template] @@ -78,9 +78,10 @@ interface A(T: type) {} // CHECK:STDOUT: %.9: = interface_witness () [template] // CHECK:STDOUT: %.10: type = interface_type @GenericAndParams.1, @GenericAndParams.1(%X) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%X) [template] +// CHECK:STDOUT: %GenericAndParams.type.3: type = generic_interface_type @GenericAndParams.2, @C(%X) [template] +// CHECK:STDOUT: %GenericAndParams.3: %GenericAndParams.type.3 = struct_value () [template] // CHECK:STDOUT: %.11: type = ptr_type %.8 [template] -// CHECK:STDOUT: %.12: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%X) [template] -// CHECK:STDOUT: %.13: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%X, %U) [symbolic] +// CHECK:STDOUT: %.12: type = interface_type @GenericAndParams.2, @GenericAndParams.2(%X, %X) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -94,11 +95,11 @@ interface A(T: type) {} // CHECK:STDOUT: %NotGenericNoParams.decl: type = interface_decl @NotGenericNoParams [template = constants.%.1] {} // CHECK:STDOUT: %NotGenericButParams.decl: %NotGenericButParams.type = interface_decl @NotGenericButParams [template = constants.%NotGenericButParams] {} // CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.1 = interface_decl @GenericAndParams.1 [template = constants.%GenericAndParams.1] { -// CHECK:STDOUT: %T.loc6_28.1: type = param T +// CHECK:STDOUT: %T.loc6_28.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc6_28.2: type = bind_symbolic_name T 0, %T.loc6_28.1 [symbolic = @GenericAndParams.1.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { -// CHECK:STDOUT: %T.loc8_9.1: type = param T +// CHECK:STDOUT: %T.loc8_9.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc8_9.2: type = bind_symbolic_name T 0, %T.loc8_9.1 [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} @@ -106,38 +107,33 @@ interface A(T: type) {} // CHECK:STDOUT: %X.ref.loc14: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %NotGenericNoParams.ref: type = name_ref NotGenericNoParams, %NotGenericNoParams.decl [template = constants.%.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_31.1: type = value_of_initializer %.loc15_30 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_31.2: type = converted %.loc15_30, %.loc15_31.1 [template = constants.%.3] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %X.ref.loc15: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type = name_ref NotGenericButParams, %NotGenericButParams.decl [template = constants.%NotGenericButParams] -// CHECK:STDOUT: %.loc15_30: init type = call %NotGenericButParams.ref() [template = constants.%.3] +// CHECK:STDOUT: %.loc15: type = interface_type @NotGenericButParams [template = constants.%.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_29.1: type = value_of_initializer %.loc16_27 [template = constants.%.10] -// CHECK:STDOUT: %.loc16_29.2: type = converted %.loc16_27, %.loc16_29.1 [template = constants.%.10] // CHECK:STDOUT: impl_decl @impl.3 { // CHECK:STDOUT: %X.ref.loc16_6: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %GenericAndParams.ref.loc16: %GenericAndParams.type.1 = name_ref GenericAndParams, %GenericAndParams.decl [template = constants.%GenericAndParams.1] // CHECK:STDOUT: %X.ref.loc16_28: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc16_27: init type = call %GenericAndParams.ref.loc16(%X.ref.loc16_28) [template = constants.%.10] +// CHECK:STDOUT: %.loc16: type = interface_type @GenericAndParams.1, @GenericAndParams.1(constants.%X) [template = constants.%.10] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 { // CHECK:STDOUT: %X.ref.loc17_6: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %C.ref.loc17: %C.type = name_ref C, %C.decl [template = constants.%C.1] // CHECK:STDOUT: %X.ref.loc17_13: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc17: init type = call %C.ref.loc17(%X.ref.loc17_13) [template = constants.%C.3] +// CHECK:STDOUT: %C.loc17: type = class_type @C, @C(constants.%X) [template = constants.%C.3] // CHECK:STDOUT: %GenericNoParams.ref: type = name_ref GenericNoParams, @C.%GenericNoParams.decl [template = constants.%.5] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18_34.1: type = value_of_initializer %.loc18_32 [template = constants.%.12] -// CHECK:STDOUT: %.loc18_34.2: type = converted %.loc18_32, %.loc18_34.1 [template = constants.%.12] // CHECK:STDOUT: impl_decl @impl.5 { // CHECK:STDOUT: %X.ref.loc18_6: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %C.ref.loc18: %C.type = name_ref C, %C.decl [template = constants.%C.1] // CHECK:STDOUT: %X.ref.loc18_13: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc18_12: init type = call %C.ref.loc18(%X.ref.loc18_13) [template = constants.%C.3] -// CHECK:STDOUT: %GenericAndParams.ref.loc18: %GenericAndParams.type.2 = name_ref GenericAndParams, @C.%GenericAndParams.decl [template = constants.%GenericAndParams.2] +// CHECK:STDOUT: %C.loc18: type = class_type @C, @C(constants.%X) [template = constants.%C.3] +// CHECK:STDOUT: %.loc18_15: %GenericAndParams.type.3 = specific_constant @C.%GenericAndParams.decl, @C(constants.%X) [template = constants.%GenericAndParams.3] +// CHECK:STDOUT: %GenericAndParams.ref.loc18: %GenericAndParams.type.3 = name_ref GenericAndParams, %.loc18_15 [template = constants.%GenericAndParams.3] // CHECK:STDOUT: %X.ref.loc18_33: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc18_32: init type = call %GenericAndParams.ref.loc18(%X.ref.loc18_33) [template = constants.%.12] +// CHECK:STDOUT: %.loc18_32: type = interface_type @GenericAndParams.2, @GenericAndParams.2(constants.%X, constants.%X) [template = constants.%.12] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -244,11 +240,13 @@ interface A(T: type) {} // CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %GenericAndParams.type: type = generic_interface_type @GenericAndParams.2, @C(%T) [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.2)] +// CHECK:STDOUT: %GenericAndParams: @C.%GenericAndParams.type (%GenericAndParams.type.2) = struct_value () [symbolic = %GenericAndParams (constants.%GenericAndParams.2)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %GenericNoParams.decl: type = interface_decl @GenericNoParams [template = constants.%.5] {} -// CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.2 = interface_decl @GenericAndParams.2 [template = constants.%GenericAndParams.2] { -// CHECK:STDOUT: %U.loc10_30.1: type = param U +// CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.2) = interface_decl @GenericAndParams.2 [symbolic = %GenericAndParams (constants.%GenericAndParams.2)] { +// CHECK:STDOUT: %U.loc10_30.1: type = param U, runtime_param // CHECK:STDOUT: %U.loc10_30.2: type = bind_symbolic_name U 1, %U.loc10_30.1 [symbolic = @GenericAndParams.2.%U (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -288,6 +286,10 @@ interface A(T: type) {} // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @C(@C.%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.1(constants.%X) { // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: @@ -300,21 +302,19 @@ interface A(T: type) {} // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.3 +// CHECK:STDOUT: %GenericAndParams => constants.%GenericAndParams.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericAndParams.2(constants.%X) { -// CHECK:STDOUT: %U => constants.%U +// CHECK:STDOUT: specific @GenericAndParams.2(constants.%X, constants.%X) { +// CHECK:STDOUT: %U => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T => constants.%X -// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.12 // CHECK:STDOUT: %Self.2 => constants.%Self.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericAndParams.2(constants.%X, constants.%U) { -// CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_non_generic_implicit_params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -330,7 +330,7 @@ interface A(T: type) {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = interface_decl @A [template = constants.%A] { -// CHECK:STDOUT: %T.loc8_13.1: type = param T +// CHECK:STDOUT: %T.loc8_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc8_13.2: type = bind_name T, %T.loc8_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -358,7 +358,7 @@ interface A(T: type) {} // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = interface_decl @A [template = constants.%A] { -// CHECK:STDOUT: %T.loc7_13.1: type = param T +// CHECK:STDOUT: %T.loc7_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc7_13.2: type = bind_name T, %T.loc7_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/import.carbon b/toolchain/check/testdata/interface/no_prelude/import.carbon index 345b7543cde6..a2a1155c1b28 100644 --- a/toolchain/check/testdata/interface/no_prelude/import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import.carbon @@ -213,17 +213,17 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UseEmpty.decl: %UseEmpty.type = fn_decl @UseEmpty [template = constants.%UseEmpty] { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %e.loc6_13.1: %.1 = param e +// CHECK:STDOUT: %e.loc6_13.1: %.1 = param e, runtime_param0 // CHECK:STDOUT: @UseEmpty.%e: %.1 = bind_name e, %e.loc6_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %UseBasic.decl: %UseBasic.type = fn_decl @UseBasic [template = constants.%UseBasic] { // CHECK:STDOUT: %Basic.ref.loc7: type = name_ref Basic, imports.%import_ref.2 [template = constants.%.3] -// CHECK:STDOUT: %e.loc7_13.1: %.3 = param e +// CHECK:STDOUT: %e.loc7_13.1: %.3 = param e, runtime_param0 // CHECK:STDOUT: @UseBasic.%e: %.3 = bind_name e, %e.loc7_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %UseForwardDeclared.decl: %UseForwardDeclared.type = fn_decl @UseForwardDeclared [template = constants.%UseForwardDeclared] { // CHECK:STDOUT: %ForwardDeclared.ref.loc8: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%.4] -// CHECK:STDOUT: %f.loc8_23.1: %.4 = param f +// CHECK:STDOUT: %f.loc8_23.1: %.4 = param f, runtime_param0 // CHECK:STDOUT: @UseForwardDeclared.%f: %.4 = bind_name f, %f.loc8_23.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Basic.ref.loc10: type = name_ref Basic, imports.%import_ref.2 [template = constants.%.3] diff --git a/toolchain/check/testdata/interface/no_prelude/import_access.carbon b/toolchain/check/testdata/interface/no_prelude/import_access.carbon index 80ba60b6b75a..4f72b9769948 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_access.carbon @@ -215,7 +215,7 @@ private interface Redecl {} // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Def.ref: type = name_ref Def, imports.%import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %i.loc4_6.1: %.1 = param i +// CHECK:STDOUT: %i.loc4_6.1: %.1 = param i, runtime_param0 // CHECK:STDOUT: @F.%i: %.1 = bind_name i, %i.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -246,7 +246,7 @@ private interface Redecl {} // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] -// CHECK:STDOUT: %i.loc10_6.1: = param i +// CHECK:STDOUT: %i.loc10_6.1: = param i, runtime_param0 // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc10_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -279,7 +279,7 @@ private interface Redecl {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] // CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] -// CHECK:STDOUT: %i.loc10_6.1: = param i +// CHECK:STDOUT: %i.loc10_6.1: = param i, runtime_param0 // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc10_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -313,7 +313,7 @@ private interface Redecl {} // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %ForwardWithDef.ref: type = name_ref ForwardWithDef, imports.%import_ref.1 [template = constants.%.1] -// CHECK:STDOUT: %i.loc4_6.1: %.1 = param i +// CHECK:STDOUT: %i.loc4_6.1: %.1 = param i, runtime_param0 // CHECK:STDOUT: @F.%i: %.1 = bind_name i, %i.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -344,7 +344,7 @@ private interface Redecl {} // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] -// CHECK:STDOUT: %i.loc10_6.1: = param i +// CHECK:STDOUT: %i.loc10_6.1: = param i, runtime_param0 // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc10_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -377,7 +377,7 @@ private interface Redecl {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] // CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] -// CHECK:STDOUT: %i.loc10_6.1: = param i +// CHECK:STDOUT: %i.loc10_6.1: = param i, runtime_param0 // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc10_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -407,7 +407,7 @@ private interface Redecl {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc8: type = ptr_type [template = ] -// CHECK:STDOUT: %i.loc8_6.1: = param i +// CHECK:STDOUT: %i.loc8_6.1: = param i, runtime_param0 // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc8_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Forward.decl: type = interface_decl @Forward [template = constants.%.2] {} @@ -442,7 +442,7 @@ private interface Redecl {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc10: type = ptr_type [template = ] -// CHECK:STDOUT: %i.loc10_6.1: = param i +// CHECK:STDOUT: %i.loc10_6.1: = param i, runtime_param0 // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc10_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -475,7 +475,7 @@ private interface Redecl {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] // CHECK:STDOUT: %.loc9: type = ptr_type [template = ] -// CHECK:STDOUT: %i.loc9_6.1: = param i +// CHECK:STDOUT: %i.loc9_6.1: = param i, runtime_param0 // CHECK:STDOUT: @F.%i: = bind_name i, %i.loc9_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/self.carbon b/toolchain/check/testdata/interface/no_prelude/self.carbon index 8a4f0f072393..a2b4b2f4ceac 100644 --- a/toolchain/check/testdata/interface/no_prelude/self.carbon +++ b/toolchain/check/testdata/interface/no_prelude/self.carbon @@ -37,7 +37,7 @@ interface UseSelf { // CHECK:STDOUT: %Self.ref.loc12_14: %.1 = name_ref Self, %Self [symbolic = @F.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = @F.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = @F.%Self (constants.%Self)] -// CHECK:STDOUT: %self.loc12_8.1: @F.%Self (%Self) = param self +// CHECK:STDOUT: %self.loc12_8.1: @F.%Self (%Self) = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_8.2: @F.%Self (%Self) = bind_name self, %self.loc12_8.1 // CHECK:STDOUT: %Self.ref.loc12_25: %.1 = name_ref Self, %Self [symbolic = @F.%Self (constants.%Self)] // CHECK:STDOUT: %.loc12_25.1: type = facet_type_access %Self.ref.loc12_25 [symbolic = @F.%Self (constants.%Self)] diff --git a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon index c39b34c63618..e01d7644e504 100644 --- a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon @@ -220,22 +220,22 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_15.1: %C = param a +// CHECK:STDOUT: %a.loc7_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a 0, %a.loc7_15.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc8_15.1: %C = param a +// CHECK:STDOUT: %a.loc8_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc8_15.2: %C = bind_symbolic_name a 0, %a.loc8_15.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = interface_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %D.ref.loc10: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc10_15.1: %C = param a +// CHECK:STDOUT: %a.loc10_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc10_15.2: %C = bind_symbolic_name a 0, %a.loc10_15.1 [symbolic = @Bar.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = interface_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %D.ref.loc11: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc11_15.1: %C = param a +// CHECK:STDOUT: %a.loc11_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc11_15.2: %C = bind_symbolic_name a 0, %a.loc11_15.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -314,12 +314,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_21.1: %C = param a +// CHECK:STDOUT: %a.loc6_21.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6_21.2: %C = bind_symbolic_name a 0, %a.loc6_21.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_17.1: %C = param a +// CHECK:STDOUT: %a.loc7_17.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_17.2: %C = bind_symbolic_name a 0, %a.loc7_17.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -376,12 +376,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_15.1: %C = param a +// CHECK:STDOUT: %a.loc6_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6_15.2: %C = bind_symbolic_name a 0, %a.loc6_15.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc14_15.1: %C = param a +// CHECK:STDOUT: %a.loc14_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc14_15.2: %C = bind_symbolic_name a 0, %a.loc14_15.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -446,12 +446,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_15.1: %C = param a +// CHECK:STDOUT: %a.loc6_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6_15.2: %C = bind_symbolic_name a 0, %a.loc6_15.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_15.1: %C = param a +// CHECK:STDOUT: %a.loc7_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a 0, %a.loc7_15.1 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -510,12 +510,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_15.1: %C = param a +// CHECK:STDOUT: %a.loc7_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a 0, %a.loc7_15.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = interface_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc8_15.1: %C = param a +// CHECK:STDOUT: %a.loc8_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc8_15.2: %C = bind_symbolic_name a 0, %a.loc8_15.1 [symbolic = @Bar.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -585,12 +585,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %.decl.loc14: %.type.1 = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %a.loc14_15.1: %C = param a +// CHECK:STDOUT: %a.loc14_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc14_15.2: %C = bind_symbolic_name a 0, %a.loc14_15.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc25: %.type.2 = interface_decl @.2 [template = constants.%.5] { // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %a.loc25_15.1: %C = param a +// CHECK:STDOUT: %a.loc25_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc25_15.2: %C = bind_symbolic_name a 0, %a.loc25_15.1 [symbolic = @.2.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -695,12 +695,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_15.1: %C = param a +// CHECK:STDOUT: %a.loc7_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a 0, %a.loc7_15.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %b.loc15_15.1: %C = param b +// CHECK:STDOUT: %b.loc15_15.1: %C = param b, runtime_param // CHECK:STDOUT: %b.loc15_15.2: %C = bind_symbolic_name b 0, %b.loc15_15.1 [symbolic = @.1.%b (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -770,12 +770,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_15.1: %C = param a +// CHECK:STDOUT: %a.loc7_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a 0, %a.loc7_15.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc15_15.1: %C = param a +// CHECK:STDOUT: %a.loc15_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc15_15.2: %C = bind_symbolic_name a 0, %a.loc15_15.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -845,12 +845,12 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, %C.decl [template = constants.%C] // CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc7_15.1: %C = param a +// CHECK:STDOUT: %a.loc7_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a 0, %a.loc7_15.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc15_15.1: %C = param a +// CHECK:STDOUT: %a.loc15_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc15_15.2: %C = bind_symbolic_name a 0, %a.loc15_15.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -913,7 +913,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc6_15.1: %C = param a +// CHECK:STDOUT: %a.loc6_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc6_15.2: %C = bind_symbolic_name a 0, %a.loc6_15.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -966,7 +966,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %D: type = bind_alias D, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.3] { // CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %a.loc19_15.1: %C = param a +// CHECK:STDOUT: %a.loc19_15.1: %C = param a, runtime_param // CHECK:STDOUT: %a.loc19_15.2: %C = bind_symbolic_name a 0, %a.loc19_15.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1035,14 +1035,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc6: type = const_type %C [template = constants.%.2] -// CHECK:STDOUT: %a.loc6_15.1: %.2 = param a +// CHECK:STDOUT: %a.loc6_15.1: %.2 = param a, runtime_param // CHECK:STDOUT: %a.loc6_15.2: %.2 = bind_symbolic_name a 0, %a.loc6_15.1 [symbolic = @Foo.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = interface_decl @.1 [template = constants.%.4] { // CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc17_26: type = const_type %C [template = constants.%.2] // CHECK:STDOUT: %.loc17_19: type = const_type %.2 [template = constants.%.2] -// CHECK:STDOUT: %a.loc17_15.1: %.2 = param a +// CHECK:STDOUT: %a.loc17_15.1: %.2 = param a, runtime_param // CHECK:STDOUT: %a.loc17_15.2: %.2 = bind_symbolic_name a 0, %a.loc17_15.1 [symbolic = @.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index c4e6df3ba27d..1866820e7d62 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -76,12 +76,12 @@ interface I { // CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32.loc14_11 [template = i32] // CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32.loc14_11, %.loc14_11.1 [template = i32] -// CHECK:STDOUT: %a.loc14_8.1: i32 = param a +// CHECK:STDOUT: %a.loc14_8.1: i32 = param a, runtime_param0 // CHECK:STDOUT: %a.loc14_8.2: i32 = bind_name a, %a.loc14_8.1 // CHECK:STDOUT: %int.make_type_32.loc14_19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_32.loc14_19 [template = i32] // CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_32.loc14_19, %.loc14_19.1 [template = i32] -// CHECK:STDOUT: %b.loc14_16.1: i32 = param b +// CHECK:STDOUT: %b.loc14_16.1: i32 = param b, runtime_param1 // CHECK:STDOUT: %b.loc14_16.2: i32 = bind_name b, %b.loc14_16.1 // CHECK:STDOUT: %int.make_type_32.loc14_27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_32.loc14_27 [template = i32] diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index d20cca1e7959..b0e2213a2b67 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -93,7 +93,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc12_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_32.loc12_9 [template = i32] // CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_32.loc12_9, %.loc12_9.1 [template = i32] -// CHECK:STDOUT: %a.loc12_6.1: i32 = param a +// CHECK:STDOUT: %a.loc12_6.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc12_6.1 // CHECK:STDOUT: %int.make_type_32.loc12_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_32.loc12_17 [template = i32] @@ -131,13 +131,13 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T 0, %.loc13_21.2 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %.loc21_14: i32 = int_literal 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_15.1: init type = call constants.%ImplicitAs(constants.%T) [symbolic = constants.%.6] +// CHECK:STDOUT: %.loc21_15.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%T) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc21_15.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%T) [symbolic = constants.%.8] // CHECK:STDOUT: %Convert.ref.loc21: %.7 = name_ref Convert, %.loc21_15.2 [symbolic = constants.%.8] // CHECK:STDOUT: %.loc21_15.3: %T = converted %.loc21_14, [template = ] // CHECK:STDOUT: %x: %T = bind_name x, // CHECK:STDOUT: %x.ref: %T = name_ref x, %x -// CHECK:STDOUT: %.loc28_11.1: init type = call constants.%ImplicitAs(i32) [template = constants.%.10] +// CHECK:STDOUT: %.loc28_11.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.10] // CHECK:STDOUT: %.loc28_11.2: %.11 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.12] // CHECK:STDOUT: %Convert.ref.loc28: %.11 = name_ref Convert, %.loc28_11.2 [template = constants.%.12] // CHECK:STDOUT: %.loc28_11.3: i32 = converted %x.ref, [template = ] diff --git a/toolchain/check/testdata/let/fail_generic_import.carbon b/toolchain/check/testdata/let/fail_generic_import.carbon index df38ee91c60e..87671e84d427 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -157,7 +157,7 @@ let a: T = 0; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_12: i32 = int_literal 0 [template = constants.%.1] -// CHECK:STDOUT: %.loc11_13.1: init type = call constants.%ImplicitAs(constants.%T) [symbolic = constants.%.6] +// CHECK:STDOUT: %.loc11_13.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%T) [symbolic = constants.%.6] // CHECK:STDOUT: %.loc11_13.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%T) [symbolic = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc11_13.2 [symbolic = constants.%.8] // CHECK:STDOUT: %.loc11_13.3: %T = converted %.loc11_12, [template = ] diff --git a/toolchain/check/testdata/let/local.carbon b/toolchain/check/testdata/let/local.carbon index 597ab33a651d..b6ce53420570 100644 --- a/toolchain/check/testdata/let/local.carbon +++ b/toolchain/check/testdata/let/local.carbon @@ -48,7 +48,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32] -// CHECK:STDOUT: %a.loc11_6.1: i32 = param a +// CHECK:STDOUT: %a.loc11_6.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc11_6.1 // CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_32.loc11_17 [template = i32] diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 19119ada4e96..cf00d57f939e 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -50,7 +50,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32] // CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32] -// CHECK:STDOUT: %a.loc11_6.1: i32 = param a +// CHECK:STDOUT: %a.loc11_6.1: i32 = param a, runtime_param0 // CHECK:STDOUT: @F.%a.loc11: i32 = bind_name a, %a.loc11_6.1 // CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_32.loc11_17 [template = i32] diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index 077ac5d3522d..049d75502318 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -82,18 +82,18 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc24_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc24_16.2: type = converted %int.make_type_32, %.loc24_16.1 [template = i32] -// CHECK:STDOUT: %n.loc24_13.1: i32 = param n +// CHECK:STDOUT: %n.loc24_13.1: i32 = param n, runtime_param // CHECK:STDOUT: %n.loc24_13.2: i32 = bind_name n, %n.loc24_13.1 // CHECK:STDOUT: %B: = namespace [template] {} -// CHECK:STDOUT: %T.loc30_13.1: type = param T +// CHECK:STDOUT: %T.loc30_13.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc30_13.2: type = bind_symbolic_name T 0, %T.loc30_13.1 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc30_13.2 [symbolic = constants.%T] -// CHECK:STDOUT: %x.loc30_23.1: %T = param x +// CHECK:STDOUT: %x.loc30_23.1: %T = param x, runtime_param // CHECK:STDOUT: %x.loc30_23.2: %T = bind_name x, %x.loc30_23.1 // CHECK:STDOUT: %C: = namespace [template] {} // CHECK:STDOUT: %D: = namespace [template] {} // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] { -// CHECK:STDOUT: %T.loc39_6.1: type = param T +// CHECK:STDOUT: %T.loc39_6.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc39_6.2: type = bind_symbolic_name T 0, %T.loc39_6.1 [symbolic = @.1.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index ff1bc7f44fbf..cd493a68e7a6 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -95,7 +95,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] // CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type.loc25, %.loc25_23.1 [template = bool] -// CHECK:STDOUT: %x.loc25_20.1: bool = param x +// CHECK:STDOUT: %x.loc25_20.1: bool = param x, runtime_param0 // CHECK:STDOUT: @PartialConstant.%x: bool = bind_name x, %x.loc25_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index 60f851cae5fb..ec5ef6eb284d 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -78,7 +78,7 @@ var or_: F(true or true); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %.loc42_17: bool = block_arg [template = constants.%.3] +// CHECK:STDOUT: %.loc42_17: bool = block_arg [template = constants.%.3] // CHECK:STDOUT: %F.call: init type = call .inst+60.loc42_10(%.loc42_17) // CHECK:STDOUT: %.loc42_24.1: type = value_of_initializer %F.call // CHECK:STDOUT: %.loc42_24.2: type = converted %F.call, %.loc42_24.1 diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon index 6dd42b3a38d7..cb75d0735bfe 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon @@ -80,7 +80,7 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_23.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_23.2: type = converted %bool.make_type, %.loc4_23.1 [template = bool] -// CHECK:STDOUT: %x.loc4_20.1: bool = param x +// CHECK:STDOUT: %x.loc4_20.1: bool = param x, runtime_param0 // CHECK:STDOUT: @PartialConstant.%x: bool = bind_name x, %x.loc4_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -184,7 +184,7 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_41.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc4_41.2: type = converted %bool.make_type, %.loc4_41.1 [template = bool] -// CHECK:STDOUT: %x.loc4_38.1: bool = param x +// CHECK:STDOUT: %x.loc4_38.1: bool = param x, runtime_param0 // CHECK:STDOUT: @KnownValueButNonConstantCondition.%x: bool = bind_name x, %x.loc4_38.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index 38ff06a8c765..599bb8b88e62 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -103,7 +103,7 @@ fn Main() { // CHECK:STDOUT: %x.var: ref bool = var x // CHECK:STDOUT: %x: ref bool = bind_name x, %x.var // CHECK:STDOUT: %.loc18_21: i32 = int_literal 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_17.1: init type = call constants.%ImplicitAs(bool) [template = constants.%.6] +// CHECK:STDOUT: %.loc18_17.1: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template = constants.%.6] // CHECK:STDOUT: %.loc18_17.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(bool) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc18_17.2 [template = constants.%.8] // CHECK:STDOUT: %.loc18_17.3: bool = converted %.loc18_21, [template = ] diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index 7168ddb53597..19f9b2903691 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -108,7 +108,7 @@ fn Main() { // CHECK:STDOUT: assign %a.var, %.loc12_16 // CHECK:STDOUT: %a.ref: ref i32 = name_ref a, %a // CHECK:STDOUT: %.loc19_7: f64 = float_literal 5.6000000000000005 [template = constants.%.3] -// CHECK:STDOUT: %.loc19_5.1: init type = call constants.%ImplicitAs(i32) [template = constants.%.7] +// CHECK:STDOUT: %.loc19_5.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.7] // CHECK:STDOUT: %.loc19_5.2: %.8 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc19_5.2 [template = constants.%.9] // CHECK:STDOUT: %.loc19_5.3: i32 = converted %.loc19_7, [template = ] diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index 56804c4979e8..64ce6858a05a 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -95,7 +95,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] // CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type.loc25, %.loc25_23.1 [template = bool] -// CHECK:STDOUT: %x.loc25_20.1: bool = param x +// CHECK:STDOUT: %x.loc25_20.1: bool = param x, runtime_param0 // CHECK:STDOUT: @PartialConstant.%x: bool = bind_name x, %x.loc25_20.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index ffaa6ff08b72..b10f6ed3aafe 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -63,7 +63,7 @@ fn Constant() { // CHECK:STDOUT: %bool.make_type.loc11_11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11_11 [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11_11, %.loc11_11.1 [template = bool] -// CHECK:STDOUT: %b.loc11_8.1: bool = param b +// CHECK:STDOUT: %b.loc11_8.1: bool = param b, runtime_param0 // CHECK:STDOUT: @Not.%b: bool = bind_name b, %b.loc11_8.1 // CHECK:STDOUT: %bool.make_type.loc11_20: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %bool.make_type.loc11_20 [template = bool] diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index 02018757f305..f8b87c76e5aa 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index 1b38c3cf2c0d..9af6facbda41 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index 7dd2c6e5481e..a4b7c31ed3cc 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -79,7 +79,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc23_11.1: %C = param a +// CHECK:STDOUT: %a.loc23_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc23_11.1 // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -96,7 +96,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: impl @impl: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index 3c652647e8b4..8b0e1cd77796 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index 50aba8d4de06..7879a95b86eb 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 5dc9383bbca9..53e186f5d4a3 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -92,7 +92,7 @@ fn TestOp() { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc18_21: type = ptr_type %C [template = constants.%.3] -// CHECK:STDOUT: %self.loc18_14.1: %.3 = param self +// CHECK:STDOUT: %self.loc18_14.1: %.3 = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_14.3: %.3 = bind_name self, %self.loc18_14.1 // CHECK:STDOUT: %.loc18_9: %.3 = addr_pattern %self.loc18_14.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index e672dbfefa77..ec57570e781c 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index 2c821b6b9742..58d665e905ff 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -152,10 +152,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestEqual.decl: %TestEqual.type = fn_decl @TestEqual [template = constants.%TestEqual] { // CHECK:STDOUT: %C.ref.loc11_17: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc11_14.1: %C = param a +// CHECK:STDOUT: %a.loc11_14.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestEqual.%a: %C = bind_name a, %a.loc11_14.1 // CHECK:STDOUT: %C.ref.loc11_23: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc11_20.1: %C = param b +// CHECK:STDOUT: %b.loc11_20.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestEqual.%b: %C = bind_name b, %b.loc11_20.1 // CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] @@ -164,10 +164,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestNotEqual.decl: %TestNotEqual.type = fn_decl @TestNotEqual [template = constants.%TestNotEqual] { // CHECK:STDOUT: %C.ref.loc15_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc15_17.1: %C = param a +// CHECK:STDOUT: %a.loc15_17.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestNotEqual.%a: %C = bind_name a, %a.loc15_17.1 // CHECK:STDOUT: %C.ref.loc15_26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc15_23.1: %C = param b +// CHECK:STDOUT: %b.loc15_23.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestNotEqual.%b: %C = bind_name b, %b.loc15_23.1 // CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] @@ -187,10 +187,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: impl @impl: %C as %.2 { // CHECK:STDOUT: %Equal.decl: %Equal.type.1 = fn_decl @Equal.1 [template = constants.%Equal.1] { // CHECK:STDOUT: %C.ref.loc7_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc7_12.1: %C = param self +// CHECK:STDOUT: %self.loc7_12.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc7_12.2: %C = bind_name self, %self.loc7_12.1 // CHECK:STDOUT: %C.ref.loc7_28: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc7_21.1: %C = param other +// CHECK:STDOUT: %other.loc7_21.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc7_21.2: %C = bind_name other, %other.loc7_21.1 // CHECK:STDOUT: %bool.make_type.loc7: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc7_34.1: type = value_of_initializer %bool.make_type.loc7 [template = bool] @@ -199,10 +199,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %NotEqual.decl: %NotEqual.type.1 = fn_decl @NotEqual.1 [template = constants.%NotEqual.1] { // CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc8_15.1: %C = param self +// CHECK:STDOUT: %self.loc8_15.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc8_15.2: %C = bind_name self, %self.loc8_15.1 // CHECK:STDOUT: %C.ref.loc8_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc8_24.1: %C = param other +// CHECK:STDOUT: %other.loc8_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc8_24.2: %C = bind_name other, %other.loc8_24.1 // CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_37.1: type = value_of_initializer %bool.make_type.loc8 [template = bool] @@ -342,10 +342,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: %TestEqual.decl: %TestEqual.type = fn_decl @TestEqual [template = constants.%TestEqual] { // CHECK:STDOUT: %D.ref.loc6_17: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc6_14.1: %D = param a +// CHECK:STDOUT: %a.loc6_14.1: %D = param a, runtime_param0 // CHECK:STDOUT: @TestEqual.%a: %D = bind_name a, %a.loc6_14.1 // CHECK:STDOUT: %D.ref.loc6_23: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc6_20.1: %D = param b +// CHECK:STDOUT: %b.loc6_20.1: %D = param b, runtime_param1 // CHECK:STDOUT: @TestEqual.%b: %D = bind_name b, %b.loc6_20.1 // CHECK:STDOUT: %bool.make_type.loc6: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %bool.make_type.loc6 [template = bool] @@ -354,10 +354,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestNotEqual.decl: %TestNotEqual.type = fn_decl @TestNotEqual [template = constants.%TestNotEqual] { // CHECK:STDOUT: %D.ref.loc14_20: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc14_17.1: %D = param a +// CHECK:STDOUT: %a.loc14_17.1: %D = param a, runtime_param0 // CHECK:STDOUT: @TestNotEqual.%a: %D = bind_name a, %a.loc14_17.1 // CHECK:STDOUT: %D.ref.loc14_26: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc14_23.1: %D = param b +// CHECK:STDOUT: %b.loc14_23.1: %D = param b, runtime_param1 // CHECK:STDOUT: @TestNotEqual.%b: %D = bind_name b, %b.loc14_23.1 // CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_32.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] @@ -513,10 +513,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestRhsBad.decl: %TestRhsBad.type = fn_decl @TestRhsBad [template = constants.%TestRhsBad] { // CHECK:STDOUT: %C.ref.loc12: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc12_15.1: %C = param a +// CHECK:STDOUT: %a.loc12_15.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestRhsBad.%a: %C = bind_name a, %a.loc12_15.1 // CHECK:STDOUT: %D.ref.loc12: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc12_21.1: %D = param b +// CHECK:STDOUT: %b.loc12_21.1: %D = param b, runtime_param1 // CHECK:STDOUT: @TestRhsBad.%b: %D = bind_name b, %b.loc12_21.1 // CHECK:STDOUT: %bool.make_type.loc12: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_30.1: type = value_of_initializer %bool.make_type.loc12 [template = bool] @@ -525,10 +525,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestLhsBad.decl: %TestLhsBad.type = fn_decl @TestLhsBad [template = constants.%TestLhsBad] { // CHECK:STDOUT: %D.ref.loc26: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc26_15.1: %D = param a +// CHECK:STDOUT: %a.loc26_15.1: %D = param a, runtime_param0 // CHECK:STDOUT: @TestLhsBad.%a: %D = bind_name a, %a.loc26_15.1 // CHECK:STDOUT: %C.ref.loc26: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_21.1: %C = param b +// CHECK:STDOUT: %b.loc26_21.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestLhsBad.%b: %C = bind_name b, %b.loc26_21.1 // CHECK:STDOUT: %bool.make_type.loc26: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc26_30.1: type = value_of_initializer %bool.make_type.loc26 [template = bool] @@ -567,10 +567,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: impl @impl: %C as %.2 { // CHECK:STDOUT: %Equal.decl: %Equal.type.1 = fn_decl @Equal.1 [template = constants.%Equal.1] { // CHECK:STDOUT: %C.ref.loc8_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc8_12.1: %C = param self +// CHECK:STDOUT: %self.loc8_12.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc8_12.2: %C = bind_name self, %self.loc8_12.1 // CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc8_21.1: %C = param other +// CHECK:STDOUT: %other.loc8_21.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc8_21.2: %C = bind_name other, %other.loc8_21.1 // CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_34.1: type = value_of_initializer %bool.make_type.loc8 [template = bool] @@ -579,10 +579,10 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %NotEqual.decl: %NotEqual.type.1 = fn_decl @NotEqual.1 [template = constants.%NotEqual.1] { // CHECK:STDOUT: %C.ref.loc9_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc9_15.1: %C = param self +// CHECK:STDOUT: %self.loc9_15.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc9_15.2: %C = bind_name self, %self.loc9_15.1 // CHECK:STDOUT: %C.ref.loc9_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc9_24.1: %C = param other +// CHECK:STDOUT: %other.loc9_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc9_24.2: %C = bind_name other, %other.loc9_24.1 // CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc9_37.1: type = value_of_initializer %bool.make_type.loc9 [template = bool] @@ -632,7 +632,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Equal.ref: %.6 = name_ref Equal, imports.%import_ref.3 [template = constants.%.7] // CHECK:STDOUT: %.loc23_12.1: %Equal.type.2 = interface_witness_access @impl.%.loc7, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc23_12.2: = bound_method %a.ref, %.loc23_12.1 -// CHECK:STDOUT: %.loc23_12.3: init type = call constants.%ImplicitAs(constants.%C) [template = constants.%.11] +// CHECK:STDOUT: %.loc23_12.3: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.11] // CHECK:STDOUT: %.loc23_12.4: %.12 = specific_constant imports.%import_ref.11, @ImplicitAs(constants.%C) [template = constants.%.13] // CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc23_12.4 [template = constants.%.13] // CHECK:STDOUT: %.loc23_12.5: %C = converted %b.ref, [template = ] diff --git a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon index d04378316090..a9bf84305247 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -120,15 +120,15 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestIncNonRef.decl: %TestIncNonRef.type = fn_decl @TestIncNonRef [template = constants.%TestIncNonRef] { // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc22_18.1: %C = param a +// CHECK:STDOUT: %a.loc22_18.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestIncNonRef.%a: %C = bind_name a, %a.loc22_18.1 // CHECK:STDOUT: } // CHECK:STDOUT: %TestAddAssignNonRef.decl: %TestAddAssignNonRef.type = fn_decl @TestAddAssignNonRef [template = constants.%TestAddAssignNonRef] { // CHECK:STDOUT: %C.ref.loc33_27: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc33_24.1: %C = param a +// CHECK:STDOUT: %a.loc33_24.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestAddAssignNonRef.%a: %C = bind_name a, %a.loc33_24.1 // CHECK:STDOUT: %C.ref.loc33_33: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc33_30.1: %C = param b +// CHECK:STDOUT: %b.loc33_30.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAddAssignNonRef.%b: %C = bind_name b, %b.loc33_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -151,7 +151,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc16_21: type = ptr_type %C [template = constants.%.3] -// CHECK:STDOUT: %self.loc16_14.1: %.3 = param self +// CHECK:STDOUT: %self.loc16_14.1: %.3 = param self, runtime_param0 // CHECK:STDOUT: %self.loc16_14.3: %.3 = bind_name self, %self.loc16_14.1 // CHECK:STDOUT: %.loc16_9: %.3 = addr_pattern %self.loc16_14.3 // CHECK:STDOUT: } @@ -166,11 +166,11 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc19_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc19_21: type = ptr_type %C [template = constants.%.3] -// CHECK:STDOUT: %self.loc19_14.1: %.3 = param self +// CHECK:STDOUT: %self.loc19_14.1: %.3 = param self, runtime_param0 // CHECK:STDOUT: %self.loc19_14.3: %.3 = bind_name self, %self.loc19_14.1 // CHECK:STDOUT: %.loc19_9: %.3 = addr_pattern %self.loc19_14.3 // CHECK:STDOUT: %C.ref.loc19_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc19_24.1: %C = param other +// CHECK:STDOUT: %other.loc19_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc19_24.2: %C = bind_name other, %other.loc19_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc18: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index caf900a44f77..6946c2261d3a 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -132,24 +132,24 @@ fn TestRef(b: C) { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} // CHECK:STDOUT: %TestUnary.decl: %TestUnary.type = fn_decl @TestUnary [template = constants.%TestUnary] { // CHECK:STDOUT: %C.ref.loc15_17: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc15_14.1: %C = param a +// CHECK:STDOUT: %a.loc15_14.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestUnary.%a: %C = bind_name a, %a.loc15_14.1 // CHECK:STDOUT: %C.ref.loc15_23: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestUnary.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestBinary.decl: %TestBinary.type = fn_decl @TestBinary [template = constants.%TestBinary] { // CHECK:STDOUT: %C.ref.loc23_18: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc23_15.1: %C = param a +// CHECK:STDOUT: %a.loc23_15.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestBinary.%a: %C = bind_name a, %a.loc23_15.1 // CHECK:STDOUT: %C.ref.loc23_24: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc23_21.1: %C = param b +// CHECK:STDOUT: %b.loc23_21.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestBinary.%b: %C = bind_name b, %b.loc23_21.1 // CHECK:STDOUT: %C.ref.loc23_30: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestBinary.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestRef.decl: %TestRef.type = fn_decl @TestRef [template = constants.%TestRef] { // CHECK:STDOUT: %C.ref.loc31: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc31_12.1: %C = param b +// CHECK:STDOUT: %b.loc31_12.1: %C = param b, runtime_param0 // CHECK:STDOUT: @TestRef.%b: %C = bind_name b, %b.loc31_12.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon index 26b7b3b06d1f..48b0bdb1ae8f 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon @@ -154,17 +154,17 @@ fn TestAssign(b: D) { // CHECK:STDOUT: } // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] { // CHECK:STDOUT: %C.ref.loc23_12: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc23_9.1: %C = param a +// CHECK:STDOUT: %a.loc23_9.1: %C = param a, runtime_param0 // CHECK:STDOUT: @Test.%a: %C = bind_name a, %a.loc23_9.1 // CHECK:STDOUT: %D.ref.loc23: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc23_15.1: %D = param b +// CHECK:STDOUT: %b.loc23_15.1: %D = param b, runtime_param1 // CHECK:STDOUT: @Test.%b: %D = bind_name b, %b.loc23_15.1 // CHECK:STDOUT: %C.ref.loc23_24: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @Test.%return: ref %C = var // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %D.ref.loc37: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc37_15.1: %D = param b +// CHECK:STDOUT: %b.loc37_15.1: %D = param b, runtime_param0 // CHECK:STDOUT: @TestAssign.%b: %D = bind_name b, %b.loc37_15.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -205,10 +205,10 @@ fn TestAssign(b: D) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc17_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc17_9.1: %C = param self +// CHECK:STDOUT: %self.loc17_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc17_9.2: %C = bind_name self, %self.loc17_9.1 // CHECK:STDOUT: %C.ref.loc17_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc17_18.1: %C = param other +// CHECK:STDOUT: %other.loc17_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc17_18.2: %C = bind_name other, %other.loc17_18.1 // CHECK:STDOUT: %C.ref.loc17_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -224,11 +224,11 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc20_21: type = ptr_type %C [template = constants.%.6] -// CHECK:STDOUT: %self.loc20_14.1: %.6 = param self +// CHECK:STDOUT: %self.loc20_14.1: %.6 = param self, runtime_param0 // CHECK:STDOUT: %self.loc20_14.3: %.6 = bind_name self, %self.loc20_14.1 // CHECK:STDOUT: %.loc20_9: %.6 = addr_pattern %self.loc20_14.3 // CHECK:STDOUT: %C.ref.loc20_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc20_24.1: %C = param other +// CHECK:STDOUT: %other.loc20_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc20_24.2: %C = bind_name other, %other.loc20_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc19: = interface_witness (%Op.decl) [template = constants.%.8] @@ -273,7 +273,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %.loc34_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc16, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc34_12.2: = bound_method %a.ref, %.loc34_12.1 // CHECK:STDOUT: %.loc34_12.3: ref %C = temporary_storage -// CHECK:STDOUT: %.loc34_12.4: init type = call constants.%ImplicitAs(constants.%C) [template = constants.%.15] +// CHECK:STDOUT: %.loc34_12.4: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.15] // CHECK:STDOUT: %.loc34_12.5: %.16 = specific_constant imports.%import_ref.12, @ImplicitAs(constants.%C) [template = constants.%.17] // CHECK:STDOUT: %Convert.ref: %.16 = name_ref Convert, %.loc34_12.5 [template = constants.%.17] // CHECK:STDOUT: %.loc34_12.6: %C = converted %b.ref, [template = ] @@ -304,7 +304,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %.loc48_5.1: %Op.type.4 = interface_witness_access @impl.2.%.loc19, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc48_5.2: = bound_method %a.ref, %.loc48_5.1 // CHECK:STDOUT: %.loc48_3: %.6 = addr_of %a.ref -// CHECK:STDOUT: %.loc48_5.3: init type = call constants.%ImplicitAs(constants.%C) [template = constants.%.15] +// CHECK:STDOUT: %.loc48_5.3: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C) [template = constants.%.15] // CHECK:STDOUT: %.loc48_5.4: %.16 = specific_constant imports.%import_ref.12, @ImplicitAs(constants.%C) [template = constants.%.17] // CHECK:STDOUT: %Convert.ref: %.16 = name_ref Convert, %.loc48_5.4 [template = constants.%.17] // CHECK:STDOUT: %.loc48_5.5: %C = converted %b.ref, [template = ] diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index 7b4d60f7ca93..ea7ce7bdc213 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -112,8 +112,6 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} -// CHECK:STDOUT: %.loc15_30.1: type = value_of_initializer %.loc15_28 [template = constants.%.7] -// CHECK:STDOUT: %.loc15_30.2: type = converted %.loc15_28, %.loc15_30.1 [template = constants.%.7] // CHECK:STDOUT: impl_decl @impl.1 { // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] @@ -121,10 +119,8 @@ fn Test() { // CHECK:STDOUT: %Core.ref.loc15: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref.loc15: %ImplicitAs.type = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %X.ref.loc15: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc15_28: init type = call %ImplicitAs.ref.loc15(%X.ref.loc15) [template = constants.%.7] +// CHECK:STDOUT: %.loc15_28: type = interface_type @ImplicitAs, @ImplicitAs(constants.%X) [template = constants.%.7] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_30.1: type = value_of_initializer %.loc19_26.3 [template = constants.%.12] -// CHECK:STDOUT: %.loc19_30.2: type = converted %.loc19_26.3, %.loc19_30.1 [template = constants.%.12] // CHECK:STDOUT: impl_decl @impl.2 { // CHECK:STDOUT: %X.ref.loc19: type = name_ref X, %X.decl [template = constants.%X] // CHECK:STDOUT: %Core.ref.loc19: = name_ref Core, imports.%Core [template = imports.%Core] @@ -132,22 +128,22 @@ fn Test() { // CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc19_26.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_26.2: type = converted %int.make_type_32.loc19, %.loc19_26.1 [template = i32] -// CHECK:STDOUT: %.loc19_26.3: init type = call %ImplicitAs.ref.loc19(%.loc19_26.2) [template = constants.%.12] +// CHECK:STDOUT: %.loc19_26.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.12] // CHECK:STDOUT: } // CHECK:STDOUT: %Sink_i32.decl: %Sink_i32.type = fn_decl @Sink_i32 [template = constants.%Sink_i32] { // CHECK:STDOUT: %int.make_type_32.loc25: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc25_16.1: type = value_of_initializer %int.make_type_32.loc25 [template = i32] // CHECK:STDOUT: %.loc25_16.2: type = converted %int.make_type_32.loc25, %.loc25_16.1 [template = i32] -// CHECK:STDOUT: %n.loc25_13.1: i32 = param n +// CHECK:STDOUT: %n.loc25_13.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @Sink_i32.%n: i32 = bind_name n, %n.loc25_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Sink_X.decl: %Sink_X.type = fn_decl @Sink_X [template = constants.%Sink_X] { // CHECK:STDOUT: %X.ref.loc26: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %x.loc26_11.1: %X = param x +// CHECK:STDOUT: %x.loc26_11.1: %X = param x, runtime_param0 // CHECK:STDOUT: @Sink_X.%x: %X = bind_name x, %x.loc26_11.1 // CHECK:STDOUT: } // CHECK:STDOUT: %Source.decl: %Source.type = fn_decl @Source [template = constants.%Source] { -// CHECK:STDOUT: %T.loc27_11.1: type = param T +// CHECK:STDOUT: %T.loc27_11.1: type = param T, runtime_param // CHECK:STDOUT: @Source.%T.loc27: type = bind_symbolic_name T 0, %T.loc27_11.1 [symbolic = @Source.%T.1 (constants.%T)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Source.%T.loc27 [symbolic = @Source.%T.1 (constants.%T)] // CHECK:STDOUT: @Source.%return: ref @Source.%T.1 (%T) = var @@ -179,7 +175,7 @@ fn Test() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc16_20.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc16_20.2: type = converted %int.make_type_32, %.loc16_20.1 [template = i32] -// CHECK:STDOUT: %self.loc16_14.1: i32 = param self +// CHECK:STDOUT: %self.loc16_14.1: i32 = param self, runtime_param0 // CHECK:STDOUT: %self.loc16_14.2: i32 = bind_name self, %self.loc16_14.1 // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %return.var: ref %X = var @@ -194,7 +190,7 @@ fn Test() { // CHECK:STDOUT: impl @impl.2: %X as %.12 { // CHECK:STDOUT: %Convert.decl: %Convert.type.4 = fn_decl @Convert.3 [template = constants.%Convert.4] { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %self.loc20_14.1: %X = param self +// CHECK:STDOUT: %self.loc20_14.1: %X = param self, runtime_param0 // CHECK:STDOUT: %self.loc20_14.2: %X = bind_name self, %self.loc20_14.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc20_28.1: type = value_of_initializer %int.make_type_32 [template = i32] @@ -265,8 +261,8 @@ fn Test() { // CHECK:STDOUT: %Source.ref.loc30: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %.loc30_18.1: ref %X = temporary_storage -// CHECK:STDOUT: %Source.call.loc30: init %X = call %Source.ref.loc30(%X.ref) to %.loc30_18.1 -// CHECK:STDOUT: %.loc30_11.1: init type = call constants.%ImplicitAs(i32) [template = constants.%.12] +// CHECK:STDOUT: %Source.call.loc30: init %X = call %Source.ref.loc30() to %.loc30_18.1 +// CHECK:STDOUT: %.loc30_11.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.12] // CHECK:STDOUT: %.loc30_11.2: %.13 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.14] // CHECK:STDOUT: %Convert.ref.loc30: %.13 = name_ref Convert, %.loc30_11.2 [template = constants.%.14] // CHECK:STDOUT: %.loc30_18.2: ref %X = temporary %.loc30_18.1, %Source.call.loc30 @@ -284,8 +280,8 @@ fn Test() { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc31_16.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc31_16.2: type = converted %int.make_type_32, %.loc31_16.1 [template = i32] -// CHECK:STDOUT: %Source.call.loc31: init i32 = call %Source.ref.loc31(%.loc31_16.2) -// CHECK:STDOUT: %.loc31_9.1: init type = call constants.%ImplicitAs(constants.%X) [template = constants.%.7] +// CHECK:STDOUT: %Source.call.loc31: init i32 = call %Source.ref.loc31() +// CHECK:STDOUT: %.loc31_9.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%X) [template = constants.%.7] // CHECK:STDOUT: %.loc31_9.2: %.8 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%X) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref.loc31: %.8 = name_ref Convert, %.loc31_9.2 [template = constants.%.9] // CHECK:STDOUT: %.loc31_16.3: ref i32 = temporary_storage diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index 2573cdbc1408..41948d395429 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -92,7 +92,7 @@ fn TestOp() { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc18_21: type = ptr_type %C [template = constants.%.3] -// CHECK:STDOUT: %self.loc18_14.1: %.3 = param self +// CHECK:STDOUT: %self.loc18_14.1: %.3 = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_14.3: %.3 = bind_name self, %self.loc18_14.1 // CHECK:STDOUT: %.loc18_9: %.3 = addr_pattern %self.loc18_14.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index da7794256d2d..ae90f920843d 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index 96d8e5ddc3eb..93660eb06e69 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index 0ec76526c9b6..46fa4712204d 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index cccc6cb2f928..227c56ef1547 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -79,7 +79,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc23_11.1: %C = param a +// CHECK:STDOUT: %a.loc23_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc23_11.1 // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -96,7 +96,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: impl @impl: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index 48dd4043766e..e1312117f32c 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -168,10 +168,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestLess.decl: %TestLess.type = fn_decl @TestLess [template = constants.%TestLess] { // CHECK:STDOUT: %C.ref.loc13_16: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc13_13.1: %C = param a +// CHECK:STDOUT: %a.loc13_13.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestLess.%a: %C = bind_name a, %a.loc13_13.1 // CHECK:STDOUT: %C.ref.loc13_22: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc13_19.1: %C = param b +// CHECK:STDOUT: %b.loc13_19.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestLess.%b: %C = bind_name b, %b.loc13_19.1 // CHECK:STDOUT: %bool.make_type.loc13: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc13_28.1: type = value_of_initializer %bool.make_type.loc13 [template = bool] @@ -180,10 +180,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestLessEqual.decl: %TestLessEqual.type = fn_decl @TestLessEqual [template = constants.%TestLessEqual] { // CHECK:STDOUT: %C.ref.loc17_21: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc17_18.1: %C = param a +// CHECK:STDOUT: %a.loc17_18.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestLessEqual.%a: %C = bind_name a, %a.loc17_18.1 // CHECK:STDOUT: %C.ref.loc17_27: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc17_24.1: %C = param b +// CHECK:STDOUT: %b.loc17_24.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestLessEqual.%b: %C = bind_name b, %b.loc17_24.1 // CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_33.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] @@ -192,10 +192,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestGreater.decl: %TestGreater.type = fn_decl @TestGreater [template = constants.%TestGreater] { // CHECK:STDOUT: %C.ref.loc21_19: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc21_16.1: %C = param a +// CHECK:STDOUT: %a.loc21_16.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestGreater.%a: %C = bind_name a, %a.loc21_16.1 // CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc21_22.1: %C = param b +// CHECK:STDOUT: %b.loc21_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestGreater.%b: %C = bind_name b, %b.loc21_22.1 // CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc21_31.1: type = value_of_initializer %bool.make_type.loc21 [template = bool] @@ -204,10 +204,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestGreaterEqual.decl: %TestGreaterEqual.type = fn_decl @TestGreaterEqual [template = constants.%TestGreaterEqual] { // CHECK:STDOUT: %C.ref.loc25_24: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc25_21.1: %C = param a +// CHECK:STDOUT: %a.loc25_21.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestGreaterEqual.%a: %C = bind_name a, %a.loc25_21.1 // CHECK:STDOUT: %C.ref.loc25_30: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc25_27.1: %C = param b +// CHECK:STDOUT: %b.loc25_27.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestGreaterEqual.%b: %C = bind_name b, %b.loc25_27.1 // CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_36.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] @@ -229,10 +229,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: impl @impl: %C as %.2 { // CHECK:STDOUT: %Less.decl: %Less.type.1 = fn_decl @Less.1 [template = constants.%Less.1] { // CHECK:STDOUT: %C.ref.loc7_17: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc7_11.1: %C = param self +// CHECK:STDOUT: %self.loc7_11.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc7_11.2: %C = bind_name self, %self.loc7_11.1 // CHECK:STDOUT: %C.ref.loc7_27: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc7_20.1: %C = param other +// CHECK:STDOUT: %other.loc7_20.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc7_20.2: %C = bind_name other, %other.loc7_20.1 // CHECK:STDOUT: %bool.make_type.loc7: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc7_33.1: type = value_of_initializer %bool.make_type.loc7 [template = bool] @@ -241,10 +241,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %LessOrEquivalent.decl: %LessOrEquivalent.type.1 = fn_decl @LessOrEquivalent.1 [template = constants.%LessOrEquivalent.1] { // CHECK:STDOUT: %C.ref.loc8_29: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc8_23.1: %C = param self +// CHECK:STDOUT: %self.loc8_23.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc8_23.2: %C = bind_name self, %self.loc8_23.1 // CHECK:STDOUT: %C.ref.loc8_39: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc8_32.1: %C = param other +// CHECK:STDOUT: %other.loc8_32.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc8_32.2: %C = bind_name other, %other.loc8_32.1 // CHECK:STDOUT: %bool.make_type.loc8: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_45.1: type = value_of_initializer %bool.make_type.loc8 [template = bool] @@ -253,10 +253,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %Greater.decl: %Greater.type.1 = fn_decl @Greater.1 [template = constants.%Greater.1] { // CHECK:STDOUT: %C.ref.loc9_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc9_14.1: %C = param self +// CHECK:STDOUT: %self.loc9_14.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc9_14.2: %C = bind_name self, %self.loc9_14.1 // CHECK:STDOUT: %C.ref.loc9_30: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc9_23.1: %C = param other +// CHECK:STDOUT: %other.loc9_23.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc9_23.2: %C = bind_name other, %other.loc9_23.1 // CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc9_36.1: type = value_of_initializer %bool.make_type.loc9 [template = bool] @@ -265,10 +265,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %GreaterOrEquivalent.decl: %GreaterOrEquivalent.type.1 = fn_decl @GreaterOrEquivalent.1 [template = constants.%GreaterOrEquivalent.1] { // CHECK:STDOUT: %C.ref.loc10_32: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc10_26.1: %C = param self +// CHECK:STDOUT: %self.loc10_26.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc10_26.2: %C = bind_name self, %self.loc10_26.1 // CHECK:STDOUT: %C.ref.loc10_42: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc10_35.1: %C = param other +// CHECK:STDOUT: %other.loc10_35.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc10_35.2: %C = bind_name other, %other.loc10_35.1 // CHECK:STDOUT: %bool.make_type.loc10: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc10_48.1: type = value_of_initializer %bool.make_type.loc10 [template = bool] @@ -488,10 +488,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} // CHECK:STDOUT: %TestLess.decl: %TestLess.type = fn_decl @TestLess [template = constants.%TestLess] { // CHECK:STDOUT: %D.ref.loc6_16: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc6_13.1: %D = param a +// CHECK:STDOUT: %a.loc6_13.1: %D = param a, runtime_param0 // CHECK:STDOUT: @TestLess.%a: %D = bind_name a, %a.loc6_13.1 // CHECK:STDOUT: %D.ref.loc6_22: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc6_19.1: %D = param b +// CHECK:STDOUT: %b.loc6_19.1: %D = param b, runtime_param1 // CHECK:STDOUT: @TestLess.%b: %D = bind_name b, %b.loc6_19.1 // CHECK:STDOUT: %bool.make_type.loc6: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc6_28.1: type = value_of_initializer %bool.make_type.loc6 [template = bool] @@ -500,10 +500,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestLessEqual.decl: %TestLessEqual.type = fn_decl @TestLessEqual [template = constants.%TestLessEqual] { // CHECK:STDOUT: %D.ref.loc14_21: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc14_18.1: %D = param a +// CHECK:STDOUT: %a.loc14_18.1: %D = param a, runtime_param0 // CHECK:STDOUT: @TestLessEqual.%a: %D = bind_name a, %a.loc14_18.1 // CHECK:STDOUT: %D.ref.loc14_27: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc14_24.1: %D = param b +// CHECK:STDOUT: %b.loc14_24.1: %D = param b, runtime_param1 // CHECK:STDOUT: @TestLessEqual.%b: %D = bind_name b, %b.loc14_24.1 // CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_33.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] @@ -512,10 +512,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestGreater.decl: %TestGreater.type = fn_decl @TestGreater [template = constants.%TestGreater] { // CHECK:STDOUT: %D.ref.loc22_19: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc22_16.1: %D = param a +// CHECK:STDOUT: %a.loc22_16.1: %D = param a, runtime_param0 // CHECK:STDOUT: @TestGreater.%a: %D = bind_name a, %a.loc22_16.1 // CHECK:STDOUT: %D.ref.loc22_25: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc22_22.1: %D = param b +// CHECK:STDOUT: %b.loc22_22.1: %D = param b, runtime_param1 // CHECK:STDOUT: @TestGreater.%b: %D = bind_name b, %b.loc22_22.1 // CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_31.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] @@ -524,10 +524,10 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %TestGreaterEqual.decl: %TestGreaterEqual.type = fn_decl @TestGreaterEqual [template = constants.%TestGreaterEqual] { // CHECK:STDOUT: %D.ref.loc30_24: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %a.loc30_21.1: %D = param a +// CHECK:STDOUT: %a.loc30_21.1: %D = param a, runtime_param0 // CHECK:STDOUT: @TestGreaterEqual.%a: %D = bind_name a, %a.loc30_21.1 // CHECK:STDOUT: %D.ref.loc30_30: type = name_ref D, %D.decl [template = constants.%D] -// CHECK:STDOUT: %b.loc30_27.1: %D = param b +// CHECK:STDOUT: %b.loc30_27.1: %D = param b, runtime_param1 // CHECK:STDOUT: @TestGreaterEqual.%b: %D = bind_name b, %b.loc30_27.1 // CHECK:STDOUT: %bool.make_type.loc30: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc30_36.1: type = value_of_initializer %bool.make_type.loc30 [template = bool] diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index b313d10d4d8e..a73144294b7b 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index 1ca40a501cf6..0b50361cf9ac 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -111,10 +111,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [template = constants.%TestOp] { // CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %a.loc26_11.1: %C = param a +// CHECK:STDOUT: %a.loc26_11.1: %C = param a, runtime_param0 // CHECK:STDOUT: @TestOp.%a: %C = bind_name a, %a.loc26_11.1 // CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc26_17.1: %C = param b +// CHECK:STDOUT: %b.loc26_17.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestOp.%b: %C = bind_name b, %b.loc26_17.1 // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: @TestOp.%return: ref %C = var @@ -122,10 +122,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a +// CHECK:STDOUT: %a.loc30_15.1: %.7 = param a, runtime_param0 // CHECK:STDOUT: @TestAssign.%a: %.7 = bind_name a, %a.loc30_15.1 // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %b.loc30_22.1: %C = param b +// CHECK:STDOUT: %b.loc30_22.1: %C = param b, runtime_param1 // CHECK:STDOUT: @TestAssign.%b: %C = bind_name b, %b.loc30_22.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -147,10 +147,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: impl @impl.1: %C as %.2 { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.loc18_9.1: %C = param self +// CHECK:STDOUT: %self.loc18_9.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc18_9.2: %C = bind_name self, %self.loc18_9.1 // CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc18_18.1: %C = param other +// CHECK:STDOUT: %other.loc18_18.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc18_18.2: %C = bind_name other, %other.loc18_18.1 // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var @@ -166,11 +166,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] -// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self +// CHECK:STDOUT: %self.loc23_14.1: %.7 = param self, runtime_param0 // CHECK:STDOUT: %self.loc23_14.3: %.7 = bind_name self, %self.loc23_14.1 // CHECK:STDOUT: %.loc23_9: %.7 = addr_pattern %self.loc23_14.3 // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %other.loc23_24.1: %C = param other +// CHECK:STDOUT: %other.loc23_24.1: %C = param other, runtime_param1 // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] diff --git a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon index b3f9c8179016..fe950e7dbbdc 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon @@ -270,7 +270,7 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %.loc4_10.1: %.1 = tuple_literal () // CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%.1 [template = constants.%.1] -// CHECK:STDOUT: %x.loc4_6.1: %.1 = param x +// CHECK:STDOUT: %x.loc4_6.1: %.1 = param x, runtime_param0 // CHECK:STDOUT: @F.%x: %.1 = bind_name x, %x.loc4_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon b/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon index 33a61f283a1a..5aa7aad5106a 100644 --- a/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon +++ b/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon @@ -47,11 +47,11 @@ export C2(T:! type); // CHECK:STDOUT: .C2 = %C2.decl // CHECK:STDOUT: } // CHECK:STDOUT: %C1.decl: %C1.type = class_decl @C1 [template = constants.%C1.1] { -// CHECK:STDOUT: %T.loc4_10.1: type = param T +// CHECK:STDOUT: %T.loc4_10.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc4_10.2: type = bind_symbolic_name T 0, %T.loc4_10.1 [symbolic = @C1.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C2.decl: %C2.type = class_decl @C2 [template = constants.%C2.1] { -// CHECK:STDOUT: %T.loc5_10.1: type = param T +// CHECK:STDOUT: %T.loc5_10.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc5_10.2: type = bind_symbolic_name T 0, %T.loc5_10.1 [symbolic = @C2.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -101,7 +101,7 @@ export C2(T:! type); // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %C1: %C1.type = export C1, imports.%import_ref.1 [template = constants.%C1.1] -// CHECK:STDOUT: %T.loc11_11.1: type = param T +// CHECK:STDOUT: %T.loc11_11.1: type = param T, runtime_param // CHECK:STDOUT: %T.loc11_11.2: type = bind_symbolic_name T 0, %T.loc11_11.1 [symbolic = constants.%T] // CHECK:STDOUT: %C2: %C2.type = export C2, imports.%import_ref.2 [template = constants.%C2.1] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/arrow.carbon b/toolchain/check/testdata/pointer/arrow.carbon index 62007fb5e13f..dd8fe0b8978f 100644 --- a/toolchain/check/testdata/pointer/arrow.carbon +++ b/toolchain/check/testdata/pointer/arrow.carbon @@ -62,7 +62,7 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %.loc16: type = ptr_type %C [template = constants.%.2] -// CHECK:STDOUT: %ptr.loc16_8.1: %.2 = param ptr +// CHECK:STDOUT: %ptr.loc16_8.1: %.2 = param ptr, runtime_param0 // CHECK:STDOUT: @Foo.%ptr: %.2 = bind_name ptr, %ptr.loc16_8.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -70,7 +70,7 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %Member.decl: %Member.type = fn_decl @Member [template = constants.%Member] { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %self.loc12_13.1: %C = param self +// CHECK:STDOUT: %self.loc12_13.1: %C = param self, runtime_param0 // CHECK:STDOUT: %self.loc12_13.2: %C = bind_name self, %self.loc12_13.1 // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index 0b1ed621d6fa..c1f5ddf3c96c 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -193,7 +193,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %int.make_type_32.loc95: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc95_26.1: type = value_of_initializer %int.make_type_32.loc95 [template = i32] // CHECK:STDOUT: %.loc95_26.2: type = converted %int.make_type_32.loc95, %.loc95_26.1 [template = i32] -// CHECK:STDOUT: %param.loc95_19.1: i32 = param param +// CHECK:STDOUT: %param.loc95_19.1: i32 = param param, runtime_param0 // CHECK:STDOUT: @AddressOfParam.%param: i32 = bind_name param, %param.loc95_19.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon index 883ee03fe427..cc7f660a6391 100644 --- a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon @@ -78,7 +78,7 @@ fn Deref(n: i32) { // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_32, %.loc11_13.1 [template = i32] -// CHECK:STDOUT: %n.loc11_10.1: i32 = param n +// CHECK:STDOUT: %n.loc11_10.1: i32 = param n, runtime_param0 // CHECK:STDOUT: @Deref.%n: i32 = bind_name n, %n.loc11_10.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon index b0f19b6c5805..0bd1b16abb54 100644 --- a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon @@ -78,7 +78,7 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: %.loc11_21.1: type = converted %.loc11_28, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %.loc11_21.2: type = const_type %.1 [template = constants.%.2] // CHECK:STDOUT: %.loc11_29: type = ptr_type %.2 [template = constants.%.3] -// CHECK:STDOUT: %p.loc11_18.1: %.3 = param p +// CHECK:STDOUT: %p.loc11_18.1: %.3 = param p, runtime_param0 // CHECK:STDOUT: @ConstMismatch.%p: %.3 = bind_name p, %p.loc11_18.1 // CHECK:STDOUT: %.loc11_43: %.1 = struct_literal () // CHECK:STDOUT: %.loc11_44.1: type = converted %.loc11_43, constants.%.1 [template = constants.%.1] @@ -110,7 +110,7 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: fn @ConstMismatch(%p: %.3) -> %.5 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %.3 = name_ref p, %p -// CHECK:STDOUT: %.loc18_11.1: init type = call constants.%ImplicitAs(constants.%.5) [template = constants.%.10] +// CHECK:STDOUT: %.loc18_11.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.5) [template = constants.%.10] // CHECK:STDOUT: %.loc18_11.2: %.11 = specific_constant imports.%import_ref.3, @ImplicitAs(constants.%.5) [template = constants.%.12] // CHECK:STDOUT: %Convert.ref: %.11 = name_ref Convert, %.loc18_11.2 [template = constants.%.12] // CHECK:STDOUT: %.loc18_11.3: %.5 = converted %p.ref, [template = ] diff --git a/toolchain/check/testdata/pointer/nested_const.carbon b/toolchain/check/testdata/pointer/nested_const.carbon index 91ae163f0b17..8c3884a20d8a 100644 --- a/toolchain/check/testdata/pointer/nested_const.carbon +++ b/toolchain/check/testdata/pointer/nested_const.carbon @@ -58,7 +58,7 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: %.loc12_16: type = const_type %.3 [template = constants.%.4] // CHECK:STDOUT: %.loc12_34: type = ptr_type %.4 [template = constants.%.5] // CHECK:STDOUT: %.loc12_9: type = const_type %.5 [template = constants.%.6] -// CHECK:STDOUT: %p.loc12_6.1: %.6 = param p +// CHECK:STDOUT: %p.loc12_6.1: %.6 = param p, runtime_param0 // CHECK:STDOUT: @F.%p: %.6 = bind_name p, %p.loc12_6.1 // CHECK:STDOUT: %int.make_type_32.loc12_47: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc12_41.1: type = value_of_initializer %int.make_type_32.loc12_47 [template = i32] diff --git a/toolchain/check/testdata/pointer/types.carbon b/toolchain/check/testdata/pointer/types.carbon index fa7c484f9d22..f74223cce039 100644 --- a/toolchain/check/testdata/pointer/types.carbon +++ b/toolchain/check/testdata/pointer/types.carbon @@ -58,7 +58,7 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32] // CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_32.loc11_11, %.loc11_14.1 [template = i32] // CHECK:STDOUT: %.loc11_14.3: type = ptr_type i32 [template = constants.%.2] -// CHECK:STDOUT: %p.loc11_8.1: %.2 = param p +// CHECK:STDOUT: %p.loc11_8.1: %.2 = param p, runtime_param0 // CHECK:STDOUT: @Ptr.%p: %.2 = bind_name p, %p.loc11_8.1 // CHECK:STDOUT: %int.make_type_32.loc11_20: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_32.loc11_20 [template = i32] @@ -72,7 +72,7 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: %.loc15_16.2: type = converted %int.make_type_32.loc15_22, %.loc15_16.1 [template = i32] // CHECK:STDOUT: %.loc15_16.3: type = const_type i32 [template = constants.%.3] // CHECK:STDOUT: %.loc15_25: type = ptr_type %.3 [template = constants.%.4] -// CHECK:STDOUT: %p.loc15_13.1: %.4 = param p +// CHECK:STDOUT: %p.loc15_13.1: %.4 = param p, runtime_param0 // CHECK:STDOUT: @ConstPtr.%p: %.4 = bind_name p, %p.loc15_13.1 // CHECK:STDOUT: %int.make_type_32.loc15_38: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %int.make_type_32.loc15_38 [template = i32] diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index b22e80df44f9..2507244dbfaf 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -64,7 +64,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] -// CHECK:STDOUT: %b.loc11_6.1: bool = param b +// CHECK:STDOUT: %b.loc11_6.1: bool = param b, runtime_param0 // CHECK:STDOUT: @F.%b: bool = bind_name b, %b.loc11_6.1 // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_32 [template = i32] diff --git a/toolchain/check/testdata/return/fail_let_in_type.carbon b/toolchain/check/testdata/return/fail_let_in_type.carbon index c9085b169438..bfd2f2da86fa 100644 --- a/toolchain/check/testdata/return/fail_let_in_type.carbon +++ b/toolchain/check/testdata/return/fail_let_in_type.carbon @@ -104,7 +104,7 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: fn() -> @HalfDozen.%y (%y) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc27_30: i32 = int_literal 6 [template = constants.%.2] -// CHECK:STDOUT: %.loc27_31.1: init type = call constants.%ImplicitAs(constants.%y) [symbolic = %.1 (constants.%.6)] +// CHECK:STDOUT: %.loc27_31.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%y) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: %.loc27_31.2: @HalfDozen.%.2 (%.7) = specific_constant .inst+43, @ImplicitAs(constants.%y) [symbolic = %.3 (constants.%.8)] // CHECK:STDOUT: %Convert.ref: @HalfDozen.%.2 (%.7) = name_ref Convert, %.loc27_31.2 [symbolic = %.3 (constants.%.8)] // CHECK:STDOUT: %.loc27_31.3: @HalfDozen.%y (%y) = converted %.loc27_30, [template = ] diff --git a/toolchain/check/testdata/return/fail_type_mismatch.carbon b/toolchain/check/testdata/return/fail_type_mismatch.carbon index df010c4a1781..025261fb2bb1 100644 --- a/toolchain/check/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/return/fail_type_mismatch.carbon @@ -105,7 +105,7 @@ fn Main() -> i32 { // CHECK:STDOUT: fn @Main() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_10: f64 = float_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_13.1: init type = call constants.%ImplicitAs(i32) [template = constants.%.6] +// CHECK:STDOUT: %.loc18_13.1: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.6] // CHECK:STDOUT: %.loc18_13.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc18_13.2 [template = constants.%.8] // CHECK:STDOUT: %.loc18_13.3: i32 = converted %.loc18_10, [template = ] diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index c131a1175e48..990cd43d7919 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -78,7 +78,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc21_25.2: type = converted %bool.make_type, %.loc21_25.1 [template = bool] -// CHECK:STDOUT: %b.loc21_22.1: bool = param b +// CHECK:STDOUT: %b.loc21_22.1: bool = param b, runtime_param0 // CHECK:STDOUT: @EnclosingButAfter.%b: bool = bind_name b, %b.loc21_22.1 // CHECK:STDOUT: %int.make_type_32.loc21: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc21_34.1: type = value_of_initializer %int.make_type_32.loc21 [template = i32] diff --git a/toolchain/check/testdata/struct/fail_type_assign.carbon b/toolchain/check/testdata/struct/fail_type_assign.carbon index 52b70469bef9..712bfd57020b 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -112,7 +112,7 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: %.loc17_25.1: type = value_of_initializer %int.make_type_32 [template = i32] // CHECK:STDOUT: %.loc17_25.2: type = converted %int.make_type_32, %.loc17_25.1 [template = i32] // CHECK:STDOUT: %.loc17_28: type = struct_type {.a: i32} [template = constants.%.2] -// CHECK:STDOUT: %.loc17_29.1: init type = call constants.%ImplicitAs(constants.%.2) [template = constants.%.6] +// CHECK:STDOUT: %.loc17_29.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%.2) [template = constants.%.6] // CHECK:STDOUT: %.loc17_29.2: %.7 = specific_constant imports.%import_ref.4, @ImplicitAs(constants.%.2) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc17_29.2 [template = constants.%.8] // CHECK:STDOUT: %.loc17_29.3: %.2 = converted %.loc17_28, [template = ] diff --git a/toolchain/check/testdata/struct/fail_value_as_type.carbon b/toolchain/check/testdata/struct/fail_value_as_type.carbon index 2e91fb876d59..7cbd18438625 100644 --- a/toolchain/check/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/check/testdata/struct/fail_value_as_type.carbon @@ -69,7 +69,7 @@ var x: {.a = 1}; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc17_14: i32 = int_literal 1 [template = constants.%.1] // CHECK:STDOUT: %.loc17_15.1: %.2 = struct_literal (%.loc17_14) -// CHECK:STDOUT: %.loc17_15.2: init type = call constants.%ImplicitAs(type) [template = constants.%.7] +// CHECK:STDOUT: %.loc17_15.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.7] // CHECK:STDOUT: %.loc17_15.3: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc17_15.3 [template = constants.%.9] // CHECK:STDOUT: %struct: %.2 = struct_value (%.loc17_14) [template = constants.%struct] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index 06a29fc74c7c..d9ae6585e4a0 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -36,9 +36,9 @@ impl package Implicit; // CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-4]]:6: In import. // CHECK:STDERR: impl package Implicit; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: implicit.carbon:8:1: Initializing parameter 1 of function declared here. +// CHECK:STDERR: implicit.carbon:8:9: Initializing generic parameter `S` declared here. // CHECK:STDERR: class C(S:! {.a: i32, .b: i32}) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: ^ // CHECK:STDERR: var c_bad: C({.c = 1, .d = 2}) = F(); @@ -140,7 +140,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_32.loc8_27 [template = i32] // CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_32.loc8_27, %.loc8_27.1 [template = i32] // CHECK:STDOUT: %.loc8_30: type = struct_type {.a: i32, .b: i32} [template = constants.%.11] -// CHECK:STDOUT: %S.loc8_9.1: %.11 = param S +// CHECK:STDOUT: %S.loc8_9.1: %.11 = param S, runtime_param // CHECK:STDOUT: %S.loc8_9.2: %.11 = bind_symbolic_name S 0, %S.loc8_9.1 [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { @@ -149,10 +149,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc9_27: i32 = int_literal 2 [template = constants.%.14] // CHECK:STDOUT: %.loc9_28: %.11 = struct_literal (%.loc9_19, %.loc9_27) // CHECK:STDOUT: %struct: %.11 = struct_value (%.loc9_19, %.loc9_27) [template = constants.%struct.4] -// CHECK:STDOUT: %.loc9_12.1: %.11 = converted %.loc9_28, %struct [template = constants.%struct.4] -// CHECK:STDOUT: %.loc9_12.2: init type = call %C.ref(%.loc9_12.1) [template = constants.%C.3] -// CHECK:STDOUT: %.loc9_29.1: type = value_of_initializer %.loc9_12.2 [template = constants.%C.3] -// CHECK:STDOUT: %.loc9_29.2: type = converted %.loc9_12.2, %.loc9_29.1 [template = constants.%C.3] +// CHECK:STDOUT: %.loc9_12: %.11 = converted %.loc9_28, %struct [template = constants.%struct.4] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.4) [template = constants.%C.3] // CHECK:STDOUT: @F.%return: ref %C.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -244,7 +242,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.1: ref %.2 = import_ref Implicit//default, inst+17, loaded // CHECK:STDOUT: %import_ref.2: ref %.6 = import_ref Implicit//default, inst+57, loaded // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+99, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+122, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+120, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int32 = %import_ref.5 // CHECK:STDOUT: import Core//prelude @@ -300,10 +298,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_24: i32 = int_literal 2 [template = constants.%.13] // CHECK:STDOUT: %.loc6_25: %.11 = struct_literal (%.loc6_16, %.loc6_24) // CHECK:STDOUT: %struct: %.11 = struct_value (%.loc6_16, %.loc6_24) [template = constants.%struct] -// CHECK:STDOUT: %.loc6_9.1: %.11 = converted %.loc6_25, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc6_9.2: init type = call %C.ref(%.loc6_9.1) [template = constants.%C.3] -// CHECK:STDOUT: %.loc6_26.1: type = value_of_initializer %.loc6_9.2 [template = constants.%C.3] -// CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_9.2, %.loc6_26.1 [template = constants.%C.3] +// CHECK:STDOUT: %.loc6_9: %.11 = converted %.loc6_25, %struct [template = constants.%struct] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var // CHECK:STDOUT: } @@ -396,7 +392,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+17, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+57, unloaded // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+99, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+122, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+120, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/operators @@ -426,9 +422,6 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc13_20: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc13_28: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %.loc13_29: %.6 = struct_literal (%.loc13_20, %.loc13_28) -// CHECK:STDOUT: %.loc13_13: init type = call %C.ref() [template = ] -// CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %.loc13_13 [template = ] -// CHECK:STDOUT: %.loc13_30.2: type = converted %.loc13_13, %.loc13_30.1 [template = ] // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } @@ -509,7 +502,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+17, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+57, unloaded // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+99, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+122, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+120, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude @@ -547,10 +540,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc9_28: i32 = int_literal 4 [template = constants.%.5] // CHECK:STDOUT: %.loc9_29: %.3 = struct_literal (%.loc9_20, %.loc9_28) // CHECK:STDOUT: %struct: %.3 = struct_value (%.loc9_20, %.loc9_28) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc9_13.1: %.3 = converted %.loc9_29, %struct [template = constants.%struct.1] -// CHECK:STDOUT: %.loc9_13.2: init type = call %C.ref(%.loc9_13.1) [template = constants.%C.3] -// CHECK:STDOUT: %.loc9_30.1: type = value_of_initializer %.loc9_13.2 [template = constants.%C.3] -// CHECK:STDOUT: %.loc9_30.2: type = converted %.loc9_13.2, %.loc9_30.1 [template = constants.%C.3] +// CHECK:STDOUT: %.loc9_13: %.3 = converted %.loc9_29, %struct [template = constants.%struct.1] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.3] // CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad // CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } @@ -600,7 +591,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] // CHECK:STDOUT: %.loc9_35.1: ref %C.4 = temporary_storage // CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc9_35.1 -// CHECK:STDOUT: %.loc9_37.1: init type = call constants.%ImplicitAs(constants.%C.3) [template = constants.%.13] +// CHECK:STDOUT: %.loc9_37.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C.3) [template = constants.%.13] // CHECK:STDOUT: %.loc9_37.2: %.14 = specific_constant imports.%import_ref.8, @ImplicitAs(constants.%C.3) [template = constants.%.15] // CHECK:STDOUT: %Convert.ref: %.14 = name_ref Convert, %.loc9_37.2 [template = constants.%.15] // CHECK:STDOUT: %.loc9_35.2: ref %C.4 = temporary %.loc9_35.1, %F.call diff --git a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon index b9bbdf859523..47a4d1b7a13b 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -137,7 +137,7 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc18_17.1: f64 = float_literal 2.6000000000000001 [template = constants.%.7] -// CHECK:STDOUT: %.loc18_17.2: init type = call constants.%ImplicitAs(i32) [template = constants.%.11] +// CHECK:STDOUT: %.loc18_17.2: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.11] // CHECK:STDOUT: %.loc18_17.3: %.12 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.13] // CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc18_17.3 [template = constants.%.13] // CHECK:STDOUT: %.loc18_17.4: i32 = converted %.loc18_17.1, [template = ] diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index eb28f365d514..41df1f0e5192 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -122,7 +122,7 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %.loc17_30.1: %.7 = tuple_literal (%.loc17_22, %.loc17_25) // CHECK:STDOUT: %.loc17_30.2: ref i32 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %.loc17_30.3: init i32 = initialize_from %.loc17_22 to %.loc17_30.2 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_30.4: init type = call constants.%ImplicitAs(i32) [template = constants.%.11] +// CHECK:STDOUT: %.loc17_30.4: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.11] // CHECK:STDOUT: %.loc17_30.5: %.12 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.13] // CHECK:STDOUT: %Convert.ref: %.12 = name_ref Convert, %.loc17_30.5 [template = constants.%.13] // CHECK:STDOUT: %.loc17_30.6: i32 = converted %.loc17_25, [template = ] diff --git a/toolchain/check/testdata/tuple/fail_type_assign.carbon b/toolchain/check/testdata/tuple/fail_type_assign.carbon index 145c54dc303b..12b555ead626 100644 --- a/toolchain/check/testdata/tuple/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuple/fail_type_assign.carbon @@ -112,7 +112,7 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc17_24.1: %.2 = tuple_literal (%int.make_type_32) -// CHECK:STDOUT: %.loc17_24.2: init type = call constants.%ImplicitAs(i32) [template = constants.%.7] +// CHECK:STDOUT: %.loc17_24.2: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template = constants.%.7] // CHECK:STDOUT: %.loc17_24.3: %.8 = specific_constant imports.%import_ref.4, @ImplicitAs(i32) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc17_24.3 [template = constants.%.9] // CHECK:STDOUT: %.loc17_19.1: ref type = temporary_storage diff --git a/toolchain/check/testdata/tuple/fail_value_as_type.carbon b/toolchain/check/testdata/tuple/fail_value_as_type.carbon index 2cff97c5f600..a75d753dfe39 100644 --- a/toolchain/check/testdata/tuple/fail_value_as_type.carbon +++ b/toolchain/check/testdata/tuple/fail_value_as_type.carbon @@ -68,7 +68,7 @@ var x: (1, ); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %.loc17_9: i32 = int_literal 1 [template = constants.%.1] // CHECK:STDOUT: %.loc17_12.1: %.2 = tuple_literal (%.loc17_9) -// CHECK:STDOUT: %.loc17_12.2: init type = call constants.%ImplicitAs(type) [template = constants.%.7] +// CHECK:STDOUT: %.loc17_12.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.7] // CHECK:STDOUT: %.loc17_12.3: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc17_12.3 [template = constants.%.9] // CHECK:STDOUT: %.loc17_12.4: type = converted %.loc17_9, [template = ] diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 110fc9cfab09..575e799dd6dd 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -37,9 +37,9 @@ impl package Implicit; // CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-5]]:6: In import. // CHECK:STDERR: impl package Implicit; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: implicit.carbon:7:1: Initializing parameter 1 of function declared here. +// CHECK:STDERR: implicit.carbon:7:9: Initializing generic parameter `X` declared here. // CHECK:STDERR: class C(X:! (i32, i32)) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: ^ // CHECK:STDERR: var c_bad: C((1, 2, 3)) = F(); @@ -154,7 +154,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc7_22.4: type = value_of_initializer %int.make_type_32.loc7_19 [template = i32] // CHECK:STDOUT: %.loc7_22.5: type = converted %int.make_type_32.loc7_19, %.loc7_22.4 [template = i32] // CHECK:STDOUT: %.loc7_22.6: type = converted %.loc7_22.1, constants.%.9 [template = constants.%.9] -// CHECK:STDOUT: %X.loc7_9.1: %.9 = param X +// CHECK:STDOUT: %X.loc7_9.1: %.9 = param X, runtime_param // CHECK:STDOUT: %X.loc7_9.2: %.9 = bind_symbolic_name X 0, %X.loc7_9.1 [symbolic = @C.%X (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { @@ -163,10 +163,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc9_17: i32 = int_literal 2 [template = constants.%.16] // CHECK:STDOUT: %.loc9_18: %.9 = tuple_literal (%.loc9_14, %.loc9_17) // CHECK:STDOUT: %tuple: %.9 = tuple_value (%.loc9_14, %.loc9_17) [template = constants.%tuple.5] -// CHECK:STDOUT: %.loc9_12.1: %.9 = converted %.loc9_18, %tuple [template = constants.%tuple.5] -// CHECK:STDOUT: %.loc9_12.2: init type = call %C.ref(%.loc9_12.1) [template = constants.%C.3] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %.loc9_12.2 [template = constants.%C.3] -// CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_12.2, %.loc9_19.1 [template = constants.%C.3] +// CHECK:STDOUT: %.loc9_12: %.9 = converted %.loc9_18, %tuple [template = constants.%tuple.5] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.5) [template = constants.%C.3] // CHECK:STDOUT: @F.%return: ref %C.3 = var // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -267,7 +265,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.1: ref %.3 = import_ref Implicit//default, inst+17, loaded // CHECK:STDOUT: %import_ref.2: ref %.9 = import_ref Implicit//default, inst+57, loaded // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+103, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+121, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+119, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int32 = %import_ref.5 // CHECK:STDOUT: import Core//prelude @@ -331,10 +329,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc6_14: i32 = int_literal 2 [template = constants.%.16] // CHECK:STDOUT: %.loc6_15: %.8 = tuple_literal (%.loc6_11, %.loc6_14) // CHECK:STDOUT: %tuple: %.8 = tuple_value (%.loc6_11, %.loc6_14) [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_9.1: %.8 = converted %.loc6_15, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_9.2: init type = call %C.ref(%.loc6_9.1) [template = constants.%C.3] -// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %.loc6_9.2 [template = constants.%C.3] -// CHECK:STDOUT: %.loc6_16.2: type = converted %.loc6_9.2, %.loc6_16.1 [template = constants.%C.3] +// CHECK:STDOUT: %.loc6_9: %.8 = converted %.loc6_15, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var // CHECK:STDOUT: } @@ -436,7 +432,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+17, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+57, unloaded // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+103, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+121, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+119, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/operators @@ -467,9 +463,6 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc14_18: i32 = int_literal 2 [template = constants.%.5] // CHECK:STDOUT: %.loc14_21: i32 = int_literal 3 [template = constants.%.6] // CHECK:STDOUT: %.loc14_22: %.7 = tuple_literal (%.loc14_15, %.loc14_18, %.loc14_21) -// CHECK:STDOUT: %.loc14_13: init type = call %C.ref() [template = ] -// CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %.loc14_13 [template = ] -// CHECK:STDOUT: %.loc14_23.2: type = converted %.loc14_13, %.loc14_23.1 [template = ] // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } @@ -550,7 +543,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+17, unloaded // CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+57, unloaded // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+103, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+121, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+119, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude @@ -588,10 +581,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc10_18: i32 = int_literal 4 [template = constants.%.5] // CHECK:STDOUT: %.loc10_19: %.3 = tuple_literal (%.loc10_15, %.loc10_18) // CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc10_15, %.loc10_18) [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc10_13.1: %.3 = converted %.loc10_19, %tuple [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc10_13.2: init type = call %C.ref(%.loc10_13.1) [template = constants.%C.3] -// CHECK:STDOUT: %.loc10_20.1: type = value_of_initializer %.loc10_13.2 [template = constants.%C.3] -// CHECK:STDOUT: %.loc10_20.2: type = converted %.loc10_13.2, %.loc10_20.1 [template = constants.%C.3] +// CHECK:STDOUT: %.loc10_13: %.3 = converted %.loc10_19, %tuple [template = constants.%tuple.1] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.1) [template = constants.%C.3] // CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad // CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } @@ -641,7 +632,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] // CHECK:STDOUT: %.loc10_25.1: ref %C.4 = temporary_storage // CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc10_25.1 -// CHECK:STDOUT: %.loc10_27.1: init type = call constants.%ImplicitAs(constants.%C.3) [template = constants.%.13] +// CHECK:STDOUT: %.loc10_27.1: type = interface_type @ImplicitAs, @ImplicitAs(constants.%C.3) [template = constants.%.13] // CHECK:STDOUT: %.loc10_27.2: %.14 = specific_constant imports.%import_ref.8, @ImplicitAs(constants.%C.3) [template = constants.%.15] // CHECK:STDOUT: %Convert.ref: %.14 = name_ref Convert, %.loc10_27.2 [template = constants.%.15] // CHECK:STDOUT: %.loc10_25.2: ref %C.4 = temporary %.loc10_25.1, %F.call diff --git a/toolchain/check/testdata/var/fail_not_copyable.carbon b/toolchain/check/testdata/var/fail_not_copyable.carbon index 5c55d8f17fa4..912777698f09 100644 --- a/toolchain/check/testdata/var/fail_not_copyable.carbon +++ b/toolchain/check/testdata/var/fail_not_copyable.carbon @@ -63,7 +63,7 @@ fn F(x: X) { // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %X.ref: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %x.loc14_6.1: %X = param x +// CHECK:STDOUT: %x.loc14_6.1: %X = param x, runtime_param0 // CHECK:STDOUT: @F.%x: %X = bind_name x, %x.loc14_6.1 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index bc4eb626db48..d7b7ac31a523 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -94,7 +94,7 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_10.1: i32 = int_literal 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_10.2: init type = call constants.%ImplicitAs(type) [template = constants.%.6] +// CHECK:STDOUT: %.loc18_10.2: type = interface_type @ImplicitAs, @ImplicitAs(type) [template = constants.%.6] // CHECK:STDOUT: %.loc18_10.3: %.7 = specific_constant imports.%import_ref.3, @ImplicitAs(type) [template = constants.%.8] // CHECK:STDOUT: %Convert.ref: %.7 = name_ref Convert, %.loc18_10.3 [template = constants.%.8] // CHECK:STDOUT: %.loc18_10.4: type = converted %.loc18_10.1, [template = ] diff --git a/toolchain/check/testdata/while/fail_bad_condition.carbon b/toolchain/check/testdata/while/fail_bad_condition.carbon index b05fed1ee22c..dcf73f19ccf0 100644 --- a/toolchain/check/testdata/while/fail_bad_condition.carbon +++ b/toolchain/check/testdata/while/fail_bad_condition.carbon @@ -98,7 +98,7 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: !while.cond: // CHECK:STDOUT: %.loc18_10: String = string_literal "Hello" [template = constants.%.3] -// CHECK:STDOUT: %.loc18_17.1: init type = call constants.%ImplicitAs(bool) [template = constants.%.7] +// CHECK:STDOUT: %.loc18_17.1: type = interface_type @ImplicitAs, @ImplicitAs(bool) [template = constants.%.7] // CHECK:STDOUT: %.loc18_17.2: %.8 = specific_constant imports.%import_ref.3, @ImplicitAs(bool) [template = constants.%.9] // CHECK:STDOUT: %Convert.ref: %.8 = name_ref Convert, %.loc18_17.2 [template = constants.%.9] // CHECK:STDOUT: %.loc18_17.3: bool = converted %.loc18_10, [template = ] diff --git a/toolchain/diagnostics/diagnostic_kind.def b/toolchain/diagnostics/diagnostic_kind.def index 40ce21c96548..d512d265abc7 100644 --- a/toolchain/diagnostics/diagnostic_kind.def +++ b/toolchain/diagnostics/diagnostic_kind.def @@ -184,6 +184,7 @@ CARBON_DIAGNOSTIC_KIND(AddrSelfIsNonRef) CARBON_DIAGNOSTIC_KIND(CallArgCountMismatch) CARBON_DIAGNOSTIC_KIND(CallToNonCallable) CARBON_DIAGNOSTIC_KIND(IncompleteReturnTypeHere) +CARBON_DIAGNOSTIC_KIND(InCallToEntity) CARBON_DIAGNOSTIC_KIND(InCallToFunction) CARBON_DIAGNOSTIC_KIND(InCallToFunctionParam) CARBON_DIAGNOSTIC_KIND(InCallToFunctionSelf) @@ -220,6 +221,7 @@ CARBON_DIAGNOSTIC_KIND(ConstructionOfAbstractClass) CARBON_DIAGNOSTIC_KIND(DeductionIncomplete) CARBON_DIAGNOSTIC_KIND(DeductionInconsistent) CARBON_DIAGNOSTIC_KIND(DeductionGenericHere) +CARBON_DIAGNOSTIC_KIND(InitializingGenericParam) // Export checking. CARBON_DIAGNOSTIC_KIND(ExportNotImportedEntity) diff --git a/toolchain/lower/file_context.cpp b/toolchain/lower/file_context.cpp index d9592544ceac..af728114c901 100644 --- a/toolchain/lower/file_context.cpp +++ b/toolchain/lower/file_context.cpp @@ -213,10 +213,12 @@ auto FileContext::BuildFunctionDecl(SemIR::FunctionId function_id) } for (auto param_ref_id : llvm::concat(implicit_param_refs, param_refs)) { - auto param_type_id = - SemIR::Function::GetParamFromParamRefId(sem_ir(), param_ref_id) - .second.type_id; - switch (auto value_rep = SemIR::ValueRepr::ForType(sem_ir(), param_type_id); + auto [param_id, param] = + SemIR::Function::GetParamFromParamRefId(sem_ir(), param_ref_id); + if (!param.runtime_index.is_valid()) { + continue; + } + switch (auto value_rep = SemIR::ValueRepr::ForType(sem_ir(), param.type_id); value_rep.kind) { case SemIR::ValueRepr::Unknown: CARBON_FATAL("Incomplete parameter type lowering function declaration"); @@ -311,6 +313,9 @@ auto FileContext::BuildFunctionDefinition(SemIR::FunctionId function_id) llvm::concat(implicit_param_refs, param_refs)) { auto [param_id, param] = SemIR::Function::GetParamFromParamRefId(sem_ir(), param_ref_id); + if (!param.runtime_index.is_valid()) { + continue; + } // Get the value of the parameter from the function argument. auto param_type_id = param.type_id; @@ -335,8 +340,7 @@ auto FileContext::BuildFunctionDefinition(SemIR::FunctionId function_id) bind_name_id = addr->inner_id; } auto bind_name = sem_ir().insts().Get(bind_name_id); - // TODO: Should we stop passing compile-time bindings at runtime? - CARBON_CHECK(bind_name.Is()); + CARBON_CHECK(bind_name.Is()); function_lowering.SetLocal(bind_name_id, param_value); } diff --git a/toolchain/sem_ir/formatter.cpp b/toolchain/sem_ir/formatter.cpp index c1a742ead08f..b05a7e2f578f 100644 --- a/toolchain/sem_ir/formatter.cpp +++ b/toolchain/sem_ir/formatter.cpp @@ -811,6 +811,14 @@ class FormatterImpl { } } + auto FormatInstRHS(GenericClassType inst) -> void { + if (inst.enclosing_specific_id.is_valid()) { + FormatArgs(inst.class_id, inst.enclosing_specific_id); + } else { + FormatArgs(inst.class_id); + } + } + auto FormatInstRHS(ImplDecl inst) -> void { FormatArgs(inst.impl_id); FormatTrailingBlock(inst.decl_block_id); @@ -829,6 +837,14 @@ class FormatterImpl { } } + auto FormatInstRHS(GenericInterfaceType inst) -> void { + if (inst.enclosing_specific_id.is_valid()) { + FormatArgs(inst.interface_id, inst.enclosing_specific_id); + } else { + FormatArgs(inst.interface_id); + } + } + auto FormatInstRHS(IntLiteral inst) -> void { out_ << " "; sem_ir_.ints() @@ -955,6 +971,8 @@ class FormatterImpl { auto FormatArg(ElementIndex index) -> void { out_ << index; } + auto FormatArg(RuntimeParamIndex index) -> void { out_ << index; } + auto FormatArg(NameScopeId id) -> void { OpenBrace(); FormatNameScope(id); diff --git a/toolchain/sem_ir/id_kind.h b/toolchain/sem_ir/id_kind.h index 20c492bef19d..39d3600679c1 100644 --- a/toolchain/sem_ir/id_kind.h +++ b/toolchain/sem_ir/id_kind.h @@ -120,10 +120,10 @@ using IdKind = TypeEnum< // From base/value_store.h. IntId, RealId, FloatId, StringLiteralValueId, // From sem_ir/id.h. - InstId, ConstantId, EntityNameId, CompileTimeBindIndex, FunctionId, ClassId, - InterfaceId, ImplId, GenericId, SpecificId, ImportIRId, ImportIRInstId, - LocId, BoolValue, IntKind, NameId, NameScopeId, InstBlockId, TypeId, - TypeBlockId, ElementIndex, LibraryNameId, FloatKind>; + InstId, ConstantId, EntityNameId, CompileTimeBindIndex, RuntimeParamIndex, + FunctionId, ClassId, InterfaceId, ImplId, GenericId, SpecificId, ImportIRId, + ImportIRInstId, LocId, BoolValue, IntKind, NameId, NameScopeId, InstBlockId, + TypeId, TypeBlockId, ElementIndex, LibraryNameId, FloatKind>; } // namespace Carbon::SemIR diff --git a/toolchain/sem_ir/ids.h b/toolchain/sem_ir/ids.h index 95f345c63b38..82405e3d1f15 100644 --- a/toolchain/sem_ir/ids.h +++ b/toolchain/sem_ir/ids.h @@ -229,6 +229,27 @@ struct CompileTimeBindIndex : public IndexBase, constexpr CompileTimeBindIndex CompileTimeBindIndex::Invalid = CompileTimeBindIndex(InvalidIndex); +// The index of a runtime parameter in a function. These are allocated +// sequentially, left-to-right, to the function parameters that will have +// arguments passed to them at runtime. In a `call` instruction, a runtime +// argument will have the position in the argument list corresponding to its +// runtime parameter index. +struct RuntimeParamIndex : public IndexBase, + public Printable { + // An explicitly invalid index. + static const RuntimeParamIndex Invalid; + + using IndexBase::IndexBase; + + auto Print(llvm::raw_ostream& out) const -> void { + out << "runtime_param"; + IndexBase::Print(out); + } +}; + +constexpr RuntimeParamIndex RuntimeParamIndex::Invalid = + RuntimeParamIndex(InvalidIndex); + // The ID of a function. struct FunctionId : public IdBase, public Printable { using ValueType = Function; diff --git a/toolchain/sem_ir/inst.h b/toolchain/sem_ir/inst.h index 748b53234e70..2d03a6adc84b 100644 --- a/toolchain/sem_ir/inst.h +++ b/toolchain/sem_ir/inst.h @@ -454,6 +454,12 @@ class InstBlockStore : public BlockValueStore { CARBON_CHECK(global_init_id == InstBlockId::GlobalInit); } + // Adds a block with the given content, returning an ID to reference it. + // Returns Empty rather than creating a unique ID if the block is empty. + auto AddOrEmpty(llvm::ArrayRef content) -> InstBlockId { + return content.empty() ? InstBlockId::Empty : Add(content); + } + auto Set(InstBlockId block_id, llvm::ArrayRef content) -> void { CARBON_CHECK(block_id != InstBlockId::Unreachable); BlockValueStore::SetContent(block_id, content); diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index 161e81fd389d..80ae3d122870 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -450,7 +450,7 @@ struct ClassInit { // The type for a class, either non-generic or specific. struct ClassType { - static constexpr auto Kind = InstKind::ClassType.Define( + static constexpr auto Kind = InstKind::ClassType.Define( {.ir_name = "class_type", .is_type = InstIsType::Always, .constant_kind = InstConstantKind::Always}); @@ -587,6 +587,7 @@ struct GenericClassType { TypeId type_id; ClassId class_id; + SpecificId enclosing_specific_id; }; // The type of the name of a generic interface. The corresponding value is an @@ -601,6 +602,7 @@ struct GenericInterfaceType { TypeId type_id; InterfaceId interface_id; + SpecificId enclosing_specific_id; }; // An `impl` declaration. @@ -688,11 +690,10 @@ struct InterfaceDecl { // The type for an interface, either non-generic or specific. struct InterfaceType { - static constexpr auto Kind = - InstKind::InterfaceType.Define( - {.ir_name = "interface_type", - .is_type = InstIsType::Always, - .constant_kind = InstConstantKind::Always}); + static constexpr auto Kind = InstKind::InterfaceType.Define( + {.ir_name = "interface_type", + .is_type = InstIsType::Always, + .constant_kind = InstConstantKind::Always}); TypeId type_id; InterfaceId interface_id; @@ -781,6 +782,7 @@ struct Param { TypeId type_id; NameId name_id; + RuntimeParamIndex runtime_index; }; // Modifies a pointee type to be a pointer. This is tracking the `*` in