Support for dependent initialization in templates (#7801)

Add support for deferring initialization as a template action, and
performing the deferred initialization during template instantiation.

This is substantially more complex than other conversion actions, for
two primary reasons:

* The initializer in the generic may have storage arguments as inputs.
We model an initializing expression as having a "slot" where
initialization writes the location that should be initialized by that
initializing expression, and that needs to be an output of the
initialization action.
* Initialization from a tuple or struct literal needs to recurse into
that literal, and the literal will have been spelled in the generic,
meaning we don't have an `InstId` that can be used to name the specific
version of the initializer as input for nested conversions.

These issues are addressed by introducing two new features to the action
machinery:

In addition to `InstAction`, we now have `MultiInstAction`, which is an
action that produces a tuple of instruction values instead of a single
instruction value. Initialization actions produce one instruction for
the final result, which is spliced at the point of initialization, plus
one instruction for each storage argument, which are spliced into the
storage argument slots in the original generic. During initialization,
if we find one of those splices in the storage argument of an
initializing expression, we return the new storage argument back to the
initialization action to be included in the specific, instead of
overwriting the storage argument in the generic.

Actions whose `PerforrmAction` takes a `SpecificId` as input no longer
perform automatic refinement of their operands to specific instructions.
Instead, the action is given control over when and where it performs
that refinement. In `InitializeAction`, we use this freedom to form a
`SpecificInst` for the initializer in the primary output block, and form
a `SpecificInst` for the target in the target block. When detecting
whether we are initializing from a tuple or struct literal, we step over
the `SpecificInst` and track its `SpecificId`, and if necessary create a
new `SpecificInst` wrapping the sub-initializer when we recurse into the
nested element conversion.

Assisted-by: Claude and Gemini via Antigravity
This commit is contained in:
Richard Smith
2026-09-24 23:10:18 +00:00
committed by GitHub
parent 08a11ff3ef
commit d4c7ca4221
34 changed files with 4416 additions and 1546 deletions
@@ -346,11 +346,11 @@ fn G() {
// CHECK:STDOUT: %.a92: type = template_inst %T [template]
// CHECK:STDOUT: %.32d: type = type_of_inst @B.%.loc12_17.4 [template]
// CHECK:STDOUT: %.8af: %.32d = splice_inst @B.%.loc12_17.4 [template]
// CHECK:STDOUT: %.d15: type = splice_inst @B.%.loc12_17.7 [template]
// CHECK:STDOUT: %require_complete.f74: <witness> = require_complete_type %.d15 [template]
// CHECK:STDOUT: %B.elem.d56: type = unbound_element_type %B.60e, %.d15 [template]
// CHECK:STDOUT: %struct_type.a.a60: type = struct_type {.a: %.d15} [template]
// CHECK:STDOUT: %complete_type.082: <witness> = complete_type_witness %struct_type.a.a60 [template]
// CHECK:STDOUT: %.537: type = splice_inst @B.%.loc12_17.7 [template]
// CHECK:STDOUT: %require_complete.cb0: <witness> = require_complete_type %.537 [template]
// CHECK:STDOUT: %B.elem.301: type = unbound_element_type %B.60e, %.537 [template]
// CHECK:STDOUT: %struct_type.a.df5: type = struct_type {.a: %.537} [template]
// CHECK:STDOUT: %complete_type.e6d: <witness> = complete_type_witness %struct_type.a.df5 [template]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %B.bd8: type = class_type @B, @B(%i32) [concrete]
@@ -360,10 +360,10 @@ fn G() {
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %inst.splice_block.72d: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.1: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.22e: type = splice_block imports.%A.decl [concrete = %A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.c26: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.2: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.4e4: type = splice_block %A [concrete = %A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [concrete]
@@ -434,24 +434,24 @@ fn G() {
// CHECK:STDOUT: %.loc12_17.5: type = type_of_inst %.loc12_17.4 [template = %.loc12_17.5 (constants.%.32d)]
// CHECK:STDOUT: %.loc12_17.6: @B.%.loc12_17.5 (%.32d) = splice_inst %.loc12_17.4 [template = %.loc12_17.6 (constants.%.8af)]
// CHECK:STDOUT: %.loc12_17.7: <instruction> = convert_to_value_action %.loc12_17.2, type [template]
// CHECK:STDOUT: %.loc12_17.8: type = splice_inst %.loc12_17.7 [template = %.loc12_17.8 (constants.%.d15)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc12_17.8 [template = %require_complete (constants.%require_complete.f74)]
// CHECK:STDOUT: %.loc12_17.8: type = splice_inst %.loc12_17.7 [template = %.loc12_17.8 (constants.%.537)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc12_17.8 [template = %require_complete (constants.%require_complete.cb0)]
// CHECK:STDOUT: %B: type = class_type @B, @B(%T.loc11_10.1) [symbolic = %B (constants.%B.60e)]
// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %.loc12_17.8 [template = %B.elem (constants.%B.elem.d56)]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @B.%.loc12_17.8 (%.d15)} [template = %struct_type.a (constants.%struct_type.a.a60)]
// CHECK:STDOUT: %complete_type.loc13_1.2: <witness> = complete_type_witness %struct_type.a [template = %complete_type.loc13_1.2 (constants.%complete_type.082)]
// CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %.loc12_17.8 [template = %B.elem (constants.%B.elem.301)]
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @B.%.loc12_17.8 (%.537)} [template = %struct_type.a (constants.%struct_type.a.df5)]
// CHECK:STDOUT: %complete_type.loc13_1.2: <witness> = complete_type_witness %struct_type.a [template = %complete_type.loc13_1.2 (constants.%complete_type.e6d)]
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: %field_decl: @B.%B.elem (%B.elem.d56) = field_decl a, element0, %.loc12_17.3 in [concrete] {
// CHECK:STDOUT: %field_decl: @B.%B.elem (%B.elem.301) = field_decl a, element0, %.loc12_17.3 in [concrete] {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, imports.%A.template [concrete = constants.%A.template]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_10.2 [symbolic = %T.loc11_10.1 (constants.%T)]
// CHECK:STDOUT: %.loc12_16.1: type = template_inst %T.ref [template = %.loc12_16.2 (constants.%.a92)]
// CHECK:STDOUT: %.loc12_17.1: type = type_of_inst %.loc12_17.4 [template = %.loc12_17.5 (constants.%.32d)]
// CHECK:STDOUT: %.loc12_17.2: @B.%.loc12_17.5 (%.32d) = splice_inst %.loc12_17.4 [template = %.loc12_17.6 (constants.%.8af)]
// CHECK:STDOUT: %.loc12_17.3: type = splice_inst %.loc12_17.7 [template = %.loc12_17.8 (constants.%.d15)]
// CHECK:STDOUT: %.loc12_17.3: type = splice_inst %.loc12_17.7 [template = %.loc12_17.8 (constants.%.537)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %complete_type.loc13_1.1: <witness> = complete_type_witness constants.%struct_type.a.a60 [template = %complete_type.loc13_1.2 (constants.%complete_type.082)]
// CHECK:STDOUT: %complete_type.loc13_1.1: <witness> = complete_type_witness constants.%struct_type.a.df5 [template = %complete_type.loc13_1.2 (constants.%complete_type.e6d)]
// CHECK:STDOUT: complete_type_witness = %complete_type.loc13_1.1
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
@@ -490,10 +490,10 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %.loc12_16.2 => constants.%i32
// CHECK:STDOUT: %.loc12_17.4 => constants.%inst.splice_block.72d
// CHECK:STDOUT: %.loc12_17.4 => constants.%inst.splice_block.426619.1
// CHECK:STDOUT: %.loc12_17.5 => type
// CHECK:STDOUT: %.loc12_17.6 => constants.%A
// CHECK:STDOUT: %.loc12_17.7 => constants.%inst.splice_block.c26
// CHECK:STDOUT: %.loc12_17.7 => constants.%inst.splice_block.426619.2
// CHECK:STDOUT: %.loc12_17.8 => constants.%A
// CHECK:STDOUT: %require_complete => constants.%complete_type.ece
// CHECK:STDOUT: %B => constants.%B.bd8
@@ -518,34 +518,34 @@ fn G() {
// CHECK:STDOUT: %.a92: type = template_inst %T [template]
// CHECK:STDOUT: %.32dd98.1: type = type_of_inst @F.%.loc10_24.5 [template]
// CHECK:STDOUT: %.8af9c5.1: %.32dd98.1 = splice_inst @F.%.loc10_24.5 [template]
// CHECK:STDOUT: %.d15: type = splice_inst @F.%.loc10_24.8 [template]
// CHECK:STDOUT: %require_complete.f74: <witness> = require_complete_type %.d15 [template]
// CHECK:STDOUT: %pattern_type.3c1: type = pattern_type %.d15 [template]
// CHECK:STDOUT: %a.patt.100: %pattern_type.3c1 = value_binding_pattern a [template]
// CHECK:STDOUT: %.537: type = splice_inst @F.%.loc10_24.8 [template]
// CHECK:STDOUT: %require_complete.cb0: <witness> = require_complete_type %.537 [template]
// CHECK:STDOUT: %pattern_type.fcb: type = pattern_type %.537 [template]
// CHECK:STDOUT: %a.patt.d9b: %pattern_type.fcb = value_binding_pattern a [template]
// CHECK:STDOUT: %.32dd98.2: type = type_of_inst @F.%.loc10_35.3 [template]
// CHECK:STDOUT: %.8af9c5.2: %.32dd98.2 = splice_inst @F.%.loc10_35.3 [template]
// CHECK:STDOUT: %.e8f: type = type_of_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.c84: %.e8f = splice_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.08a: type = type_of_inst @F.%.loc10_39.4 [template]
// CHECK:STDOUT: %.47d: %.08a = splice_inst @F.%.loc10_39.4 [template]
// CHECK:STDOUT: %.74a: %.d15 = splice_inst @F.%.loc10_39.7 [template]
// CHECK:STDOUT: %.fdd: type = type_of_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.598: %.fdd = splice_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.e81: type = type_of_inst @F.%.loc10_39.4 [template]
// CHECK:STDOUT: %.949: %.e81 = splice_inst @F.%.loc10_39.4 [template]
// CHECK:STDOUT: %.739: %.537 = splice_inst @F.%.loc10_39.7 [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F, @F(%i32) [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %inst.splice_block.72dff3.1: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.1: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.22ed96.1: type = splice_block imports.%A.decl [concrete = %A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.c26: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.2: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.4e4: type = splice_block %A [concrete = %A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %pattern_type.b78: type = pattern_type %A [concrete]
// CHECK:STDOUT: %a.patt.117: %pattern_type.b78 = value_binding_pattern a [concrete]
// CHECK:STDOUT: %inst.splice_block.72dff3.2: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.3: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.22ed96.2: type = splice_block imports.%A.decl [concrete = %A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.A.cpp_overload_set.type: type = cpp_overload_set_type @A.A.cpp_overload_set [concrete]
@@ -556,7 +556,7 @@ fn G() {
// CHECK:STDOUT: %ptr.303: type = ptr_type %A [concrete]
// CHECK:STDOUT: %A__carbon_thunk.type: type = fn_type @A__carbon_thunk [concrete]
// CHECK:STDOUT: %A__carbon_thunk: %A__carbon_thunk.type = struct_value () [concrete]
// CHECK:STDOUT: %inst.splice_block.76c: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.4: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.78f: init %A = splice_block %.38d {
// CHECK:STDOUT: %.3a8: ref %A = temporary_storage
// CHECK:STDOUT: %addr: %ptr.303 = addr_of %.3a8
@@ -564,7 +564,7 @@ fn G() {
// CHECK:STDOUT: %.38d: init %A to %.3a8 = mark_in_place_init %A__carbon_thunk.call
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.b90: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.5: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.114: %A = splice_block %.f4b {
// CHECK:STDOUT: %.146: ref %A = temporary %.3a8, %.78f
// CHECK:STDOUT: %.f4b: %A = acquire_value %.146
@@ -610,21 +610,21 @@ fn G() {
// CHECK:STDOUT: %.loc10_24.6: type = type_of_inst %.loc10_24.5 [template = %.loc10_24.6 (constants.%.32dd98.1)]
// CHECK:STDOUT: %.loc10_24.7: @F.%.loc10_24.6 (%.32dd98.1) = splice_inst %.loc10_24.5 [template = %.loc10_24.7 (constants.%.8af9c5.1)]
// CHECK:STDOUT: %.loc10_24.8: <instruction> = convert_to_value_action %.loc10_24.3, type [template]
// CHECK:STDOUT: %.loc10_24.9: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.d15)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc10_24.9 [template = %require_complete (constants.%require_complete.f74)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc10_24.9 [template = %pattern_type (constants.%pattern_type.3c1)]
// CHECK:STDOUT: %a.patt.loc10_15.2: @F.%pattern_type (%pattern_type.3c1) = value_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.100)]
// CHECK:STDOUT: %.loc10_24.9: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.537)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc10_24.9 [template = %require_complete (constants.%require_complete.cb0)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc10_24.9 [template = %pattern_type (constants.%pattern_type.fcb)]
// CHECK:STDOUT: %a.patt.loc10_15.2: @F.%pattern_type (%pattern_type.fcb) = value_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.d9b)]
// CHECK:STDOUT: %.loc10_35.3: <instruction> = call_action (%A.ref.loc10_31, %.loc10_34), false [template]
// CHECK:STDOUT: %.loc10_35.4: type = type_of_inst %.loc10_35.3 [template = %.loc10_35.4 (constants.%.32dd98.2)]
// CHECK:STDOUT: %.loc10_35.5: @F.%.loc10_35.4 (%.32dd98.2) = splice_inst %.loc10_35.3 [template = %.loc10_35.5 (constants.%.8af9c5.2)]
// CHECK:STDOUT: %.loc10_36.3: <instruction> = access_member_action %.loc10_35.2, A [template]
// CHECK:STDOUT: %.loc10_36.4: type = type_of_inst %.loc10_36.3 [template = %.loc10_36.4 (constants.%.e8f)]
// CHECK:STDOUT: %.loc10_36.5: @F.%.loc10_36.4 (%.e8f) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.c84)]
// CHECK:STDOUT: %.loc10_36.4: type = type_of_inst %.loc10_36.3 [template = %.loc10_36.4 (constants.%.fdd)]
// CHECK:STDOUT: %.loc10_36.5: @F.%.loc10_36.4 (%.fdd) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.598)]
// CHECK:STDOUT: %.loc10_39.4: <instruction> = call_action (%.loc10_36.2), false [template]
// CHECK:STDOUT: %.loc10_39.5: type = type_of_inst %.loc10_39.4 [template = %.loc10_39.5 (constants.%.08a)]
// CHECK:STDOUT: %.loc10_39.6: @F.%.loc10_39.5 (%.08a) = splice_inst %.loc10_39.4 [template = %.loc10_39.6 (constants.%.47d)]
// CHECK:STDOUT: %.loc10_39.5: type = type_of_inst %.loc10_39.4 [template = %.loc10_39.5 (constants.%.e81)]
// CHECK:STDOUT: %.loc10_39.6: @F.%.loc10_39.5 (%.e81) = splice_inst %.loc10_39.4 [template = %.loc10_39.6 (constants.%.949)]
// CHECK:STDOUT: %.loc10_39.7: <instruction> = convert_to_value_action %.loc10_39.2, %.loc10_24.9 [template]
// CHECK:STDOUT: %.loc10_39.8: @F.%.loc10_24.9 (%.d15) = splice_inst %.loc10_39.7 [template = %.loc10_39.8 (constants.%.74a)]
// CHECK:STDOUT: %.loc10_39.8: @F.%.loc10_24.9 (%.537) = splice_inst %.loc10_39.7 [template = %.loc10_39.8 (constants.%.739)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
@@ -634,23 +634,23 @@ fn G() {
// CHECK:STDOUT: %.loc10_34: type = template_inst %T.ref.loc10_34 [template = %.loc10_23.2 (constants.%.a92)]
// CHECK:STDOUT: %.loc10_35.1: type = type_of_inst %.loc10_35.3 [template = %.loc10_35.4 (constants.%.32dd98.2)]
// CHECK:STDOUT: %.loc10_35.2: @F.%.loc10_35.4 (%.32dd98.2) = splice_inst %.loc10_35.3 [template = %.loc10_35.5 (constants.%.8af9c5.2)]
// CHECK:STDOUT: %.loc10_36.1: type = type_of_inst %.loc10_36.3 [template = %.loc10_36.4 (constants.%.e8f)]
// CHECK:STDOUT: %.loc10_36.2: @F.%.loc10_36.4 (%.e8f) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.c84)]
// CHECK:STDOUT: %.loc10_39.1: type = type_of_inst %.loc10_39.4 [template = %.loc10_39.5 (constants.%.08a)]
// CHECK:STDOUT: %.loc10_39.2: @F.%.loc10_39.5 (%.08a) = splice_inst %.loc10_39.4 [template = %.loc10_39.6 (constants.%.47d)]
// CHECK:STDOUT: %.loc10_39.3: @F.%.loc10_24.9 (%.d15) = splice_inst %.loc10_39.7 [template = %.loc10_39.8 (constants.%.74a)]
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.4 [template = %.loc10_24.9 (constants.%.d15)] {
// CHECK:STDOUT: %.loc10_36.1: type = type_of_inst %.loc10_36.3 [template = %.loc10_36.4 (constants.%.fdd)]
// CHECK:STDOUT: %.loc10_36.2: @F.%.loc10_36.4 (%.fdd) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.598)]
// CHECK:STDOUT: %.loc10_39.1: type = type_of_inst %.loc10_39.4 [template = %.loc10_39.5 (constants.%.e81)]
// CHECK:STDOUT: %.loc10_39.2: @F.%.loc10_39.5 (%.e81) = splice_inst %.loc10_39.4 [template = %.loc10_39.6 (constants.%.949)]
// CHECK:STDOUT: %.loc10_39.3: @F.%.loc10_24.9 (%.537) = splice_inst %.loc10_39.7 [template = %.loc10_39.8 (constants.%.739)]
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.4 [template = %.loc10_24.9 (constants.%.537)] {
// CHECK:STDOUT: %Cpp.ref.loc10_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc10_20: %A.type = name_ref A, imports.%A.template [concrete = constants.%A.template]
// CHECK:STDOUT: %T.ref.loc10_23: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T)]
// CHECK:STDOUT: %.loc10_23.1: type = template_inst %T.ref.loc10_23 [template = %.loc10_23.2 (constants.%.a92)]
// CHECK:STDOUT: %.loc10_24.2: type = type_of_inst %.loc10_24.5 [template = %.loc10_24.6 (constants.%.32dd98.1)]
// CHECK:STDOUT: %.loc10_24.3: @F.%.loc10_24.6 (%.32dd98.1) = splice_inst %.loc10_24.5 [template = %.loc10_24.7 (constants.%.8af9c5.1)]
// CHECK:STDOUT: %.loc10_24.4: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.d15)]
// CHECK:STDOUT: %.loc10_24.4: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.537)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: @F.%.loc10_24.9 (%.d15) = wrapper_binding a, %.loc10_39.3
// CHECK:STDOUT: %a: @F.%.loc10_24.9 (%.537) = wrapper_binding a, %.loc10_39.3
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt.loc10_15.1: @F.%pattern_type (%pattern_type.3c1) = value_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.100)]
// CHECK:STDOUT: %a.patt.loc10_15.1: @F.%pattern_type (%pattern_type.fcb) = value_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.d9b)]
// CHECK:STDOUT: }
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -676,24 +676,24 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %.loc10_23.2 => constants.%i32
// CHECK:STDOUT: %.loc10_24.5 => constants.%inst.splice_block.72dff3.1
// CHECK:STDOUT: %.loc10_24.5 => constants.%inst.splice_block.426619.1
// CHECK:STDOUT: %.loc10_24.6 => type
// CHECK:STDOUT: %.loc10_24.7 => constants.%A
// CHECK:STDOUT: %.loc10_24.8 => constants.%inst.splice_block.c26
// CHECK:STDOUT: %.loc10_24.8 => constants.%inst.splice_block.426619.2
// CHECK:STDOUT: %.loc10_24.9 => constants.%A
// CHECK:STDOUT: %require_complete => constants.%complete_type.357
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b78
// CHECK:STDOUT: %a.patt.loc10_15.2 => constants.%a.patt.117
// CHECK:STDOUT: %.loc10_35.3 => constants.%inst.splice_block.72dff3.2
// CHECK:STDOUT: %.loc10_35.3 => constants.%inst.splice_block.426619.3
// CHECK:STDOUT: %.loc10_35.4 => type
// CHECK:STDOUT: %.loc10_35.5 => constants.%A
// CHECK:STDOUT: %.loc10_36.3 => constants.%inst.name_ref
// CHECK:STDOUT: %.loc10_36.4 => constants.%A.A.cpp_overload_set.type
// CHECK:STDOUT: %.loc10_36.5 => constants.%A.A.cpp_overload_set.value
// CHECK:STDOUT: %.loc10_39.4 => constants.%inst.splice_block.76c
// CHECK:STDOUT: %.loc10_39.4 => constants.%inst.splice_block.426619.4
// CHECK:STDOUT: %.loc10_39.5 => constants.%A
// CHECK:STDOUT: %.loc10_39.6 => invalid
// CHECK:STDOUT: %.loc10_39.7 => constants.%inst.splice_block.b90
// CHECK:STDOUT: %.loc10_39.7 => constants.%inst.splice_block.426619.5
// CHECK:STDOUT: %.loc10_39.8 => invalid
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -713,45 +713,36 @@ fn G() {
// CHECK:STDOUT: %.a92: type = template_inst %T [template]
// CHECK:STDOUT: %.32dd98.1: type = type_of_inst @F.%.loc10_24.5 [template]
// CHECK:STDOUT: %.8af9c5.1: %.32dd98.1 = splice_inst @F.%.loc10_24.5 [template]
// CHECK:STDOUT: %.d15: type = splice_inst @F.%.loc10_24.8 [template]
// CHECK:STDOUT: %require_complete.f74: <witness> = require_complete_type %.d15 [template]
// CHECK:STDOUT: %pattern_type.3c1: type = pattern_type %.d15 [template]
// CHECK:STDOUT: %a.patt.b2a: %pattern_type.3c1 = ref_binding_pattern a [template]
// CHECK:STDOUT: %a.var_patt.66a: %pattern_type.3c1 = var_pattern %a.patt.b2a [template]
// CHECK:STDOUT: %.537: type = splice_inst @F.%.loc10_24.8 [template]
// CHECK:STDOUT: %require_complete.cb0: <witness> = require_complete_type %.537 [template]
// CHECK:STDOUT: %pattern_type.fcb: type = pattern_type %.537 [template]
// CHECK:STDOUT: %a.patt.970: %pattern_type.fcb = ref_binding_pattern a [template]
// CHECK:STDOUT: %a.var_patt.98f: %pattern_type.fcb = var_pattern %a.patt.970 [template]
// CHECK:STDOUT: %.32dd98.2: type = type_of_inst @F.%.loc10_35.3 [template]
// CHECK:STDOUT: %.8af9c5.2: %.32dd98.2 = splice_inst @F.%.loc10_35.3 [template]
// CHECK:STDOUT: %.e8f: type = type_of_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.c84: %.e8f = splice_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.08a: type = type_of_inst @F.%.loc10_39.3 [template]
// CHECK:STDOUT: %.47d: %.08a = splice_inst @F.%.loc10_39.3 [template]
// CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete]
// CHECK:STDOUT: %.98306a.1: type = type_of_inst @F.%.loc10_3.15 [template]
// CHECK:STDOUT: %.21024f.1: %.98306a.1 = splice_inst @F.%.loc10_3.15 [template]
// CHECK:STDOUT: %.20fa30.1: type = type_of_inst @F.%.loc10_3.18 [template]
// CHECK:STDOUT: %.aae4fe.1: %.20fa30.1 = splice_inst @F.%.loc10_3.18 [template]
// CHECK:STDOUT: %.e2f: type = type_of_inst @F.%.loc10_3.21 [template]
// CHECK:STDOUT: %.8c6: %.e2f = splice_inst @F.%.loc10_3.21 [template]
// CHECK:STDOUT: %.4d4: type = type_of_inst @F.%.loc10_3.24 [template]
// CHECK:STDOUT: %.c8d: %.4d4 = splice_inst @F.%.loc10_3.24 [template]
// CHECK:STDOUT: %.972: %.d15 = splice_inst @F.%.loc10_3.27 [template]
// CHECK:STDOUT: %.fdd: type = type_of_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.598: %.fdd = splice_inst @F.%.loc10_36.3 [template]
// CHECK:STDOUT: %.e81: type = type_of_inst @F.%.loc10_39.3 [template]
// CHECK:STDOUT: %.949: %.e81 = splice_inst @F.%.loc10_39.3 [template]
// CHECK:STDOUT: %tuple.type: type = tuple_type (<instruction>) [concrete]
// CHECK:STDOUT: %.5d6: %.537 = splice_inst @F.%tuple.elem0 [template]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic]
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.4e5: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic]
// CHECK:STDOUT: %Self: %Destroy.type = symbolic_binding Self, 0 [symbolic]
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.4e5: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self) [symbolic]
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.4a0: %Destroy.WithSelf.SelfDestruct.type.4e5 = struct_value () [symbolic]
// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete]
// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.71d [concrete]
// CHECK:STDOUT: %.409: type = type_of_inst @F.%.loc10_3.29 [template]
// CHECK:STDOUT: %.9b8: %.409 = splice_inst @F.%.loc10_3.29 [template]
// CHECK:STDOUT: %.a75: type = type_of_inst @F.%.loc10_3.32 [template]
// CHECK:STDOUT: %.4ea: %.a75 = splice_inst @F.%.loc10_3.32 [template]
// CHECK:STDOUT: %.8cb: type = type_of_inst @F.%.loc10_3.8 [template]
// CHECK:STDOUT: %.c23: %.8cb = splice_inst @F.%.loc10_3.8 [template]
// CHECK:STDOUT: %.57c: type = type_of_inst @F.%.loc10_3.11 [template]
// CHECK:STDOUT: %.e63: %.57c = splice_inst @F.%.loc10_3.11 [template]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %A: type = class_type @A [concrete]
// CHECK:STDOUT: %inst.splice_block.72dff3.1: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.1: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.22ed96.1: type = splice_block imports.%A.decl [concrete = %A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.c26: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.2: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.4e4: type = splice_block %A [concrete = %A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
@@ -759,7 +750,7 @@ fn G() {
// CHECK:STDOUT: %pattern_type.b78: type = pattern_type %A [concrete]
// CHECK:STDOUT: %a.patt.198: %pattern_type.b78 = ref_binding_pattern a [concrete]
// CHECK:STDOUT: %a.var_patt.47b: %pattern_type.b78 = var_pattern %a.patt.198 [concrete]
// CHECK:STDOUT: %inst.splice_block.72dff3.2: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %inst.splice_block.426619.3: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.22ed96.2: type = splice_block imports.%A.decl [concrete = %A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.A.cpp_overload_set.type: type = cpp_overload_set_type @A.A.cpp_overload_set [concrete]
@@ -770,28 +761,18 @@ fn G() {
// CHECK:STDOUT: %ptr.303: type = ptr_type %A [concrete]
// CHECK:STDOUT: %A__carbon_thunk.type: type = fn_type @A__carbon_thunk [concrete]
// CHECK:STDOUT: %A__carbon_thunk: %A__carbon_thunk.type = struct_value () [concrete]
// CHECK:STDOUT: %inst.splice_block.76c: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.78f: init %A = splice_block %.38d {
// CHECK:STDOUT: %.3a8: ref %A = temporary_storage
// CHECK:STDOUT: %addr: %ptr.303 = addr_of %.3a8
// CHECK:STDOUT: %inst.splice_block.426619.4: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.723: init %A = splice_block %.904 {
// CHECK:STDOUT: %.b99e31.2: ref %A = specific_inst @F.%a.var, @F(%i32)
// CHECK:STDOUT: %addr: %ptr.303 = addr_of %.b99e31.2
// CHECK:STDOUT: %A__carbon_thunk.call: init %empty_tuple.type = call imports.%A__carbon_thunk.decl(%addr)
// CHECK:STDOUT: %.38d: init %A to %.3a8 = mark_in_place_init %A__carbon_thunk.call
// CHECK:STDOUT: %.904: init %A to %.b99e31.2 = mark_in_place_init %A__carbon_thunk.call
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %.7ad: <instruction> = call_action (%ImplicitAs.generic, %.d15), false [template]
// CHECK:STDOUT: %.98306a.2: type = type_of_inst %.7ad [template]
// CHECK:STDOUT: %.21024f.2: %.98306a.2 = splice_inst %.7ad [template]
// CHECK:STDOUT: %.adc: <instruction> = access_member_action %.21024f.2, Convert [template]
// CHECK:STDOUT: %.20fa30.2: type = type_of_inst %.adc [template]
// CHECK:STDOUT: %.aae4fe.2: %.20fa30.2 = splice_inst %.adc [template]
// CHECK:STDOUT: %.311: <instruction> = compound_member_access_action %.78f, %.aae4fe.2 [template]
// CHECK:STDOUT: %.1be: type = type_of_inst %.311 [template]
// CHECK:STDOUT: %.3f6: %.1be = splice_inst %.311 [template]
// CHECK:STDOUT: %.787: <instruction> = call_action (%.3f6), true [template]
// CHECK:STDOUT: %.67b: type = type_of_inst %.787 [template]
// CHECK:STDOUT: %.c3f: %.67b = splice_inst %.787 [template]
// CHECK:STDOUT: %.9d9: <instruction> = convert_to_category_action %.c3f, element10 [template]
// CHECK:STDOUT: %.1a1: %A = splice_inst %.9d9 [template]
// CHECK:STDOUT: %inst.splice_block.426619.5: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.ab7: init %A = splice_block %.723 {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%inst.splice_block.426619.5) [concrete]
// CHECK:STDOUT: %self.param_patt.1f1: %pattern_type.b78 = ref_param_pattern [concrete]
// CHECK:STDOUT: %self.patt.6db: %pattern_type.b78 = wrapper_binding_pattern self, %self.param_patt.1f1 [concrete]
// CHECK:STDOUT: %A.cpp_destructor.type: type = fn_type @A.cpp_destructor [concrete]
@@ -804,15 +785,15 @@ fn G() {
// CHECK:STDOUT: %Destroy.facet.cd4: %Destroy.type = facet_value %A, (%custom_witness.842) [concrete]
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.2fb: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.cd4) [concrete]
// CHECK:STDOUT: %.758: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.2fb, %Destroy.facet.cd4 [concrete]
// CHECK:STDOUT: %inst.splice_block.df2: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.6c0: <bound method> = splice_block %bound_method {
// CHECK:STDOUT: %.30e: ref %A = specific_inst @F.%a.var, @F(%i32)
// CHECK:STDOUT: %inst.splice_block.426619.6: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.c39: <bound method> = splice_block %bound_method {
// CHECK:STDOUT: %.b99e31.1: ref %A = specific_inst @F.%a.var, @F(%i32)
// CHECK:STDOUT: %impl.elem2: %.758 = impl_witness_access %custom_witness.842, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.30e, %impl.elem2
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.b99e31.1, %impl.elem2
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.call: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.6c0(%.30e)
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.c39(%.b99e31.1)
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -869,83 +850,63 @@ fn G() {
// CHECK:STDOUT: %.loc10_24.6: type = type_of_inst %.loc10_24.5 [template = %.loc10_24.6 (constants.%.32dd98.1)]
// CHECK:STDOUT: %.loc10_24.7: @F.%.loc10_24.6 (%.32dd98.1) = splice_inst %.loc10_24.5 [template = %.loc10_24.7 (constants.%.8af9c5.1)]
// CHECK:STDOUT: %.loc10_24.8: <instruction> = convert_to_value_action %.loc10_24.3, type [template]
// CHECK:STDOUT: %.loc10_24.9: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.d15)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc10_24.9 [template = %require_complete (constants.%require_complete.f74)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc10_24.9 [template = %pattern_type (constants.%pattern_type.3c1)]
// CHECK:STDOUT: %a.patt.loc10_15.2: @F.%pattern_type (%pattern_type.3c1) = ref_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.b2a)]
// CHECK:STDOUT: %a.var_patt.loc10_3.2: @F.%pattern_type (%pattern_type.3c1) = var_pattern %a.patt.loc10_15.2 [template = %a.var_patt.loc10_3.2 (constants.%a.var_patt.66a)]
// CHECK:STDOUT: %.loc10_24.9: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.537)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc10_24.9 [template = %require_complete (constants.%require_complete.cb0)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc10_24.9 [template = %pattern_type (constants.%pattern_type.fcb)]
// CHECK:STDOUT: %a.patt.loc10_15.2: @F.%pattern_type (%pattern_type.fcb) = ref_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.970)]
// CHECK:STDOUT: %a.var_patt.loc10_3.2: @F.%pattern_type (%pattern_type.fcb) = var_pattern %a.patt.loc10_15.2 [template = %a.var_patt.loc10_3.2 (constants.%a.var_patt.98f)]
// CHECK:STDOUT: %.loc10_35.3: <instruction> = call_action (%A.ref.loc10_31, %.loc10_34), false [template]
// CHECK:STDOUT: %.loc10_35.4: type = type_of_inst %.loc10_35.3 [template = %.loc10_35.4 (constants.%.32dd98.2)]
// CHECK:STDOUT: %.loc10_35.5: @F.%.loc10_35.4 (%.32dd98.2) = splice_inst %.loc10_35.3 [template = %.loc10_35.5 (constants.%.8af9c5.2)]
// CHECK:STDOUT: %.loc10_36.3: <instruction> = access_member_action %.loc10_35.2, A [template]
// CHECK:STDOUT: %.loc10_36.4: type = type_of_inst %.loc10_36.3 [template = %.loc10_36.4 (constants.%.e8f)]
// CHECK:STDOUT: %.loc10_36.5: @F.%.loc10_36.4 (%.e8f) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.c84)]
// CHECK:STDOUT: %.loc10_36.4: type = type_of_inst %.loc10_36.3 [template = %.loc10_36.4 (constants.%.fdd)]
// CHECK:STDOUT: %.loc10_36.5: @F.%.loc10_36.4 (%.fdd) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.598)]
// CHECK:STDOUT: %.loc10_39.3: <instruction> = call_action (%.loc10_36.2), false [template]
// CHECK:STDOUT: %.loc10_39.4: type = type_of_inst %.loc10_39.3 [template = %.loc10_39.4 (constants.%.08a)]
// CHECK:STDOUT: %.loc10_39.5: @F.%.loc10_39.4 (%.08a) = splice_inst %.loc10_39.3 [template = %.loc10_39.5 (constants.%.47d)]
// CHECK:STDOUT: %.loc10_3.15: <instruction> = call_action (constants.%ImplicitAs.generic, constants.%.d15), false [template]
// CHECK:STDOUT: %.loc10_3.16: type = type_of_inst %.loc10_3.15 [template = %.loc10_3.16 (constants.%.98306a.1)]
// CHECK:STDOUT: %.loc10_3.17: @F.%.loc10_3.16 (%.98306a.1) = splice_inst %.loc10_3.15 [template = %.loc10_3.17 (constants.%.21024f.1)]
// CHECK:STDOUT: %.loc10_3.18: <instruction> = access_member_action %.loc10_3.2, Convert [template]
// CHECK:STDOUT: %.loc10_3.19: type = type_of_inst %.loc10_3.18 [template = %.loc10_3.19 (constants.%.20fa30.1)]
// CHECK:STDOUT: %.loc10_3.20: @F.%.loc10_3.19 (%.20fa30.1) = splice_inst %.loc10_3.18 [template = %.loc10_3.20 (constants.%.aae4fe.1)]
// CHECK:STDOUT: %.loc10_3.21: <instruction> = compound_member_access_action %.loc10_39.2, %.loc10_3.4 [template]
// CHECK:STDOUT: %.loc10_3.22: type = type_of_inst %.loc10_3.21 [template = %.loc10_3.22 (constants.%.e2f)]
// CHECK:STDOUT: %.loc10_3.23: @F.%.loc10_3.22 (%.e2f) = splice_inst %.loc10_3.21 [template = %.loc10_3.23 (constants.%.8c6)]
// CHECK:STDOUT: %.loc10_3.24: <instruction> = call_action (%.loc10_3.6), true [template]
// CHECK:STDOUT: %.loc10_3.25: type = type_of_inst %.loc10_3.24 [template = %.loc10_3.25 (constants.%.4d4)]
// CHECK:STDOUT: %.loc10_3.26: @F.%.loc10_3.25 (%.4d4) = splice_inst %.loc10_3.24 [template = %.loc10_3.26 (constants.%.c8d)]
// CHECK:STDOUT: %.loc10_3.27: <instruction> = convert_to_category_action %.loc10_3.9, element10 [template]
// CHECK:STDOUT: %.loc10_3.28: @F.%.loc10_24.9 (%.d15) = splice_inst %.loc10_3.27 [template = %.loc10_3.28 (constants.%.972)]
// CHECK:STDOUT: %.loc10_3.29: <instruction> = compound_member_access_action %a.var, constants.%assoc2 [template]
// CHECK:STDOUT: %.loc10_3.30: type = type_of_inst %.loc10_3.29 [template = %.loc10_3.30 (constants.%.409)]
// CHECK:STDOUT: %.loc10_3.31: @F.%.loc10_3.30 (%.409) = splice_inst %.loc10_3.29 [template = %.loc10_3.31 (constants.%.9b8)]
// CHECK:STDOUT: %.loc10_3.32: <instruction> = call_action (%.loc10_3.12), true [template]
// CHECK:STDOUT: %.loc10_3.33: type = type_of_inst %.loc10_3.32 [template = %.loc10_3.33 (constants.%.a75)]
// CHECK:STDOUT: %.loc10_3.34: @F.%.loc10_3.33 (%.a75) = splice_inst %.loc10_3.32 [template = %.loc10_3.34 (constants.%.4ea)]
// CHECK:STDOUT: %.loc10_39.4: type = type_of_inst %.loc10_39.3 [template = %.loc10_39.4 (constants.%.e81)]
// CHECK:STDOUT: %.loc10_39.5: @F.%.loc10_39.4 (%.e81) = splice_inst %.loc10_39.3 [template = %.loc10_39.5 (constants.%.949)]
// CHECK:STDOUT: %.loc10_3.6: %tuple.type = initialize_action %.loc10_39.2, %.loc10_24.9, %a.var, false [template]
// CHECK:STDOUT: %tuple.elem0: <instruction> = tuple_access %.loc10_3.6, element0 [template]
// CHECK:STDOUT: %.loc10_3.7: @F.%.loc10_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc10_3.7 (constants.%.5d6)]
// CHECK:STDOUT: %.loc10_3.8: <instruction> = compound_member_access_action %a.var, constants.%assoc2 [template]
// CHECK:STDOUT: %.loc10_3.9: type = type_of_inst %.loc10_3.8 [template = %.loc10_3.9 (constants.%.8cb)]
// CHECK:STDOUT: %.loc10_3.10: @F.%.loc10_3.9 (%.8cb) = splice_inst %.loc10_3.8 [template = %.loc10_3.10 (constants.%.c23)]
// CHECK:STDOUT: %.loc10_3.11: <instruction> = call_action (%.loc10_3.3), true [template]
// CHECK:STDOUT: %.loc10_3.12: type = type_of_inst %.loc10_3.11 [template = %.loc10_3.12 (constants.%.57c)]
// CHECK:STDOUT: %.loc10_3.13: @F.%.loc10_3.12 (%.57c) = splice_inst %.loc10_3.11 [template = %.loc10_3.13 (constants.%.e63)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.var: ref @F.%.loc10_24.9 (%.d15) = var_storage %a.var_patt.loc10_3.1
// CHECK:STDOUT: %a.var: ref @F.%.loc10_24.9 (%.537) = var_storage %a.var_patt.loc10_3.1
// CHECK:STDOUT: %Cpp.ref.loc10_28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc10_31: %A.type = name_ref A, imports.%A.template [concrete = constants.%A.template]
// CHECK:STDOUT: %T.ref.loc10_34: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T)]
// CHECK:STDOUT: %.loc10_34: type = template_inst %T.ref.loc10_34 [template = %.loc10_23.2 (constants.%.a92)]
// CHECK:STDOUT: %.loc10_35.1: type = type_of_inst %.loc10_35.3 [template = %.loc10_35.4 (constants.%.32dd98.2)]
// CHECK:STDOUT: %.loc10_35.2: @F.%.loc10_35.4 (%.32dd98.2) = splice_inst %.loc10_35.3 [template = %.loc10_35.5 (constants.%.8af9c5.2)]
// CHECK:STDOUT: %.loc10_36.1: type = type_of_inst %.loc10_36.3 [template = %.loc10_36.4 (constants.%.e8f)]
// CHECK:STDOUT: %.loc10_36.2: @F.%.loc10_36.4 (%.e8f) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.c84)]
// CHECK:STDOUT: %.loc10_39.1: type = type_of_inst %.loc10_39.3 [template = %.loc10_39.4 (constants.%.08a)]
// CHECK:STDOUT: %.loc10_39.2: @F.%.loc10_39.4 (%.08a) = splice_inst %.loc10_39.3 [template = %.loc10_39.5 (constants.%.47d)]
// CHECK:STDOUT: %.loc10_3.1: type = type_of_inst %.loc10_3.15 [template = %.loc10_3.16 (constants.%.98306a.1)]
// CHECK:STDOUT: %.loc10_3.2: @F.%.loc10_3.16 (%.98306a.1) = splice_inst %.loc10_3.15 [template = %.loc10_3.17 (constants.%.21024f.1)]
// CHECK:STDOUT: %.loc10_3.3: type = type_of_inst %.loc10_3.18 [template = %.loc10_3.19 (constants.%.20fa30.1)]
// CHECK:STDOUT: %.loc10_3.4: @F.%.loc10_3.19 (%.20fa30.1) = splice_inst %.loc10_3.18 [template = %.loc10_3.20 (constants.%.aae4fe.1)]
// CHECK:STDOUT: %.loc10_3.5: type = type_of_inst %.loc10_3.21 [template = %.loc10_3.22 (constants.%.e2f)]
// CHECK:STDOUT: %.loc10_3.6: @F.%.loc10_3.22 (%.e2f) = splice_inst %.loc10_3.21 [template = %.loc10_3.23 (constants.%.8c6)]
// CHECK:STDOUT: %.loc10_3.7: type = type_of_inst %.loc10_3.24 [template = %.loc10_3.25 (constants.%.4d4)]
// CHECK:STDOUT: %.loc10_3.8: @F.%.loc10_3.25 (%.4d4) = splice_inst %.loc10_3.24 [template = %.loc10_3.26 (constants.%.c8d)]
// CHECK:STDOUT: %.loc10_3.9: @F.%.loc10_24.9 (%.d15) = converted %.loc10_39.2, %.loc10_3.8 [template = %.loc10_3.26 (constants.%.c8d)]
// CHECK:STDOUT: %.loc10_3.10: @F.%.loc10_24.9 (%.d15) = splice_inst %.loc10_3.27 [template = %.loc10_3.28 (constants.%.972)]
// CHECK:STDOUT: assign %a.var, %.loc10_3.10
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.4 [template = %.loc10_24.9 (constants.%.d15)] {
// CHECK:STDOUT: %.loc10_36.1: type = type_of_inst %.loc10_36.3 [template = %.loc10_36.4 (constants.%.fdd)]
// CHECK:STDOUT: %.loc10_36.2: @F.%.loc10_36.4 (%.fdd) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.598)]
// CHECK:STDOUT: %.loc10_39.1: type = type_of_inst %.loc10_39.3 [template = %.loc10_39.4 (constants.%.e81)]
// CHECK:STDOUT: %.loc10_39.2: @F.%.loc10_39.4 (%.e81) = splice_inst %.loc10_39.3 [template = %.loc10_39.5 (constants.%.949)]
// CHECK:STDOUT: %.loc10_3.1: @F.%.loc10_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc10_3.7 (constants.%.5d6)]
// CHECK:STDOUT: assign %a.var, %.loc10_3.1
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.4 [template = %.loc10_24.9 (constants.%.537)] {
// CHECK:STDOUT: %Cpp.ref.loc10_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc10_20: %A.type = name_ref A, imports.%A.template [concrete = constants.%A.template]
// CHECK:STDOUT: %T.ref.loc10_23: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T)]
// CHECK:STDOUT: %.loc10_23.1: type = template_inst %T.ref.loc10_23 [template = %.loc10_23.2 (constants.%.a92)]
// CHECK:STDOUT: %.loc10_24.2: type = type_of_inst %.loc10_24.5 [template = %.loc10_24.6 (constants.%.32dd98.1)]
// CHECK:STDOUT: %.loc10_24.3: @F.%.loc10_24.6 (%.32dd98.1) = splice_inst %.loc10_24.5 [template = %.loc10_24.7 (constants.%.8af9c5.1)]
// CHECK:STDOUT: %.loc10_24.4: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.d15)]
// CHECK:STDOUT: %.loc10_24.4: type = splice_inst %.loc10_24.8 [template = %.loc10_24.9 (constants.%.537)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref @F.%.loc10_24.9 (%.d15) = wrapper_binding a, %a.var
// CHECK:STDOUT: %a: ref @F.%.loc10_24.9 (%.537) = wrapper_binding a, %a.var
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt.loc10_15.1: @F.%pattern_type (%pattern_type.3c1) = ref_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.b2a)]
// CHECK:STDOUT: %a.var_patt.loc10_3.1: @F.%pattern_type (%pattern_type.3c1) = var_pattern %a.patt.loc10_15.1 [template = %a.var_patt.loc10_3.2 (constants.%a.var_patt.66a)]
// CHECK:STDOUT: %a.patt.loc10_15.1: @F.%pattern_type (%pattern_type.fcb) = ref_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.970)]
// CHECK:STDOUT: %a.var_patt.loc10_3.1: @F.%pattern_type (%pattern_type.fcb) = var_pattern %a.patt.loc10_15.1 [template = %a.var_patt.loc10_3.2 (constants.%a.var_patt.98f)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc10_3.11: type = type_of_inst %.loc10_3.29 [template = %.loc10_3.30 (constants.%.409)]
// CHECK:STDOUT: %.loc10_3.12: @F.%.loc10_3.30 (%.409) = splice_inst %.loc10_3.29 [template = %.loc10_3.31 (constants.%.9b8)]
// CHECK:STDOUT: %.loc10_3.13: type = type_of_inst %.loc10_3.32 [template = %.loc10_3.33 (constants.%.a75)]
// CHECK:STDOUT: %.loc10_3.14: @F.%.loc10_3.33 (%.a75) = splice_inst %.loc10_3.32 [template = %.loc10_3.34 (constants.%.4ea)]
// CHECK:STDOUT: %.loc10_3.2: type = type_of_inst %.loc10_3.8 [template = %.loc10_3.9 (constants.%.8cb)]
// CHECK:STDOUT: %.loc10_3.3: @F.%.loc10_3.9 (%.8cb) = splice_inst %.loc10_3.8 [template = %.loc10_3.10 (constants.%.c23)]
// CHECK:STDOUT: %.loc10_3.4: type = type_of_inst %.loc10_3.11 [template = %.loc10_3.12 (constants.%.57c)]
// CHECK:STDOUT: %.loc10_3.5: @F.%.loc10_3.12 (%.57c) = splice_inst %.loc10_3.11 [template = %.loc10_3.13 (constants.%.e63)]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -970,43 +931,32 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %.loc10_23.2 => constants.%i32
// CHECK:STDOUT: %.loc10_24.5 => constants.%inst.splice_block.72dff3.1
// CHECK:STDOUT: %.loc10_24.5 => constants.%inst.splice_block.426619.1
// CHECK:STDOUT: %.loc10_24.6 => type
// CHECK:STDOUT: %.loc10_24.7 => constants.%A
// CHECK:STDOUT: %.loc10_24.8 => constants.%inst.splice_block.c26
// CHECK:STDOUT: %.loc10_24.8 => constants.%inst.splice_block.426619.2
// CHECK:STDOUT: %.loc10_24.9 => constants.%A
// CHECK:STDOUT: %require_complete => constants.%complete_type.357
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b78
// CHECK:STDOUT: %a.patt.loc10_15.2 => constants.%a.patt.198
// CHECK:STDOUT: %a.var_patt.loc10_3.2 => constants.%a.var_patt.47b
// CHECK:STDOUT: %.loc10_35.3 => constants.%inst.splice_block.72dff3.2
// CHECK:STDOUT: %.loc10_35.3 => constants.%inst.splice_block.426619.3
// CHECK:STDOUT: %.loc10_35.4 => type
// CHECK:STDOUT: %.loc10_35.5 => constants.%A
// CHECK:STDOUT: %.loc10_36.3 => constants.%inst.name_ref
// CHECK:STDOUT: %.loc10_36.4 => constants.%A.A.cpp_overload_set.type
// CHECK:STDOUT: %.loc10_36.5 => constants.%A.A.cpp_overload_set.value
// CHECK:STDOUT: %.loc10_39.3 => constants.%inst.splice_block.76c
// CHECK:STDOUT: %.loc10_39.3 => constants.%inst.splice_block.426619.4
// CHECK:STDOUT: %.loc10_39.4 => constants.%A
// CHECK:STDOUT: %.loc10_39.5 => invalid
// CHECK:STDOUT: %.loc10_3.15 => constants.%.7ad
// CHECK:STDOUT: %.loc10_3.16 => constants.%.98306a.2
// CHECK:STDOUT: %.loc10_3.17 => constants.%.21024f.2
// CHECK:STDOUT: %.loc10_3.18 => constants.%.adc
// CHECK:STDOUT: %.loc10_3.19 => constants.%.20fa30.2
// CHECK:STDOUT: %.loc10_3.20 => constants.%.aae4fe.2
// CHECK:STDOUT: %.loc10_3.21 => constants.%.311
// CHECK:STDOUT: %.loc10_3.22 => constants.%.1be
// CHECK:STDOUT: %.loc10_3.23 => constants.%.3f6
// CHECK:STDOUT: %.loc10_3.24 => constants.%.787
// CHECK:STDOUT: %.loc10_3.25 => constants.%.67b
// CHECK:STDOUT: %.loc10_3.26 => constants.%.c3f
// CHECK:STDOUT: %.loc10_3.27 => constants.%.9d9
// CHECK:STDOUT: %.loc10_3.28 => constants.%.1a1
// CHECK:STDOUT: %.loc10_3.29 => constants.%inst.splice_block.df2
// CHECK:STDOUT: %.loc10_3.30 => <bound method>
// CHECK:STDOUT: %.loc10_3.31 => invalid
// CHECK:STDOUT: %.loc10_3.32 => constants.%inst.call
// CHECK:STDOUT: %.loc10_3.33 => constants.%empty_tuple.type
// CHECK:STDOUT: %.loc10_3.34 => invalid
// CHECK:STDOUT: %.loc10_3.6 => constants.%tuple
// CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.5
// CHECK:STDOUT: %.loc10_3.7 => invalid
// CHECK:STDOUT: %.loc10_3.8 => constants.%inst.splice_block.426619.6
// CHECK:STDOUT: %.loc10_3.9 => <bound method>
// CHECK:STDOUT: %.loc10_3.10 => invalid
// CHECK:STDOUT: %.loc10_3.11 => constants.%inst.call
// CHECK:STDOUT: %.loc10_3.12 => constants.%empty_tuple.type
// CHECK:STDOUT: %.loc10_3.13 => invalid
// CHECK:STDOUT: }
// CHECK:STDOUT: