diff --git a/core/prelude/operators/arithmetic.carbon b/core/prelude/operators/arithmetic.carbon index 36705e2cc567..d8a5e0c4bf70 100644 --- a/core/prelude/operators/arithmetic.carbon +++ b/core/prelude/operators/arithmetic.carbon @@ -6,14 +6,27 @@ package Core library "prelude/operators/arithmetic"; import library "prelude/types/int_literal"; +// TODO: Per the design, the associated type `Result` in each of these +// interfaces should have a default value of `Self`: +// +// default let Result:! type = Self; + +// TODO: Per the design, for each *With interface there should also be a +// non-With named constraint, such as: +// +// constraint Add { +// extend require impls AddWith(Self) where .Result = Self; +// } + // Addition: `a + b`. -interface Add { - fn Op[self: Self](other: Self) -> Self; +interface AddWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Addition with assignment: `a += b`. -interface AddAssign { - fn Op[addr self: Self*](other: Self); +interface AddAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Increment: `++a`. @@ -23,17 +36,19 @@ interface Inc { // Negation: `-a`. interface Negate { - fn Op[self: Self]() -> Self; + let Result:! type; + fn Op[self: Self]() -> Result; } // Subtraction: `a - b`. -interface Sub { - fn Op[self: Self](other: Self) -> Self; +interface SubWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Subtraction with assignment: `a -= b`. -interface SubAssign { - fn Op[addr self: Self*](other: Self); +interface SubAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Decrement: `--a`. @@ -42,58 +57,61 @@ interface Dec { } // Multiplication: `a * b`. -interface Mul { - fn Op[self: Self](other: Self) -> Self; +interface MulWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Multiplication with assignment: `a *= b`. -interface MulAssign { - fn Op[addr self: Self*](other: Self); +interface MulAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Division: `a / b`. -interface Div { - fn Op[self: Self](other: Self) -> Self; +interface DivWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Division with assignment: `a /= b`. -interface DivAssign { - fn Op[addr self: Self*](other: Self); +interface DivAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Modulo: `a % b`. -interface Mod { - fn Op[self: Self](other: Self) -> Self; +interface ModWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Modulo with assignment: `a %= b`. -interface ModAssign { - fn Op[addr self: Self*](other: Self); +interface ModAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Operations for IntLiteral. These need to be here because IntLiteral has no // associated library of its own. -impl IntLiteral() as Add { +impl IntLiteral() as AddWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.sadd"; } -impl IntLiteral() as Div { +impl IntLiteral() as DivWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.sdiv"; } -impl IntLiteral() as Mod { +impl IntLiteral() as ModWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.smod"; } -impl IntLiteral() as Mul { +impl IntLiteral() as MulWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.smul"; } -impl IntLiteral() as Negate { +impl IntLiteral() as Negate where .Result = Self { fn Op[self: Self]() -> Self = "int.snegate"; } -impl IntLiteral() as Sub { +impl IntLiteral() as SubWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.ssub"; } diff --git a/core/prelude/operators/as.carbon b/core/prelude/operators/as.carbon index abf43896b31f..362e56205bff 100644 --- a/core/prelude/operators/as.carbon +++ b/core/prelude/operators/as.carbon @@ -12,3 +12,8 @@ interface ImplicitAs(Dest:! type) { // TODO: extend As(Dest); fn Convert[self: Self]() -> Dest; } + +// TODO: This should only apply to copyable types. +impl forall [T:! type] T as ImplicitAs(T) { + fn Convert[self: Self]() -> Self { return self; } +} diff --git a/core/prelude/operators/bitwise.carbon b/core/prelude/operators/bitwise.carbon index 23130c850b5d..6062ef3ee92f 100644 --- a/core/prelude/operators/bitwise.carbon +++ b/core/prelude/operators/bitwise.carbon @@ -6,85 +6,103 @@ package Core library "prelude/operators/bitwise"; import library "prelude/types/int_literal"; +// TODO: Per the design, the associated type `Result` in each of these +// interfaces should have a default value of `Self`: +// +// default let Result:! type = Self; + +// TODO: Per the design, for each *With interface there should also be a +// non-With named constraint, such as: +// +// constraint BitAnd { +// extend require impls BitAndWith(Self) where .Result = Self; +// } + // Bit complement: `^a`. interface BitComplement { - fn Op[self: Self]() -> Self; + let Result:! type; + fn Op[self: Self]() -> Result; } // Bitwise AND: `a & b`. -interface BitAnd { - fn Op[self: Self](other: Self) -> Self; +interface BitAndWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Bitwise AND with assignment: `a &= b`. -interface BitAndAssign { - fn Op[addr self: Self*](other: Self); +interface BitAndAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Bitwise OR: `a | b`. -interface BitOr { - fn Op[self: Self](other: Self) -> Self; +interface BitOrWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Bitwise OR with assignment: `a |= b`. -interface BitOrAssign { - fn Op[addr self: Self*](other: Self); +interface BitOrAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Bitwise XOR: `a ^ b`. -interface BitXor { - fn Op[self: Self](other: Self) -> Self; +interface BitXorWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Bitwise XOR with assignment: `a ^= b`. -interface BitXorAssign { - fn Op[addr self: Self*](other: Self); +interface BitXorAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Left shift: `a << b`. -interface LeftShift { - fn Op[self: Self](other: Self) -> Self; +interface LeftShiftWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Left shift with assignment: `a <<= b`. -interface LeftShiftAssign { - fn Op[addr self: Self*](other: Self); +interface LeftShiftAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Right shift: `a >> b`. -interface RightShift { - fn Op[self: Self](other: Self) -> Self; +interface RightShiftWith(Other:! type) { + let Result:! type; + fn Op[self: Self](other: Other) -> Result; } // Right shift with assignment: `a >>= b`. -interface RightShiftAssign { - fn Op[addr self: Self*](other: Self); +interface RightShiftAssignWith(Other:! type) { + fn Op[addr self: Self*](other: Other); } // Operations for IntLiteral. These need to be here because IntLiteral has no // associated library of its own. -impl IntLiteral() as BitAnd { +impl IntLiteral() as BitAndWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.and"; } -impl IntLiteral() as BitComplement { +impl IntLiteral() as BitComplement where .Result = Self { fn Op[self: Self]() -> Self = "int.complement"; } -impl IntLiteral() as BitOr { +impl IntLiteral() as BitOrWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.or"; } -impl IntLiteral() as BitXor { +impl IntLiteral() as BitXorWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.xor"; } -impl IntLiteral() as LeftShift { +impl IntLiteral() as LeftShiftWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.left_shift"; } -impl IntLiteral() as RightShift { +impl IntLiteral() as RightShiftWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.right_shift"; } @@ -92,6 +110,6 @@ impl IntLiteral() as RightShift { // associated library of its own. // Facet type combination. -impl type as BitAnd { +impl type as BitAndWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "type.and"; } diff --git a/core/prelude/operators/comparison.carbon b/core/prelude/operators/comparison.carbon index 45d48b3fbfa2..cfd8b7e7e78e 100644 --- a/core/prelude/operators/comparison.carbon +++ b/core/prelude/operators/comparison.carbon @@ -7,25 +7,32 @@ package Core library "prelude/operators/comparison"; export import library "prelude/types/bool"; import library "prelude/types/int_literal"; +// TODO: Per the design, for each *With interface there should also be a +// non-With named constraint, such as: +// +// constraint Eq { +// extend require impls EqWith(Self); +// } + // Equality comparison: `a == b` and `a != b`. -interface Eq { - fn Equal[self: Self](other: Self) -> bool; - fn NotEqual[self: Self](other: Self) -> bool; +interface EqWith(Other:! type) { + fn Equal[self: Self](other: Other) -> bool; + fn NotEqual[self: Self](other: Other) -> bool; } // Relational comparison: `a < b`, `a <= b`, `a > b`, `a >= b`. -interface Ordered { +interface OrderedWith(Other:! type) { // TODO: fn Compare - fn Less[self: Self](other: Self) -> bool; - fn LessOrEquivalent[self: Self](other: Self) -> bool; - fn Greater[self: Self](other: Self) -> bool; - fn GreaterOrEquivalent[self: Self](other: Self) -> bool; + fn Less[self: Self](other: Other) -> bool; + fn LessOrEquivalent[self: Self](other: Other) -> bool; + fn Greater[self: Self](other: Other) -> bool; + fn GreaterOrEquivalent[self: Self](other: Other) -> bool; } // Equality comparison for `bool`. // Note that this must be provided in this library as `bool` doesn't have any // associated libraries of its own. -impl bool as Eq { +impl bool as EqWith(Self) { fn Equal[self: Self](other: Self) -> bool = "bool.eq"; fn NotEqual[self: Self](other: Self) -> bool = "bool.neq"; } @@ -33,12 +40,12 @@ impl bool as Eq { // Operations for IntLiteral. These need to be here because IntLiteral has no // associated library of its own. -impl IntLiteral() as Eq { +impl IntLiteral() as EqWith(Self) { fn Equal[self: Self](other: Self) -> bool = "int.eq"; fn NotEqual[self: Self](other: Self) -> bool = "int.neq"; } -impl IntLiteral() as Ordered { +impl IntLiteral() as OrderedWith(Self) { // TODO: fn Compare fn Less[self: Self](other: Self) -> bool = "int.less"; fn LessOrEquivalent[self: Self](other: Self) -> bool = "int.less_eq"; diff --git a/core/prelude/types/int.carbon b/core/prelude/types/int.carbon index e3ab2f43f158..2544e85a8719 100644 --- a/core/prelude/types/int.carbon +++ b/core/prelude/types/int.carbon @@ -19,7 +19,7 @@ impl forall [To:! IntLiteral()] IntLiteral() as ImplicitAs(Int(To)) { fn Convert[self: Self]() -> Int(To) = "int.convert_checked"; } -impl forall [From:! IntLiteral()] Int(From) as ImplicitAs(IntLiteral()) { +final impl forall [From:! IntLiteral()] Int(From) as ImplicitAs(IntLiteral()) { fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; } @@ -28,23 +28,40 @@ impl forall [To:! IntLiteral()] IntLiteral() as As(Int(To)) { fn Convert[self: Self]() -> Int(To) = "int.convert_checked"; } -impl forall [From:! IntLiteral()] Int(From) as As(IntLiteral()) { +final impl forall [From:! IntLiteral()] Int(From) as As(IntLiteral()) { fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; } // TODO: Allow as an implicit conversion if N > M. -impl forall [From:! IntLiteral(), To:! IntLiteral()] Int(From) as As(Int(To)) { +final impl forall [From:! IntLiteral(), To:! IntLiteral()] Int(From) as As(Int(To)) { fn Convert[self: Self]() -> Int(To) = "int.convert"; } // Comparisons. -impl forall [N:! IntLiteral()] Int(N) as Eq { +// - Int(N) vs Int(M). + +final impl forall [N:! IntLiteral(), M:! IntLiteral()] Int(N) as EqWith(Int(M)) { + fn Equal[self: Self](other: Int(M)) -> bool = "int.eq"; + fn NotEqual[self: Self](other: Int(M)) -> bool = "int.neq"; +} + +final impl forall [N:! IntLiteral(), M:! IntLiteral()] Int(N) as OrderedWith(Int(M)) { + // TODO: fn Compare + fn Less[self: Self](other: Int(M)) -> bool = "int.less"; + fn LessOrEquivalent[self: Self](other: Int(M)) -> bool = "int.less_eq"; + fn Greater[self: Self](other: Int(M)) -> bool = "int.greater"; + fn GreaterOrEquivalent[self: Self](other: Int(M)) -> bool = "int.greater_eq"; +} + +// - Int(N) on left-hand side. + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] Int(N) as EqWith(T) { fn Equal[self: Self](other: Self) -> bool = "int.eq"; fn NotEqual[self: Self](other: Self) -> bool = "int.neq"; } -impl forall [N:! IntLiteral()] Int(N) as Ordered { +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] Int(N) as OrderedWith(T) { // TODO: fn Compare fn Less[self: Self](other: Self) -> bool = "int.less"; fn LessOrEquivalent[self: Self](other: Self) -> bool = "int.less_eq"; @@ -52,112 +69,267 @@ impl forall [N:! IntLiteral()] Int(N) as Ordered { fn GreaterOrEquivalent[self: Self](other: Self) -> bool = "int.greater_eq"; } +// - Int(N) on right-hand side. + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] T as EqWith(Int(N)) { + fn Equal[self: Int(N)](other: Int(N)) -> bool = "int.eq"; + fn NotEqual[self: Int(N)](other: Int(N)) -> bool = "int.neq"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] T as OrderedWith(Int(N)) { + // TODO: fn Compare + fn Less[self: Int(N)](other: Int(N)) -> bool = "int.less"; + fn LessOrEquivalent[self: Int(N)](other: Int(N)) -> bool = "int.less_eq"; + fn Greater[self: Int(N)](other: Int(N)) -> bool = "int.greater"; + fn GreaterOrEquivalent[self: Int(N)](other: Int(N)) -> bool = "int.greater_eq"; +} + // Arithmetic. -impl forall [N:! IntLiteral()] Int(N) as Add { +// - Homogeneous. + +final impl forall [N:! IntLiteral()] + Int(N) as AddWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.sadd"; } -impl forall [N:! IntLiteral()] Int(N) as Div { +final impl forall [N:! IntLiteral()] + Int(N) as DivWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.sdiv"; } -impl forall [N:! IntLiteral()] Int(N) as Mod { +final impl forall [N:! IntLiteral()] + Int(N) as ModWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.smod"; } -impl forall [N:! IntLiteral()] Int(N) as Mul { +final impl forall [N:! IntLiteral()] + Int(N) as MulWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.smul"; } -impl forall [N:! IntLiteral()] Int(N) as Negate { +final impl forall [N:! IntLiteral()] + Int(N) as Negate where .Result = Self { fn Op[self: Self]() -> Self = "int.snegate"; } -impl forall [N:! IntLiteral()] Int(N) as Sub { +final impl forall [N:! IntLiteral()] + Int(N) as SubWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.ssub"; } +// - Int(N) on left-hand side. + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as AddWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.sadd"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as DivWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.sdiv"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as ModWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.smod"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as MulWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.smul"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as SubWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.ssub"; +} + +// - Int(N) on right-hand side. + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as AddWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.sadd"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as DivWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.sdiv"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as ModWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.smod"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as MulWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.smul"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as SubWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.ssub"; +} + // Bitwise operators. -impl forall [N:! IntLiteral()] Int(N) as BitAnd { +// - Homogeneous. + +final impl forall [N:! IntLiteral()] + Int(N) as BitAndWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.and"; } -impl forall [N:! IntLiteral()] Int(N) as BitComplement { +final impl forall [N:! IntLiteral()] + Int(N) as BitComplement where .Result = Self { fn Op[self: Self]() -> Self = "int.complement"; } -impl forall [N:! IntLiteral()] Int(N) as BitOr { +final impl forall [N:! IntLiteral()] + Int(N) as BitOrWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.or"; } -impl forall [N:! IntLiteral()] Int(N) as BitXor { +final impl forall [N:! IntLiteral()] + Int(N) as BitXorWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.xor"; } -impl forall [N:! IntLiteral()] Int(N) as LeftShift { +final impl forall [N:! IntLiteral()] + Int(N) as LeftShiftWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.left_shift"; } -impl forall [N:! IntLiteral()] Int(N) as RightShift { +final impl forall [N:! IntLiteral()] + Int(N) as RightShiftWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.right_shift"; } +// - Int(N) on left-hand side. + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as BitAndWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.and"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as BitOrWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.or"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as BitXorWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.xor"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as LeftShiftWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.left_shift"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as RightShiftWith(U) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.right_shift"; +} + +// - Int(N) on right-hand side. + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as BitAndWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.and"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as BitOrWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.or"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as BitXorWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.xor"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as LeftShiftWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.left_shift"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(Int(N))] + T as RightShiftWith(Int(N)) where .Result = Int(N) { + fn Op[self: Int(N)](other: Int(N)) -> Int(N) = "int.right_shift"; +} + // Compound assignments. -impl forall [N:! IntLiteral()] Int(N) as AddAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as AddAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.sadd_assign"; } -impl forall [N:! IntLiteral()] Int(N) as BitAndAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as BitAndAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.and_assign"; } -impl forall [N:! IntLiteral()] Int(N) as BitOrAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as BitOrAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.or_assign"; } -impl forall [N:! IntLiteral()] Int(N) as BitXorAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as BitXorAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.xor_assign"; } -impl forall [N:! IntLiteral()] Int(N) as DivAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as DivAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.sdiv_assign"; } -impl forall [N:! IntLiteral()] Int(N) as LeftShiftAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as LeftShiftAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.left_shift_assign"; } -impl forall [N:! IntLiteral()] Int(N) as ModAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as ModAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.smod_assign"; } -impl forall [N:! IntLiteral()] Int(N) as MulAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as MulAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.smul_assign"; } -impl forall [N:! IntLiteral()] Int(N) as RightShiftAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as RightShiftAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.right_shift_assign"; } -impl forall [N:! IntLiteral()] Int(N) as SubAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(Int(N))] + Int(N) as SubAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.ssub_assign"; } // Increment and decrement. -// impl forall [N:! IntLiteral()] Int(N) as Dec { -impl i32 as Dec { +// TODO: Add builtins for these to avoid emitting a call. + +impl forall [N:! IntLiteral()] Int(N) as Dec { fn Op[addr self: Self*]() { - *self -= 1; + // TODO: `*self -= 1;` should work, but fails because the `impl IntLiteral + // as ImplicitAs(Int(N))` is not final, which causes us to not attempt the + // conversion from `1` to `Int(N)` until runtime, when we've lost the + // constant value. + fn AsInt(n: IntLiteral()) -> Int(N) = "int.convert_checked"; + *self -= AsInt(1); } } -// impl forall [N:! IntLiteral()] Int(N) as Inc { -impl i32 as Inc { +impl forall [N:! IntLiteral()] Int(N) as Inc { fn Op[addr self: Self*]() { - *self += 1; + fn AsInt(n: IntLiteral()) -> Int(N) = "int.convert_checked"; + *self += AsInt(1); } } diff --git a/core/prelude/types/uint.carbon b/core/prelude/types/uint.carbon index fca3bfbb497b..9e9c4856a257 100644 --- a/core/prelude/types/uint.carbon +++ b/core/prelude/types/uint.carbon @@ -20,7 +20,7 @@ impl forall [To:! IntLiteral()] IntLiteral() as ImplicitAs(UInt(To)) { fn Convert[self: Self]() -> UInt(To) = "int.convert_checked"; } -impl forall [From:! IntLiteral()] UInt(From) as ImplicitAs(IntLiteral()) { +final impl forall [From:! IntLiteral()] UInt(From) as ImplicitAs(IntLiteral()) { fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; } @@ -29,17 +29,17 @@ impl forall [To:! IntLiteral()] IntLiteral() as As(UInt(To)) { fn Convert[self: Self]() -> UInt(To) = "int.convert_checked"; } -impl forall [From:! IntLiteral()] UInt(From) as As(IntLiteral()) { +final impl forall [From:! IntLiteral()] UInt(From) as As(IntLiteral()) { fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; } // TODO: Allow as an implicit conversion if To > From. -impl forall [From:! IntLiteral(), To:! IntLiteral()] UInt(From) as As(UInt(To)) { +final impl forall [From:! IntLiteral(), To:! IntLiteral()] UInt(From) as As(UInt(To)) { fn Convert[self: Self]() -> UInt(To) = "int.convert"; } // TODO: Allow as an implicit conversion if To > From. -impl forall [From:! IntLiteral(), To:! IntLiteral()] UInt(From) as As(Int(To)) { +final impl forall [From:! IntLiteral(), To:! IntLiteral()] UInt(From) as As(Int(To)) { fn Convert[self: Self]() -> Int(To) = "int.convert"; } @@ -50,12 +50,59 @@ impl forall [From:! IntLiteral(), To:! IntLiteral()] Int(From) as As(UInt(To)) { // Comparisons. -impl forall [N:! IntLiteral()] UInt(N) as Eq { +// - UInt(N) vs UInt(M). + +final impl forall [N:! IntLiteral(), M:! IntLiteral()] UInt(N) as EqWith(UInt(M)) { + fn Equal[self: Self](other: UInt(M)) -> bool = "int.eq"; + fn NotEqual[self: Self](other: UInt(M)) -> bool = "int.neq"; +} + +final impl forall [N:! IntLiteral(), M:! IntLiteral()] UInt(N) as OrderedWith(UInt(M)) { + // TODO: fn Compare + fn Less[self: Self](other: UInt(M)) -> bool = "int.less"; + fn LessOrEquivalent[self: Self](other: UInt(M)) -> bool = "int.less_eq"; + fn Greater[self: Self](other: UInt(M)) -> bool = "int.greater"; + fn GreaterOrEquivalent[self: Self](other: UInt(M)) -> bool = "int.greater_eq"; +} + +// - UInt(N) vs Int(M). + +final impl forall [N:! IntLiteral(), M:! IntLiteral()] UInt(N) as EqWith(Int(M)) { + fn Equal[self: Self](other: Int(M)) -> bool = "int.eq"; + fn NotEqual[self: Self](other: Int(M)) -> bool = "int.neq"; +} + +final impl forall [N:! IntLiteral(), M:! IntLiteral()] UInt(N) as OrderedWith(Int(M)) { + // TODO: fn Compare + fn Less[self: Self](other: Int(M)) -> bool = "int.less"; + fn LessOrEquivalent[self: Self](other: Int(M)) -> bool = "int.less_eq"; + fn Greater[self: Self](other: Int(M)) -> bool = "int.greater"; + fn GreaterOrEquivalent[self: Self](other: Int(M)) -> bool = "int.greater_eq"; +} + +// - Int(N) vs UInt(M). + +impl forall [N:! IntLiteral(), M:! IntLiteral()] Int(N) as EqWith(UInt(M)) { + fn Equal[self: Self](other: UInt(M)) -> bool = "int.eq"; + fn NotEqual[self: Self](other: UInt(M)) -> bool = "int.neq"; +} + +impl forall [N:! IntLiteral(), M:! IntLiteral()] Int(N) as OrderedWith(UInt(M)) { + // TODO: fn Compare + fn Less[self: Self](other: UInt(M)) -> bool = "int.less"; + fn LessOrEquivalent[self: Self](other: UInt(M)) -> bool = "int.less_eq"; + fn Greater[self: Self](other: UInt(M)) -> bool = "int.greater"; + fn GreaterOrEquivalent[self: Self](other: UInt(M)) -> bool = "int.greater_eq"; +} + +// - UInt(N) on left-hand side. + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] UInt(N) as EqWith(T) { fn Equal[self: Self](other: Self) -> bool = "int.eq"; fn NotEqual[self: Self](other: Self) -> bool = "int.neq"; } -impl forall [N:! IntLiteral()] UInt(N) as Ordered { +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] UInt(N) as OrderedWith(T) { // TODO: fn Compare fn Less[self: Self](other: Self) -> bool = "int.less"; fn LessOrEquivalent[self: Self](other: Self) -> bool = "int.less_eq"; @@ -63,112 +110,267 @@ impl forall [N:! IntLiteral()] UInt(N) as Ordered { fn GreaterOrEquivalent[self: Self](other: Self) -> bool = "int.greater_eq"; } +// - UInt(N) on right-hand side. + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] T as EqWith(UInt(N)) { + fn Equal[self: UInt(N)](other: UInt(N)) -> bool = "int.eq"; + fn NotEqual[self: UInt(N)](other: UInt(N)) -> bool = "int.neq"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] T as OrderedWith(UInt(N)) { + // TODO: fn Compare + fn Less[self: UInt(N)](other: UInt(N)) -> bool = "int.less"; + fn LessOrEquivalent[self: UInt(N)](other: UInt(N)) -> bool = "int.less_eq"; + fn Greater[self: UInt(N)](other: UInt(N)) -> bool = "int.greater"; + fn GreaterOrEquivalent[self: UInt(N)](other: UInt(N)) -> bool = "int.greater_eq"; +} + // Arithmetic. -impl forall [N:! IntLiteral()] UInt(N) as Add { +// - Homogeneous. + +final impl forall [N:! IntLiteral()] + UInt(N) as AddWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.uadd"; } -impl forall [N:! IntLiteral()] UInt(N) as Div { +final impl forall [N:! IntLiteral()] + UInt(N) as DivWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.udiv"; } -impl forall [N:! IntLiteral()] UInt(N) as Mod { +final impl forall [N:! IntLiteral()] + UInt(N) as ModWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.umod"; } -impl forall [N:! IntLiteral()] UInt(N) as Mul { +final impl forall [N:! IntLiteral()] + UInt(N) as MulWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.umul"; } -impl forall [N:! IntLiteral()] UInt(N) as Negate { +final impl forall [N:! IntLiteral()] + UInt(N) as Negate where .Result = Self { fn Op[self: Self]() -> Self = "int.unegate"; } -impl forall [N:! IntLiteral()] UInt(N) as Sub { +final impl forall [N:! IntLiteral()] + UInt(N) as SubWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.usub"; } +// - UInt(N) on left-hand side. + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as AddWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.uadd"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as DivWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.udiv"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as ModWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.umod"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as MulWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.umul"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as SubWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.usub"; +} + +// - UInt(N) on right-hand side. + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as AddWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.uadd"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as DivWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.udiv"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as ModWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.umod"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as MulWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.umul"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as SubWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.usub"; +} + // Bitwise operators. -impl forall [N:! IntLiteral()] UInt(N) as BitAnd { +// - Homogeneous. + +final impl forall [N:! IntLiteral()] + UInt(N) as BitAndWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.and"; } -impl forall [N:! IntLiteral()] UInt(N) as BitComplement { +final impl forall [N:! IntLiteral()] + UInt(N) as BitComplement where .Result = Self { fn Op[self: Self]() -> Self = "int.complement"; } -impl forall [N:! IntLiteral()] UInt(N) as BitOr { +final impl forall [N:! IntLiteral()] + UInt(N) as BitOrWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.or"; } -impl forall [N:! IntLiteral()] UInt(N) as BitXor { +final impl forall [N:! IntLiteral()] + UInt(N) as BitXorWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.xor"; } -impl forall [N:! IntLiteral()] UInt(N) as LeftShift { +final impl forall [N:! IntLiteral()] + UInt(N) as LeftShiftWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.left_shift"; } -impl forall [N:! IntLiteral()] UInt(N) as RightShift { +final impl forall [N:! IntLiteral()] + UInt(N) as RightShiftWith(Self) where .Result = Self { fn Op[self: Self](other: Self) -> Self = "int.right_shift"; } +// - UInt(N) on left-hand side. + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as BitAndWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.and"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as BitOrWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.or"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as BitXorWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.xor"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as LeftShiftWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.left_shift"; +} + +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as RightShiftWith(U) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.right_shift"; +} + +// - UInt(N) on right-hand side. + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as BitAndWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.and"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as BitOrWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.or"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as BitXorWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.xor"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as LeftShiftWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.left_shift"; +} + +impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))] + T as RightShiftWith(UInt(N)) where .Result = UInt(N) { + fn Op[self: UInt(N)](other: UInt(N)) -> UInt(N) = "int.right_shift"; +} + // Compound assignments. -impl forall [N:! IntLiteral()] UInt(N) as AddAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as AddAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.uadd_assign"; } -impl forall [N:! IntLiteral()] UInt(N) as BitAndAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as BitAndAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.and_assign"; } -impl forall [N:! IntLiteral()] UInt(N) as BitOrAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as BitOrAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.or_assign"; } -impl forall [N:! IntLiteral()] UInt(N) as BitXorAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as BitXorAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.xor_assign"; } -impl forall [N:! IntLiteral()] UInt(N) as DivAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as DivAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.udiv_assign"; } -impl forall [N:! IntLiteral()] UInt(N) as LeftShiftAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as LeftShiftAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.left_shift_assign"; } -impl forall [N:! IntLiteral()] UInt(N) as ModAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as ModAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.umod_assign"; } -impl forall [N:! IntLiteral()] UInt(N) as MulAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as MulAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.umul_assign"; } -impl forall [N:! IntLiteral()] UInt(N) as RightShiftAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as RightShiftAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.right_shift_assign"; } -impl forall [N:! IntLiteral()] UInt(N) as SubAssign { +impl forall [N:! IntLiteral(), U:! ImplicitAs(UInt(N))] + UInt(N) as SubAssignWith(U) { fn Op[addr self: Self*](other: Self) = "int.usub_assign"; } // Increment and decrement. -// impl forall [N:! IntLiteral()] UInt(N) as Dec { -impl u32 as Dec { +// TODO: Add builtins for these to avoid emitting a call. + +impl forall [N:! IntLiteral()] UInt(N) as Dec { fn Op[addr self: Self*]() { - *self -= 1; + // TODO: `*self -= 1;` should work, but fails because the `impl IntLiteral + // as ImplicitAs(Int(N))` is not final, which causes us to not attempt the + // conversion from `1` to `Int(N)` until runtime, when we've lost the + // constant value. + fn AsUInt(n: IntLiteral()) -> UInt(N) = "int.convert_checked"; + *self -= AsUInt(1); } } -// impl forall [N:! IntLiteral()] UInt(N) as Inc { -impl u32 as Inc { +impl forall [N:! IntLiteral()] UInt(N) as Inc { fn Op[addr self: Self*]() { - *self += 1; + fn AsUInt(n: IntLiteral()) -> UInt(N) = "int.convert_checked"; + *self += AsUInt(1); } } diff --git a/toolchain/check/handle_operator.cpp b/toolchain/check/handle_operator.cpp index 8008b7986b24..881a20d63512 100644 --- a/toolchain/check/handle_operator.cpp +++ b/toolchain/check/handle_operator.cpp @@ -30,6 +30,12 @@ static auto HandleBinaryOperator(Context& context, -> bool { auto rhs_id = context.node_stack().PopExpr(); auto lhs_id = context.node_stack().PopExpr(); + // All the `*With` binary operator interfaces take a single argument that is + // the type of the RHS operand. `as` has different rules and we don't call + // this function for it. + SemIR::InstId args[] = { + context.types().GetInstId(context.insts().Get(rhs_id).type_id())}; + op.interface_args_ref = args; auto result_id = BuildBinaryOperator(context, expr_node_id, op, lhs_id, rhs_id); context.node_stack().Push(expr_node_id, result_id); @@ -39,12 +45,12 @@ static auto HandleBinaryOperator(Context& context, auto HandleParseNode(Context& context, Parse::InfixOperatorAmpId node_id) -> bool { // TODO: Facet type intersection may need to be handled directly. - return HandleBinaryOperator(context, node_id, {"BitAnd"}); + return HandleBinaryOperator(context, node_id, {"BitAndWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorAmpEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"BitAndAssign"}); + return HandleBinaryOperator(context, node_id, {"BitAndAssignWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorAsId node_id) @@ -60,12 +66,12 @@ auto HandleParseNode(Context& context, Parse::InfixOperatorAsId node_id) auto HandleParseNode(Context& context, Parse::InfixOperatorCaretId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"BitXor"}); + return HandleBinaryOperator(context, node_id, {"BitXorWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorCaretEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"BitXorAssign"}); + return HandleBinaryOperator(context, node_id, {"BitXorAssignWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorEqualId node_id) @@ -73,7 +79,7 @@ auto HandleParseNode(Context& context, Parse::InfixOperatorEqualId node_id) // TODO: Switch to using assignment interface for most assignment. Some cases // may need to be handled directly. // - // return HandleBinaryOperator(context, node_id, {"Assign"}); + // return HandleBinaryOperator(context, node_id, {"AssignWith"}); auto [rhs_node, rhs_id] = context.node_stack().PopExprWithNodeId(); auto [lhs_node, lhs_id] = context.node_stack().PopExprWithNodeId(); @@ -99,45 +105,45 @@ auto HandleParseNode(Context& context, Parse::InfixOperatorEqualId node_id) auto HandleParseNode(Context& context, Parse::InfixOperatorEqualEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"Eq", {}, "Equal"}); + return HandleBinaryOperator(context, node_id, {"EqWith", {}, "Equal"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorExclaimEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"Eq", {}, "NotEqual"}); + return HandleBinaryOperator(context, node_id, {"EqWith", {}, "NotEqual"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorGreaterId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"Ordered", {}, "Greater"}); + return HandleBinaryOperator(context, node_id, {"OrderedWith", {}, "Greater"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorGreaterEqualId node_id) -> bool { return HandleBinaryOperator(context, node_id, - {"Ordered", {}, "GreaterOrEquivalent"}); + {"OrderedWith", {}, "GreaterOrEquivalent"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorGreaterGreaterId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"RightShift"}); + return HandleBinaryOperator(context, node_id, {"RightShiftWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorGreaterGreaterEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"RightShiftAssign"}); + return HandleBinaryOperator(context, node_id, {"RightShiftAssignWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorLessId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"Ordered", {}, "Less"}); + return HandleBinaryOperator(context, node_id, {"OrderedWith", {}, "Less"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorLessEqualId node_id) -> bool { return HandleBinaryOperator(context, node_id, - {"Ordered", {}, "LessOrEquivalent"}); + {"OrderedWith", {}, "LessOrEquivalent"}); } auto HandleParseNode(Context& context, @@ -147,72 +153,72 @@ auto HandleParseNode(Context& context, auto HandleParseNode(Context& context, Parse::InfixOperatorLessLessId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"LeftShift"}); + return HandleBinaryOperator(context, node_id, {"LeftShiftWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorLessLessEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"LeftShiftAssign"}); + return HandleBinaryOperator(context, node_id, {"LeftShiftAssignWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorMinusId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"Sub"}); + return HandleBinaryOperator(context, node_id, {"SubWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorMinusEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"SubAssign"}); + return HandleBinaryOperator(context, node_id, {"SubAssignWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorPercentId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"Mod"}); + return HandleBinaryOperator(context, node_id, {"ModWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorPercentEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"ModAssign"}); + return HandleBinaryOperator(context, node_id, {"ModAssignWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorPipeId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"BitOr"}); + return HandleBinaryOperator(context, node_id, {"BitOrWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorPipeEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"BitOrAssign"}); + return HandleBinaryOperator(context, node_id, {"BitOrAssignWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorPlusId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"Add"}); + return HandleBinaryOperator(context, node_id, {"AddWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorPlusEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"AddAssign"}); + return HandleBinaryOperator(context, node_id, {"AddAssignWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorSlashId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"Div"}); + return HandleBinaryOperator(context, node_id, {"DivWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorSlashEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"DivAssign"}); + return HandleBinaryOperator(context, node_id, {"DivAssignWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorStarId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"Mul"}); + return HandleBinaryOperator(context, node_id, {"MulWith"}); } auto HandleParseNode(Context& context, Parse::InfixOperatorStarEqualId node_id) -> bool { - return HandleBinaryOperator(context, node_id, {"MulAssign"}); + return HandleBinaryOperator(context, node_id, {"MulAssignWith"}); } auto HandleParseNode(Context& context, Parse::PostfixOperatorStarId node_id) diff --git a/toolchain/check/testdata/array/bound_values.carbon b/toolchain/check/testdata/array/bound_values.carbon index 322fc4c80667..fdb96864e08d 100644 --- a/toolchain/check/testdata/array/bound_values.carbon +++ b/toolchain/check/testdata/array/bound_values.carbon @@ -70,21 +70,22 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] -// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Add.impl_witness.b91: = impl_witness imports.%Add.impl_witness_table.5a4 [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value Core.IntLiteral, (%Add.impl_witness.b91) [concrete] -// CHECK:STDOUT: %.066: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] -// CHECK:STDOUT: %Op.type.f28: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.d0f: %Op.type.f28 = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %int_1.5b8, %Op.d0f [concrete] +// CHECK:STDOUT: %AddWith.type.d7d: type = facet_type <@AddWith, @AddWith(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %Op.type.0ee: type = fn_type @Op.1, @AddWith(Core.IntLiteral) [concrete] +// CHECK:STDOUT: %AddWith.impl_witness.568: = impl_witness imports.%AddWith.impl_witness_table.255 [concrete] +// CHECK:STDOUT: %AddWith.facet: %AddWith.type.d7d = facet_value Core.IntLiteral, (%AddWith.impl_witness.568) [concrete] +// CHECK:STDOUT: %.e1a: type = fn_type_with_self_type %Op.type.0ee, %AddWith.facet [concrete] +// CHECK:STDOUT: %Op.type.b60: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.14b: %Op.type.b60 = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %int_1.5b8, %Op.14b [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.3e4: %Op.type.f28 = import_ref Core//prelude/operators/arithmetic, loc78_42, loaded [concrete = constants.%Op.d0f] -// CHECK:STDOUT: %Add.impl_witness_table.5a4 = impl_witness_table (%Core.import_ref.3e4), @impl.9e0 [concrete] +// CHECK:STDOUT: %Core.import_ref.abd9 = import_ref Core//prelude/operators/arithmetic, loc95_57, unloaded +// CHECK:STDOUT: %Core.import_ref.d10: %Op.type.b60 = import_ref Core//prelude/operators/arithmetic, loc96_42, loaded [concrete = constants.%Op.14b] +// CHECK:STDOUT: %AddWith.impl_witness_table.255 = impl_witness_table (%Core.import_ref.abd9, %Core.import_ref.d10), @impl.013 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -93,8 +94,8 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.066 = impl_witness_access constants.%Add.impl_witness.b91, element0 [concrete = constants.%Op.d0f] -// CHECK:STDOUT: %bound_method: = bound_method %int_1, %impl.elem0 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem1: %.e1a = impl_witness_access constants.%AddWith.impl_witness.568, element1 [concrete = constants.%Op.14b] +// CHECK:STDOUT: %bound_method: = bound_method %int_1, %impl.elem1 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.sadd: init Core.IntLiteral = call %bound_method(%int_1, %int_2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = value_of_initializer %int.sadd [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc6_18.2: Core.IntLiteral = converted %int.sadd, %.loc6_18.1 [concrete = constants.%int_3.1ba] @@ -119,27 +120,27 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.002: type = fn_type @Convert.4, @impl.750(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.002: type = fn_type @Convert.5, @impl.750(%From) [symbolic] // CHECK:STDOUT: %Convert.819: %Convert.type.002 = struct_value () [symbolic] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %Convert.type.792: type = fn_type @Convert.5, @impl.2f2(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.792: type = fn_type @Convert.6, @impl.2f2(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.c02: %Convert.type.792 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.d2d: = impl_witness imports.%As.impl_witness_table.afe, @impl.2f2(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.70b: type = fn_type @Convert.5, @impl.2f2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.70b: type = fn_type @Convert.6, @impl.2f2(%int_32) [concrete] // CHECK:STDOUT: %Convert.92a: %Convert.type.70b = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.ce0 = facet_value Core.IntLiteral, (%As.impl_witness.d2d) [concrete] // CHECK:STDOUT: %.68c: type = fn_type_with_self_type %Convert.type.b94, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound.7d9: = bound_method %int_3.1ba, %Convert.92a [concrete] -// CHECK:STDOUT: %Convert.specific_fn.4cf: = specific_function %Convert.92a, @Convert.5(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.4cf: = specific_function %Convert.92a, @Convert.6(%int_32) [concrete] // CHECK:STDOUT: %bound_method.94d: = bound_method %int_3.1ba, %Convert.specific_fn.4cf [concrete] // CHECK:STDOUT: %int_3.d14: %u32 = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.6ad, @impl.750(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.e06: type = fn_type @Convert.4, @impl.750(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.e06: type = fn_type @Convert.5, @impl.750(%int_32) [concrete] // CHECK:STDOUT: %Convert.47f: %Convert.type.e06 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.84e: %ImplicitAs.type.2fd = facet_value %u32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.268: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.84e [concrete] // CHECK:STDOUT: %Convert.bound.258: = bound_method %int_3.d14, %Convert.47f [concrete] -// CHECK:STDOUT: %Convert.specific_fn.2eb: = specific_function %Convert.47f, @Convert.4(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.2eb: = specific_function %Convert.47f, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3a6: = bound_method %int_3.d14, %Convert.specific_fn.2eb [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] // CHECK:STDOUT: } @@ -160,14 +161,14 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [concrete = constants.%u32] // CHECK:STDOUT: %impl.elem0.loc6_18.1: %.68c = impl_witness_access constants.%As.impl_witness.d2d, element0 [concrete = constants.%Convert.92a] // CHECK:STDOUT: %bound_method.loc6_18.1: = bound_method %int_3.loc6, %impl.elem0.loc6_18.1 [concrete = constants.%Convert.bound.7d9] -// CHECK:STDOUT: %specific_fn.loc6_18.1: = specific_function %impl.elem0.loc6_18.1, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.4cf] +// CHECK:STDOUT: %specific_fn.loc6_18.1: = specific_function %impl.elem0.loc6_18.1, @Convert.6(constants.%int_32) [concrete = constants.%Convert.specific_fn.4cf] // CHECK:STDOUT: %bound_method.loc6_18.2: = bound_method %int_3.loc6, %specific_fn.loc6_18.1 [concrete = constants.%bound_method.94d] // CHECK:STDOUT: %int.convert_checked.loc6_18.1: init %u32 = call %bound_method.loc6_18.2(%int_3.loc6) [concrete = constants.%int_3.d14] // CHECK:STDOUT: %.loc6_18.1: %u32 = value_of_initializer %int.convert_checked.loc6_18.1 [concrete = constants.%int_3.d14] // CHECK:STDOUT: %.loc6_18.2: %u32 = converted %int_3.loc6, %.loc6_18.1 [concrete = constants.%int_3.d14] // CHECK:STDOUT: %impl.elem0.loc6_18.2: %.268 = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.47f] // CHECK:STDOUT: %bound_method.loc6_18.3: = bound_method %.loc6_18.2, %impl.elem0.loc6_18.2 [concrete = constants.%Convert.bound.258] -// CHECK:STDOUT: %specific_fn.loc6_18.2: = specific_function %impl.elem0.loc6_18.2, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.2eb] +// CHECK:STDOUT: %specific_fn.loc6_18.2: = specific_function %impl.elem0.loc6_18.2, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.2eb] // CHECK:STDOUT: %bound_method.loc6_18.4: = bound_method %.loc6_18.2, %specific_fn.loc6_18.2 [concrete = constants.%bound_method.3a6] // CHECK:STDOUT: %int.convert_checked.loc6_18.2: init Core.IntLiteral = call %bound_method.loc6_18.4(%.loc6_18.2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc6_18.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc6_18.2 [concrete = constants.%int_3.1ba] diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index b953ad345634..cb98aa085b86 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -60,15 +60,15 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -107,7 +107,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %int_1.loc10_23: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc10_20.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_20.1: = bound_method %int_1.loc10_13, %impl.elem0.loc10_20.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc10_20.1: = specific_function %impl.elem0.loc10_20.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_20.1: = specific_function %impl.elem0.loc10_20.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_20.2: = bound_method %int_1.loc10_13, %specific_fn.loc10_20.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc10_20.1: init %i32 = call %bound_method.loc10_20.2(%int_1.loc10_13) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_20.2: init %i32 = converted %int_1.loc10_13, %int.convert_checked.loc10_20.1 [concrete = constants.%int_1.5d2] @@ -117,7 +117,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %.loc10_20.5: init %i32 = initialize_from %.loc10_20.2 to %.loc10_20.4 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc10_20.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_20.3: = bound_method %int_2.loc10_16, %impl.elem0.loc10_20.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc10_20.2: = specific_function %impl.elem0.loc10_20.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_20.2: = specific_function %impl.elem0.loc10_20.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_20.4: = bound_method %int_2.loc10_16, %specific_fn.loc10_20.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc10_20.2: init %i32 = call %bound_method.loc10_20.4(%int_2.loc10_16) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc10_20.6: init %i32 = converted %int_2.loc10_16, %int.convert_checked.loc10_20.2 [concrete = constants.%int_2.ef8] @@ -126,7 +126,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %.loc10_20.8: init %i32 = initialize_from %.loc10_20.6 to %.loc10_20.7 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %impl.elem0.loc10_20.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_20.5: = bound_method %int_3, %impl.elem0.loc10_20.3 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc10_20.3: = specific_function %impl.elem0.loc10_20.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_20.3: = specific_function %impl.elem0.loc10_20.3, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_20.6: = bound_method %int_3, %specific_fn.loc10_20.3 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc10_20.3: init %i32 = call %bound_method.loc10_20.6(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc10_20.9: init %i32 = converted %int_3, %int.convert_checked.loc10_20.3 [concrete = constants.%int_3.822] @@ -139,7 +139,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %.loc10_20.15: %array_type = bind_value %.loc10_20.14 // CHECK:STDOUT: %impl.elem0.loc10_23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_23.1: = bound_method %int_1.loc10_23, %impl.elem0.loc10_23 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc10_23: = specific_function %impl.elem0.loc10_23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_23: = specific_function %impl.elem0.loc10_23, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_23.2: = bound_method %int_1.loc10_23, %specific_fn.loc10_23 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc10_23: init %i32 = call %bound_method.loc10_23.2(%int_1.loc10_23) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.convert_checked.loc10_23 [concrete = constants.%int_1.5d2] @@ -164,15 +164,15 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -195,7 +195,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_24.1: = bound_method %.loc6_24.1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_24.2: = bound_method %.loc6_24.1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc6_24.2(%.loc6_24.1) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc6_24.2: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/array/init_dependent_bound.carbon b/toolchain/check/testdata/array/init_dependent_bound.carbon index 8b72f98bc071..608073c15d1c 100644 --- a/toolchain/check/testdata/array/init_dependent_bound.carbon +++ b/toolchain/check/testdata/array/init_dependent_bound.carbon @@ -130,26 +130,26 @@ fn H() { G(3); } // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.2d6: = bound_method %int_3.822, %Convert.960 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c6f: = bound_method %int_3.822, %Convert.specific_fn.8a8 [concrete] // CHECK:STDOUT: %inst.splice_block: = inst_value [concrete] { // CHECK:STDOUT: %.df7: Core.IntLiteral = splice_block %.dd0 [concrete = %int_3.1ba] { -// CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access %ImplicitAs.impl_witness.a11, element0 [concrete = %Convert.960] -// CHECK:STDOUT: %bound_method.8d1: = bound_method %int_3.822, %impl.elem0 [concrete = %Convert.bound.2d6] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(%int_32) [concrete = %Convert.specific_fn.8a8] +// CHECK:STDOUT: %impl.elem0.c2d: %.0ea = impl_witness_access %ImplicitAs.impl_witness.a11, element0 [concrete = %Convert.960] +// CHECK:STDOUT: %bound_method.8d1: = bound_method %int_3.822, %impl.elem0.c2d [concrete = %Convert.bound.2d6] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.c2d, @Convert.4(%int_32) [concrete = %Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.9ef: = bound_method %int_3.822, %specific_fn [concrete = %bound_method.c6f] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method.9ef(%int_3.822) [concrete = %int_3.1ba] -// CHECK:STDOUT: %.5d1: Core.IntLiteral = value_of_initializer %int.convert_checked [concrete = %int_3.1ba] +// CHECK:STDOUT: %int.convert_checked.367: init Core.IntLiteral = call %bound_method.9ef(%int_3.822) [concrete = %int_3.1ba] +// CHECK:STDOUT: %.5d1: Core.IntLiteral = value_of_initializer %int.convert_checked.367 [concrete = %int_3.1ba] // CHECK:STDOUT: %.dd0: Core.IntLiteral = converted %int_3.822, %.5d1 [concrete = %int_3.1ba] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index 9b0c6c37d43b..71afabf8110f 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -248,16 +248,16 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.6, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] // CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.197 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.6(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_1.e78: %A = int_value 1 [concrete] @@ -291,7 +291,7 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc9_15.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_15.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_15.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_15.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -352,15 +352,15 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -390,7 +390,7 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %impl.elem0.loc14_34.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_34.1: = bound_method %int_1, %impl.elem0.loc14_34.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc14_34.1: = specific_function %impl.elem0.loc14_34.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_34.1: = specific_function %impl.elem0.loc14_34.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_34.2: = bound_method %int_1, %specific_fn.loc14_34.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc14_34.1: init %i32 = call %bound_method.loc14_34.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_34.2: init %i32 = converted %int_1, %int.convert_checked.loc14_34.1 [concrete = constants.%int_1.5d2] @@ -399,7 +399,7 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %.loc14_34.5: init %i32 = initialize_from %.loc14_34.2 to %.loc14_34.4 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc14_34.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_34.3: = bound_method %int_2, %impl.elem0.loc14_34.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc14_34.2: = specific_function %impl.elem0.loc14_34.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_34.2: = specific_function %impl.elem0.loc14_34.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_34.4: = bound_method %int_2, %specific_fn.loc14_34.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc14_34.2: init %i32 = call %bound_method.loc14_34.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc14_34.6: init %i32 = converted %int_2, %int.convert_checked.loc14_34.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/basics/parens.carbon b/toolchain/check/testdata/basics/parens.carbon index a8fc1c0a06b4..ccdf286222e2 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -27,15 +27,15 @@ var b: i32 = ((2)); // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -91,7 +91,7 @@ var b: i32 = ((2)); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc13: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_1.1: = bound_method %int_1, %impl.elem0.loc13 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_1.2: = bound_method %int_1, %specific_fn.loc13 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %bound_method.loc13_1.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13: init %i32 = converted %int_1, %int.convert_checked.loc13 [concrete = constants.%int_1.5d2] @@ -99,7 +99,7 @@ var b: i32 = ((2)); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_1.1: = bound_method %int_2, %impl.elem0.loc14 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_1.2: = bound_method %int_2, %specific_fn.loc14 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %bound_method.loc14_1.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc14: init %i32 = converted %int_2, %int.convert_checked.loc14 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/builtins/bool/eq.carbon b/toolchain/check/testdata/builtins/bool/eq.carbon index dd9f76024cdb..ad4725fb0e1e 100644 --- a/toolchain/check/testdata/builtins/bool/eq.carbon +++ b/toolchain/check/testdata/builtins/bool/eq.carbon @@ -97,20 +97,20 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %pattern_type.cc5: type = pattern_type %C.a14 [concrete] // CHECK:STDOUT: %True.type: type = fn_type @True [concrete] // CHECK:STDOUT: %True: %True.type = struct_value () [concrete] -// CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [concrete] -// CHECK:STDOUT: %Equal.type.79c: type = fn_type @Equal.1 [concrete] -// CHECK:STDOUT: %Eq.impl_witness: = impl_witness imports.%Eq.impl_witness_table [concrete] -// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value bool, (%Eq.impl_witness) [concrete] -// CHECK:STDOUT: %.7f7: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [concrete] -// CHECK:STDOUT: %Equal.type.aa3: type = fn_type @Equal.2 [concrete] -// CHECK:STDOUT: %Equal.6e2: %Equal.type.aa3 = struct_value () [concrete] -// CHECK:STDOUT: %Equal.bound.fe0: = bound_method %true, %Equal.6e2 [concrete] +// CHECK:STDOUT: %EqWith.type.a38: type = facet_type <@EqWith, @EqWith(bool)> [concrete] +// CHECK:STDOUT: %Equal.type.a58: type = fn_type @Equal.1, @EqWith(bool) [concrete] +// CHECK:STDOUT: %EqWith.impl_witness: = impl_witness imports.%EqWith.impl_witness_table [concrete] +// CHECK:STDOUT: %EqWith.facet: %EqWith.type.a38 = facet_value bool, (%EqWith.impl_witness) [concrete] +// CHECK:STDOUT: %.18c: type = fn_type_with_self_type %Equal.type.a58, %EqWith.facet [concrete] +// CHECK:STDOUT: %Equal.type.f5c: type = fn_type @Equal.2 [concrete] +// CHECK:STDOUT: %Equal.4ef: %Equal.type.f5c = struct_value () [concrete] +// CHECK:STDOUT: %Equal.bound.e10: = bound_method %true, %Equal.4ef [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.998: %Equal.type.aa3 = import_ref Core//prelude/operators/comparison, loc29_45, loaded [concrete = constants.%Equal.6e2] -// CHECK:STDOUT: %Core.import_ref.fb6 = import_ref Core//prelude/operators/comparison, loc30_48, unloaded -// CHECK:STDOUT: %Eq.impl_witness_table = impl_witness_table (%Core.import_ref.998, %Core.import_ref.fb6), @impl.bb5 [concrete] +// CHECK:STDOUT: %Core.import_ref.9cf: %Equal.type.f5c = import_ref Core//prelude/operators/comparison, loc36_45, loaded [concrete = constants.%Equal.4ef] +// CHECK:STDOUT: %Core.import_ref.f59 = import_ref Core//prelude/operators/comparison, loc37_48, unloaded +// CHECK:STDOUT: %EqWith.impl_witness_table = impl_witness_table (%Core.import_ref.9cf, %Core.import_ref.f59), @impl.4e5 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -123,8 +123,8 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc10_10: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %true.loc10_18: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc10: %.7f7 = impl_witness_access constants.%Eq.impl_witness, element0 [concrete = constants.%Equal.6e2] -// CHECK:STDOUT: %bound_method.loc10: = bound_method %true.loc10_10, %impl.elem0.loc10 [concrete = constants.%Equal.bound.fe0] +// CHECK:STDOUT: %impl.elem0.loc10: %.18c = impl_witness_access constants.%EqWith.impl_witness, element0 [concrete = constants.%Equal.4ef] +// CHECK:STDOUT: %bound_method.loc10: = bound_method %true.loc10_10, %impl.elem0.loc10 [concrete = constants.%Equal.bound.e10] // CHECK:STDOUT: %bool.eq.loc10: init bool = call %bound_method.loc10(%true.loc10_10, %true.loc10_18) [concrete = constants.%true] // CHECK:STDOUT: %.loc10_22.2: bool = value_of_initializer %bool.eq.loc10 [concrete = constants.%true] // CHECK:STDOUT: %.loc10_22.3: bool = converted %bool.eq.loc10, %.loc10_22.2 [concrete = constants.%true] diff --git a/toolchain/check/testdata/builtins/bool/neq.carbon b/toolchain/check/testdata/builtins/bool/neq.carbon index a65cfc01681c..2a92f9f6f29c 100644 --- a/toolchain/check/testdata/builtins/bool/neq.carbon +++ b/toolchain/check/testdata/builtins/bool/neq.carbon @@ -99,20 +99,20 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %pattern_type.d8f: type = pattern_type %C.2ba [concrete] // CHECK:STDOUT: %False.type: type = fn_type @False [concrete] // CHECK:STDOUT: %False: %False.type = struct_value () [concrete] -// CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [concrete] -// CHECK:STDOUT: %NotEqual.type.e6c: type = fn_type @NotEqual.1 [concrete] -// CHECK:STDOUT: %Eq.impl_witness: = impl_witness imports.%Eq.impl_witness_table [concrete] -// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value bool, (%Eq.impl_witness) [concrete] -// CHECK:STDOUT: %.f66: type = fn_type_with_self_type %NotEqual.type.e6c, %Eq.facet [concrete] -// CHECK:STDOUT: %NotEqual.type.c0e: type = fn_type @NotEqual.2 [concrete] -// CHECK:STDOUT: %NotEqual.bf4: %NotEqual.type.c0e = struct_value () [concrete] -// CHECK:STDOUT: %NotEqual.bound.542: = bound_method %true, %NotEqual.bf4 [concrete] +// CHECK:STDOUT: %EqWith.type.a38: type = facet_type <@EqWith, @EqWith(bool)> [concrete] +// CHECK:STDOUT: %NotEqual.type.f03: type = fn_type @NotEqual.1, @EqWith(bool) [concrete] +// CHECK:STDOUT: %EqWith.impl_witness: = impl_witness imports.%EqWith.impl_witness_table [concrete] +// CHECK:STDOUT: %EqWith.facet: %EqWith.type.a38 = facet_value bool, (%EqWith.impl_witness) [concrete] +// CHECK:STDOUT: %.c2f: type = fn_type_with_self_type %NotEqual.type.f03, %EqWith.facet [concrete] +// CHECK:STDOUT: %NotEqual.type.bb4: type = fn_type @NotEqual.2 [concrete] +// CHECK:STDOUT: %NotEqual.c32: %NotEqual.type.bb4 = struct_value () [concrete] +// CHECK:STDOUT: %NotEqual.bound.0d4: = bound_method %true, %NotEqual.c32 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.85b = import_ref Core//prelude/operators/comparison, loc29_45, unloaded -// CHECK:STDOUT: %Core.import_ref.67a: %NotEqual.type.c0e = import_ref Core//prelude/operators/comparison, loc30_48, loaded [concrete = constants.%NotEqual.bf4] -// CHECK:STDOUT: %Eq.impl_witness_table = impl_witness_table (%Core.import_ref.85b, %Core.import_ref.67a), @impl.bb5 [concrete] +// CHECK:STDOUT: %Core.import_ref.a67 = import_ref Core//prelude/operators/comparison, loc36_45, unloaded +// CHECK:STDOUT: %Core.import_ref.76f: %NotEqual.type.bb4 = import_ref Core//prelude/operators/comparison, loc37_48, loaded [concrete = constants.%NotEqual.c32] +// CHECK:STDOUT: %EqWith.impl_witness_table = impl_witness_table (%Core.import_ref.a67, %Core.import_ref.76f), @impl.4e5 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -125,8 +125,8 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc10_10: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %true.loc10_18: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem1.loc10: %.f66 = impl_witness_access constants.%Eq.impl_witness, element1 [concrete = constants.%NotEqual.bf4] -// CHECK:STDOUT: %bound_method.loc10: = bound_method %true.loc10_10, %impl.elem1.loc10 [concrete = constants.%NotEqual.bound.542] +// CHECK:STDOUT: %impl.elem1.loc10: %.c2f = impl_witness_access constants.%EqWith.impl_witness, element1 [concrete = constants.%NotEqual.c32] +// CHECK:STDOUT: %bound_method.loc10: = bound_method %true.loc10_10, %impl.elem1.loc10 [concrete = constants.%NotEqual.bound.0d4] // CHECK:STDOUT: %bool.neq.loc10: init bool = call %bound_method.loc10(%true.loc10_10, %true.loc10_18) [concrete = constants.%false] // CHECK:STDOUT: %.loc10_22.2: bool = value_of_initializer %bool.neq.loc10 [concrete = constants.%false] // CHECK:STDOUT: %.loc10_22.3: bool = converted %bool.neq.loc10, %.loc10_22.2 [concrete = constants.%false] diff --git a/toolchain/check/testdata/builtins/int/convert_checked.carbon b/toolchain/check/testdata/builtins/int/convert_checked.carbon index 220f9a71a8f9..57da663fcbdf 100644 --- a/toolchain/check/testdata/builtins/int/convert_checked.carbon +++ b/toolchain/check/testdata/builtins/int/convert_checked.carbon @@ -273,15 +273,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.6da: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0b2: type = fn_type @Convert.2, @impl.c81(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0b2: type = fn_type @Convert.3, @impl.c81(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.6d7: %Convert.type.0b2 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.e34: = impl_witness imports.%ImplicitAs.impl_witness_table.e36, @impl.c81(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.2, @impl.c81(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.3, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.16d: %Convert.type.ed5 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] -// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.2e7: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] +// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet.2e7 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.16d [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.47b: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_1.c1d: %u32 = int_value 1 [concrete] @@ -346,7 +346,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int_1.loc6: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc6: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc6_41.1: = bound_method %int_1.loc6, %impl.elem0.loc6 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_41.2: = bound_method %int_1.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc6_41: init %i32 = call %bound_method.loc6_41.2(%int_1.loc6) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc6_41.1: %i32 = value_of_initializer %int.convert_checked.loc6_41 [concrete = constants.%int_1.47b] @@ -356,7 +356,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc7: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc7_35.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_35.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc7_35: init %i32 = call %bound_method.loc7_35.2(%int_1.loc7) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %int.convert_checked.loc7_35 [concrete = constants.%int_1.47b] @@ -366,7 +366,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc8: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc8_34.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_34.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc8_34: init %i32 = call %bound_method.loc8_34.2(%int_1.loc8) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %int.convert_checked.loc8_34 [concrete = constants.%int_1.47b] diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index 848fe9ad046b..576f8150a512 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -110,8 +110,8 @@ fn Test(n: Core.IntLiteral()) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Eq.type.e7f: type = fn_type @Eq.1 [concrete] -// CHECK:STDOUT: %Eq: %Eq.type.e7f = struct_value () [concrete] +// CHECK:STDOUT: %Eq.type: type = fn_type @Eq [concrete] +// CHECK:STDOUT: %Eq: %Eq.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -119,7 +119,7 @@ fn Test(n: Core.IntLiteral()) { // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Eq.ref: %Eq.type.e7f = name_ref Eq, file.%Eq.decl [concrete = constants.%Eq] +// CHECK:STDOUT: %Eq.ref: %Eq.type = name_ref Eq, file.%Eq.decl [concrete = constants.%Eq] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.eq: init bool = call %Eq.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index e0775e9edc49..0fe726f87a45 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -231,8 +231,8 @@ let bad4: Core.IntLiteral() = LeftShiftOfLit(12, an_i32); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %LeftShift.type.ed3: type = fn_type @LeftShift.1 [concrete] -// CHECK:STDOUT: %LeftShift: %LeftShift.type.ed3 = struct_value () [concrete] +// CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [concrete] +// CHECK:STDOUT: %LeftShift: %LeftShift.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -240,7 +240,7 @@ let bad4: Core.IntLiteral() = LeftShiftOfLit(12, an_i32); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type.ed3 = name_ref LeftShift, file.%LeftShift.decl [concrete = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [concrete = constants.%LeftShift] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.left_shift: init %i32 = call %LeftShift.ref(%a.ref, %b.ref) @@ -255,8 +255,8 @@ let bad4: Core.IntLiteral() = LeftShiftOfLit(12, an_i32); // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %LeftShift.type.ed3: type = fn_type @LeftShift.1 [concrete] -// CHECK:STDOUT: %LeftShift: %LeftShift.type.ed3 = struct_value () [concrete] +// CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [concrete] +// CHECK:STDOUT: %LeftShift: %LeftShift.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -264,7 +264,7 @@ let bad4: Core.IntLiteral() = LeftShiftOfLit(12, an_i32); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param: %u32, %b.param: %i32) -> %u32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type.ed3 = name_ref LeftShift, file.%LeftShift.decl [concrete = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [concrete = constants.%LeftShift] // CHECK:STDOUT: %a.ref: %u32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.left_shift: init %u32 = call %LeftShift.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index 11f83bc46654..8a8c45dcc4bf 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -135,8 +135,8 @@ let negative_lit_zero: Core.IntLiteral() = RightShiftLit(0, -1); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %RightShift.type.050: type = fn_type @RightShift.1 [concrete] -// CHECK:STDOUT: %RightShift: %RightShift.type.050 = struct_value () [concrete] +// CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [concrete] +// CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -144,7 +144,7 @@ let negative_lit_zero: Core.IntLiteral() = RightShiftLit(0, -1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %RightShift.ref: %RightShift.type.050 = name_ref RightShift, file.%RightShift.decl [concrete = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref: %RightShift.type = name_ref RightShift, file.%RightShift.decl [concrete = constants.%RightShift] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.right_shift: init %i32 = call %RightShift.ref(%a.ref, %b.ref) @@ -159,8 +159,8 @@ let negative_lit_zero: Core.IntLiteral() = RightShiftLit(0, -1); // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %RightShift.type.050: type = fn_type @RightShift.1 [concrete] -// CHECK:STDOUT: %RightShift: %RightShift.type.050 = struct_value () [concrete] +// CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [concrete] +// CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -168,7 +168,7 @@ let negative_lit_zero: Core.IntLiteral() = RightShiftLit(0, -1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param: %u32, %b.param: %i32) -> %u32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %RightShift.ref: %RightShift.type.050 = name_ref RightShift, file.%RightShift.decl [concrete = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref: %RightShift.type = name_ref RightShift, file.%RightShift.decl [concrete = constants.%RightShift] // CHECK:STDOUT: %a.ref: %u32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.right_shift: init %u32 = call %RightShift.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index b6581f8ef1bf..56376de52c89 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -164,8 +164,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Add.type.b1f: type = fn_type @Add.1 [concrete] -// CHECK:STDOUT: %Add: %Add.type.b1f = struct_value () [concrete] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [concrete] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -173,7 +173,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: %Add.type.b1f = name_ref Add, file.%Add.decl [concrete = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [concrete = constants.%Add] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index 9dae38a1565c..451f6a0926e3 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -95,8 +95,8 @@ let d: Core.IntLiteral() = DivLit(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Div.type.ab4: type = fn_type @Div.1 [concrete] -// CHECK:STDOUT: %Div: %Div.type.ab4 = struct_value () [concrete] +// CHECK:STDOUT: %Div.type: type = fn_type @Div [concrete] +// CHECK:STDOUT: %Div: %Div.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -104,7 +104,7 @@ let d: Core.IntLiteral() = DivLit(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: %Div.type.ab4 = name_ref Div, file.%Div.decl [concrete = constants.%Div] +// CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, file.%Div.decl [concrete = constants.%Div] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.sdiv: init %i32 = call %Div.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 3f8558bbb7bb..d770ccf5ab69 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -70,8 +70,8 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Mod.type.797: type = fn_type @Mod.1 [concrete] -// CHECK:STDOUT: %Mod: %Mod.type.797 = struct_value () [concrete] +// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [concrete] +// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,7 +79,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref: %Mod.type.797 = name_ref Mod, file.%Mod.decl [concrete = constants.%Mod] +// CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, file.%Mod.decl [concrete = constants.%Mod] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.smod: init %i32 = call %Mod.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index 3628f4bd67d6..9b54326866c5 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -77,8 +77,8 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Mul.type.b2a: type = fn_type @Mul.1 [concrete] -// CHECK:STDOUT: %Mul: %Mul.type.b2a = struct_value () [concrete] +// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [concrete] +// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -86,7 +86,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: %Mul.type.b2a = name_ref Mul, file.%Mul.decl [concrete = constants.%Mul] +// CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, file.%Mul.decl [concrete = constants.%Mul] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.smul: init %i32 = call %Mul.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index 0d5076f76c08..2e298624de65 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -42,8 +42,8 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Sub.type.765: type = fn_type @Sub.1 [concrete] -// CHECK:STDOUT: %Sub: %Sub.type.765 = struct_value () [concrete] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [concrete] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -51,7 +51,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: %Sub.type.765 = name_ref Sub, file.%Sub.decl [concrete = constants.%Sub] +// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [concrete = constants.%Sub] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index 3a79dd70e463..9f2caf359e8d 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -113,8 +113,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Add.type.b1f: type = fn_type @Add.1 [concrete] -// CHECK:STDOUT: %Add: %Add.type.b1f = struct_value () [concrete] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [concrete] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -122,7 +122,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: %Add.type.b1f = name_ref Add, file.%Add.decl [concrete = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [concrete = constants.%Add] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.uadd: init %i32 = call %Add.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index 28751c050cf1..bd69107dec89 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -63,8 +63,8 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Div.type.ab4: type = fn_type @Div.1 [concrete] -// CHECK:STDOUT: %Div: %Div.type.ab4 = struct_value () [concrete] +// CHECK:STDOUT: %Div.type: type = fn_type @Div [concrete] +// CHECK:STDOUT: %Div: %Div.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -72,7 +72,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: %Div.type.ab4 = name_ref Div, file.%Div.decl [concrete = constants.%Div] +// CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, file.%Div.decl [concrete = constants.%Div] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.udiv: init %i32 = call %Div.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index cbf8ae4e5de4..953bc305d76b 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -65,8 +65,8 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Mod.type.797: type = fn_type @Mod.1 [concrete] -// CHECK:STDOUT: %Mod: %Mod.type.797 = struct_value () [concrete] +// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [concrete] +// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,7 +74,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref: %Mod.type.797 = name_ref Mod, file.%Mod.decl [concrete = constants.%Mod] +// CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, file.%Mod.decl [concrete = constants.%Mod] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.umod: init %i32 = call %Mod.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index fa0461734037..ed0fb93ddfee 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -37,8 +37,8 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Mul.type.b2a: type = fn_type @Mul.1 [concrete] -// CHECK:STDOUT: %Mul: %Mul.type.b2a = struct_value () [concrete] +// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [concrete] +// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -46,7 +46,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: %Mul.type.b2a = name_ref Mul, file.%Mul.decl [concrete = constants.%Mul] +// CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, file.%Mul.decl [concrete = constants.%Mul] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.umul: init %i32 = call %Mul.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index da61b34a3a02..34e0946cb886 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -38,8 +38,8 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %Sub.type.765: type = fn_type @Sub.1 [concrete] -// CHECK:STDOUT: %Sub: %Sub.type.765 = struct_value () [concrete] +// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [concrete] +// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,7 +47,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCallIsValid(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: %Sub.type.765 = name_ref Sub, file.%Sub.decl [concrete = constants.%Sub] +// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [concrete = constants.%Sub] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/builtins/print/char.carbon b/toolchain/check/testdata/builtins/print/char.carbon index a5cb9a00c103..d20e7f730d5e 100644 --- a/toolchain/check/testdata/builtins/print/char.carbon +++ b/toolchain/check/testdata/builtins/print/char.carbon @@ -34,15 +34,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %PrintChar.type.089: type = fn_type @PrintChar.2 [concrete] @@ -75,7 +75,7 @@ fn Main() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_13.1: = bound_method %int_1, %impl.elem0.loc17 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_13.2: = bound_method %int_1, %specific_fn.loc17 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_13.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_13.1: %i32 = value_of_initializer %int.convert_checked.loc17 [concrete = constants.%int_1.5d2] @@ -86,7 +86,7 @@ fn Main() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_18.1: = bound_method %int_2, %impl.elem0.loc18 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_18.2: = bound_method %int_2, %specific_fn.loc18 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %bound_method.loc18_18.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc18_18.1: %i32 = value_of_initializer %int.convert_checked.loc18 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/builtins/print/int.carbon b/toolchain/check/testdata/builtins/print/int.carbon index 50b2b0b00dda..3a3fdc55d4d3 100644 --- a/toolchain/check/testdata/builtins/print/int.carbon +++ b/toolchain/check/testdata/builtins/print/int.carbon @@ -35,15 +35,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Print.type.6ed: type = fn_type @Print.2 [concrete] @@ -76,7 +76,7 @@ fn Main() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_9.1: = bound_method %int_1, %impl.elem0.loc17 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_9.2: = bound_method %int_1, %specific_fn.loc17 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_9.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_9.1: %i32 = value_of_initializer %int.convert_checked.loc17 [concrete = constants.%int_1.5d2] @@ -87,7 +87,7 @@ fn Main() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_14.1: = bound_method %int_2, %impl.elem0.loc18 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_14.2: = bound_method %int_2, %specific_fn.loc18 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %bound_method.loc18_14.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc18_14.1: %i32 = value_of_initializer %int.convert_checked.loc18 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/choice/basic.carbon b/toolchain/check/testdata/choice/basic.carbon index cb0afdb29ea6..fa78cb597d61 100644 --- a/toolchain/check/testdata/choice/basic.carbon +++ b/toolchain/check/testdata/choice/basic.carbon @@ -144,19 +144,19 @@ let never: Never = {}; // CHECK:STDOUT: %ImplicitAs.type.54b: type = facet_type <@ImplicitAs, @ImplicitAs(%u2)> [concrete] // CHECK:STDOUT: %Convert.type.f0e: type = fn_type @Convert.1, @ImplicitAs(%u2) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.30e: type = fn_type @Convert.2, @impl.86e(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.30e: type = fn_type @Convert.3, @impl.86e(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.d1a: %Convert.type.30e = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.801: = impl_witness imports.%ImplicitAs.impl_witness_table.bb8, @impl.86e(%int_2.ecc) [concrete] -// CHECK:STDOUT: %Convert.type.70b: type = fn_type @Convert.2, @impl.86e(%int_2.ecc) [concrete] +// CHECK:STDOUT: %Convert.type.70b: type = fn_type @Convert.3, @impl.86e(%int_2.ecc) [concrete] // CHECK:STDOUT: %Convert.474: %Convert.type.70b = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.54b = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.801) [concrete] -// CHECK:STDOUT: %.3e0: type = fn_type_with_self_type %Convert.type.f0e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.7cf: %ImplicitAs.type.54b = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.801) [concrete] +// CHECK:STDOUT: %.3e0: type = fn_type_with_self_type %Convert.type.f0e, %ImplicitAs.facet.7cf [concrete] // CHECK:STDOUT: %Convert.bound.5bb: = bound_method %int_0.5c6, %Convert.474 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.474, @Convert.2(%int_2.ecc) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.474, @Convert.3(%int_2.ecc) [concrete] // CHECK:STDOUT: %bound_method.d36: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.9fd: %u2 = int_value 0 [concrete] // CHECK:STDOUT: %Ordering.val.a29: %Ordering = struct_value (%int_0.9fd) [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.0dd: = bound_method %int_1.5b8, %Convert.474 [concrete] // CHECK:STDOUT: %bound_method.6bf: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.b2c: %u2 = int_value 1 [concrete] @@ -209,7 +209,7 @@ let never: Never = {}; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc5: %.3e0 = impl_witness_access constants.%ImplicitAs.impl_witness.801, element0 [concrete = constants.%Convert.474] // CHECK:STDOUT: %bound_method.loc5_7.1: = bound_method %int_0, %impl.elem0.loc5 [concrete = constants.%Convert.bound.5bb] -// CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.2(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.3(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_7.2: = bound_method %int_0, %specific_fn.loc5 [concrete = constants.%bound_method.d36] // CHECK:STDOUT: %int.convert_checked.loc5: init %u2 = call %bound_method.loc5_7.2(%int_0) [concrete = constants.%int_0.9fd] // CHECK:STDOUT: %.loc5_7.1: %u2 = value_of_initializer %int.convert_checked.loc5 [concrete = constants.%int_0.9fd] @@ -226,7 +226,7 @@ let never: Never = {}; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc6: %.3e0 = impl_witness_access constants.%ImplicitAs.impl_witness.801, element0 [concrete = constants.%Convert.474] // CHECK:STDOUT: %bound_method.loc6_13.1: = bound_method %int_1, %impl.elem0.loc6 [concrete = constants.%Convert.bound.0dd] -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.3(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_13.2: = bound_method %int_1, %specific_fn.loc6 [concrete = constants.%bound_method.6bf] // CHECK:STDOUT: %int.convert_checked.loc6: init %u2 = call %bound_method.loc6_13.2(%int_1) [concrete = constants.%int_1.b2c] // CHECK:STDOUT: %.loc6_13.1: %u2 = value_of_initializer %int.convert_checked.loc6 [concrete = constants.%int_1.b2c] @@ -243,7 +243,7 @@ let never: Never = {}; // CHECK:STDOUT: %int_2.loc7: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc7: %.3e0 = impl_witness_access constants.%ImplicitAs.impl_witness.801, element0 [concrete = constants.%Convert.474] // CHECK:STDOUT: %bound_method.loc7_10.1: = bound_method %int_2.loc7, %impl.elem0.loc7 [concrete = constants.%Convert.bound.122] -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.2(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.3(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_10.2: = bound_method %int_2.loc7, %specific_fn.loc7 [concrete = constants.%bound_method.f7d] // CHECK:STDOUT: %int.convert_checked.loc7: init %u2 = call %bound_method.loc7_10.2(%int_2.loc7) [concrete = constants.%int_2.788] // CHECK:STDOUT: %.loc7_10.1: %u2 = value_of_initializer %int.convert_checked.loc7 [concrete = constants.%int_2.788] @@ -260,7 +260,7 @@ let never: Never = {}; // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %impl.elem0.loc9: %.3e0 = impl_witness_access constants.%ImplicitAs.impl_witness.801, element0 [concrete = constants.%Convert.474] // CHECK:STDOUT: %bound_method.loc9_1.1: = bound_method %int_3, %impl.elem0.loc9 [concrete = constants.%Convert.bound.a5c] -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.3(constants.%int_2.ecc) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_1.2: = bound_method %int_3, %specific_fn.loc9 [concrete = constants.%bound_method.c7e] // CHECK:STDOUT: %int.convert_checked.loc9: init %u2 = call %bound_method.loc9_1.2(%int_3) [concrete = constants.%int_3.975] // CHECK:STDOUT: %.loc9_1.1: %u2 = value_of_initializer %int.convert_checked.loc9 [concrete = constants.%int_3.975] diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index 947aa42829a0..efe7e1dea60b 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -165,15 +165,15 @@ class A { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.a25: = bound_method %int_5.64b, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete] // CHECK:STDOUT: %SomeInternalFunction.type: type = fn_type @SomeInternalFunction [concrete] @@ -231,7 +231,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_45.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound.4e6] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_45.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method.a25] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc6_45.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc6_45.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_5.0f6] @@ -271,7 +271,7 @@ class A { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_13.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_13.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_13.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc9_13.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -285,7 +285,7 @@ class A { // CHECK:STDOUT: %.loc13_24.1: %struct_type.radius.f47 = struct_literal (%int_5) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_24.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound.4e6] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_24.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method.a25] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc13_24.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc13_24.2: init %i32 = converted %int_5, %int.convert_checked [concrete = constants.%int_5.0f6] @@ -418,15 +418,15 @@ class A { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -520,7 +520,7 @@ class A { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_13.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_13.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc12_13.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc12_13.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -553,15 +553,15 @@ class A { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5.64b, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -610,7 +610,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_16.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_16.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc5_16.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc5_16.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_5.0f6] @@ -647,15 +647,15 @@ class A { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5.64b, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -713,7 +713,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_26.1: = bound_method %int_5.loc5, %impl.elem0.loc5 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_26.2: = bound_method %int_5.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %bound_method.loc5_26.2(%int_5.loc5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc5_26.1: %i32 = value_of_initializer %int.convert_checked.loc5 [concrete = constants.%int_5.0f6] @@ -729,7 +729,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_24.1: = bound_method %int_5.loc6, %impl.elem0.loc6 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_24.2: = bound_method %int_5.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %bound_method.loc6_24.2(%int_5.loc6) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc6_24.1: %i32 = value_of_initializer %int.convert_checked.loc6 [concrete = constants.%int_5.0f6] diff --git a/toolchain/check/testdata/class/adapter/init_adapt.carbon b/toolchain/check/testdata/class/adapter/init_adapt.carbon index 921f24c94941..c119145df540 100644 --- a/toolchain/check/testdata/class/adapter/init_adapt.carbon +++ b/toolchain/check/testdata/class/adapter/init_adapt.carbon @@ -116,15 +116,15 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -173,7 +173,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [concrete = constants.%C] // CHECK:STDOUT: %impl.elem0.loc13_27.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_27.1: = bound_method @__global_init.%int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc13_27.1: = specific_function %impl.elem0.loc13_27.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc13_27.1: = specific_function %impl.elem0.loc13_27.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.2: = bound_method @__global_init.%int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %bound_method.loc13_27.2(@__global_init.%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13_27.1: init %i32 = converted @__global_init.%int_1, %int.convert_checked.loc13_27.1 [concrete = constants.%int_1.5d2] @@ -182,7 +182,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.4: init %i32 = initialize_from %.loc13_27.1 to %.loc13_27.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc13_27.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_27.3: = bound_method @__global_init.%int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc13_27.2: = specific_function %impl.elem0.loc13_27.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc13_27.2: = specific_function %impl.elem0.loc13_27.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.4: = bound_method @__global_init.%int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %bound_method.loc13_27.4(@__global_init.%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc13_27.5: init %i32 = converted @__global_init.%int_2, %int.convert_checked.loc13_27.2 [concrete = constants.%int_2.ef8] @@ -317,15 +317,15 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -374,7 +374,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [concrete = constants.%C] // CHECK:STDOUT: %impl.elem0.loc13_27.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_27.1: = bound_method @__global_init.%int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc13_27.1: = specific_function %impl.elem0.loc13_27.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc13_27.1: = specific_function %impl.elem0.loc13_27.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.2: = bound_method @__global_init.%int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %bound_method.loc13_27.2(@__global_init.%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13_27.1: init %i32 = converted @__global_init.%int_1, %int.convert_checked.loc13_27.1 [concrete = constants.%int_1.5d2] @@ -383,7 +383,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.4: init %i32 = initialize_from %.loc13_27.1 to %.loc13_27.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc13_27.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_27.3: = bound_method @__global_init.%int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc13_27.2: = specific_function %impl.elem0.loc13_27.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc13_27.2: = specific_function %impl.elem0.loc13_27.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.4: = bound_method @__global_init.%int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %bound_method.loc13_27.4(@__global_init.%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc13_27.5: init %i32 = converted @__global_init.%int_2, %int.convert_checked.loc13_27.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index d04f37158ec6..e05fcc1ed6b8 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -76,15 +76,15 @@ class Derived { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ac3: = bound_method %int_4.0c1, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.1da: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %Base.val: %Base = struct_value (%int_4.940) [concrete] @@ -190,7 +190,7 @@ class Derived { // CHECK:STDOUT: %.loc14_35.1: %struct_type.base.d.a20 = struct_literal (%.loc14_26.1, %int_7) // CHECK:STDOUT: %impl.elem0.loc14_26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_26.1: = bound_method %int_4, %impl.elem0.loc14_26 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc14_26: = specific_function %impl.elem0.loc14_26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_26: = specific_function %impl.elem0.loc14_26, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_26.2: = bound_method %int_4, %specific_fn.loc14_26 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %bound_method.loc14_26.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc14_26.2: init %i32 = converted %int_4, %int.convert_checked.loc14_26 [concrete = constants.%int_4.940] @@ -201,7 +201,7 @@ class Derived { // CHECK:STDOUT: %.loc14_35.3: init %Base = converted %.loc14_26.1, %.loc14_26.5 [concrete = constants.%Base.val] // CHECK:STDOUT: %impl.elem0.loc14_35: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_35.1: = bound_method %int_7, %impl.elem0.loc14_35 [concrete = constants.%Convert.bound.208] -// CHECK:STDOUT: %specific_fn.loc14_35: = specific_function %impl.elem0.loc14_35, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_35: = specific_function %impl.elem0.loc14_35, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_35.2: = bound_method %int_7, %specific_fn.loc14_35 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %int.convert_checked.loc14_35: init %i32 = call %bound_method.loc14_35.2(%int_7) [concrete = constants.%int_7.0b1] // CHECK:STDOUT: %.loc14_35.4: init %i32 = converted %int_7, %int.convert_checked.loc14_35 [concrete = constants.%int_7.0b1] diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index 47b2fd734d56..c29fe15083e3 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -52,15 +52,15 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Derived: type = class_type @Derived [concrete] @@ -171,7 +171,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc21_13.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc21_13: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index 574a7956116c..7228c6ab63bd 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -53,15 +53,15 @@ fn Run() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4.0c1, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: } @@ -185,7 +185,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_18.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_18.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc29_18.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc29_18.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_4.940] diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index 5d827d43ef52..5d87d90b8d8a 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -93,15 +93,15 @@ fn ConvertInit() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.5d2) [concrete] @@ -344,7 +344,7 @@ fn ConvertInit() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %impl.elem0.loc41_39: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc41_39.1: = bound_method %int_1, %impl.elem0.loc41_39 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc41_39: = specific_function %impl.elem0.loc41_39, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc41_39: = specific_function %impl.elem0.loc41_39, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc41_39.2: = bound_method %int_1, %specific_fn.loc41_39 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc41_39: init %i32 = call %bound_method.loc41_39.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc41_39.2: init %i32 = converted %int_1, %int.convert_checked.loc41_39 [concrete = constants.%int_1.5d2] @@ -357,7 +357,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc41_48.3: init %A = converted %.loc41_39.1, %.loc41_39.5 [concrete = constants.%A.val] // CHECK:STDOUT: %impl.elem0.loc41_48: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc41_48.1: = bound_method %int_2, %impl.elem0.loc41_48 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc41_48: = specific_function %impl.elem0.loc41_48, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc41_48: = specific_function %impl.elem0.loc41_48, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc41_48.2: = bound_method %int_2, %specific_fn.loc41_48 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc41_48: init %i32 = call %bound_method.loc41_48.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc41_48.4: init %i32 = converted %int_2, %int.convert_checked.loc41_48 [concrete = constants.%int_2.ef8] @@ -367,7 +367,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc41_57.4: init %B = converted %.loc41_48.1, %.loc41_48.7 [concrete = constants.%B.val] // CHECK:STDOUT: %impl.elem0.loc41_57: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc41_57.1: = bound_method %int_3, %impl.elem0.loc41_57 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc41_57: = specific_function %impl.elem0.loc41_57, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc41_57: = specific_function %impl.elem0.loc41_57, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc41_57.2: = bound_method %int_3, %specific_fn.loc41_57 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc41_57: init %i32 = call %bound_method.loc41_57.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc41_57.5: init %i32 = converted %int_3, %int.convert_checked.loc41_57 [concrete = constants.%int_3.822] diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index d99467de51f9..370eef483628 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -54,18 +54,18 @@ class Class { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] @@ -112,7 +112,7 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc32_24.1: = bound_method %int_0, %impl.elem0.loc32 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_24.2: = bound_method %int_0, %specific_fn.loc32 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %bound_method.loc32_24.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc32_24.1: %i32 = value_of_initializer %int.convert_checked.loc32 [concrete = constants.%int_0.6a9] @@ -128,7 +128,7 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc38: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc38_22.1: = bound_method %int_1, %impl.elem0.loc38 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc38: = specific_function %impl.elem0.loc38, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc38: = specific_function %impl.elem0.loc38, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc38_22.2: = bound_method %int_1, %specific_fn.loc38 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc38: init %i32 = call %bound_method.loc38_22.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc38_22.1: %i32 = value_of_initializer %int.convert_checked.loc38 [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index 804fc6400d4e..aa6b3f82091b 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -56,15 +56,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] @@ -126,7 +126,7 @@ fn F() { // CHECK:STDOUT: %Class.ref.loc29: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_18.1: = bound_method %int_1.loc29, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_18.2: = bound_method %int_1.loc29, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc29_18.2(%int_1.loc29) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc29_18.2: init %i32 = converted %int_1.loc29, %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index ad1f22725403..9de07c8989a4 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -57,15 +57,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -142,7 +142,7 @@ fn F() { // CHECK:STDOUT: %Class.ref.loc29_38: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %impl.elem0.loc29_33.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_33.1: = bound_method %int_1, %impl.elem0.loc29_33.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc29_33.1: = specific_function %impl.elem0.loc29_33.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc29_33.1: = specific_function %impl.elem0.loc29_33.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_33.2: = bound_method %int_1, %specific_fn.loc29_33.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc29_33.1: init %i32 = call %bound_method.loc29_33.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc29_33.2: init %i32 = converted %int_1, %int.convert_checked.loc29_33.1 [concrete = constants.%int_1.5d2] @@ -151,7 +151,7 @@ fn F() { // CHECK:STDOUT: %.loc29_33.5: init %i32 = initialize_from %.loc29_33.2 to %.loc29_33.4 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc29_33.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_33.3: = bound_method %int_2, %impl.elem0.loc29_33.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc29_33.2: = specific_function %impl.elem0.loc29_33.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc29_33.2: = specific_function %impl.elem0.loc29_33.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_33.4: = bound_method %int_2, %specific_fn.loc29_33.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc29_33.2: init %i32 = call %bound_method.loc29_33.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc29_33.6: init %i32 = converted %int_2, %int.convert_checked.loc29_33.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index e61d8247e50c..04274303d39c 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -44,15 +44,15 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] @@ -116,7 +116,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_13.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc16_13.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index 9cd022ce0bb3..5034592efca2 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -44,16 +44,16 @@ fn Run() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -118,7 +118,7 @@ fn Run() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_7.1: = bound_method %int_1, %impl.elem0.loc21 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_7.2: = bound_method %int_1, %specific_fn.loc21 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %bound_method.loc21_7.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc21_7: init %i32 = converted %int_1, %int.convert_checked.loc21 [concrete = constants.%int_1.5d2] @@ -129,7 +129,7 @@ fn Run() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc22: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_7.1: = bound_method %int_2, %impl.elem0.loc22 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_7.2: = bound_method %int_2, %specific_fn.loc22 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %bound_method.loc22_7.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc22_7: init %i32 = converted %int_2, %int.convert_checked.loc22 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index 31bedae18030..e09133afecbb 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -45,16 +45,16 @@ fn Test() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -119,7 +119,7 @@ fn Test() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_8.1: = bound_method %int_1, %impl.elem0.loc21 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_8.2: = bound_method %int_1, %specific_fn.loc21 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %bound_method.loc21_8.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc21_8: init %i32 = converted %int_1, %int.convert_checked.loc21 [concrete = constants.%int_1.5d2] @@ -130,7 +130,7 @@ fn Test() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc22: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_8.1: = bound_method %int_2, %impl.elem0.loc22 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_8.2: = bound_method %int_2, %specific_fn.loc22 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %bound_method.loc22_8.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc22_8: init %i32 = converted %int_2, %int.convert_checked.loc22 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index e63d3b19a14f..b01c4f252a9c 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -392,14 +392,14 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: --- fail_todo_extend_adapt_specific_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %C.elem.66c: type = unbound_element_type %C.f2e, %T [symbolic] -// CHECK:STDOUT: %struct_type.x.2ac: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T.8b3) [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] +// CHECK:STDOUT: %C.elem.66c: type = unbound_element_type %C.f2e, %T.8b3 [symbolic] +// CHECK:STDOUT: %struct_type.x.2ac: type = struct_type {.x: %T.8b3} [symbolic] // CHECK:STDOUT: %complete_type.433: = complete_type_witness %struct_type.x.2ac [symbolic] // CHECK:STDOUT: %Adapter: type = class_type @Adapter [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -442,7 +442,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %Adapter.decl: type = class_decl @Adapter [concrete = constants.%Adapter] {} {} // CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [concrete = constants.%Access] { @@ -462,19 +462,19 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc4_9.1: type) { -// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_9.2 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C.f2e)] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %T.loc4_9.2 [symbolic = %C.elem (constants.%C.elem.66c)] -// CHECK:STDOUT: %struct_type.x.loc6_1.2: type = struct_type {.x: @C.%T.loc4_9.2 (%T)} [symbolic = %struct_type.x.loc6_1.2 (constants.%struct_type.x.2ac)] +// CHECK:STDOUT: %struct_type.x.loc6_1.2: type = struct_type {.x: @C.%T.loc4_9.2 (%T.8b3)} [symbolic = %struct_type.x.loc6_1.2 (constants.%struct_type.x.2ac)] // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness %struct_type.x.loc6_1.2 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.433)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T.8b3)] // CHECK:STDOUT: %.loc5: @C.%C.elem (%C.elem.66c) = field_decl x, element0 [concrete] -// CHECK:STDOUT: %struct_type.x.loc6_1.1: type = struct_type {.x: %T} [symbolic = %struct_type.x.loc6_1.2 (constants.%struct_type.x.2ac)] +// CHECK:STDOUT: %struct_type.x.loc6_1.1: type = struct_type {.x: %T.8b3} [symbolic = %struct_type.x.loc6_1.2 (constants.%struct_type.x.2ac)] // CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.loc6_1.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.433)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 // CHECK:STDOUT: @@ -510,8 +510,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { -// CHECK:STDOUT: %T.loc4_9.2 => constants.%T +// CHECK:STDOUT: specific @C(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_9.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { @@ -636,15 +636,15 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %struct_type.x.2ac: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %struct_type.x.2ac: type = struct_type {.x: %T.8b3} [symbolic] // CHECK:STDOUT: %complete_type.433: = complete_type_witness %struct_type.x.2ac [symbolic] -// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T.8b3) [symbolic] // CHECK:STDOUT: %C.239: type = class_type @C, @C(%i32) [concrete] // CHECK:STDOUT: %struct_type.x.767: type = struct_type {.x: %i32} [concrete] // CHECK:STDOUT: %complete_type.c07: = complete_type_witness %struct_type.x.767 [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %C.elem.66c: type = unbound_element_type %C.f2e, %T [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] +// CHECK:STDOUT: %C.elem.66c: type = unbound_element_type %C.f2e, %T.8b3 [symbolic] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] // CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] // CHECK:STDOUT: %C.elem.ed6: type = unbound_element_type %C.239, %i32 [concrete] @@ -665,7 +665,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//extend_adapt_specific_type_library, loc7_9, loaded [symbolic = @C.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//extend_adapt_specific_type_library, loc7_9, loaded [symbolic = @C.%T (constants.%T.8b3)] // CHECK:STDOUT: %Main.import_ref.b5f: = import_ref Main//extend_adapt_specific_type_library, loc9_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.433)] // CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//extend_adapt_specific_type_library, inst26 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.262: @C.%C.elem (%C.elem.66c) = import_ref Main//extend_adapt_specific_type_library, loc8_8, loaded [concrete = %.22b] @@ -712,13 +712,13 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(imports.%Main.import_ref.5ab: type) [from "extend_adapt_specific_type_library.carbon"] { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.f2e)] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %T [symbolic = %C.elem (constants.%C.elem.66c)] -// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.2ac)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T (%T.8b3)} [symbolic = %struct_type.x (constants.%struct_type.x.2ac)] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [symbolic = %complete_type (constants.%complete_type.433)] // CHECK:STDOUT: // CHECK:STDOUT: class { @@ -739,8 +739,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @C(constants.%T.8b3) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 9de267bac9ed..3a2b6395d9cd 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -92,7 +92,7 @@ class Outer(T:! type) { // CHECK:STDOUT: --- call.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -103,7 +103,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] -// CHECK:STDOUT: %Class.ab2: type = class_type @Class, @Class(%T, %N.356) [symbolic] +// CHECK:STDOUT: %Class.ab2: type = class_type @Class, @Class(%T.8b3, %N.356) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] @@ -113,15 +113,15 @@ class Outer(T:! type) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.a25: = bound_method %int_5.64b, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete] // CHECK:STDOUT: %Class.f29: type = class_type @Class, @Class(%ptr.235, %int_5.0f6) [concrete] @@ -159,7 +159,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -179,7 +179,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_21.1: = bound_method %int_5, %impl.elem0.loc6 [concrete = constants.%Convert.bound.4e6] -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_21.2: = bound_method %int_5, %specific_fn.loc6 [concrete = constants.%bound_method.a25] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %bound_method.loc6_21.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc6_21.2: %i32 = value_of_initializer %int.convert_checked.loc6 [concrete = constants.%int_5.0f6] @@ -199,7 +199,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_15, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %impl.elem0.loc9: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_19.1: = bound_method %int_0, %impl.elem0.loc9 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_19.2: = bound_method %int_0, %specific_fn.loc9 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %bound_method.loc9_19.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc9_19.3: %i32 = value_of_initializer %int.convert_checked.loc9 [concrete = constants.%int_0.6a9] @@ -210,7 +210,7 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) { -// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -225,8 +225,8 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T, constants.%N.356) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%T +// CHECK:STDOUT: specific @Class(constants.%T.8b3, constants.%N.356) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%T.8b3 // CHECK:STDOUT: %N.loc4_23.2 => constants.%N.356 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index 0e43d366ee1a..2338650dd3ec 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -61,21 +61,21 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.588: = bound_method %N.51e, %Convert.960 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f9c: = bound_method %N.51e, %Convert.specific_fn.8a8 [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method.f9c(%N.51e) [symbolic] -// CHECK:STDOUT: %iN.builtin.8fe: type = int_type signed, %int.convert_checked [symbolic] +// CHECK:STDOUT: %int.convert_checked.12c: init Core.IntLiteral = call %bound_method.f9c(%N.51e) [symbolic] +// CHECK:STDOUT: %iN.builtin.8fe: type = int_type signed, %int.convert_checked.12c [symbolic] // CHECK:STDOUT: %require_complete.e34: = require_complete_type %iN.builtin.8fe [symbolic] // CHECK:STDOUT: %A.elem.07f: type = unbound_element_type %A.dd3, %iN.builtin.8fe [symbolic] // CHECK:STDOUT: %struct_type.base.n: type = struct_type {.base: %B, .n: %iN.builtin.8fe} [symbolic] @@ -84,12 +84,12 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %A.6fc: type = class_type @A, @A(%int_0.6a9) [concrete] @@ -168,7 +168,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc15_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_12.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_12.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -199,7 +199,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %A.elem.loc7: type = unbound_element_type %A, constants.%B [symbolic = %A.elem.loc7 (constants.%A.elem.500)] // CHECK:STDOUT: %Convert.bound: = bound_method %N.loc6_9.2, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound.588)] // CHECK:STDOUT: %bound_method.loc12_14.3: = bound_method %N.loc6_9.2, constants.%Convert.specific_fn.8a8 [symbolic = %bound_method.loc12_14.3 (constants.%bound_method.f9c)] -// CHECK:STDOUT: %int.convert_checked.loc12_14.2: init Core.IntLiteral = call %bound_method.loc12_14.3(%N.loc6_9.2) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc12_14.2: init Core.IntLiteral = call %bound_method.loc12_14.3(%N.loc6_9.2) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked.12c)] // CHECK:STDOUT: %iN.builtin: type = int_type signed, %int.convert_checked.loc12_14.2 [symbolic = %iN.builtin (constants.%iN.builtin.8fe)] // CHECK:STDOUT: %require_complete: = require_complete_type %iN.builtin [symbolic = %require_complete (constants.%require_complete.e34)] // CHECK:STDOUT: %A.elem.loc12: type = unbound_element_type %A, %iN.builtin [symbolic = %A.elem.loc12 (constants.%A.elem.07f)] @@ -213,11 +213,11 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc6_9.1 [symbolic = %N.loc6_9.2 (constants.%N.51e)] // CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc12_14.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound.588)] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc12_14.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc12_14.3 (constants.%bound_method.f9c)] -// CHECK:STDOUT: %int.convert_checked.loc12_14.1: init Core.IntLiteral = call %bound_method.loc12_14.2(%N.ref) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc12_14.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc12_14.2: Core.IntLiteral = converted %N.ref, %.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc12_14.1: init Core.IntLiteral = call %bound_method.loc12_14.2(%N.ref) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked.12c)] +// CHECK:STDOUT: %.loc12_14.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked.12c)] +// CHECK:STDOUT: %.loc12_14.2: Core.IntLiteral = converted %N.ref, %.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked.12c)] // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_14.2) [symbolic = %iN.builtin (constants.%iN.builtin.8fe)] // CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed [symbolic = %iN.builtin (constants.%iN.builtin.8fe)] // CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed, %.loc12_15.1 [symbolic = %iN.builtin (constants.%iN.builtin.8fe)] diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index d597b82b5ba0..ba5335bb2fc6 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -91,20 +91,20 @@ class Class(U:! type) { // CHECK:STDOUT: --- foo.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [concrete] // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [concrete] -// CHECK:STDOUT: %CompleteClass.f97: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %CompleteClass.f97: type = class_type @CompleteClass, @CompleteClass(%T.8b3) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type %CompleteClass.f97, %i32 [symbolic] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %F.type.14f: type = fn_type @F.1, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %F.type.14f: type = fn_type @F.1, @CompleteClass(%T.8b3) [symbolic] // CHECK:STDOUT: %F.874: %F.type.14f = struct_value () [symbolic] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.54b: = complete_type_witness %struct_type.n [concrete] @@ -114,15 +114,15 @@ class Class(U:! type) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %CompleteClass.e9e: type = class_type @CompleteClass, @CompleteClass(%i32) [concrete] @@ -155,12 +155,12 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %CompleteClass.decl: %CompleteClass.type = class_decl @CompleteClass [concrete = constants.%CompleteClass.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc6_21.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_21.2 (constants.%T)] +// CHECK:STDOUT: %T.loc6_21.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_21.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.b25 = fn_decl @F.2 [concrete = constants.%F.c41] { // CHECK:STDOUT: %return.patt: %pattern_type.0b0 = return_slot_pattern [concrete] @@ -176,13 +176,13 @@ class Class(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type) { -// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: class; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @CompleteClass(%T.loc6_21.1: type) { -// CHECK:STDOUT: %T.loc6_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_21.2 (constants.%T)] +// CHECK:STDOUT: %T.loc6_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_21.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T.loc6_21.2) [symbolic = %CompleteClass (constants.%CompleteClass.f97)] @@ -222,7 +222,7 @@ class Class(U:! type) { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_27.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc8_27.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -233,12 +233,12 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %CompleteClass.e9e; // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%T +// CHECK:STDOUT: specific @Class(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(constants.%T) { -// CHECK:STDOUT: %T.loc6_21.2 => constants.%T +// CHECK:STDOUT: specific @CompleteClass(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc6_21.2 => constants.%T.8b3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.f97 @@ -247,7 +247,7 @@ class Class(U:! type) { // CHECK:STDOUT: %F => constants.%F.874 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T) {} +// CHECK:STDOUT: specific @F.1(constants.%T.8b3) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%i32) { // CHECK:STDOUT: %T.loc6_21.2 => constants.%i32 @@ -256,31 +256,32 @@ class Class(U:! type) { // CHECK:STDOUT: --- foo.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.595: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.595 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %Convert.type.9a6: type = fn_type @Convert.2, @impl.a8d(%To.c80) [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] +// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] +// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] +// CHECK:STDOUT: %Convert.type.9a6: type = fn_type @Convert.3, @impl.a8d(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.458: %Convert.type.9a6 = struct_value () [symbolic] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] -// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.8b3) [symbolic] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.8b3 [symbolic] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %T.8b3} [symbolic] // CHECK:STDOUT: %complete_type.433: = complete_type_witness %struct_type.x [symbolic] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [concrete] // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.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: %struct_type.n.4d6: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.a68: = complete_type_witness %struct_type.n.4d6 [concrete] -// CHECK:STDOUT: %CompleteClass.f97: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %CompleteClass.f97: type = class_type @CompleteClass, @CompleteClass(%T.8b3) [symbolic] // CHECK:STDOUT: %CompleteClass.elem.9ef: type = unbound_element_type %CompleteClass.f97, %i32 [symbolic] -// CHECK:STDOUT: %F.type.14f: type = fn_type @F.1, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %F.type.14f: type = fn_type @F.1, @CompleteClass(%T.8b3) [symbolic] // CHECK:STDOUT: %F.874: %F.type.14f = struct_value () [symbolic] // CHECK:STDOUT: %CompleteClass.a06: type = class_type @CompleteClass, @CompleteClass(%i32) [concrete] // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %CompleteClass.a06 [concrete] @@ -289,17 +290,16 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.elem.426: type = unbound_element_type %CompleteClass.a06, %i32 [concrete] // CHECK:STDOUT: %F.type.0aa: type = fn_type @F.1, @CompleteClass(%i32) [concrete] // CHECK:STDOUT: %F.971: %F.type.0aa = struct_value () [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %struct_type.n.44a: type = struct_type {.n: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.b9e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.ea0: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.1ad, @impl.a8d(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.2, @impl.a8d(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.3, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.4cb: %Convert.type.e14 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.23e: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] +// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet.23e [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.4cb [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.47b: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %CompleteClass.val: %CompleteClass.a06 = struct_value (%int_1.47b) [concrete] @@ -313,15 +313,15 @@ class Class(U:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.773: @impl.a8d.%Convert.type (%Convert.type.9a6) = import_ref Main//foo, inst140 [indirect], loaded [symbolic = @impl.a8d.%Convert (constants.%Convert.458)] +// CHECK:STDOUT: %Main.import_ref.773: @impl.a8d.%Convert.type (%Convert.type.9a6) = import_ref Main//foo, inst176 [indirect], loaded [symbolic = @impl.a8d.%Convert (constants.%Convert.458)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (%Main.import_ref.773), @impl.a8d [concrete] -// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc4_13, loaded [symbolic = @Class.%T.1 (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc4_13, loaded [symbolic = @Class.%T.1 (constants.%T.8b3)] +// CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T.8b3)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.a68] // CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst33 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.051 = import_ref Main//foo, loc7_8, unloaded // CHECK:STDOUT: %Main.import_ref.570 = import_ref Main//foo, loc8_17, unloaded -// CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.595 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } @@ -339,7 +339,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %T.loc4: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type.b25 = fn_decl @F.2 [concrete = constants.%F.c41] { // CHECK:STDOUT: %return.patt: %pattern_type.84b = return_slot_pattern [concrete] @@ -355,19 +355,19 @@ class Class(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class(imports.%Main.import_ref.5ab3ec.1: type) { -// CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.1 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.1 [symbolic = %Class.elem (constants.%Class.elem)] -// CHECK:STDOUT: %struct_type.x.loc6_1.2: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %struct_type.x.loc6_1.2 (constants.%struct_type.x)] +// CHECK:STDOUT: %struct_type.x.loc6_1.2: type = struct_type {.x: @Class.%T.1 (%T.8b3)} [symbolic = %struct_type.x.loc6_1.2 (constants.%struct_type.x)] // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness %struct_type.x.loc6_1.2 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.433)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T.8b3)] // CHECK:STDOUT: %.loc5: @Class.%Class.elem (%Class.elem) = field_decl x, element0 [concrete] -// CHECK:STDOUT: %struct_type.x.loc6_1.1: type = struct_type {.x: %T} [symbolic = %struct_type.x.loc6_1.2 (constants.%struct_type.x)] +// CHECK:STDOUT: %struct_type.x.loc6_1.1: type = struct_type {.x: %T.8b3} [symbolic = %struct_type.x.loc6_1.2 (constants.%struct_type.x)] // CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.loc6_1.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.433)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 // CHECK:STDOUT: @@ -379,7 +379,7 @@ class Class(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @CompleteClass(imports.%Main.import_ref.5ab3ec.2: type) [from "foo.carbon"] { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.f97)] @@ -409,7 +409,7 @@ class Class(U:! type) { // CHECK:STDOUT: %.loc9_17.1: %struct_type.n.44a = struct_literal (%int_1) // CHECK:STDOUT: %impl.elem0: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc9_17.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_17.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_17.2(%int_1) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc9_17.2: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.47b] @@ -420,12 +420,12 @@ class Class(U:! type) { // CHECK:STDOUT: return %.loc9_18 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T) { -// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: specific @Class(constants.%T.8b3) { +// CHECK:STDOUT: %T.1 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @CompleteClass(constants.%T.8b3) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.f97 @@ -434,7 +434,7 @@ class Class(U:! type) { // CHECK:STDOUT: %F => constants.%F.874 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T) {} +// CHECK:STDOUT: specific @F.1(constants.%T.8b3) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%i32) { // CHECK:STDOUT: %T => constants.%i32 @@ -646,10 +646,10 @@ class Class(U:! type) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.a68: = complete_type_witness %struct_type.n [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %CompleteClass.f97: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %CompleteClass.f97: type = class_type @CompleteClass, @CompleteClass(%T.8b3) [symbolic] // CHECK:STDOUT: %CompleteClass.elem.9ef: type = unbound_element_type %CompleteClass.f97, %i32 [symbolic] -// CHECK:STDOUT: %F.type.14f: type = fn_type @F.1, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %F.type.14f: type = fn_type @F.1, @CompleteClass(%T.8b3) [symbolic] // CHECK:STDOUT: %F.874: %F.type.14f = struct_value () [symbolic] // CHECK:STDOUT: %ptr.9e1: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %CompleteClass.0fe: type = class_type @CompleteClass, @CompleteClass(%ptr.9e1) [concrete] @@ -677,12 +677,12 @@ class Class(U:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T.8b3)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.a68] // CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst33 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.051 = import_ref Main//foo, loc7_8, unloaded // CHECK:STDOUT: %Main.import_ref.570 = import_ref Main//foo, loc8_17, unloaded -// CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T.8b3)] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } @@ -701,7 +701,7 @@ class Class(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @CompleteClass(imports.%Main.import_ref.5ab3ec.1: type) [from "foo.carbon"] { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.f97)] @@ -750,8 +750,8 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2 [from "foo.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @CompleteClass(constants.%T.8b3) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.f97 @@ -760,7 +760,7 @@ class Class(U:! type) { // CHECK:STDOUT: %F => constants.%F.874 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T) {} +// CHECK:STDOUT: specific @F.1(constants.%T.8b3) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%ptr.9e1) { // CHECK:STDOUT: %T => constants.%ptr.9e1 @@ -785,14 +785,14 @@ class Class(U:! type) { // CHECK:STDOUT: --- fail_foo.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] +// CHECK:STDOUT: %U.8b3: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %Class.type.cf06d9.1: type = generic_class_type @Class.1 [concrete] // CHECK:STDOUT: %Class.generic.9545f5.1: %Class.type.cf06d9.1 = struct_value () [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Class.type.cf06d9.2: type = generic_class_type @Class.2 [concrete] // CHECK:STDOUT: %Class.generic.9545f5.2: %Class.type.cf06d9.2 = struct_value () [concrete] -// CHECK:STDOUT: %Class.fe1b2d.2: type = class_type @Class.2, @Class.2(%U) [symbolic] +// CHECK:STDOUT: %Class.fe1b2d.2: type = class_type @Class.2, @Class.2(%U.8b3) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -803,7 +803,7 @@ class Class(U:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//foo, loc4_13, loaded [symbolic = @Class.1.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//foo, loc4_13, loaded [symbolic = @Class.1.%T (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -820,18 +820,18 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.decl: %Class.type.cf06d9.2 = class_decl @Class.2 [concrete = constants.%Class.generic.9545f5.2] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.loc12_13.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_13.2 (constants.%U)] +// CHECK:STDOUT: %U.loc12_13.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_13.2 (constants.%U.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class.1(imports.%Main.import_ref.5ab: type) [from "foo.carbon"] { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: class; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class.2(%U.loc12_13.1: type) { -// CHECK:STDOUT: %U.loc12_13.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_13.2 (constants.%U)] +// CHECK:STDOUT: %U.loc12_13.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_13.2 (constants.%U.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -849,11 +849,11 @@ class Class(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class.1(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Class.1(constants.%T.8b3) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class.2(constants.%U) { -// CHECK:STDOUT: %U.loc12_13.2 => constants.%U +// CHECK:STDOUT: specific @Class.2(constants.%U.8b3) { +// CHECK:STDOUT: %U.loc12_13.2 => constants.%U.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index bc00833aaa10..d09aa5dd4f63 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -58,19 +58,19 @@ fn Test() -> i32 { // CHECK:STDOUT: --- class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [concrete] // CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [concrete] -// CHECK:STDOUT: %Outer.9d6: type = class_type @Outer, @Outer(%T) [symbolic] -// CHECK:STDOUT: %Inner.51b: type = class_type @Inner, @Inner(%T) [symbolic] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %Inner.elem.310: type = unbound_element_type %Inner.51b, %T [symbolic] -// CHECK:STDOUT: %struct_type.n.848: type = struct_type {.n: %T} [symbolic] +// CHECK:STDOUT: %Outer.9d6: type = class_type @Outer, @Outer(%T.8b3) [symbolic] +// CHECK:STDOUT: %Inner.51b: type = class_type @Inner, @Inner(%T.8b3) [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] +// CHECK:STDOUT: %Inner.elem.310: type = unbound_element_type %Inner.51b, %T.8b3 [symbolic] +// CHECK:STDOUT: %struct_type.n.848: type = struct_type {.n: %T.8b3} [symbolic] // CHECK:STDOUT: %complete_type.84b: = complete_type_witness %struct_type.n.848 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %pattern_type.253: type = pattern_type %Inner.51b [symbolic] -// CHECK:STDOUT: %F.type.2ee: type = fn_type @F, @Outer(%T) [symbolic] +// CHECK:STDOUT: %F.type.2ee: type = fn_type @F, @Outer(%T.8b3) [symbolic] // CHECK:STDOUT: %F.384: %F.type.2ee = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -99,15 +99,15 @@ fn Test() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -135,7 +135,7 @@ fn Test() -> i32 { // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] @@ -149,7 +149,7 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Outer(%T.loc4_13.1: type) { -// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(%T.loc4_13.2) [symbolic = %Inner (constants.%Inner.51b)] @@ -164,11 +164,11 @@ fn Test() -> i32 { // CHECK:STDOUT: %return.patt: @F.%pattern_type.loc9_14 (%pattern_type.253) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc9_14 (%pattern_type.253) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_17: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner (constants.%Inner.51b)] +// CHECK:STDOUT: %.loc9_17: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T.8b3) [symbolic = %Inner (constants.%Inner.51b)] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc9_17 [symbolic = %Inner (constants.%Inner.51b)] -// CHECK:STDOUT: %n.param: @F.%T (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %n: @F.%T (%T) = bind_name n, %n.param +// CHECK:STDOUT: %n.param: @F.%T (%T.8b3) = value_param call_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T.8b3)] +// CHECK:STDOUT: %n: @F.%T (%T.8b3) = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref @F.%Inner (%Inner.51b) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%Inner (%Inner.51b) = return_slot %return.param // CHECK:STDOUT: } @@ -186,17 +186,17 @@ fn Test() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_13.1: type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(%T) [symbolic = %Inner (constants.%Inner.51b)] // CHECK:STDOUT: %Inner.elem: type = unbound_element_type %Inner, %T [symbolic = %Inner.elem (constants.%Inner.elem.310)] -// CHECK:STDOUT: %struct_type.n.loc7_3.2: type = struct_type {.n: @Inner.%T (%T)} [symbolic = %struct_type.n.loc7_3.2 (constants.%struct_type.n.848)] +// CHECK:STDOUT: %struct_type.n.loc7_3.2: type = struct_type {.n: @Inner.%T (%T.8b3)} [symbolic = %struct_type.n.loc7_3.2 (constants.%struct_type.n.848)] // CHECK:STDOUT: %complete_type.loc7_3.2: = complete_type_witness %struct_type.n.loc7_3.2 [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.84b)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %.loc6: @Inner.%Inner.elem (%Inner.elem.310) = field_decl n, element0 [concrete] -// CHECK:STDOUT: %struct_type.n.loc7_3.1: type = struct_type {.n: %T} [symbolic = %struct_type.n.loc7_3.2 (constants.%struct_type.n.848)] +// CHECK:STDOUT: %struct_type.n.loc7_3.1: type = struct_type {.n: %T.8b3} [symbolic = %struct_type.n.loc7_3.2 (constants.%struct_type.n.848)] // CHECK:STDOUT: %complete_type.loc7_3.1: = complete_type_witness %struct_type.n.loc7_3.1 [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.84b)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc7_3.1 // CHECK:STDOUT: @@ -208,7 +208,7 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@Outer.%T.loc4_13.1: type) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type.loc9_8: type = pattern_type %T [symbolic = %pattern_type.loc9_8 (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(%T) [symbolic = %Inner (constants.%Inner.51b)] // CHECK:STDOUT: %pattern_type.loc9_14: type = pattern_type %Inner [symbolic = %pattern_type.loc9_14 (constants.%pattern_type.253)] @@ -216,14 +216,14 @@ fn Test() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc9_14: = require_complete_type %Inner [symbolic = %require_complete.loc9_14 (constants.%require_complete.561)] // CHECK:STDOUT: %require_complete.loc9_9: = require_complete_type %T [symbolic = %require_complete.loc9_9 (constants.%require_complete.4ae)] -// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @F.%T (%T)} [symbolic = %struct_type.n (constants.%struct_type.n.848)] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @F.%T (%T.8b3)} [symbolic = %struct_type.n (constants.%struct_type.n.848)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%n.param: @F.%T (%T)) -> %return.param: @F.%Inner (%Inner.51b) { +// CHECK:STDOUT: fn(%n.param: @F.%T (%T.8b3)) -> %return.param: @F.%Inner (%Inner.51b) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: @F.%T (%T) = name_ref n, %n +// CHECK:STDOUT: %n.ref: @F.%T (%T.8b3) = name_ref n, %n // CHECK:STDOUT: %.loc9_39.1: @F.%struct_type.n (%struct_type.n.848) = struct_literal (%n.ref) -// CHECK:STDOUT: %.loc9_39.2: ref @F.%T (%T) = class_element_access %return, element0 -// CHECK:STDOUT: %.loc9_39.3: init @F.%T (%T) = initialize_from %n.ref to %.loc9_39.2 +// CHECK:STDOUT: %.loc9_39.2: ref @F.%T (%T.8b3) = class_element_access %return, element0 +// CHECK:STDOUT: %.loc9_39.3: init @F.%T (%T.8b3) = initialize_from %n.ref to %.loc9_39.2 // CHECK:STDOUT: %.loc9_39.4: init @F.%Inner (%Inner.51b) = class_init (%.loc9_39.3), %return // CHECK:STDOUT: %.loc9_40: init @F.%Inner (%Inner.51b) = converted %.loc9_39.1, %.loc9_39.4 // CHECK:STDOUT: return %.loc9_40 to %return @@ -248,7 +248,7 @@ fn Test() -> i32 { // CHECK:STDOUT: %.loc13_3: ref %Inner.721 = splice_block %c.var {} // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_42.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_42.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc13_42.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc13_42.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -271,8 +271,8 @@ fn Test() -> i32 { // CHECK:STDOUT: return %.loc14_11.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(constants.%T) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%T +// CHECK:STDOUT: specific @Outer(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%T.8b3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner => constants.%Inner.51b @@ -280,9 +280,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %F => constants.%F.384 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(constants.%T) { +// CHECK:STDOUT: specific @Inner(constants.%T.8b3) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: %Inner => constants.%Inner.51b // CHECK:STDOUT: %Inner.elem => constants.%Inner.elem.310 @@ -290,8 +290,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %complete_type.loc7_3.2 => constants.%complete_type.84b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.8b3) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %pattern_type.loc9_8 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: %Inner => constants.%Inner.51b // CHECK:STDOUT: %pattern_type.loc9_14 => constants.%pattern_type.253 @@ -331,36 +331,36 @@ fn Test() -> i32 { // CHECK:STDOUT: --- interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [concrete] // CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [concrete] -// CHECK:STDOUT: %Outer.9d6: type = class_type @Outer, @Outer(%T) [symbolic] -// CHECK:STDOUT: %Inner.type.392: type = facet_type <@Inner, @Inner(%T)> [symbolic] +// CHECK:STDOUT: %Outer.9d6: type = class_type @Outer, @Outer(%T.8b3) [symbolic] +// CHECK:STDOUT: %Inner.type.392: type = facet_type <@Inner, @Inner(%T.8b3)> [symbolic] // CHECK:STDOUT: %Self.770: %Inner.type.392 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Self.as_type.ea1: type = facet_access_type %Self.770 [symbolic] // CHECK:STDOUT: %pattern_type.81e: type = pattern_type %Self.as_type.ea1 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] -// CHECK:STDOUT: %F.type.0f3: type = fn_type @F.1, @Inner(%T) [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] +// CHECK:STDOUT: %F.type.0f3: type = fn_type @F.1, @Inner(%T.8b3) [symbolic] // CHECK:STDOUT: %F.db9: %F.type.0f3 = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.assoc_type.115: type = assoc_entity_type @Inner, @Inner(%T) [symbolic] +// CHECK:STDOUT: %Inner.assoc_type.115: type = assoc_entity_type @Inner, @Inner(%T.8b3) [symbolic] // CHECK:STDOUT: %assoc0.95e: %Inner.assoc_type.115 = assoc_entity element0, @Inner.%F.decl [symbolic] -// CHECK:STDOUT: %C.390: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.390: type = class_type @C, @C(%T.8b3) [symbolic] // CHECK:STDOUT: %require_complete.8fa: = require_complete_type %Inner.type.392 [symbolic] -// CHECK:STDOUT: %Inner.impl_witness.b15: = impl_witness @C.%Inner.impl_witness_table, @impl.eed(%T) [symbolic] +// CHECK:STDOUT: %Inner.impl_witness.b15: = impl_witness @C.%Inner.impl_witness_table, @impl.eed(%T.8b3) [symbolic] // CHECK:STDOUT: %pattern_type.e59: type = pattern_type %C.390 [symbolic] -// CHECK:STDOUT: %F.type.77b: type = fn_type @F.2, @impl.eed(%T) [symbolic] +// CHECK:STDOUT: %F.type.77b: type = fn_type @F.2, @impl.eed(%T.8b3) [symbolic] // CHECK:STDOUT: %F.ed9: %F.type.77b = struct_value () [symbolic] // CHECK:STDOUT: %Inner.facet.9a3: %Inner.type.392 = facet_value %C.390, (%Inner.impl_witness.b15) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] // CHECK:STDOUT: %require_complete.930: = require_complete_type %C.390 [symbolic] -// CHECK:STDOUT: %Inner.lookup_impl_witness: = lookup_impl_witness %C.390, @Inner, @Inner(%T) [symbolic] +// CHECK:STDOUT: %Inner.lookup_impl_witness: = lookup_impl_witness %C.390, @Inner, @Inner(%T.8b3) [symbolic] // CHECK:STDOUT: %Inner.facet.c18: %Inner.type.392 = facet_value %C.390, (%Inner.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %.692: type = fn_type_with_self_type %F.type.0f3, %Inner.facet.c18 [symbolic] -// CHECK:STDOUT: %impl.elem0: %.692 = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @F.1(%T, %Inner.facet.c18) [symbolic] +// CHECK:STDOUT: %impl.elem0.681: %.692 = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.d7c: = specific_impl_function %impl.elem0.681, @F.1(%T.8b3, %Inner.facet.c18) [symbolic] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -415,7 +415,7 @@ fn Test() -> i32 { // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] { @@ -431,7 +431,7 @@ fn Test() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Inner(@Outer.%T.loc4_13.1: type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T)> [symbolic = %Inner.type (constants.%Inner.type.392)] // CHECK:STDOUT: %Self.2: @Inner.%Inner.type (%Inner.type.392) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.770)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @Inner(%T) [symbolic = %F.type (constants.%F.type.0f3)] @@ -447,17 +447,17 @@ fn Test() -> i32 { // CHECK:STDOUT: %return.patt: @F.1.%pattern_type.loc6_24 (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type.loc6_24 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc6_16.1 (%Self.as_type.ea1) = value_param call_param0 // CHECK:STDOUT: %.loc6_16.1: type = splice_block %.loc6_16.3 [symbolic = %Self.as_type.loc6_16.1 (constants.%Self.as_type.ea1)] { -// CHECK:STDOUT: %.loc6_16.2: @F.1.%Inner.type (%Inner.type.392) = specific_constant @Inner.%Self.1, @Inner(constants.%T) [symbolic = %Self (constants.%Self.770)] +// CHECK:STDOUT: %.loc6_16.2: @F.1.%Inner.type (%Inner.type.392) = specific_constant @Inner.%Self.1, @Inner(constants.%T.8b3) [symbolic = %Self (constants.%Self.770)] // CHECK:STDOUT: %Self.ref: @F.1.%Inner.type (%Inner.type.392) = name_ref Self, %.loc6_16.2 [symbolic = %Self (constants.%Self.770)] // CHECK:STDOUT: %Self.as_type.loc6_16.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_16.1 (constants.%Self.as_type.ea1)] // CHECK:STDOUT: %.loc6_16.3: type = converted %Self.ref, %Self.as_type.loc6_16.2 [symbolic = %Self.as_type.loc6_16.1 (constants.%Self.as_type.ea1)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc6_16.1 (%Self.as_type.ea1) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.1.%T (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.1.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.1.%T (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.1.%T (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0.loc6_28.1: @Inner.%Inner.assoc_type (%Inner.assoc_type.115) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc6_28.2 (constants.%assoc0.95e)] // CHECK:STDOUT: @@ -470,7 +470,7 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.eed(@Outer.%T.loc4_13.1: type) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.390)] // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T)> [symbolic = %Inner.type (constants.%Inner.type.392)] // CHECK:STDOUT: %require_complete: = require_complete_type %Inner.type [symbolic = %require_complete (constants.%require_complete.8fa)] @@ -487,15 +487,15 @@ fn Test() -> i32 { // CHECK:STDOUT: %return.patt: @F.2.%pattern_type.loc11_23 (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.2.%pattern_type.loc11_23 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %self.param: @F.2.%C (%C.390) = value_param call_param0 // CHECK:STDOUT: %.loc11_18.1: type = splice_block %C.ref [symbolic = %C (constants.%C.390)] { -// CHECK:STDOUT: %.loc11_18.2: type = specific_constant @Outer.%C.decl, @Outer(constants.%T) [symbolic = %C (constants.%C.390)] +// CHECK:STDOUT: %.loc11_18.2: type = specific_constant @Outer.%C.decl, @Outer(constants.%T.8b3) [symbolic = %C (constants.%C.390)] // CHECK:STDOUT: %C.ref: type = name_ref C, %.loc11_18.2 [symbolic = %C (constants.%C.390)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.2.%C (%C.390) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.2.%T (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.2.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.2.%T (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.2.%T (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -530,7 +530,7 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Outer(%T.loc4_13.1: type) { -// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T.loc4_13.2)> [symbolic = %Inner.type (constants.%Inner.type.392)] @@ -557,11 +557,11 @@ fn Test() -> i32 { // CHECK:STDOUT: class { // CHECK:STDOUT: impl_decl @impl.eed [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C.390 [symbolic = %C (constants.%C.390)] -// CHECK:STDOUT: %.loc10: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.type (constants.%Inner.type.392)] +// CHECK:STDOUT: %.loc10: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T.8b3) [symbolic = %Inner.type (constants.%Inner.type.392)] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc10 [symbolic = %Inner.type (constants.%Inner.type.392)] // CHECK:STDOUT: } // CHECK:STDOUT: %Inner.impl_witness_table = impl_witness_table (@impl.eed.%F.decl), @impl.eed [concrete] -// CHECK:STDOUT: %Inner.impl_witness: = impl_witness %Inner.impl_witness_table, @impl.eed(constants.%T) [symbolic = @impl.eed.%Inner.impl_witness (constants.%Inner.impl_witness.b15)] +// CHECK:STDOUT: %Inner.impl_witness: = impl_witness %Inner.impl_witness_table, @impl.eed(constants.%T.8b3) [symbolic = @impl.eed.%Inner.impl_witness (constants.%Inner.impl_witness.b15)] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -597,18 +597,18 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@Outer.%T.loc4_13.1: type, @Inner.%Self.1: @Inner.%Inner.type (%Inner.type.392)) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T)> [symbolic = %Inner.type (constants.%Inner.type.392)] // CHECK:STDOUT: %Self: @F.1.%Inner.type (%Inner.type.392) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.770)] // CHECK:STDOUT: %Self.as_type.loc6_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_16.1 (constants.%Self.as_type.ea1)] // CHECK:STDOUT: %pattern_type.loc6_10: type = pattern_type %Self.as_type.loc6_16.1 [symbolic = %pattern_type.loc6_10 (constants.%pattern_type.81e)] // CHECK:STDOUT: %pattern_type.loc6_24: type = pattern_type %T [symbolic = %pattern_type.loc6_24 (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc6_16.1 (%Self.as_type.ea1)) -> @F.1.%T (%T); +// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc6_16.1 (%Self.as_type.ea1)) -> @F.1.%T (%T.8b3); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.2(@Outer.%T.loc4_13.1: type) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.390)] // CHECK:STDOUT: %pattern_type.loc11_12: type = pattern_type %C [symbolic = %pattern_type.loc11_12 (constants.%pattern_type.e59)] // CHECK:STDOUT: %pattern_type.loc11_23: type = pattern_type %T [symbolic = %pattern_type.loc11_23 (constants.%pattern_type.7dcd0a.1)] @@ -624,23 +624,23 @@ fn Test() -> i32 { // CHECK:STDOUT: %F.type: type = fn_type @F.1, @Inner(%T) [symbolic = %F.type (constants.%F.type.0f3)] // CHECK:STDOUT: %Inner.facet: @F.2.%Inner.type (%Inner.type.392) = facet_value %C, (%Inner.lookup_impl_witness) [symbolic = %Inner.facet (constants.%Inner.facet.c18)] // CHECK:STDOUT: %.loc11_41: type = fn_type_with_self_type %F.type, %Inner.facet [symbolic = %.loc11_41 (constants.%.692)] -// CHECK:STDOUT: %impl.elem0.loc11_41.2: @F.2.%.loc11_41 (%.692) = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc11_41.2: = specific_impl_function %impl.elem0.loc11_41.2, @F.1(%T, %Inner.facet) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %impl.elem0.loc11_41.2: @F.2.%.loc11_41 (%.692) = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0.681)] +// CHECK:STDOUT: %specific_impl_fn.loc11_41.2: = specific_impl_function %impl.elem0.loc11_41.2, @F.1(%T, %Inner.facet) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn.d7c)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.2.%C (%C.390)) -> @F.2.%T (%T) { +// CHECK:STDOUT: fn(%self.param: @F.2.%C (%C.390)) -> @F.2.%T (%T.8b3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @F.2.%C (%C.390) = name_ref self, %self -// CHECK:STDOUT: %.loc11_43: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.type (constants.%Inner.type.392)] +// CHECK:STDOUT: %.loc11_43: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T.8b3) [symbolic = %Inner.type (constants.%Inner.type.392)] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc11_43 [symbolic = %Inner.type (constants.%Inner.type.392)] -// CHECK:STDOUT: %.loc11_48: @F.2.%Inner.assoc_type (%Inner.assoc_type.115) = specific_constant @Inner.%assoc0.loc6_28.1, @Inner(constants.%T) [symbolic = %assoc0 (constants.%assoc0.95e)] +// CHECK:STDOUT: %.loc11_48: @F.2.%Inner.assoc_type (%Inner.assoc_type.115) = specific_constant @Inner.%assoc0.loc6_28.1, @Inner(constants.%T.8b3) [symbolic = %assoc0 (constants.%assoc0.95e)] // CHECK:STDOUT: %F.ref: @F.2.%Inner.assoc_type (%Inner.assoc_type.115) = name_ref F, %.loc11_48 [symbolic = %assoc0 (constants.%assoc0.95e)] -// CHECK:STDOUT: %impl.elem0.loc11_41.1: @F.2.%.loc11_41 (%.692) = impl_witness_access constants.%Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc11_41.1: @F.2.%.loc11_41 (%.692) = impl_witness_access constants.%Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0.681)] // CHECK:STDOUT: %bound_method.loc11_41: = bound_method %self.ref, %impl.elem0.loc11_41.1 -// CHECK:STDOUT: %specific_impl_fn.loc11_41.1: = specific_impl_function %impl.elem0.loc11_41.1, @F.1(constants.%T, constants.%Inner.facet.c18) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc11_41.1: = specific_impl_function %impl.elem0.loc11_41.1, @F.1(constants.%T.8b3, constants.%Inner.facet.c18) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn.d7c)] // CHECK:STDOUT: %bound_method.loc11_52: = bound_method %self.ref, %specific_impl_fn.loc11_41.1 -// CHECK:STDOUT: %.loc11_52: init @F.2.%T (%T) = call %bound_method.loc11_52(%self.ref) -// CHECK:STDOUT: %.loc11_53.1: @F.2.%T (%T) = value_of_initializer %.loc11_52 -// CHECK:STDOUT: %.loc11_53.2: @F.2.%T (%T) = converted %.loc11_52, %.loc11_53.1 +// CHECK:STDOUT: %.loc11_52: init @F.2.%T (%T.8b3) = call %bound_method.loc11_52(%self.ref) +// CHECK:STDOUT: %.loc11_53.1: @F.2.%T (%T.8b3) = value_of_initializer %.loc11_52 +// CHECK:STDOUT: %.loc11_53.2: @F.2.%T (%T.8b3) = converted %.loc11_52, %.loc11_53.1 // CHECK:STDOUT: return %.loc11_53.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -687,17 +687,17 @@ fn Test() -> i32 { // CHECK:STDOUT: return %.loc24_34.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(constants.%T) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%T +// CHECK:STDOUT: specific @Outer(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%T.8b3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type => constants.%Inner.type.392 // CHECK:STDOUT: %C => constants.%C.390 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(constants.%T) { +// CHECK:STDOUT: specific @Inner(constants.%T.8b3) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.392 // CHECK:STDOUT: %Self.2 => constants.%Self.770 // CHECK:STDOUT: %F.type => constants.%F.type.0f3 @@ -706,8 +706,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %assoc0.loc6_28.2 => constants.%assoc0.95e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.770) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @F.1(constants.%T.8b3, constants.%Self.770) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.392 // CHECK:STDOUT: %Self => constants.%Self.770 // CHECK:STDOUT: %Self.as_type.loc6_16.1 => constants.%Self.as_type.ea1 @@ -715,12 +715,12 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { +// CHECK:STDOUT: specific @C(constants.%T.8b3) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.eed(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @impl.eed(constants.%T.8b3) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %C => constants.%C.390 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.392 // CHECK:STDOUT: %require_complete => constants.%require_complete.8fa @@ -731,15 +731,15 @@ fn Test() -> i32 { // CHECK:STDOUT: %F => constants.%F.ed9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @F.2(constants.%T.8b3) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %C => constants.%C.390 // CHECK:STDOUT: %pattern_type.loc11_12 => constants.%pattern_type.e59 // CHECK:STDOUT: %pattern_type.loc11_23 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%Inner.facet.9a3) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @F.1(constants.%T.8b3, constants.%Inner.facet.9a3) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.392 // CHECK:STDOUT: %Self => constants.%Inner.facet.9a3 // CHECK:STDOUT: %Self.as_type.loc6_16.1 => constants.%C.390 @@ -747,8 +747,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%Inner.facet.c18) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @F.1(constants.%T.8b3, constants.%Inner.facet.c18) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.392 // CHECK:STDOUT: %Self => constants.%Inner.facet.c18 // CHECK:STDOUT: %Self.as_type.loc6_16.1 => constants.%C.390 diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index 80cf7588cb40..376f9bad707a 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -350,15 +350,15 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_123.fff, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_123.fff, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_123.f7f: %i32 = int_value 123 [concrete] // CHECK:STDOUT: %C.4c3: type = class_type @C, @C(%int_123.f7f) [concrete] @@ -404,7 +404,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_13.1: = bound_method %int_123, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_13.2: = bound_method %int_123, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc13_13.2(%int_123) [concrete = constants.%int_123.f7f] // CHECK:STDOUT: %.loc13_13.2: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_123.f7f] @@ -473,15 +473,15 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -539,7 +539,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_25.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %impl.elem0.loc25_25.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_25.1: = bound_method %int_1, %impl.elem0.loc25_25.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc25_25.1: = specific_function %impl.elem0.loc25_25.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_25.1: = specific_function %impl.elem0.loc25_25.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_25.2: = bound_method %int_1, %specific_fn.loc25_25.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc25_25.1: init %i32 = call %bound_method.loc25_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc25_25.2: init %i32 = converted %int_1, %int.convert_checked.loc25_25.1 [concrete = constants.%int_1.5d2] @@ -548,7 +548,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_25.5: init %i32 = initialize_from %.loc25_25.2 to %.loc25_25.4 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc25_25.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_25.3: = bound_method %int_2, %impl.elem0.loc25_25.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc25_25.2: = specific_function %impl.elem0.loc25_25.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_25.2: = specific_function %impl.elem0.loc25_25.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_25.4: = bound_method %int_2, %specific_fn.loc25_25.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc25_25.2: init %i32 = call %bound_method.loc25_25.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc25_25.6: init %i32 = converted %int_2, %int.convert_checked.loc25_25.2 [concrete = constants.%int_2.ef8] @@ -604,7 +604,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %impl.elem0.loc25_53.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_53.1: = bound_method %int_3, %impl.elem0.loc25_53.1 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc25_53.1: = specific_function %impl.elem0.loc25_53.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_53.1: = specific_function %impl.elem0.loc25_53.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_53.2: = bound_method %int_3, %specific_fn.loc25_53.1 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc25_53.1: init %i32 = call %bound_method.loc25_53.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc25_53.2: init %i32 = converted %int_3, %int.convert_checked.loc25_53.1 [concrete = constants.%int_3.822] @@ -613,7 +613,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_53.5: init %i32 = initialize_from %.loc25_53.2 to %.loc25_53.4 [concrete = constants.%int_3.822] // CHECK:STDOUT: %impl.elem0.loc25_53.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_53.3: = bound_method %int_4, %impl.elem0.loc25_53.2 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc25_53.2: = specific_function %impl.elem0.loc25_53.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_53.2: = specific_function %impl.elem0.loc25_53.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_53.4: = bound_method %int_4, %specific_fn.loc25_53.2 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc25_53.2: init %i32 = call %bound_method.loc25_53.4(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc25_53.6: init %i32 = converted %int_4, %int.convert_checked.loc25_53.2 [concrete = constants.%int_4.940] diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 324cc2bf36f4..1a99edbcc43e 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -186,15 +186,15 @@ fn Run() { // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.6da: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0b2: type = fn_type @Convert.2, @impl.c81(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0b2: type = fn_type @Convert.3, @impl.c81(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.6d7: %Convert.type.0b2 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.e34: = impl_witness imports.%ImplicitAs.impl_witness_table.e36, @impl.c81(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.2, @impl.c81(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.3, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.16d: %Convert.type.ed5 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] -// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.2e7: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] +// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet.2e7 [concrete] // CHECK:STDOUT: %Convert.bound.43e: = bound_method %int_1.5b8, %Convert.16d [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.947: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.47b: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Field.val: %Field = struct_value (%int_1.47b) [concrete] @@ -317,7 +317,7 @@ fn Run() { // CHECK:STDOUT: %.loc9_25.1: %struct_type.x.c96 = struct_literal (%int_1) // CHECK:STDOUT: %impl.elem0.loc9: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc9_25.1: = bound_method %int_1, %impl.elem0.loc9 [concrete = constants.%Convert.bound.43e] -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_25.2: = bound_method %int_1, %specific_fn.loc9 [concrete = constants.%bound_method.947] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %bound_method.loc9_25.2(%int_1) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc9_25.2: init %i32 = converted %int_1, %int.convert_checked.loc9 [concrete = constants.%int_1.47b] @@ -334,7 +334,7 @@ fn Run() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc10: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc10_7.1: = bound_method %int_2, %impl.elem0.loc10 [concrete = constants.%Convert.bound.918] -// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_7.2: = bound_method %int_2, %specific_fn.loc10 [concrete = constants.%bound_method.c74] // CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %bound_method.loc10_7.2(%int_2) [concrete = constants.%int_2.d0d] // CHECK:STDOUT: %.loc10_7: init %i32 = converted %int_2, %int.convert_checked.loc10 [concrete = constants.%int_2.d0d] diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index 057c13ec7fb8..af897082718a 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -158,15 +158,15 @@ fn Run() { // CHECK:STDOUT: %ImplicitAs.type.9ba: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.6da: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0b2: type = fn_type @Convert.2, @impl.c81(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0b2: type = fn_type @Convert.3, @impl.c81(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.6d7: %Convert.type.0b2 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.e34: = impl_witness imports.%ImplicitAs.impl_witness_table.e36, @impl.c81(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.2, @impl.c81(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.3, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.16d: %Convert.type.ed5 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] -// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.2e7: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] +// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet.2e7 [concrete] // CHECK:STDOUT: %Convert.bound.9aa: = bound_method %int_0.5c6, %Convert.16d [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.8aa: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.263: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Convert.bound.43e: = bound_method %int_1.5b8, %Convert.16d [concrete] @@ -254,7 +254,7 @@ fn Run() { // CHECK:STDOUT: %.loc7_48.1: %struct_type.base.6c7 = struct_literal (%.loc7_47.1) // CHECK:STDOUT: %impl.elem0.loc7_47.1: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc7_47.1: = bound_method %int_0, %impl.elem0.loc7_47.1 [concrete = constants.%Convert.bound.9aa] -// CHECK:STDOUT: %specific_fn.loc7_47.1: = specific_function %impl.elem0.loc7_47.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7_47.1: = specific_function %impl.elem0.loc7_47.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_47.2: = bound_method %int_0, %specific_fn.loc7_47.1 [concrete = constants.%bound_method.8aa] // CHECK:STDOUT: %int.convert_checked.loc7_47.1: init %i32 = call %bound_method.loc7_47.2(%int_0) [concrete = constants.%int_0.263] // CHECK:STDOUT: %.loc7_47.2: init %i32 = converted %int_0, %int.convert_checked.loc7_47.1 [concrete = constants.%int_0.263] @@ -263,7 +263,7 @@ fn Run() { // CHECK:STDOUT: %.loc7_47.4: init %i32 = initialize_from %.loc7_47.2 to %.loc7_47.3 [concrete = constants.%int_0.263] // CHECK:STDOUT: %impl.elem0.loc7_47.2: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc7_47.3: = bound_method %int_1, %impl.elem0.loc7_47.2 [concrete = constants.%Convert.bound.43e] -// CHECK:STDOUT: %specific_fn.loc7_47.2: = specific_function %impl.elem0.loc7_47.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7_47.2: = specific_function %impl.elem0.loc7_47.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_47.4: = bound_method %int_1, %specific_fn.loc7_47.2 [concrete = constants.%bound_method.947] // CHECK:STDOUT: %int.convert_checked.loc7_47.2: init %i32 = call %bound_method.loc7_47.4(%int_1) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc7_47.5: init %i32 = converted %int_1, %int.convert_checked.loc7_47.2 [concrete = constants.%int_1.47b] @@ -284,7 +284,7 @@ fn Run() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc8: %.d6a = impl_witness_access constants.%ImplicitAs.impl_witness.e34, element0 [concrete = constants.%Convert.16d] // CHECK:STDOUT: %bound_method.loc8_7.1: = bound_method %int_2, %impl.elem0.loc8 [concrete = constants.%Convert.bound.918] -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_7.2: = bound_method %int_2, %specific_fn.loc8 [concrete = constants.%bound_method.c74] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %bound_method.loc8_7.2(%int_2) [concrete = constants.%int_2.d0d] // CHECK:STDOUT: %.loc8_7: init %i32 = converted %int_2, %int.convert_checked.loc8 [concrete = constants.%int_2.d0d] diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 75768b112523..035d8c500f9a 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -498,15 +498,15 @@ class B { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5.64b, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete] // CHECK:STDOUT: %SomeProtectedFunction.type: type = fn_type @SomeProtectedFunction [concrete] @@ -558,7 +558,7 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_38.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_38.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc5_38.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc5_38.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_5.0f6] @@ -623,7 +623,7 @@ class B { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_13.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc7_13.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_5.0f6] @@ -1014,15 +1014,15 @@ class B { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5.64b, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -1076,7 +1076,7 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_48.1: = bound_method %int_5.loc5, %impl.elem0.loc5 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_48.2: = bound_method %int_5.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %bound_method.loc5_48.2(%int_5.loc5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc5_48.1: %i32 = value_of_initializer %int.convert_checked.loc5 [concrete = constants.%int_5.0f6] @@ -1092,7 +1092,7 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_44.1: = bound_method %int_5.loc6, %impl.elem0.loc6 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_44.2: = bound_method %int_5.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %bound_method.loc6_44.2(%int_5.loc6) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc6_44.1: %i32 = value_of_initializer %int.convert_checked.loc6 [concrete = constants.%int_5.0f6] @@ -1119,7 +1119,7 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_42.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_42.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc10_42.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc10_42.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_5.0f6] diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index 50c04f8b533f..a27338f09699 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -42,15 +42,15 @@ fn F() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -116,7 +116,7 @@ fn F() -> i32 { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %impl.elem0.loc20_26.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_26.1: = bound_method %int_1, %impl.elem0.loc20_26.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc20_26.1: = specific_function %impl.elem0.loc20_26.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc20_26.1: = specific_function %impl.elem0.loc20_26.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_26.2: = bound_method %int_1, %specific_fn.loc20_26.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc20_26.1: init %i32 = call %bound_method.loc20_26.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_26.2: init %i32 = converted %int_1, %int.convert_checked.loc20_26.1 [concrete = constants.%int_1.5d2] @@ -125,7 +125,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc20_26.5: init %i32 = initialize_from %.loc20_26.2 to %.loc20_26.4 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc20_26.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_26.3: = bound_method %int_2, %impl.elem0.loc20_26.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc20_26.2: = specific_function %impl.elem0.loc20_26.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc20_26.2: = specific_function %impl.elem0.loc20_26.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_26.4: = bound_method %int_2, %specific_fn.loc20_26.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc20_26.2: init %i32 = call %bound_method.loc20_26.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc20_26.6: init %i32 = converted %int_2, %int.convert_checked.loc20_26.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/class/local.carbon b/toolchain/check/testdata/class/local.carbon index 252037a0b373..60d435548a79 100644 --- a/toolchain/check/testdata/class/local.carbon +++ b/toolchain/check/testdata/class/local.carbon @@ -53,15 +53,15 @@ class A { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %B.val: %B = struct_value (%int_1.5d2) [concrete] @@ -154,7 +154,7 @@ class A { // CHECK:STDOUT: %.loc18_39.1: %struct_type.n.44a = struct_literal (%int_1) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_39.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_39.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc18_39.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_39.2: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index eddd26e3a261..755d06345a4b 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -94,15 +94,15 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.5d2) [concrete] @@ -361,7 +361,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc38_18.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc38_18.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc38_18.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc38_18.2: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index 539cdb8fe3a6..4a95f7469521 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -42,15 +42,15 @@ class Class { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -122,7 +122,7 @@ class Class { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc20_13.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_13.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index ab389fc709de..a27b6feb037b 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -91,15 +91,15 @@ class A { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.5d2) [concrete] @@ -249,7 +249,7 @@ class A { // CHECK:STDOUT: %.loc32_25.1: %struct_type.a.a6c = struct_literal (%int_1) // CHECK:STDOUT: %impl.elem0.loc32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc32_25.1: = bound_method %int_1, %impl.elem0.loc32 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_25.2: = bound_method %int_1, %specific_fn.loc32 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %bound_method.loc32_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc32_25.2: init %i32 = converted %int_1, %int.convert_checked.loc32 [concrete = constants.%int_1.5d2] @@ -269,7 +269,7 @@ class A { // CHECK:STDOUT: %.loc33_25.1: %struct_type.b.a15 = struct_literal (%int_2) // CHECK:STDOUT: %impl.elem0.loc33: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc33_25.1: = bound_method %int_2, %impl.elem0.loc33 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc33_25.2: = bound_method %int_2, %specific_fn.loc33 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc33: init %i32 = call %bound_method.loc33_25.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc33_25.2: init %i32 = converted %int_2, %int.convert_checked.loc33 [concrete = constants.%int_2.ef8] @@ -289,7 +289,7 @@ class A { // CHECK:STDOUT: %.loc34_25.1: %struct_type.c.5b8 = struct_literal (%int_3) // CHECK:STDOUT: %impl.elem0.loc34: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc34_25.1: = bound_method %int_3, %impl.elem0.loc34 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc34: = specific_function %impl.elem0.loc34, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc34: = specific_function %impl.elem0.loc34, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc34_25.2: = bound_method %int_3, %specific_fn.loc34 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc34: init %i32 = call %bound_method.loc34_25.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc34_25.2: init %i32 = converted %int_3, %int.convert_checked.loc34 [concrete = constants.%int_3.822] @@ -309,7 +309,7 @@ class A { // CHECK:STDOUT: %.loc35_25.1: %struct_type.d.3ea = struct_literal (%int_4) // CHECK:STDOUT: %impl.elem0.loc35: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc35_25.1: = bound_method %int_4, %impl.elem0.loc35 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc35_25.2: = bound_method %int_4, %specific_fn.loc35 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %bound_method.loc35_25.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc35_25.2: init %i32 = converted %int_4, %int.convert_checked.loc35 [concrete = constants.%int_4.940] diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index d22512dd5e1a..c31d06117472 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -51,15 +51,15 @@ fn Run() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %F.type.b25: type = fn_type @F.2 [concrete] @@ -140,7 +140,7 @@ fn Run() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_13.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc16_13.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -162,7 +162,7 @@ fn Run() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_11.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_11.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc25_11.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc25_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index 0202e92579b8..424c32d4ac43 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -66,15 +66,15 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %ptr.404: type = ptr_type %Derived [concrete] @@ -225,7 +225,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc30_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc30_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc30_13.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc30_13: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index aecad1e0e30d..7a9dd0c16a7f 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -54,15 +54,15 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.ff9, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1000.ff9, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1000.1b6: %i32 = int_value 1000 [concrete] // CHECK:STDOUT: %C.262: type = class_type @C, @C(%int_1000.1b6) [concrete] @@ -110,7 +110,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %int_1000.loc5: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0.loc5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_20.1: = bound_method %int_1000.loc5, %impl.elem0.loc5 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_20.2: = bound_method %int_1000.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %bound_method.loc5_20.2(%int_1000.loc5) [concrete = constants.%int_1000.1b6] // CHECK:STDOUT: %.loc5_20.2: %i32 = value_of_initializer %int.convert_checked.loc5 [concrete = constants.%int_1000.1b6] @@ -127,7 +127,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %int_1000.loc6: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_20.1: = bound_method %int_1000.loc6, %impl.elem0.loc6 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_20.2: = bound_method %int_1000.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %bound_method.loc6_20.2(%int_1000.loc6) [concrete = constants.%int_1000.1b6] // CHECK:STDOUT: %.loc6_20.2: %i32 = value_of_initializer %int.convert_checked.loc6 [concrete = constants.%int_1000.1b6] @@ -200,15 +200,15 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.ff9, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1000.ff9, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1000.1b6: %i32 = int_value 1000 [concrete] // CHECK:STDOUT: %C.262: type = class_type @C, @C(%int_1000.1b6) [concrete] @@ -258,7 +258,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_19.1: = bound_method %int_1000, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_19.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc5_19.2(%int_1000) [concrete = constants.%int_1000.1b6] // CHECK:STDOUT: %.loc5_19.2: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1000.1b6] @@ -275,7 +275,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_20.1: = bound_method %int_1000, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_20.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc13_20.2(%int_1000) [concrete = constants.%int_1000.1b6] // CHECK:STDOUT: %.loc13_20.2: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1000.1b6] diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 32413d041d30..ec3d183168c1 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -1040,15 +1040,15 @@ base class T1(T:! type) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %struct_type.m2.m1.68c: type = struct_type {.m2: %i32, .m1: %i32} [concrete] @@ -1126,7 +1126,7 @@ base class T1(T:! type) { // CHECK:STDOUT: %int_3.loc12: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %impl.elem0.loc12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %int_3.loc12, %impl.elem0.loc12 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %int_3.loc12, %specific_fn.loc12 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %bound_method.loc12_3.2(%int_3.loc12) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc12_3: init %i32 = converted %int_3.loc12, %int.convert_checked.loc12 [concrete = constants.%int_3.822] @@ -1171,7 +1171,7 @@ base class T1(T:! type) { // CHECK:STDOUT: %.loc15_35.4: init %ptr.454 = initialize_from %.loc15_35.3 to %.loc15_35.2 // CHECK:STDOUT: %impl.elem0.loc15_35.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_35.1: = bound_method %int_5, %impl.elem0.loc15_35.1 [concrete = constants.%Convert.bound.4e6] -// CHECK:STDOUT: %specific_fn.loc15_35.1: = specific_function %impl.elem0.loc15_35.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_35.1: = specific_function %impl.elem0.loc15_35.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_35.2: = bound_method %int_5, %specific_fn.loc15_35.1 [concrete = constants.%bound_method.a25] // CHECK:STDOUT: %int.convert_checked.loc15_35.1: init %i32 = call %bound_method.loc15_35.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc15_35.5: init %i32 = converted %int_5, %int.convert_checked.loc15_35.1 [concrete = constants.%int_5.0f6] @@ -1179,7 +1179,7 @@ base class T1(T:! type) { // CHECK:STDOUT: %.loc15_35.7: init %i32 = initialize_from %.loc15_35.5 to %.loc15_35.6 [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %impl.elem0.loc15_35.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_35.3: = bound_method %int_3.loc15, %impl.elem0.loc15_35.2 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc15_35.2: = specific_function %impl.elem0.loc15_35.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_35.2: = specific_function %impl.elem0.loc15_35.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_35.4: = bound_method %int_3.loc15, %specific_fn.loc15_35.2 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc15_35.2: init %i32 = call %bound_method.loc15_35.4(%int_3.loc15) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc15_35.8: init %i32 = converted %int_3.loc15, %int.convert_checked.loc15_35.2 [concrete = constants.%int_3.822] @@ -1196,7 +1196,7 @@ base class T1(T:! type) { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_9.1: = bound_method %int_4, %impl.elem0.loc18 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_9.2: = bound_method %int_4, %specific_fn.loc18 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %bound_method.loc18_9.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc18_9: init %i32 = converted %int_4, %int.convert_checked.loc18 [concrete = constants.%int_4.940] diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 6162a2a4a826..2fc7ee531999 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -130,15 +130,15 @@ fn G() -> i32 { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %array_type.743: type = array_type %int_3, %T [symbolic] +// CHECK:STDOUT: %array_type.743: type = array_type %int_3, %T.8b3 [symbolic] // CHECK:STDOUT: %pattern_type.58b: type = pattern_type %array_type.743 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] // CHECK:STDOUT: %require_complete.06f: = require_complete_type %array_type.743 [symbolic] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -150,15 +150,16 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] @@ -168,7 +169,6 @@ fn G() -> i32 { // CHECK:STDOUT: %pattern_type.a63: type = pattern_type %array_type.002 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C) [concrete] @@ -204,17 +204,17 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: @F.%pattern_type.loc6_32 (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc6_32 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_35: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc6_35: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %a.param: @F.%array_type.loc6_29.2 (%array_type.743) = value_param call_param0 // CHECK:STDOUT: %.loc6_29: type = splice_block %array_type.loc6_29.1 [symbolic = %array_type.loc6_29.2 (constants.%array_type.743)] { -// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] // CHECK:STDOUT: %array_type.loc6_29.1: type = array_type %int_3, %T.ref.loc6_25 [symbolic = %array_type.loc6_29.2 (constants.%array_type.743)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%array_type.loc6_29.2 (%array_type.743) = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] @@ -236,7 +236,7 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { -// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %array_type.loc6_29.2: type = array_type constants.%int_3, %T.loc6_6.2 [symbolic = %array_type.loc6_29.2 (constants.%array_type.743)] // CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %array_type.loc6_29.2 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.58b)] // CHECK:STDOUT: %pattern_type.loc6_32: type = pattern_type %T.loc6_6.2 [symbolic = %pattern_type.loc6_32 (constants.%pattern_type.7dcd0a.1)] @@ -245,7 +245,7 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete.loc6_32: = require_complete_type %T.loc6_6.2 [symbolic = %require_complete.loc6_32 (constants.%require_complete.4ae)] // CHECK:STDOUT: %require_complete.loc6_17: = require_complete_type %array_type.loc6_29.2 [symbolic = %require_complete.loc6_17 (constants.%require_complete.06f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_29.2 (%array_type.743)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_29.2 (%array_type.743)) -> @F.%T.loc6_6.2 (%T.8b3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: @F.%array_type.loc6_29.2 (%array_type.743) = name_ref a, %a // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] @@ -253,14 +253,14 @@ fn G() -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_48.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_48.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc6_48.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_48.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_48.2: %i32 = converted %int_0, %.loc6_48.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_49.1: ref @F.%array_type.loc6_29.2 (%array_type.743) = value_as_ref %a.ref -// CHECK:STDOUT: %.loc6_49.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_49.1, %.loc6_48.2 -// CHECK:STDOUT: %.loc6_49.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_49.2 +// CHECK:STDOUT: %.loc6_49.2: ref @F.%T.loc6_6.2 (%T.8b3) = array_index %.loc6_49.1, %.loc6_48.2 +// CHECK:STDOUT: %.loc6_49.3: @F.%T.loc6_6.2 (%T.8b3) = bind_value %.loc6_49.2 // CHECK:STDOUT: return %.loc6_49.3 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -306,8 +306,8 @@ fn G() -> i32 { // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%T.8b3 // CHECK:STDOUT: %array_type.loc6_29.2 => constants.%array_type.743 // CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.58b // CHECK:STDOUT: %pattern_type.loc6_32 => constants.%pattern_type.7dcd0a.1 @@ -349,17 +349,18 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.41f: = bound_method %N, %Convert.956 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.ad4: = bound_method %N, %Convert.specific_fn [symbolic] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.ad4(%N) [symbolic] +// CHECK:STDOUT: %int.convert_checked.d03: init %i32 = call %bound_method.ad4(%N) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] @@ -368,7 +369,6 @@ fn G() -> i32 { // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_3.1ba) [concrete] @@ -458,18 +458,18 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_42.2 [symbolic = %require_complete (constants.%require_complete.d82)] // CHECK:STDOUT: %Convert.bound: = bound_method %N.loc6_6.2, constants.%Convert.956 [symbolic = %Convert.bound (constants.%Convert.bound.41f)] // CHECK:STDOUT: %bound_method.loc6_62.3: = bound_method %N.loc6_6.2, constants.%Convert.specific_fn [symbolic = %bound_method.loc6_62.3 (constants.%bound_method.ad4)] -// CHECK:STDOUT: %int.convert_checked.loc6_62.2: init %i32 = call %bound_method.loc6_62.3(%N.loc6_6.2) [symbolic = %int.convert_checked.loc6_62.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc6_62.2: init %i32 = call %bound_method.loc6_62.3(%N.loc6_6.2) [symbolic = %int.convert_checked.loc6_62.2 (constants.%int.convert_checked.d03)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_42.2 (%array_type.6a2)) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc6_61: Core.IntLiteral = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N)] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_62.1: = bound_method %N.ref.loc6_61, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound.41f)] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_62.2: = bound_method %N.ref.loc6_61, %specific_fn [symbolic = %bound_method.loc6_62.3 (constants.%bound_method.ad4)] -// CHECK:STDOUT: %int.convert_checked.loc6_62.1: init %i32 = call %bound_method.loc6_62.2(%N.ref.loc6_61) [symbolic = %int.convert_checked.loc6_62.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc6_62.1: %i32 = value_of_initializer %int.convert_checked.loc6_62.1 [symbolic = %int.convert_checked.loc6_62.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc6_62.2: %i32 = converted %N.ref.loc6_61, %.loc6_62.1 [symbolic = %int.convert_checked.loc6_62.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc6_62.1: init %i32 = call %bound_method.loc6_62.2(%N.ref.loc6_61) [symbolic = %int.convert_checked.loc6_62.2 (constants.%int.convert_checked.d03)] +// CHECK:STDOUT: %.loc6_62.1: %i32 = value_of_initializer %int.convert_checked.loc6_62.1 [symbolic = %int.convert_checked.loc6_62.2 (constants.%int.convert_checked.d03)] +// CHECK:STDOUT: %.loc6_62.2: %i32 = converted %N.ref.loc6_61, %.loc6_62.1 [symbolic = %int.convert_checked.loc6_62.2 (constants.%int.convert_checked.d03)] // CHECK:STDOUT: return %.loc6_62.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -698,15 +698,15 @@ fn G() -> i32 { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %array_type.9d4: type = array_type %int_2, %T [symbolic] +// CHECK:STDOUT: %array_type.9d4: type = array_type %int_2, %T.8b3 [symbolic] // CHECK:STDOUT: %pattern_type.a4c: type = pattern_type %array_type.9d4 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] // CHECK:STDOUT: %require_complete.d11: = require_complete_type %array_type.9d4 [symbolic] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -718,15 +718,16 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] @@ -737,7 +738,6 @@ fn G() -> i32 { // CHECK:STDOUT: %pattern_type.a63: type = pattern_type %array_type.002 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: %array_type.15a: type = array_type %int_2, %C [concrete] // CHECK:STDOUT: %pattern_type.114: type = pattern_type %array_type.15a [concrete] @@ -774,17 +774,17 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: @F.%pattern_type.loc6_32 (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc6_32 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_35: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc6_35: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %a.param: @F.%array_type.loc6_29.2 (%array_type.9d4) = value_param call_param0 // CHECK:STDOUT: %.loc6_29: type = splice_block %array_type.loc6_29.1 [symbolic = %array_type.loc6_29.2 (constants.%array_type.9d4)] { -// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %array_type.loc6_29.1: type = array_type %int_2, %T.ref.loc6_25 [symbolic = %array_type.loc6_29.2 (constants.%array_type.9d4)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%array_type.loc6_29.2 (%array_type.9d4) = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] @@ -806,7 +806,7 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_6.1: type) { -// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %array_type.loc6_29.2: type = array_type constants.%int_2, %T.loc6_6.2 [symbolic = %array_type.loc6_29.2 (constants.%array_type.9d4)] // CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %array_type.loc6_29.2 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.a4c)] // CHECK:STDOUT: %pattern_type.loc6_32: type = pattern_type %T.loc6_6.2 [symbolic = %pattern_type.loc6_32 (constants.%pattern_type.7dcd0a.1)] @@ -815,7 +815,7 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete.loc6_32: = require_complete_type %T.loc6_6.2 [symbolic = %require_complete.loc6_32 (constants.%require_complete.4ae)] // CHECK:STDOUT: %require_complete.loc6_17: = require_complete_type %array_type.loc6_29.2 [symbolic = %require_complete.loc6_17 (constants.%require_complete.d11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_29.2 (%array_type.9d4)) -> @F.%T.loc6_6.2 (%T) { +// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_29.2 (%array_type.9d4)) -> @F.%T.loc6_6.2 (%T.8b3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: @F.%array_type.loc6_29.2 (%array_type.9d4) = name_ref a, %a // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] @@ -823,14 +823,14 @@ fn G() -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_48.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_48.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc6_48.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_48.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_48.2: %i32 = converted %int_0, %.loc6_48.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_49.1: ref @F.%array_type.loc6_29.2 (%array_type.9d4) = value_as_ref %a.ref -// CHECK:STDOUT: %.loc6_49.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_49.1, %.loc6_48.2 -// CHECK:STDOUT: %.loc6_49.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_49.2 +// CHECK:STDOUT: %.loc6_49.2: ref @F.%T.loc6_6.2 (%T.8b3) = array_index %.loc6_49.1, %.loc6_48.2 +// CHECK:STDOUT: %.loc6_49.3: @F.%T.loc6_6.2 (%T.8b3) = bind_value %.loc6_49.2 // CHECK:STDOUT: return %.loc6_49.3 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -876,8 +876,8 @@ fn G() -> i32 { // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc6_6.2 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc6_6.2 => constants.%T.8b3 // CHECK:STDOUT: %array_type.loc6_29.2 => constants.%array_type.9d4 // CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.a4c // CHECK:STDOUT: %pattern_type.loc6_32 => constants.%pattern_type.7dcd0a.1 @@ -920,17 +920,18 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.41f: = bound_method %N, %Convert.956 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.ad4: = bound_method %N, %Convert.specific_fn [symbolic] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.ad4(%N) [symbolic] +// CHECK:STDOUT: %int.convert_checked.d03: init %i32 = call %bound_method.ad4(%N) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] @@ -939,7 +940,6 @@ fn G() -> i32 { // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %D.val: %D = struct_value () [concrete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %array_type.fe4 = tuple_value (%D.val, %D.val, %D.val) [concrete] // CHECK:STDOUT: %array_type.002: type = array_type %int_3.1ba, %C [concrete] @@ -1042,18 +1042,18 @@ fn G() -> i32 { // CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc7_42.2 [symbolic = %require_complete (constants.%require_complete.d82)] // CHECK:STDOUT: %Convert.bound: = bound_method %N.loc7_6.2, constants.%Convert.956 [symbolic = %Convert.bound (constants.%Convert.bound.41f)] // CHECK:STDOUT: %bound_method.loc7_62.3: = bound_method %N.loc7_6.2, constants.%Convert.specific_fn [symbolic = %bound_method.loc7_62.3 (constants.%bound_method.ad4)] -// CHECK:STDOUT: %int.convert_checked.loc7_62.2: init %i32 = call %bound_method.loc7_62.3(%N.loc7_6.2) [symbolic = %int.convert_checked.loc7_62.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc7_62.2: init %i32 = call %bound_method.loc7_62.3(%N.loc7_6.2) [symbolic = %int.convert_checked.loc7_62.2 (constants.%int.convert_checked.d03)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: @F.%array_type.loc7_42.2 (%array_type.6a2)) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc7_61: Core.IntLiteral = name_ref N, %N.loc7_6.1 [symbolic = %N.loc7_6.2 (constants.%N)] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_62.1: = bound_method %N.ref.loc7_61, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound.41f)] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_62.2: = bound_method %N.ref.loc7_61, %specific_fn [symbolic = %bound_method.loc7_62.3 (constants.%bound_method.ad4)] -// CHECK:STDOUT: %int.convert_checked.loc7_62.1: init %i32 = call %bound_method.loc7_62.2(%N.ref.loc7_61) [symbolic = %int.convert_checked.loc7_62.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc7_62.1: %i32 = value_of_initializer %int.convert_checked.loc7_62.1 [symbolic = %int.convert_checked.loc7_62.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc7_62.2: %i32 = converted %N.ref.loc7_61, %.loc7_62.1 [symbolic = %int.convert_checked.loc7_62.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc7_62.1: init %i32 = call %bound_method.loc7_62.2(%N.ref.loc7_61) [symbolic = %int.convert_checked.loc7_62.2 (constants.%int.convert_checked.d03)] +// CHECK:STDOUT: %.loc7_62.1: %i32 = value_of_initializer %int.convert_checked.loc7_62.1 [symbolic = %int.convert_checked.loc7_62.2 (constants.%int.convert_checked.d03)] +// CHECK:STDOUT: %.loc7_62.2: %i32 = converted %N.ref.loc7_61, %.loc7_62.1 [symbolic = %int.convert_checked.loc7_62.2 (constants.%int.convert_checked.d03)] // CHECK:STDOUT: return %.loc7_62.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1135,18 +1135,19 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] -// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %N.51e, %Convert.960 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.51e, %Convert.specific_fn [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method(%N.51e) [symbolic] -// CHECK:STDOUT: %array_type.b2f: type = array_type %int.convert_checked, %C [symbolic] +// CHECK:STDOUT: %int.convert_checked.12c: init Core.IntLiteral = call %bound_method(%N.51e) [symbolic] +// CHECK:STDOUT: %array_type.b2f: type = array_type %int.convert_checked.12c, %C [symbolic] // CHECK:STDOUT: %pattern_type.ac2: type = pattern_type %array_type.b2f [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -1159,7 +1160,6 @@ fn G() -> i32 { // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %array_type.002 = tuple_value (%C.val, %C.val, %C.val) [concrete] // CHECK:STDOUT: } @@ -1206,11 +1206,11 @@ fn G() -> i32 { // CHECK:STDOUT: %N.ref.loc6_27: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.51e)] // CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc6_27.1: = bound_method %N.ref.loc6_27, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound)] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_27.2: = bound_method %N.ref.loc6_27, %specific_fn [symbolic = %bound_method.loc6_27.3 (constants.%bound_method)] -// CHECK:STDOUT: %int.convert_checked.loc6_27.1: init Core.IntLiteral = call %bound_method.loc6_27.2(%N.ref.loc6_27) [symbolic = %int.convert_checked.loc6_27.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc6_27.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc6_27.1 [symbolic = %int.convert_checked.loc6_27.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc6_27.2: Core.IntLiteral = converted %N.ref.loc6_27, %.loc6_27.1 [symbolic = %int.convert_checked.loc6_27.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc6_27.1: init Core.IntLiteral = call %bound_method.loc6_27.2(%N.ref.loc6_27) [symbolic = %int.convert_checked.loc6_27.2 (constants.%int.convert_checked.12c)] +// CHECK:STDOUT: %.loc6_27.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc6_27.1 [symbolic = %int.convert_checked.loc6_27.2 (constants.%int.convert_checked.12c)] +// CHECK:STDOUT: %.loc6_27.2: Core.IntLiteral = converted %N.ref.loc6_27, %.loc6_27.1 [symbolic = %int.convert_checked.loc6_27.2 (constants.%int.convert_checked.12c)] // CHECK:STDOUT: %array_type.loc6_28.1: type = array_type %.loc6_27.2, %C.ref [symbolic = %array_type.loc6_28.2 (constants.%array_type.b2f)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%array_type.loc6_28.2 (%array_type.b2f) = bind_name a, %a.param @@ -1241,7 +1241,7 @@ fn G() -> i32 { // CHECK:STDOUT: %N.loc6_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc6_6.2 (constants.%N.51e)] // CHECK:STDOUT: %Convert.bound: = bound_method %N.loc6_6.2, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound)] // CHECK:STDOUT: %bound_method.loc6_27.3: = bound_method %N.loc6_6.2, constants.%Convert.specific_fn [symbolic = %bound_method.loc6_27.3 (constants.%bound_method)] -// CHECK:STDOUT: %int.convert_checked.loc6_27.2: init Core.IntLiteral = call %bound_method.loc6_27.3(%N.loc6_6.2) [symbolic = %int.convert_checked.loc6_27.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc6_27.2: init Core.IntLiteral = call %bound_method.loc6_27.3(%N.loc6_6.2) [symbolic = %int.convert_checked.loc6_27.2 (constants.%int.convert_checked.12c)] // CHECK:STDOUT: %array_type.loc6_28.2: type = array_type %int.convert_checked.loc6_27.2, constants.%C [symbolic = %array_type.loc6_28.2 (constants.%array_type.b2f)] // CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_28.2 [symbolic = %pattern_type (constants.%pattern_type.ac2)] // CHECK:STDOUT: @@ -1296,7 +1296,7 @@ fn G() -> i32 { // CHECK:STDOUT: %N.loc6_6.2 => constants.%N.51e // CHECK:STDOUT: %Convert.bound => constants.%Convert.bound // CHECK:STDOUT: %bound_method.loc6_27.3 => constants.%bound_method -// CHECK:STDOUT: %int.convert_checked.loc6_27.2 => constants.%int.convert_checked +// CHECK:STDOUT: %int.convert_checked.loc6_27.2 => constants.%int.convert_checked.12c // CHECK:STDOUT: %array_type.loc6_28.2 => constants.%array_type.b2f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.ac2 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 3f150895892b..b157264a3789 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -718,15 +718,15 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %WithNontype.b82: type = class_type @WithNontype, @WithNontype(%int_0.6a9) [concrete] @@ -838,7 +838,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_31.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_31.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_31.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc9_31.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index d57af0cfb11a..fbc15f610060 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -255,15 +255,15 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -361,14 +361,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %.loc8_22.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) // CHECK:STDOUT: %impl.elem0.loc8_22.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_22.1: = bound_method %int_1, %impl.elem0.loc8_22.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc8_22.1: = specific_function %impl.elem0.loc8_22.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8_22.1: = specific_function %impl.elem0.loc8_22.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.2: = bound_method %int_1, %specific_fn.loc8_22.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc8_22.1: init %i32 = call %bound_method.loc8_22.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.2: %i32 = value_of_initializer %int.convert_checked.loc8_22.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.3: %i32 = converted %int_1, %.loc8_22.2 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc8_22.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_22.3: = bound_method %int_2, %impl.elem0.loc8_22.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc8_22.2: = specific_function %impl.elem0.loc8_22.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8_22.2: = specific_function %impl.elem0.loc8_22.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.4: = bound_method %int_2, %specific_fn.loc8_22.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc8_22.2: init %i32 = call %bound_method.loc8_22.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc8_22.4: %i32 = value_of_initializer %int.convert_checked.loc8_22.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon index e93fe0fc1b01..1a1a6ef4c01a 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -651,11 +651,11 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete] -// CHECK:STDOUT: %T: %array_type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.eb6: %array_type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.dcb: type = pattern_type %array_type [concrete] // CHECK:STDOUT: %HoldsType.type: type = generic_class_type @HoldsType [concrete] // CHECK:STDOUT: %HoldsType.generic: %HoldsType.type = struct_value () [concrete] -// CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T) [symbolic] +// CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(%T.eb6) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.142: type = pattern_type %HoldsType [symbolic] @@ -669,15 +669,15 @@ fn G() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -719,7 +719,7 @@ fn G() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete = constants.%array_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_17.1: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_17.1: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.2 (constants.%T.eb6)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.dcb = symbolic_binding_pattern T, 0 [concrete] @@ -732,23 +732,23 @@ fn G() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete = constants.%array_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_6.1: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc12_6.1: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T.eb6)] // CHECK:STDOUT: %x.param: @F.%HoldsType.loc12_40.2 (%HoldsType) = value_param call_param0 // CHECK:STDOUT: %.loc12_40: type = splice_block %HoldsType.loc12_40.1 [symbolic = %HoldsType.loc12_40.2 (constants.%HoldsType)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc12_39: %array_type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %HoldsType.loc12_40.1: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc12_40.2 (constants.%HoldsType)] +// CHECK:STDOUT: %T.ref.loc12_39: %array_type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T.eb6)] +// CHECK:STDOUT: %HoldsType.loc12_40.1: type = class_type @HoldsType, @HoldsType(constants.%T.eb6) [symbolic = %HoldsType.loc12_40.2 (constants.%HoldsType)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.%HoldsType.loc12_40.2 (%HoldsType) = bind_name x, %x.param // CHECK:STDOUT: %a.param: = value_param call_param1 // CHECK:STDOUT: %.1: = splice_block [concrete = ] { -// CHECK:STDOUT: %T.ref.loc12_46: %array_type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc12_46: %array_type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T.eb6)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_48.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_48.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc12_48.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc12_48.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -764,7 +764,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @HoldsType(%T.loc4_17.1: %array_type) { -// CHECK:STDOUT: %T.loc4_17.2: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_17.2: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.2 (constants.%T.eb6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -788,7 +788,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc12_6.1: %array_type) { -// CHECK:STDOUT: %T.loc12_6.2: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc12_6.2: %array_type = bind_symbolic_name T, 0 [symbolic = %T.loc12_6.2 (constants.%T.eb6)] // CHECK:STDOUT: %HoldsType.loc12_40.2: type = class_type @HoldsType, @HoldsType(%T.loc12_6.2) [symbolic = %HoldsType.loc12_40.2 (constants.%HoldsType)] // CHECK:STDOUT: %pattern_type: type = pattern_type %HoldsType.loc12_40.2 [symbolic = %pattern_type (constants.%pattern_type.142)] // CHECK:STDOUT: @@ -822,14 +822,14 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(constants.%T) { -// CHECK:STDOUT: %T.loc4_17.2 => constants.%T +// CHECK:STDOUT: specific @HoldsType(constants.%T.eb6) { +// CHECK:STDOUT: %T.loc4_17.2 => constants.%T.eb6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc12_6.2 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.eb6) { +// CHECK:STDOUT: %T.loc12_6.2 => constants.%T.eb6 // CHECK:STDOUT: %HoldsType.loc12_40.2 => constants.%HoldsType // CHECK:STDOUT: %pattern_type => constants.%pattern_type.142 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/access.carbon b/toolchain/check/testdata/facet/access.carbon index e629df376407..62ecfd03e2da 100644 --- a/toolchain/check/testdata/facet/access.carbon +++ b/toolchain/check/testdata/facet/access.carbon @@ -564,15 +564,15 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] // CHECK:STDOUT: %B.assoc_type: type = assoc_entity_type @B [concrete] // CHECK:STDOUT: %assoc0.081: %B.assoc_type = assoc_entity element0, @B.%Y [concrete] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %A.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %A.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type.938: type = facet_type <@A & @B> [concrete] // CHECK:STDOUT: %.Self: %facet_type.938 = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] @@ -598,8 +598,8 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl [concrete] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -616,7 +616,7 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [concrete = constants.%facet_type.6d1] { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %impl.elem0.loc14_13: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc14_13: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method: = bound_method %A.ref, %impl.elem0.loc14_13 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and: init type = call %bound_method(%A.ref, %B.ref) [concrete = constants.%facet_type.938] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %type.and [concrete = constants.%facet_type.938] @@ -658,7 +658,7 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %.loc18_17.1: type = splice_block %.loc18_17.2 [concrete = constants.%facet_type.6d1] { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %impl.elem0.loc18_13: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc18_13: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method: = bound_method %A.ref, %impl.elem0.loc18_13 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and: init type = call %bound_method(%A.ref, %B.ref) [concrete = constants.%facet_type.938] // CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %type.and [concrete = constants.%facet_type.938] diff --git a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon index 6e795657ca76..5a786e3603c1 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -75,16 +75,18 @@ fn F() { // CHECK:STDOUT: %BB.type.24d: type = fn_type @BB.2 [concrete] // CHECK:STDOUT: %BB.fe8: %BB.type.24d = struct_value () [concrete] // CHECK:STDOUT: %B.facet.82f: %B.type = facet_value %C, (%B.impl_witness) [concrete] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound.56f: = bound_method %A.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound.9a5: = bound_method %A.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type.d5f: type = facet_type <@Empty & @A> [concrete] -// CHECK:STDOUT: %Op.bound.e1a: = bound_method %facet_type.d5f, %Op.0a6 [concrete] +// CHECK:STDOUT: %Op.bound.44b: = bound_method %facet_type.d5f, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type.242: type = facet_type <@Empty & @A & @B> [concrete] // CHECK:STDOUT: %T: %facet_type.242 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.8e7: type = pattern_type %facet_type.242 [concrete] @@ -115,13 +117,13 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -165,12 +167,12 @@ fn F() { // CHECK:STDOUT: %.loc33_20.1: type = splice_block %.loc33_20.3 [concrete = constants.%facet_type.242] { // CHECK:STDOUT: %A.ref.loc33: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] -// CHECK:STDOUT: %impl.elem0.loc33_12: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %bound_method.loc33_12: = bound_method %A.ref.loc33, %impl.elem0.loc33_12 [concrete = constants.%Op.bound.56f] +// CHECK:STDOUT: %impl.elem0.loc33_12: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %bound_method.loc33_12: = bound_method %A.ref.loc33, %impl.elem0.loc33_12 [concrete = constants.%Op.bound.9a5] // CHECK:STDOUT: %type.and.loc33_12: init type = call %bound_method.loc33_12(%A.ref.loc33, %Empty.ref) [concrete = constants.%facet_type.d5f] // CHECK:STDOUT: %B.ref.loc33: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %impl.elem0.loc33_20: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %bound_method.loc33_20: = bound_method %type.and.loc33_12, %impl.elem0.loc33_20 [concrete = constants.%Op.bound.e1a] +// CHECK:STDOUT: %impl.elem0.loc33_20: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %bound_method.loc33_20: = bound_method %type.and.loc33_12, %impl.elem0.loc33_20 [concrete = constants.%Op.bound.44b] // CHECK:STDOUT: %.loc33_12.1: type = value_of_initializer %type.and.loc33_12 [concrete = constants.%facet_type.d5f] // CHECK:STDOUT: %.loc33_12.2: type = converted %type.and.loc33_12, %.loc33_12.1 [concrete = constants.%facet_type.d5f] // CHECK:STDOUT: %type.and.loc33_20: init type = call %bound_method.loc33_20(%.loc33_12.2, %B.ref.loc33) [concrete = constants.%facet_type.242] diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon index a6431150421d..00c2a862be30 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon @@ -104,14 +104,16 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Feed: %Feed.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.c75: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %Animal.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %Animal.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type: type = facet_type <@Eats & @Animal> [concrete] // CHECK:STDOUT: %U: %facet_type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.787: type = pattern_type %facet_type [concrete] @@ -127,13 +129,13 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -170,7 +172,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %impl.elem0: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method: = bound_method %Animal.ref, %impl.elem0 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and: init type = call %bound_method(%Animal.ref, %Eats.ref) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc8_28.2: type = value_of_initializer %type.and [concrete = constants.%facet_type] @@ -272,15 +274,17 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Tame.type: type = facet_type <@Tame> [concrete] // CHECK:STDOUT: %Self.7ee: %Tame.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound.fc0: = bound_method %Tame.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound.0c8: = bound_method %Tame.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type.6ff: type = facet_type <@Eats & @Tame> [concrete] // CHECK:STDOUT: %V: %facet_type.6ff = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %pattern_type.9f3: type = pattern_type %facet_type.6ff [concrete] @@ -289,9 +293,9 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %FeedTame.type: type = fn_type @FeedTame [concrete] // CHECK:STDOUT: %FeedTame: %FeedTame.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.940: = require_complete_type %V.as_type [symbolic] -// CHECK:STDOUT: %Op.bound.096: = bound_method %Eats.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %Op.bound.a5f: = bound_method %Eats.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type.c3f: type = facet_type <@Eats & @Animal> [concrete] -// CHECK:STDOUT: %Op.bound.e7d: = bound_method %facet_type.c3f, %Op.0a6 [concrete] +// CHECK:STDOUT: %Op.bound.70b: = bound_method %facet_type.c3f, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type.a95: type = facet_type <@Eats & @Animal & @Tame> [concrete] // CHECK:STDOUT: %W: %facet_type.a95 = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f1b: type = pattern_type %facet_type.a95 [concrete] @@ -308,13 +312,13 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -338,8 +342,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc7_22.1: type = splice_block %.loc7_22.3 [concrete = constants.%facet_type.6ff] { // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %impl.elem0: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %bound_method: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%Op.bound.fc0] +// CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %bound_method: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%Op.bound.0c8] // CHECK:STDOUT: %type.and: init type = call %bound_method(%Tame.ref, %Eats.ref) [concrete = constants.%facet_type.6ff] // CHECK:STDOUT: %.loc7_22.2: type = value_of_initializer %type.and [concrete = constants.%facet_type.6ff] // CHECK:STDOUT: %.loc7_22.3: type = converted %type.and, %.loc7_22.2 [concrete = constants.%facet_type.6ff] @@ -361,12 +365,12 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc9_39.1: type = splice_block %.loc9_39.3 [concrete = constants.%facet_type.a95] { // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] -// CHECK:STDOUT: %impl.elem0.loc9_30: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %bound_method.loc9_30: = bound_method %Eats.ref, %impl.elem0.loc9_30 [concrete = constants.%Op.bound.096] +// CHECK:STDOUT: %impl.elem0.loc9_30: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %bound_method.loc9_30: = bound_method %Eats.ref, %impl.elem0.loc9_30 [concrete = constants.%Op.bound.a5f] // CHECK:STDOUT: %type.and.loc9_30: init type = call %bound_method.loc9_30(%Eats.ref, %Animal.ref) [concrete = constants.%facet_type.c3f] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] -// CHECK:STDOUT: %impl.elem0.loc9_39: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %bound_method.loc9_39: = bound_method %type.and.loc9_30, %impl.elem0.loc9_39 [concrete = constants.%Op.bound.e7d] +// CHECK:STDOUT: %impl.elem0.loc9_39: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %bound_method.loc9_39: = bound_method %type.and.loc9_30, %impl.elem0.loc9_39 [concrete = constants.%Op.bound.70b] // CHECK:STDOUT: %.loc9_30.1: type = value_of_initializer %type.and.loc9_30 [concrete = constants.%facet_type.c3f] // CHECK:STDOUT: %.loc9_30.2: type = converted %type.and.loc9_30, %.loc9_30.1 [concrete = constants.%facet_type.c3f] // CHECK:STDOUT: %type.and.loc9_39: init type = call %bound_method.loc9_39(%.loc9_30.2, %Tame.ref) [concrete = constants.%facet_type.a95] @@ -482,15 +486,17 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %pattern_type.3b0: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %A.as_type: type = facet_access_type %A [symbolic] // CHECK:STDOUT: %Eats.impl_witness.8ab: = impl_witness file.%Eats.impl_witness_table, @impl.e7b(%A) [symbolic] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound.fc0: = bound_method %Tame.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound.0c8: = bound_method %Tame.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type.6ff: type = facet_type <@Eats & @Tame> [concrete] // CHECK:STDOUT: %V: %facet_type.6ff = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %pattern_type.9f3: type = pattern_type %facet_type.6ff [concrete] @@ -499,7 +505,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %FeedTame2.type: type = fn_type @FeedTame2 [concrete] // CHECK:STDOUT: %FeedTame2: %FeedTame2.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.940: = require_complete_type %V.as_type [symbolic] -// CHECK:STDOUT: %Op.bound.f48: = bound_method %Animal.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %Op.bound.cb0: = bound_method %Animal.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type.65c: type = facet_type <@Animal & @Tame> [concrete] // CHECK:STDOUT: %W: %facet_type.65c = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %pattern_type.6e8: type = pattern_type %facet_type.65c [concrete] @@ -519,13 +525,13 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -561,8 +567,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.3 [concrete = constants.%facet_type.6ff] { // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %impl.elem0: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %bound_method: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%Op.bound.fc0] +// CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %bound_method: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%Op.bound.0c8] // CHECK:STDOUT: %type.and: init type = call %bound_method(%Tame.ref, %Eats.ref) [concrete = constants.%facet_type.6ff] // CHECK:STDOUT: %.loc9_23.2: type = value_of_initializer %type.and [concrete = constants.%facet_type.6ff] // CHECK:STDOUT: %.loc9_23.3: type = converted %type.and, %.loc9_23.2 [concrete = constants.%facet_type.6ff] @@ -584,8 +590,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.loc11_33.1: type = splice_block %.loc11_33.3 [concrete = constants.%facet_type.65c] { // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] -// CHECK:STDOUT: %impl.elem0: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %bound_method: = bound_method %Animal.ref, %impl.elem0 [concrete = constants.%Op.bound.f48] +// CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %bound_method: = bound_method %Animal.ref, %impl.elem0 [concrete = constants.%Op.bound.cb0] // CHECK:STDOUT: %type.and: init type = call %bound_method(%Animal.ref, %Tame.ref) [concrete = constants.%facet_type.65c] // CHECK:STDOUT: %.loc11_33.2: type = value_of_initializer %type.and [concrete = constants.%facet_type.65c] // CHECK:STDOUT: %.loc11_33.3: type = converted %type.and, %.loc11_33.2 [concrete = constants.%facet_type.65c] diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index d7802f531595..62b37ee7e8cf 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -27,8 +27,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Add.type.b1f: type = fn_type @Add.1 [concrete] -// CHECK:STDOUT: %Add: %Add.type.b1f = struct_value () [concrete] +// CHECK:STDOUT: %Add.type: type = fn_type @Add [concrete] +// CHECK:STDOUT: %Add: %Add.type = struct_value () [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] @@ -36,20 +36,20 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -57,12 +57,12 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.2d6: = bound_method %int_3.822, %Convert.960 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c6f: = bound_method %int_3.822, %Convert.specific_fn.8a8 [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] @@ -94,7 +94,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Add.decl: %Add.type.b1f = fn_decl @Add.1 [concrete = constants.%Add] { +// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [concrete = constants.%Add] { // CHECK:STDOUT: %a.patt: %pattern_type.7ce = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.7ce = binding_pattern b [concrete] @@ -127,19 +127,19 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %.loc16_30: type = splice_block %array_type [concrete = constants.%array_type] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %Add.ref: %Add.type.b1f = name_ref Add, %Add.decl [concrete = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [concrete = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc16_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_25.1: = bound_method %int_1, %impl.elem0.loc16_25 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc16_25: = specific_function %impl.elem0.loc16_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] +// CHECK:STDOUT: %specific_fn.loc16_25: = specific_function %impl.elem0.loc16_25, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc16_25.2: = bound_method %int_1, %specific_fn.loc16_25 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc16_25: init %i32 = call %bound_method.loc16_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc16_25.1: %i32 = value_of_initializer %int.convert_checked.loc16_25 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc16_25.2: %i32 = converted %int_1, %.loc16_25.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc16_28: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_28.1: = bound_method %int_2, %impl.elem0.loc16_28 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc16_28: = specific_function %impl.elem0.loc16_28, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] +// CHECK:STDOUT: %specific_fn.loc16_28: = specific_function %impl.elem0.loc16_28, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc16_28.2: = bound_method %int_2, %specific_fn.loc16_28 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc16_28: init %i32 = call %bound_method.loc16_28.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc16_28.1: %i32 = value_of_initializer %int.convert_checked.loc16_28 [concrete = constants.%int_2.ef8] @@ -147,7 +147,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc16_25.2, %.loc16_28.2) [concrete = constants.%int_3.822] // CHECK:STDOUT: %impl.elem0.loc16_29: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc16_29.1: = bound_method %int.sadd, %impl.elem0.loc16_29 [concrete = constants.%Convert.bound.2d6] -// CHECK:STDOUT: %specific_fn.loc16_29: = specific_function %impl.elem0.loc16_29, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] +// CHECK:STDOUT: %specific_fn.loc16_29: = specific_function %impl.elem0.loc16_29, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc16_29.2: = bound_method %int.sadd, %specific_fn.loc16_29 [concrete = constants.%bound_method.c6f] // CHECK:STDOUT: %.loc16_29.1: %i32 = value_of_initializer %int.sadd [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc16_29.2: %i32 = converted %int.sadd, %.loc16_29.1 [concrete = constants.%int_3.822] @@ -184,11 +184,11 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Add.1(%a.param: %i32, %b.param: %i32) -> %i32 = "int.sadd"; +// CHECK:STDOUT: fn @Add(%a.param: %i32, %b.param: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param: %i32, %b.param: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: %Add.type.b1f = name_ref Add, file.%Add.decl [concrete = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [concrete = constants.%Add] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%a.ref, %b.ref) diff --git a/toolchain/check/testdata/function/builtin/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/call_from_operator.carbon index 4e2b46fe43df..b28393251d2f 100644 --- a/toolchain/check/testdata/function/builtin/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/call_from_operator.carbon @@ -18,7 +18,7 @@ package Core; fn IntLiteral() -> type = "int_literal.make_type"; fn Int(N: IntLiteral()) -> type = "int.make_type_signed"; -interface Add { +interface AddWith(T:! type) { fn Op[self: Self](other: Self) -> Self; } @@ -30,7 +30,7 @@ interface ImplicitAs(T:! type) { fn Convert[self: Self]() -> T; } -impl i32 as Add { +impl i32 as AddWith(i32) { fn Op[self: Self](other: Self) -> Self = "int.sadd"; } @@ -61,15 +61,17 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete] // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete] // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] -// CHECK:STDOUT: %Self.b3d: %Add.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type.f73: type = facet_access_type %Self.b3d [symbolic] -// CHECK:STDOUT: %pattern_type.8f9: type = pattern_type %Self.as_type.f73 [symbolic] -// CHECK:STDOUT: %Op.type.31b: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.d59: %Op.type.31b = struct_value () [concrete] -// CHECK:STDOUT: %Add.assoc_type: type = assoc_entity_type @Add [concrete] -// CHECK:STDOUT: %assoc0.82c: %Add.assoc_type = assoc_entity element0, @Add.%Op.decl [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %AddWith.type.b35: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.b35 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.type.bc7: type = facet_type <@AddWith, @AddWith(%T)> [symbolic] +// CHECK:STDOUT: %Self.deb: %AddWith.type.bc7 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Self.as_type.6cc: type = facet_access_type %Self.deb [symbolic] +// CHECK:STDOUT: %pattern_type.4a8: type = pattern_type %Self.as_type.6cc [symbolic] +// CHECK:STDOUT: %Op.type.5b7: type = fn_type @Op.1, @AddWith(%T) [symbolic] +// CHECK:STDOUT: %Op.037: %Op.type.5b7 = struct_value () [symbolic] +// CHECK:STDOUT: %AddWith.assoc_type.36e: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic] +// CHECK:STDOUT: %assoc0.adf: %AddWith.assoc_type.36e = assoc_entity element0, @AddWith.%Op.decl [symbolic] // CHECK:STDOUT: %As.type.b51: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.b51 = struct_value () [concrete] // CHECK:STDOUT: %As.type.8ba: type = facet_type <@As, @As(%T)> [symbolic] @@ -93,11 +95,17 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.8f8: %ImplicitAs.assoc_type.095 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] -// CHECK:STDOUT: %Add.impl_witness: = impl_witness file.%Add.impl_witness_table [concrete] +// CHECK:STDOUT: %AddWith.type.49d: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete] +// CHECK:STDOUT: %Self.da9: %AddWith.type.49d = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Op.type.efc: type = fn_type @Op.1, @AddWith(%i32.builtin) [concrete] +// CHECK:STDOUT: %Op.a62: %Op.type.efc = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.assoc_type.a65: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete] +// CHECK:STDOUT: %assoc0.ee2: %AddWith.assoc_type.a65 = assoc_entity element0, @AddWith.%Op.decl [concrete] +// CHECK:STDOUT: %AddWith.impl_witness: = impl_witness file.%AddWith.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.956: type = pattern_type %i32.builtin [concrete] -// CHECK:STDOUT: %Op.type.c2a: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.4e3: %Op.type.c2a = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32.builtin, (%Add.impl_witness) [concrete] +// CHECK:STDOUT: %Op.type.e57: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.c8a: %Op.type.e57 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.facet: %AddWith.type.49d = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete] // CHECK:STDOUT: %As.type.a09: type = facet_type <@As, @As(%i32.builtin)> [concrete] // CHECK:STDOUT: %Self.2fa: %As.type.a09 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.c0d: type = fn_type @Convert.1, @As(%i32.builtin) [concrete] @@ -134,7 +142,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .IntLiteral = %IntLiteral.decl // CHECK:STDOUT: .Int = %Int.decl -// CHECK:STDOUT: .Add = %Add.decl +// CHECK:STDOUT: .AddWith = %AddWith.decl // CHECK:STDOUT: .As = %As.decl // CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl // CHECK:STDOUT: } @@ -162,7 +170,11 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param: ref type = out_param call_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Add.decl: type = interface_decl @Add [concrete = constants.%Add.type] {} {} +// CHECK:STDOUT: %AddWith.decl: %AddWith.type.b35 = interface_decl @AddWith [concrete = constants.%AddWith.generic] { +// CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %T.loc7_19.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_19.2 (constants.%T)] +// CHECK:STDOUT: } // CHECK:STDOUT: %As.decl: %As.type.b51 = interface_decl @As [concrete = constants.%As.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { @@ -173,15 +185,20 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } { // CHECK:STDOUT: %T.loc15_22.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: impl_decl @impl.c45 [concrete] {} { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed, %.loc19_6.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%Add.decl [concrete = constants.%Add.type] +// CHECK:STDOUT: impl_decl @impl.fcd [concrete] {} { +// CHECK:STDOUT: %int_32.loc19_6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_6: init type = call constants.%Int(%int_32.loc19_6) [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_signed.loc19_6 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed.loc19_6, %.loc19_6.1 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %AddWith.ref: %AddWith.type.b35 = name_ref AddWith, file.%AddWith.decl [concrete = constants.%AddWith.generic] +// CHECK:STDOUT: %int_32.loc19_21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc19_21: init type = call constants.%Int(%int_32.loc19_21) [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_signed.loc19_21 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_signed.loc19_21, %.loc19_24.1 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(constants.%i32.builtin)> [concrete = constants.%AddWith.type.49d] // CHECK:STDOUT: } -// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (@impl.c45.%Op.decl), @impl.c45 [concrete] -// CHECK:STDOUT: %Add.impl_witness: = impl_witness %Add.impl_witness_table [concrete = constants.%Add.impl_witness] +// CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (@impl.fcd.%Op.decl), @impl.fcd [concrete] +// CHECK:STDOUT: %AddWith.impl_witness: = impl_witness %AddWith.impl_witness_table [concrete = constants.%AddWith.impl_witness] // CHECK:STDOUT: impl_decl @impl.028 [concrete] {} { // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] @@ -226,42 +243,57 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %ImplicitAs.impl_witness.loc31: = impl_witness %ImplicitAs.impl_witness_table.loc31 [concrete = constants.%ImplicitAs.impl_witness.95b] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: interface @Add { -// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.b3d] -// CHECK:STDOUT: %Op.decl: %Op.type.31b = fn_decl @Op.1 [concrete = constants.%Op.d59] { -// CHECK:STDOUT: %self.patt: @Op.1.%pattern_type (%pattern_type.8f9) = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Op.1.%pattern_type (%pattern_type.8f9) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: @Op.1.%pattern_type (%pattern_type.8f9) = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: @Op.1.%pattern_type (%pattern_type.8f9) = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @Op.1.%pattern_type (%pattern_type.8f9) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Op.1.%pattern_type (%pattern_type.8f9) = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc8_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.b3d)] -// CHECK:STDOUT: %Self.as_type.loc8_37: type = facet_access_type %Self.ref.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.f73)] -// CHECK:STDOUT: %.loc8_37: type = converted %Self.ref.loc8_37, %Self.as_type.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.f73)] -// CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.f73) = value_param call_param0 -// CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.f73)] { -// CHECK:STDOUT: %Self.ref.loc8_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.b3d)] -// CHECK:STDOUT: %Self.as_type.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.f73)] -// CHECK:STDOUT: %.loc8_15.2: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.f73)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.f73) = bind_name self, %self.param -// CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.f73) = value_param call_param1 -// CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.f73)] { -// CHECK:STDOUT: %Self.ref.loc8_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.b3d)] -// CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.f73)] -// CHECK:STDOUT: %.loc8_28.2: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.f73)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.f73) = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.f73) = out_param call_param2 -// CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.f73) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, %Op.decl [concrete = constants.%assoc0.82c] +// CHECK:STDOUT: generic interface @AddWith(%T.loc7_19.1: type) { +// CHECK:STDOUT: %T.loc7_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_19.2 (constants.%T)] // CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .Op = %assoc0 -// CHECK:STDOUT: witness = (%Op.decl) +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc7_19.2)> [symbolic = %AddWith.type (constants.%AddWith.type.bc7)] +// CHECK:STDOUT: %Self.2: @AddWith.%AddWith.type (%AddWith.type.bc7) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.deb)] +// CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @AddWith(%T.loc7_19.2) [symbolic = %Op.type (constants.%Op.type.5b7)] +// CHECK:STDOUT: %Op: @AddWith.%Op.type (%Op.type.5b7) = struct_value () [symbolic = %Op (constants.%Op.037)] +// CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T.loc7_19.2) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type.36e)] +// CHECK:STDOUT: %assoc0.loc8_41.2: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.36e) = assoc_entity element0, %Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.adf)] +// CHECK:STDOUT: +// CHECK:STDOUT: interface { +// CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type (%AddWith.type.bc7) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.deb)] +// CHECK:STDOUT: %Op.decl: @AddWith.%Op.type (%Op.type.5b7) = fn_decl @Op.1 [symbolic = @AddWith.%Op (constants.%Op.037)] { +// CHECK:STDOUT: %self.patt: @Op.1.%pattern_type (%pattern_type.4a8) = binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Op.1.%pattern_type (%pattern_type.4a8) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %other.patt: @Op.1.%pattern_type (%pattern_type.4a8) = binding_pattern other [concrete] +// CHECK:STDOUT: %other.param_patt: @Op.1.%pattern_type (%pattern_type.4a8) = value_param_pattern %other.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @Op.1.%pattern_type (%pattern_type.4a8) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Op.1.%pattern_type (%pattern_type.4a8) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %.loc8_37.1: @Op.1.%AddWith.type (%AddWith.type.bc7) = specific_constant @AddWith.%Self.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.deb)] +// CHECK:STDOUT: %Self.ref.loc8_37: @Op.1.%AddWith.type (%AddWith.type.bc7) = name_ref Self, %.loc8_37.1 [symbolic = %Self (constants.%Self.deb)] +// CHECK:STDOUT: %Self.as_type.loc8_37: type = facet_access_type %Self.ref.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] +// CHECK:STDOUT: %.loc8_37.2: type = converted %Self.ref.loc8_37, %Self.as_type.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] +// CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = value_param call_param0 +// CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.3 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] { +// CHECK:STDOUT: %.loc8_15.2: @Op.1.%AddWith.type (%AddWith.type.bc7) = specific_constant @AddWith.%Self.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.deb)] +// CHECK:STDOUT: %Self.ref.loc8_15: @Op.1.%AddWith.type (%AddWith.type.bc7) = name_ref Self, %.loc8_15.2 [symbolic = %Self (constants.%Self.deb)] +// CHECK:STDOUT: %Self.as_type.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] +// CHECK:STDOUT: %.loc8_15.3: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = value_param call_param1 +// CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.3 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] { +// CHECK:STDOUT: %.loc8_28.2: @Op.1.%AddWith.type (%AddWith.type.bc7) = specific_constant @AddWith.%Self.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.deb)] +// CHECK:STDOUT: %Self.ref.loc8_28: @Op.1.%AddWith.type (%AddWith.type.bc7) = name_ref Self, %.loc8_28.2 [symbolic = %Self (constants.%Self.deb)] +// CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] +// CHECK:STDOUT: %.loc8_28.3: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = out_param call_param2 +// CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %assoc0.loc8_41.1: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.36e) = assoc_entity element0, %Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.adf)] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self.1 +// CHECK:STDOUT: .Op = %assoc0.loc8_41.1 +// CHECK:STDOUT: witness = (%Op.decl) +// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(%T.loc11_14.1: type) { @@ -346,8 +378,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.c45: %.loc19_6.2 as %Add.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.c2a = fn_decl @Op.2 [concrete = constants.%Op.4e3] { +// CHECK:STDOUT: impl @impl.fcd: %.loc19_6.2 as %AddWith.type { +// CHECK:STDOUT: %Op.decl: %Op.type.e57 = fn_decl @Op.2 [concrete = constants.%Op.c8a] { // CHECK:STDOUT: %self.patt: %pattern_type.956 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.956 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %other.patt: %pattern_type.956 = binding_pattern other [concrete] @@ -355,12 +387,12 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @impl.c45.%.loc19_6.2 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @impl.fcd.%.loc19_6.2 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %self.param: %i32.builtin = value_param call_param0 -// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.c45.%.loc19_6.2 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.fcd.%.loc19_6.2 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param // CHECK:STDOUT: %other.param: %i32.builtin = value_param call_param1 -// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.c45.%.loc19_6.2 [concrete = constants.%i32.builtin] +// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.fcd.%.loc19_6.2 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %other: %i32.builtin = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param2 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -368,7 +400,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Add.impl_witness +// CHECK:STDOUT: witness = file.%AddWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.028: %.loc23_17.2 as %As.type { @@ -445,12 +477,14 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.1(@Add.%Self: %Add.type) { -// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.b3d)] -// CHECK:STDOUT: %Self.as_type.loc8_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.f73)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc8_15.1 [symbolic = %pattern_type (constants.%pattern_type.8f9)] +// CHECK:STDOUT: generic fn @Op.1(@AddWith.%T.loc7_19.1: type, @AddWith.%Self.1: @AddWith.%AddWith.type (%AddWith.type.bc7)) { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.bc7)] +// CHECK:STDOUT: %Self: @Op.1.%AddWith.type (%AddWith.type.bc7) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.deb)] +// CHECK:STDOUT: %Self.as_type.loc8_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc8_15.1 [symbolic = %pattern_type (constants.%pattern_type.4a8)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.f73), %other.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.f73)) -> @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.f73); +// CHECK:STDOUT: fn(%self.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc), %other.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc)) -> @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.1(@As.%T.loc11_14.1: type, @As.%Self.1: @As.%As.type (%As.type.8ba)) { @@ -483,10 +517,16 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.5(%self.param: %i32.builtin) -> Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(constants.%Self.b3d) { -// CHECK:STDOUT: %Self => constants.%Self.b3d -// CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%Self.as_type.f73 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.8f9 +// CHECK:STDOUT: specific @AddWith(constants.%T) { +// CHECK:STDOUT: %T.loc7_19.2 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op.1(constants.%T, constants.%Self.deb) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.bc7 +// CHECK:STDOUT: %Self => constants.%Self.deb +// CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%Self.as_type.6cc +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.4a8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%T) { @@ -515,8 +555,22 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.7dc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(constants.%Add.facet) { -// CHECK:STDOUT: %Self => constants.%Add.facet +// CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) { +// CHECK:STDOUT: %T.loc7_19.2 => constants.%i32.builtin +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.49d +// CHECK:STDOUT: %Self.2 => constants.%Self.da9 +// CHECK:STDOUT: %Op.type => constants.%Op.type.efc +// CHECK:STDOUT: %Op => constants.%Op.a62 +// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.a65 +// CHECK:STDOUT: %assoc0.loc8_41.2 => constants.%assoc0.ee2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op.1(constants.%i32.builtin, constants.%AddWith.facet) { +// CHECK:STDOUT: %T => constants.%i32.builtin +// CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.49d +// CHECK:STDOUT: %Self => constants.%AddWith.facet // CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%i32.builtin // CHECK:STDOUT: %pattern_type => constants.%pattern_type.956 // CHECK:STDOUT: } @@ -611,8 +665,22 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %As.assoc_type.bc2: type = assoc_entity_type @As, @As(%i32.builtin) [concrete] // CHECK:STDOUT: %assoc0.9fb: %As.assoc_type.bc2 = assoc_entity element0, imports.%Core.import_ref.708 [concrete] // CHECK:STDOUT: %assoc0.97d: %As.assoc_type.760 = assoc_entity element0, imports.%Core.import_ref.4e8 [symbolic] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] -// CHECK:STDOUT: %Self.a99: %Add.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.type.6d3: type = facet_type <@AddWith, @AddWith(%T)> [symbolic] +// CHECK:STDOUT: %Self.6c1: %AddWith.type.6d3 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %AddWith.type.6f5: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete] +// CHECK:STDOUT: %Op.type.22d: type = fn_type @Op.1, @AddWith(%T) [symbolic] +// CHECK:STDOUT: %Op.965: %Op.type.22d = struct_value () [symbolic] +// CHECK:STDOUT: %Self.as_type.030: type = facet_access_type %Self.6c1 [symbolic] +// CHECK:STDOUT: %pattern_type.7fc: type = pattern_type %Self.as_type.030 [symbolic] +// CHECK:STDOUT: %AddWith.assoc_type.c10: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic] +// CHECK:STDOUT: %assoc0.89962d.1: %AddWith.assoc_type.c10 = assoc_entity element0, imports.%Core.import_ref.7e6ace.1 [symbolic] +// CHECK:STDOUT: %Self.ec3: %AddWith.type.6f5 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %Op.type.0b7: type = fn_type @Op.1, @AddWith(%i32.builtin) [concrete] +// CHECK:STDOUT: %Op.9d6: %Op.type.0b7 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.assoc_type.dff: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete] +// CHECK:STDOUT: %assoc0.7f1: %AddWith.assoc_type.dff = assoc_entity element0, imports.%Core.import_ref.1b9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] @@ -645,18 +713,13 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %Convert.bound.324: = bound_method %int_2.ecc, %Convert.5bc [concrete] // CHECK:STDOUT: %int_2.5a1: %i32.builtin = int_value 2 [concrete] -// CHECK:STDOUT: %Add.assoc_type: type = assoc_entity_type @Add [concrete] -// CHECK:STDOUT: %assoc0.c7d: %Add.assoc_type = assoc_entity element0, imports.%Core.import_ref.6dd [concrete] -// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Op.3eb: %Op.type.545 = struct_value () [concrete] -// CHECK:STDOUT: %Self.as_type.da9: type = facet_access_type %Self.a99 [symbolic] -// CHECK:STDOUT: %pattern_type.26e: type = pattern_type %Self.as_type.da9 [symbolic] -// CHECK:STDOUT: %Add.impl_witness: = impl_witness imports.%Add.impl_witness_table [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32.builtin, (%Add.impl_witness) [concrete] -// CHECK:STDOUT: %.a7d: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] -// CHECK:STDOUT: %Op.type.240: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0e2: %Op.type.240 = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound.393: = bound_method %int_1.f38, %Op.0e2 [concrete] +// CHECK:STDOUT: %assoc0.89962d.2: %AddWith.assoc_type.c10 = assoc_entity element0, imports.%Core.import_ref.7e6ace.2 [symbolic] +// CHECK:STDOUT: %AddWith.impl_witness: = impl_witness imports.%AddWith.impl_witness_table [concrete] +// CHECK:STDOUT: %AddWith.facet: %AddWith.type.6f5 = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete] +// CHECK:STDOUT: %.1e7: type = fn_type_with_self_type %Op.type.0b7, %AddWith.facet [concrete] +// CHECK:STDOUT: %Op.type.2bc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.9d1: %Op.type.2bc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound.de8: = bound_method %int_1.f38, %Op.9d1 [concrete] // CHECK:STDOUT: %int_3.a0f: %i32.builtin = int_value 3 [concrete] // CHECK:STDOUT: %assoc0.dc001e.2: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.9c5: = impl_witness imports.%ImplicitAs.impl_witness_table.5fc [concrete] @@ -672,7 +735,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Convert.bound.94d: = bound_method %int_3.1ba, %Convert.5bc [concrete] // CHECK:STDOUT: %Convert.bound.8fc: = bound_method %int_4.0c1, %Convert.5bc [concrete] // CHECK:STDOUT: %int_4.4f1: %i32.builtin = int_value 4 [concrete] -// CHECK:STDOUT: %Op.bound.423: = bound_method %int_3.a0f, %Op.0e2 [concrete] +// CHECK:STDOUT: %Op.bound.703: = bound_method %int_3.a0f, %Op.9d1 [concrete] // CHECK:STDOUT: %int_7: %i32.builtin = int_value 7 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32.builtin) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] @@ -690,38 +753,43 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .As = %Core.As -// CHECK:STDOUT: .Add = %Core.Add +// CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int] // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//default, As, loaded [concrete = constants.%As.generic] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst88 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst103 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.5e1: @As.%As.assoc_type (%As.assoc_type.760) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.97d)] // CHECK:STDOUT: %Core.Convert.313 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst88 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)] +// CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst103 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)] // CHECK:STDOUT: %Core.import_ref.708: @As.%Convert.type (%Convert.type.843) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%Convert (constants.%Convert.95f)] // CHECK:STDOUT: %Core.import_ref.4e8 = import_ref Core//default, loc12_32, unloaded -// CHECK:STDOUT: %Core.import_ref.07c = import_ref Core//default, inst43 [no loc], unloaded -// CHECK:STDOUT: %Core.import_ref.f6c: %Add.assoc_type = import_ref Core//default, loc8_41, loaded [concrete = constants.%assoc0.c7d] +// CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.476 = import_ref Core//default, inst49 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.35d: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.c10) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%assoc0 (constants.%assoc0.89962d.2)] // CHECK:STDOUT: %Core.Op = import_ref Core//default, Op, unloaded -// CHECK:STDOUT: %Core.import_ref.902: = import_ref Core//default, loc19_17, loaded [concrete = constants.%Add.impl_witness] +// CHECK:STDOUT: %Core.import_ref.772: = import_ref Core//default, loc19_26, loaded [concrete = constants.%AddWith.impl_witness] // CHECK:STDOUT: %Core.import_ref.c8c7cd.1: type = import_ref Core//default, loc19_6, loaded [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %Core.import_ref.bf0: type = import_ref Core//default, loc19_13, loaded [concrete = constants.%Add.type] +// CHECK:STDOUT: %Core.import_ref.ef3: type = import_ref Core//default, loc19_24, loaded [concrete = constants.%AddWith.type.6f5] +// CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3) = import_ref Core//default, inst49 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.6c1)] +// CHECK:STDOUT: %Core.import_ref.7e6ace.1 = import_ref Core//default, loc8_41, unloaded +// CHECK:STDOUT: %Core.import_ref.1b9: @AddWith.%Op.type (%Op.type.22d) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%Op (constants.%Op.965)] // CHECK:STDOUT: %Core.import_ref.cb6: = import_ref Core//default, loc23_30, loaded [concrete = constants.%As.impl_witness] // CHECK:STDOUT: %Core.import_ref.8721d7.1: type = import_ref Core//default, loc23_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.1e5: type = import_ref Core//default, loc23_28, loaded [concrete = constants.%As.type.a6d] -// CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst132 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.5ab3ec.5: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst147 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc001e.2)] // CHECK:STDOUT: %Core.Convert.e69 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.c62: = import_ref Core//default, loc27_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a] // CHECK:STDOUT: %Core.import_ref.8721d7.2: type = import_ref Core//default, loc27_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc27_36, loaded [concrete = constants.%ImplicitAs.type.61e] -// CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst132 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] +// CHECK:STDOUT: %Core.import_ref.5ab3ec.6: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst147 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc16_32, unloaded // CHECK:STDOUT: %Core.import_ref.1c752f.1: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] // CHECK:STDOUT: %Core.import_ref.c5f: = import_ref Core//default, loc31_38, loaded [concrete = constants.%ImplicitAs.impl_witness.9c5] @@ -730,11 +798,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Core.import_ref.1c752f.2: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] // CHECK:STDOUT: %Core.import_ref.73a: %Convert.type.953 = import_ref Core//default, loc24_35, loaded [concrete = constants.%Convert.5bc] // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.import_ref.73a), @impl.2cc [concrete] -// CHECK:STDOUT: %Core.Add: type = import_ref Core//default, Add, loaded [concrete = constants.%Add.type] -// CHECK:STDOUT: %Core.import_ref.6dd: %Op.type.545 = import_ref Core//default, loc8_41, loaded [concrete = constants.%Op.3eb] -// CHECK:STDOUT: %Core.import_ref.442: %Add.type = import_ref Core//default, inst43 [no loc], loaded [symbolic = constants.%Self.a99] -// CHECK:STDOUT: %Core.import_ref.db4: %Op.type.240 = import_ref Core//default, loc20_42, loaded [concrete = constants.%Op.0e2] -// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Core.import_ref.db4), @impl.a1d [concrete] +// CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//default, AddWith, loaded [concrete = constants.%AddWith.generic] +// CHECK:STDOUT: %Core.import_ref.7e6ace.2 = import_ref Core//default, loc8_41, unloaded +// CHECK:STDOUT: %Core.import_ref.079: %Op.type.2bc = import_ref Core//default, loc20_42, loaded [concrete = constants.%Op.9d1] +// CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (%Core.import_ref.079), @impl.23c [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.207961.2 = import_ref Core//default, loc16_32, unloaded // CHECK:STDOUT: %Core.import_ref.4f9: %Convert.type.0e4 = import_ref Core//default, loc32_44, loaded [concrete = constants.%Convert.b32] @@ -777,8 +844,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int.convert_checked.loc4_37: init %i32.builtin = call %bound_method.loc4_37(%int_2) [concrete = constants.%int_2.5a1] // CHECK:STDOUT: %.loc4_37.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_37 [concrete = constants.%int_2.5a1] // CHECK:STDOUT: %.loc4_37.2: %i32.builtin = converted %int_2, %.loc4_37.1 [concrete = constants.%int_2.5a1] -// CHECK:STDOUT: %impl.elem0.loc4_32.1: %.a7d = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.0e2] -// CHECK:STDOUT: %bound_method.loc4_32.1: = bound_method %.loc4_24.2, %impl.elem0.loc4_32.1 [concrete = constants.%Op.bound.393] +// CHECK:STDOUT: %impl.elem0.loc4_32.1: %.1e7 = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%Op.9d1] +// CHECK:STDOUT: %bound_method.loc4_32.1: = bound_method %.loc4_24.2, %impl.elem0.loc4_32.1 [concrete = constants.%Op.bound.de8] // CHECK:STDOUT: %int.sadd: init %i32.builtin = call %bound_method.loc4_32.1(%.loc4_24.2, %.loc4_37.2) [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc4_16.1: type = value_of_initializer %int.make_type_signed.loc4_16 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_16.2: type = converted %int.make_type_signed.loc4_16, %.loc4_16.1 [concrete = constants.%i32.builtin] @@ -813,14 +880,26 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: interface @Add [from "core.carbon"] { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Core.import_ref.07c -// CHECK:STDOUT: .Op = imports.%Core.import_ref.f6c -// CHECK:STDOUT: witness = (imports.%Core.Op) +// CHECK:STDOUT: generic interface @AddWith(imports.%Core.import_ref.5ab3ec.3: type) [from "core.carbon"] { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d3)] +// CHECK:STDOUT: %Self: @AddWith.%AddWith.type (%AddWith.type.6d3) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.6c1)] +// CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @AddWith(%T) [symbolic = %Op.type (constants.%Op.type.22d)] +// CHECK:STDOUT: %Op: @AddWith.%Op.type (%Op.type.22d) = struct_value () [symbolic = %Op (constants.%Op.965)] +// CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type.c10)] +// CHECK:STDOUT: %assoc0: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.c10) = assoc_entity element0, imports.%Core.import_ref.7e6ace.1 [symbolic = %assoc0 (constants.%assoc0.89962d.1)] +// CHECK:STDOUT: +// CHECK:STDOUT: interface { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = imports.%Core.import_ref.476 +// CHECK:STDOUT: .Op = imports.%Core.import_ref.35d +// CHECK:STDOUT: witness = (imports.%Core.Op) +// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.3: type) [from "core.carbon"] { +// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.5: type) [from "core.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -839,9 +918,9 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.a1d: imports.%Core.import_ref.c8c7cd.1 as imports.%Core.import_ref.bf0 [from "core.carbon"] { +// CHECK:STDOUT: impl @impl.23c: imports.%Core.import_ref.c8c7cd.1 as imports.%Core.import_ref.ef3 [from "core.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Core.import_ref.902 +// CHECK:STDOUT: witness = imports.%Core.import_ref.772 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2cc: imports.%Core.import_ref.8721d7.1 as imports.%Core.import_ref.1e5 [from "core.carbon"] { @@ -872,7 +951,17 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert.2(imports.%Core.import_ref.5ab3ec.4: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] { +// CHECK:STDOUT: generic fn @Op.1(imports.%Core.import_ref.5ab3ec.4: type, imports.%Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3)) [from "core.carbon"] { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d3)] +// CHECK:STDOUT: %Self: @Op.1.%AddWith.type (%AddWith.type.6d3) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.6c1)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.030)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.7fc)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn; +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Convert.2(imports.%Core.import_ref.5ab3ec.6: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)] // CHECK:STDOUT: %Self: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)] @@ -885,14 +974,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.3 = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Op.1(imports.%Core.import_ref.442: %Add.type) [from "core.carbon"] { -// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.a99)] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.da9)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.26e)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Op.2 = "int.sadd" [from "core.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.4 = "int.convert_checked" [from "core.carbon"]; @@ -923,8 +1004,8 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int.convert_checked.loc4_71: init %i32.builtin = call %bound_method.loc4_71(%int_4.loc4_69) [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc4_71.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_71 [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc4_71.2: %i32.builtin = converted %int_4.loc4_69, %.loc4_71.1 [concrete = constants.%int_4.4f1] -// CHECK:STDOUT: %impl.elem0.loc4_66: %.a7d = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.0e2] -// CHECK:STDOUT: %bound_method.loc4_66: = bound_method %.loc4_58.2, %impl.elem0.loc4_66 [concrete = constants.%Op.bound.423] +// CHECK:STDOUT: %impl.elem0.loc4_66: %.1e7 = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%Op.9d1] +// CHECK:STDOUT: %bound_method.loc4_66: = bound_method %.loc4_58.2, %impl.elem0.loc4_66 [concrete = constants.%Op.bound.703] // CHECK:STDOUT: %int.sadd: init %i32.builtin = call %bound_method.loc4_66(%.loc4_58.2, %.loc4_71.2) [concrete = constants.%int_7] // CHECK:STDOUT: %.loc4_78.1: %tuple.type = tuple_literal (%int_3.loc4_49, %int_4.loc4_52, %int.sadd) // CHECK:STDOUT: %impl.elem0.loc4_78.1: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5] @@ -975,6 +1056,30 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0 => constants.%assoc0.9fb // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith(constants.%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) { +// CHECK:STDOUT: %T => constants.%i32.builtin +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.6f5 +// CHECK:STDOUT: %Self => constants.%Self.ec3 +// CHECK:STDOUT: %Op.type => constants.%Op.type.0b7 +// CHECK:STDOUT: %Op => constants.%Op.9d6 +// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.dff +// CHECK:STDOUT: %assoc0 => constants.%assoc0.7f1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op.1(constants.%T, constants.%Self.6c1) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.6d3 +// CHECK:STDOUT: %Self => constants.%Self.6c1 +// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.030 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7fc +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } @@ -1012,9 +1117,3 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0 => constants.%assoc0.8c4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(constants.%Self.a99) { -// CHECK:STDOUT: %Self => constants.%Self.a99 -// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.da9 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.26e -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index 9e065ce46cee..3d4cfe7e3a31 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -25,8 +25,8 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic] +// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.8268 [symbolic] // CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type.b70 [symbolic] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] @@ -46,49 +46,49 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.4, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.5, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.6, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] // CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound.c1b: = bound_method %int_1.5b8, %Convert.197 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.aad: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.aad: = specific_function %Convert.197, @Convert.6(%int_32) [concrete] // CHECK:STDOUT: %bound_method.082: = bound_method %int_1.5b8, %Convert.specific_fn.aad [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] -// CHECK:STDOUT: %.5c7: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] +// CHECK:STDOUT: %.5c7b: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete] // CHECK:STDOUT: %F.bound: = bound_method %int_1.5d2, %F.9ec [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.2, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.4, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.4(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.5, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.2d6: = bound_method %int_3.822, %Convert.960 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.5(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c6f: = bound_method %int_3.822, %Convert.specific_fn.8a8 [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete] @@ -142,19 +142,19 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %i32.loc22_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc22_24: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc22_24.1: = bound_method %int_1, %impl.elem0.loc22_24 [concrete = constants.%Convert.bound.c1b] -// CHECK:STDOUT: %specific_fn.loc22_24: = specific_function %impl.elem0.loc22_24, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.aad] +// CHECK:STDOUT: %specific_fn.loc22_24: = specific_function %impl.elem0.loc22_24, @Convert.6(constants.%int_32) [concrete = constants.%Convert.specific_fn.aad] // CHECK:STDOUT: %bound_method.loc22_24.2: = bound_method %int_1, %specific_fn.loc22_24 [concrete = constants.%bound_method.082] // CHECK:STDOUT: %int.convert_checked.loc22_24: init %i32 = call %bound_method.loc22_24.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc22_24.1: %i32 = value_of_initializer %int.convert_checked.loc22_24 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc22_24.2: %i32 = converted %int_1, %.loc22_24.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0.82e] -// CHECK:STDOUT: %impl.elem0.loc22_31: %.5c7 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.9ec] +// CHECK:STDOUT: %impl.elem0.loc22_31: %.5c7b = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.9ec] // CHECK:STDOUT: %bound_method.loc22_31: = bound_method %.loc22_24.2, %impl.elem0.loc22_31 [concrete = constants.%F.bound] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc22_38: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_38.1: = bound_method %int_2, %impl.elem0.loc22_38 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc22_38: = specific_function %impl.elem0.loc22_38, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] +// CHECK:STDOUT: %specific_fn.loc22_38: = specific_function %impl.elem0.loc22_38, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc22_38.2: = bound_method %int_2, %specific_fn.loc22_38 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc22_38: init %i32 = call %bound_method.loc22_38.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc22_38.1: %i32 = value_of_initializer %int.convert_checked.loc22_38 [concrete = constants.%int_2.ef8] @@ -162,7 +162,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc22_31(%.loc22_24.2, %.loc22_38.2) [concrete = constants.%int_3.822] // CHECK:STDOUT: %impl.elem0.loc22_39: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc22_39.1: = bound_method %int.sadd, %impl.elem0.loc22_39 [concrete = constants.%Convert.bound.2d6] -// CHECK:STDOUT: %specific_fn.loc22_39: = specific_function %impl.elem0.loc22_39, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] +// CHECK:STDOUT: %specific_fn.loc22_39: = specific_function %impl.elem0.loc22_39, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc22_39.2: = bound_method %int.sadd, %specific_fn.loc22_39 [concrete = constants.%bound_method.c6f] // CHECK:STDOUT: %.loc22_39.1: %i32 = value_of_initializer %int.sadd [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc22_39.2: %i32 = converted %int.sadd, %.loc22_39.1 [concrete = constants.%int_3.822] @@ -175,7 +175,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] { // CHECK:STDOUT: %self.patt: @F.1.%pattern_type (%pattern_type.6de) = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @F.1.%pattern_type (%pattern_type.6de) = value_param_pattern %self.patt, call_param0 [concrete] @@ -184,19 +184,19 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %return.patt: @F.1.%pattern_type (%pattern_type.6de) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type (%pattern_type.6de) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc15_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.ref.loc15_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.8268)] // CHECK:STDOUT: %Self.as_type.loc15_36: type = facet_access_type %Self.ref.loc15_36 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: %.loc15_36: type = converted %Self.ref.loc15_36, %Self.as_type.loc15_36 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70) = value_param call_param0 // CHECK:STDOUT: %.loc15_14.1: type = splice_block %.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] { -// CHECK:STDOUT: %Self.ref.loc15_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.ref.loc15_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.8268)] // CHECK:STDOUT: %Self.as_type.loc15_14.2: type = facet_access_type %Self.ref.loc15_14 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: %.loc15_14.2: type = converted %Self.ref.loc15_14, %Self.as_type.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70) = bind_name self, %self.param // CHECK:STDOUT: %other.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.b70) = value_param call_param1 // CHECK:STDOUT: %.loc15_27.1: type = splice_block %.loc15_27.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] { -// CHECK:STDOUT: %Self.ref.loc15_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.ref.loc15_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.8268)] // CHECK:STDOUT: %Self.as_type.loc15_27: type = facet_access_type %Self.ref.loc15_27 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: %.loc15_27.2: type = converted %Self.ref.loc15_27, %Self.as_type.loc15_27 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: } @@ -245,7 +245,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.8268)] // CHECK:STDOUT: %Self.as_type.loc15_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc15_14.1 [symbolic = %pattern_type (constants.%pattern_type.6de)] // CHECK:STDOUT: @@ -254,8 +254,8 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%self.param: %i32, %other.param: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Self.826) { -// CHECK:STDOUT: %Self => constants.%Self.826 +// CHECK:STDOUT: specific @F.1(constants.%Self.8268) { +// CHECK:STDOUT: %Self => constants.%Self.8268 // CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%Self.as_type.b70 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 97487e62608d..ec12f7552d49 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -37,15 +37,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -107,7 +107,7 @@ fn Main() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_21.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_21.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc19_21.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc19_21.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index 997af934c6a0..ee7dc671c6fc 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -42,15 +42,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %tuple: %tuple.type.a1c = tuple_value (%int_1.5d2) [concrete] @@ -119,7 +119,7 @@ fn Main() { // CHECK:STDOUT: %.loc17_22.1: %tuple.type.985 = tuple_literal (%int_1) // CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_22.1: = bound_method %int_1, %impl.elem0.loc17 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_22.2: = bound_method %int_1, %specific_fn.loc17 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_22.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_22.2: init %i32 = converted %int_1, %int.convert_checked.loc17 [concrete = constants.%int_1.5d2] @@ -141,7 +141,7 @@ fn Main() { // CHECK:STDOUT: %.loc19_8: %i32 = bind_value %tuple.elem0 // CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_12.1: = bound_method %int_6, %impl.elem0.loc19 [concrete = constants.%Convert.bound.ce9] -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_12.2: = bound_method %int_6, %specific_fn.loc19 [concrete = constants.%bound_method.efa] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %bound_method.loc19_12.2(%int_6) [concrete = constants.%int_6.e56] // CHECK:STDOUT: %.loc19_12.1: %i32 = value_of_initializer %int.convert_checked.loc19 [concrete = constants.%int_6.e56] diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index bffe47d1a15e..35430ae08f73 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -36,15 +36,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -94,7 +94,7 @@ fn Main() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc17_7.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_7.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index 1c70f1468786..f80160a73b56 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -37,15 +37,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -95,7 +95,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %int_1.loc17, %impl.elem0.loc17 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %int_1.loc17, %specific_fn.loc17 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_7.2(%int_1.loc17) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_7.1: %i32 = value_of_initializer %int.convert_checked.loc17 [concrete = constants.%int_1.5d2] @@ -105,7 +105,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1.loc18, %impl.elem0.loc18 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1.loc18, %specific_fn.loc18 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %bound_method.loc18_7.2(%int_1.loc18) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.1: %i32 = value_of_initializer %int.convert_checked.loc18 [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index b290618d3691..a9d527123e32 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -37,15 +37,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -107,14 +107,14 @@ fn Main() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc17_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %int_1, %impl.elem0.loc17_7 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17_7: = specific_function %impl.elem0.loc17_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_7: = specific_function %impl.elem0.loc17_7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %int_1, %specific_fn.loc17_7 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc17_7: init %i32 = call %bound_method.loc17_7.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_7.1: %i32 = value_of_initializer %int.convert_checked.loc17_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_7.2: %i32 = converted %int_1, %.loc17_7.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc17_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_10.1: = bound_method %int_2, %impl.elem0.loc17_10 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc17_10: = specific_function %impl.elem0.loc17_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_10: = specific_function %impl.elem0.loc17_10, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %int_2, %specific_fn.loc17_10 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc17_10: init %i32 = call %bound_method.loc17_10.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc17_10.1: %i32 = value_of_initializer %int.convert_checked.loc17_10 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index f717e6c2d7a3..60af7d9d6487 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -38,15 +38,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -108,14 +108,14 @@ fn Main() { // CHECK:STDOUT: %int_2.loc17: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc17_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %int_1.loc17, %impl.elem0.loc17_7 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17_7: = specific_function %impl.elem0.loc17_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_7: = specific_function %impl.elem0.loc17_7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %int_1.loc17, %specific_fn.loc17_7 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc17_7: init %i32 = call %bound_method.loc17_7.2(%int_1.loc17) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_7.1: %i32 = value_of_initializer %int.convert_checked.loc17_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_7.2: %i32 = converted %int_1.loc17, %.loc17_7.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc17_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_10.1: = bound_method %int_2.loc17, %impl.elem0.loc17_10 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc17_10: = specific_function %impl.elem0.loc17_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_10: = specific_function %impl.elem0.loc17_10, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %int_2.loc17, %specific_fn.loc17_10 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc17_10: init %i32 = call %bound_method.loc17_10.2(%int_2.loc17) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc17_10.1: %i32 = value_of_initializer %int.convert_checked.loc17_10 [concrete = constants.%int_2.ef8] @@ -126,14 +126,14 @@ fn Main() { // CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc18_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1.loc18, %impl.elem0.loc18_7 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc18_7: = specific_function %impl.elem0.loc18_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18_7: = specific_function %impl.elem0.loc18_7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1.loc18, %specific_fn.loc18_7 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc18_7: init %i32 = call %bound_method.loc18_7.2(%int_1.loc18) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.1: %i32 = value_of_initializer %int.convert_checked.loc18_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.2: %i32 = converted %int_1.loc18, %.loc18_7.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc18_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_10.1: = bound_method %int_2.loc18, %impl.elem0.loc18_10 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc18_10: = specific_function %impl.elem0.loc18_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18_10: = specific_function %impl.elem0.loc18_10, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_10.2: = bound_method %int_2.loc18, %specific_fn.loc18_10 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc18_10: init %i32 = call %bound_method.loc18_10.2(%int_2.loc18) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc18_10.1: %i32 = value_of_initializer %int.convert_checked.loc18_10 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index 385c5e7f9e69..4b389f5a820a 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -52,15 +52,15 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.3fa, @F(%F.8b3) [symbolic] @@ -166,7 +166,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_29.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_29.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc8_29.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc8_29.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index ddf39034b3dd..7f96a7b8593d 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -477,15 +477,15 @@ import library "extern_api"; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [concrete] @@ -611,7 +611,7 @@ import library "extern_api"; // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_16.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_16.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %bound_method.loc7_16.2(%int_1.loc7) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_16.1: %i32 = value_of_initializer %int.convert_checked.loc7 [concrete = constants.%int_1.5d2] @@ -623,7 +623,7 @@ import library "extern_api"; // CHECK:STDOUT: %.loc8_25.1: %tuple.type.985 = tuple_literal (%int_1.loc8) // CHECK:STDOUT: %impl.elem0.loc8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_25.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %bound_method.loc8_25.2(%int_1.loc8) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_25.2: %i32 = value_of_initializer %int.convert_checked.loc8 [concrete = constants.%int_1.5d2] @@ -672,15 +672,15 @@ import library "extern_api"; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete] @@ -822,7 +822,7 @@ import library "extern_api"; // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc53: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc53_16.1: = bound_method %int_1.loc53, %impl.elem0.loc53 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_16.2: = bound_method %int_1.loc53, %specific_fn.loc53 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %bound_method.loc53_16.2(%int_1.loc53) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc53_16.1: %i32 = value_of_initializer %int.convert_checked.loc53 [concrete = constants.%int_1.5d2] @@ -834,7 +834,7 @@ import library "extern_api"; // CHECK:STDOUT: %.loc54_25.1: %tuple.type.985 = tuple_literal (%int_1.loc54) // CHECK:STDOUT: %impl.elem0.loc54: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc54_25.1: = bound_method %int_1.loc54, %impl.elem0.loc54 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc54_25.2: = bound_method %int_1.loc54, %specific_fn.loc54 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %bound_method.loc54_25.2(%int_1.loc54) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc54_25.2: %i32 = value_of_initializer %int.convert_checked.loc54 [concrete = constants.%int_1.5d2] @@ -888,8 +888,8 @@ import library "extern_api"; // CHECK:STDOUT: %ImplicitAs.impl_witness.e34: = impl_witness imports.%ImplicitAs.impl_witness_table.e36, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.ed5: type = fn_type @Convert.2, @impl.c81(%int_32) [concrete] // CHECK:STDOUT: %Convert.16d: %Convert.type.ed5 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] -// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.2e7: %ImplicitAs.type.9ba = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.e34) [concrete] +// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Convert.type.6da, %ImplicitAs.facet.2e7 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.16d [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.16d, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -1084,15 +1084,15 @@ import library "extern_api"; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [concrete] @@ -1218,7 +1218,7 @@ import library "extern_api"; // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc53: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc53_16.1: = bound_method %int_1.loc53, %impl.elem0.loc53 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_16.2: = bound_method %int_1.loc53, %specific_fn.loc53 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %bound_method.loc53_16.2(%int_1.loc53) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc53_16.1: %i32 = value_of_initializer %int.convert_checked.loc53 [concrete = constants.%int_1.5d2] @@ -1230,7 +1230,7 @@ import library "extern_api"; // CHECK:STDOUT: %.loc54_25.1: %tuple.type.985 = tuple_literal (%int_1.loc54) // CHECK:STDOUT: %impl.elem0.loc54: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc54_25.1: = bound_method %int_1.loc54, %impl.elem0.loc54 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc54_25.2: = bound_method %int_1.loc54, %specific_fn.loc54 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %bound_method.loc54_25.2(%int_1.loc54) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc54_25.2: %i32 = value_of_initializer %int.convert_checked.loc54 [concrete = constants.%int_1.5d2] @@ -1269,15 +1269,15 @@ import library "extern_api"; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [concrete] @@ -1403,7 +1403,7 @@ import library "extern_api"; // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc53: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc53_16.1: = bound_method %int_1.loc53, %impl.elem0.loc53 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_16.2: = bound_method %int_1.loc53, %specific_fn.loc53 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %bound_method.loc53_16.2(%int_1.loc53) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc53_16.1: %i32 = value_of_initializer %int.convert_checked.loc53 [concrete = constants.%int_1.5d2] @@ -1415,7 +1415,7 @@ import library "extern_api"; // CHECK:STDOUT: %.loc54_25.1: %tuple.type.985 = tuple_literal (%int_1.loc54) // CHECK:STDOUT: %impl.elem0.loc54: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc54_25.1: = bound_method %int_1.loc54, %impl.elem0.loc54 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc54_25.2: = bound_method %int_1.loc54, %specific_fn.loc54 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %bound_method.loc54_25.2(%int_1.loc54) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc54_25.2: %i32 = value_of_initializer %int.convert_checked.loc54 [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index d5f0aa9bb084..596116db595c 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -265,15 +265,15 @@ fn D() {} // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [concrete] @@ -363,7 +363,7 @@ fn D() {} // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_16.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_16.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %bound_method.loc7_16.2(%int_1.loc7) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_16.1: %i32 = value_of_initializer %int.convert_checked.loc7 [concrete = constants.%int_1.5d2] @@ -375,7 +375,7 @@ fn D() {} // CHECK:STDOUT: %.loc8_25.1: %tuple.type.985 = tuple_literal (%int_1.loc8) // CHECK:STDOUT: %impl.elem0.loc8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_25.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %bound_method.loc8_25.2(%int_1.loc8) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_25.2: %i32 = value_of_initializer %int.convert_checked.loc8 [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index c130817f66f4..996b65810ace 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -813,7 +813,7 @@ fn F() { // CHECK:STDOUT: --- deduce_nested_tuple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -821,7 +821,7 @@ fn F() { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] -// CHECK:STDOUT: %tuple.type.f83: type = tuple_type (%T, %i32) [symbolic] +// CHECK:STDOUT: %tuple.type.f83: type = tuple_type (%T.8b3, %i32) [symbolic] // CHECK:STDOUT: %pattern_type.ec8: type = pattern_type %tuple.type.f83 [symbolic] // CHECK:STDOUT: %TupleParam.type: type = fn_type @TupleParam [concrete] // CHECK:STDOUT: %TupleParam: %TupleParam.type = struct_value () [concrete] @@ -839,15 +839,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %tuple: %tuple.type.4c8 = tuple_value (%int_1, %int_2.ef8) [concrete] @@ -879,10 +879,10 @@ fn F() { // CHECK:STDOUT: %x.patt: @TupleParam.%pattern_type (%pattern_type.ec8) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @TupleParam.%pattern_type (%pattern_type.ec8) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.2 (constants.%T.8b3)] // CHECK:STDOUT: %x.param: @TupleParam.%tuple.type (%tuple.type.f83) = value_param call_param0 // CHECK:STDOUT: %.loc4_35.1: type = splice_block %.loc4_35.3 [symbolic = %tuple.type (constants.%tuple.type.f83)] { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T.8b3)] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc4_35.2: %tuple.type.24b = tuple_literal (%T.ref, %i32) @@ -894,7 +894,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @TupleParam(%T.loc4_15.1: type) { -// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.2 (constants.%T.8b3)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc4_15.2, constants.%i32) [symbolic = %tuple.type (constants.%tuple.type.f83)] // CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [symbolic = %pattern_type (constants.%pattern_type.ec8)] // CHECK:STDOUT: @@ -916,7 +916,7 @@ fn F() { // CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam.ref, @TupleParam(Core.IntLiteral) [concrete = constants.%TupleParam.specific_fn] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_19.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_19.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_19.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc7_19.2: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] @@ -927,8 +927,8 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TupleParam(constants.%T) { -// CHECK:STDOUT: %T.loc4_15.2 => constants.%T +// CHECK:STDOUT: specific @TupleParam(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_15.2 => constants.%T.8b3 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.f83 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.ec8 // CHECK:STDOUT: } @@ -945,14 +945,14 @@ fn F() { // CHECK:STDOUT: --- deduce_nested_struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %struct_type.a.b.46e: type = struct_type {.a: %T, .b: %i32} [symbolic] +// CHECK:STDOUT: %struct_type.a.b.46e: type = struct_type {.a: %T.8b3, .b: %i32} [symbolic] // CHECK:STDOUT: %pattern_type.e94: type = pattern_type %struct_type.a.b.46e [symbolic] // CHECK:STDOUT: %StructParam.type: type = fn_type @StructParam [concrete] // CHECK:STDOUT: %StructParam: %StructParam.type = struct_value () [concrete] @@ -970,15 +970,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %struct: %struct_type.a.b.a13 = struct_value (%int_1, %int_2.ef8) [concrete] @@ -1010,13 +1010,13 @@ fn F() { // CHECK:STDOUT: %x.patt: @StructParam.%pattern_type (%pattern_type.e94) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @StructParam.%pattern_type (%pattern_type.e94) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T.8b3)] // CHECK:STDOUT: %x.param: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.46e) = value_param call_param0 // CHECK:STDOUT: %.loc4: type = splice_block %struct_type.a.b.loc4_44.1 [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.46e)] { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T.8b3)] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.loc4_44.1: type = struct_type {.a: @StructParam.%T.loc4_16.2 (%T), .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.46e)] +// CHECK:STDOUT: %struct_type.a.b.loc4_44.1: type = struct_type {.a: @StructParam.%T.loc4_16.2 (%T.8b3), .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.46e)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.46e) = bind_name x, %x.param // CHECK:STDOUT: } @@ -1024,8 +1024,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @StructParam(%T.loc4_16.1: type) { -// CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)] -// CHECK:STDOUT: %struct_type.a.b.loc4_44.2: type = struct_type {.a: @StructParam.%T.loc4_16.2 (%T), .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.46e)] +// CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T.8b3)] +// CHECK:STDOUT: %struct_type.a.b.loc4_44.2: type = struct_type {.a: @StructParam.%T.loc4_16.2 (%T.8b3), .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.46e)] // CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.b.loc4_44.2 [symbolic = %pattern_type (constants.%pattern_type.e94)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1046,7 +1046,7 @@ fn F() { // CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam.ref, @StructParam(Core.IntLiteral) [concrete = constants.%StructParam.specific_fn] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_30.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_30.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_30.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc7_30.2: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] @@ -1057,8 +1057,8 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @StructParam(constants.%T) { -// CHECK:STDOUT: %T.loc4_16.2 => constants.%T +// CHECK:STDOUT: specific @StructParam(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_16.2 => constants.%T.8b3 // CHECK:STDOUT: %struct_type.a.b.loc4_44.2 => constants.%struct_type.a.b.46e // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e94 // CHECK:STDOUT: } @@ -1827,14 +1827,16 @@ fn F() { // CHECK:STDOUT: %CC.3ba: type = class_type @CC, @CC(%D) [symbolic] // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] // CHECK:STDOUT: %Self.6e6: %Z.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %Y.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.da0: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.c6f: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.a92: %Op.type.c6f = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %Y.type, %Op.a92 [concrete] // CHECK:STDOUT: %facet_type: type = facet_type <@Y & @W> [concrete] // CHECK:STDOUT: %E: %facet_type = bind_symbolic_name E, 0 [symbolic] // CHECK:STDOUT: %pattern_type.122: type = pattern_type %facet_type [concrete] @@ -1854,13 +1856,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude/operators/bitwise, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude/operators/bitwise, loc96_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/operators/bitwise, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.ad2 = import_ref Core//prelude/operators/bitwise, loc113_52, unloaded +// CHECK:STDOUT: %Core.import_ref.0f9: %Op.type.c6f = import_ref Core//prelude/operators/bitwise, loc114_42, loaded [concrete = constants.%Op.a92] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.ad2, %Core.import_ref.0f9), @impl.ee8 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1909,8 +1912,8 @@ fn F() { // CHECK:STDOUT: %.loc19_20.1: type = splice_block %.loc19_20.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: %W.ref: type = name_ref W, file.%W.decl [concrete = constants.%W.type] -// CHECK:STDOUT: %impl.elem0: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %bound_method: = bound_method %Y.ref, %impl.elem0 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem1: %.da0 = impl_witness_access constants.%BitAndWith.impl_witness, element1 [concrete = constants.%Op.a92] +// CHECK:STDOUT: %bound_method: = bound_method %Y.ref, %impl.elem1 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and: init type = call %bound_method(%Y.ref, %W.ref) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc19_20.2: type = value_of_initializer %type.and [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc19_20.3: type = converted %type.and, %.loc19_20.2 [concrete = constants.%facet_type] diff --git a/toolchain/check/testdata/function/generic/param_in_type.carbon b/toolchain/check/testdata/function/generic/param_in_type.carbon index 96787051d6af..6ebad25f396c 100644 --- a/toolchain/check/testdata/function/generic/param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/param_in_type.carbon @@ -27,18 +27,18 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] -// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %N.51e, %Convert.960 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.51e, %Convert.specific_fn [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method(%N.51e) [symbolic] -// CHECK:STDOUT: %array_type: type = array_type %int.convert_checked, %i32 [symbolic] +// CHECK:STDOUT: %int.convert_checked.12c: init Core.IntLiteral = call %bound_method(%N.51e) [symbolic] +// CHECK:STDOUT: %array_type: type = array_type %int.convert_checked.12c, %i32 [symbolic] // CHECK:STDOUT: %ptr.0ad: type = ptr_type %array_type [symbolic] // CHECK:STDOUT: %pattern_type.c7e: type = pattern_type %ptr.0ad [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -81,11 +81,11 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc14_6.1 [symbolic = %N.loc14_6.2 (constants.%N.51e)] // CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc14_29.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound (constants.%Convert.bound)] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_29.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc14_29.3 (constants.%bound_method)] -// CHECK:STDOUT: %int.convert_checked.loc14_29.1: init Core.IntLiteral = call %bound_method.loc14_29.2(%N.ref) [symbolic = %int.convert_checked.loc14_29.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc14_29.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_29.1 [symbolic = %int.convert_checked.loc14_29.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc14_29.2: Core.IntLiteral = converted %N.ref, %.loc14_29.1 [symbolic = %int.convert_checked.loc14_29.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc14_29.1: init Core.IntLiteral = call %bound_method.loc14_29.2(%N.ref) [symbolic = %int.convert_checked.loc14_29.2 (constants.%int.convert_checked.12c)] +// CHECK:STDOUT: %.loc14_29.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_29.1 [symbolic = %int.convert_checked.loc14_29.2 (constants.%int.convert_checked.12c)] +// CHECK:STDOUT: %.loc14_29.2: Core.IntLiteral = converted %N.ref, %.loc14_29.1 [symbolic = %int.convert_checked.loc14_29.2 (constants.%int.convert_checked.12c)] // CHECK:STDOUT: %array_type.loc14_30.1: type = array_type %.loc14_29.2, %i32.loc14_24 [symbolic = %array_type.loc14_30.2 (constants.%array_type)] // CHECK:STDOUT: %ptr.loc14_31.1: type = ptr_type %array_type.loc14_30.1 [symbolic = %ptr.loc14_31.2 (constants.%ptr.0ad)] // CHECK:STDOUT: } @@ -97,7 +97,7 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: %N.loc14_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc14_6.2 (constants.%N.51e)] // CHECK:STDOUT: %Convert.bound: = bound_method %N.loc14_6.2, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound)] // CHECK:STDOUT: %bound_method.loc14_29.3: = bound_method %N.loc14_6.2, constants.%Convert.specific_fn [symbolic = %bound_method.loc14_29.3 (constants.%bound_method)] -// CHECK:STDOUT: %int.convert_checked.loc14_29.2: init Core.IntLiteral = call %bound_method.loc14_29.3(%N.loc14_6.2) [symbolic = %int.convert_checked.loc14_29.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc14_29.2: init Core.IntLiteral = call %bound_method.loc14_29.3(%N.loc14_6.2) [symbolic = %int.convert_checked.loc14_29.2 (constants.%int.convert_checked.12c)] // CHECK:STDOUT: %array_type.loc14_30.2: type = array_type %int.convert_checked.loc14_29.2, constants.%i32 [symbolic = %array_type.loc14_30.2 (constants.%array_type)] // CHECK:STDOUT: %ptr.loc14_31.2: type = ptr_type %array_type.loc14_30.2 [symbolic = %ptr.loc14_31.2 (constants.%ptr.0ad)] // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc14_31.2 [symbolic = %pattern_type (constants.%pattern_type.c7e)] @@ -109,7 +109,7 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: %N.loc14_6.2 => constants.%N.51e // CHECK:STDOUT: %Convert.bound => constants.%Convert.bound // CHECK:STDOUT: %bound_method.loc14_29.3 => constants.%bound_method -// CHECK:STDOUT: %int.convert_checked.loc14_29.2 => constants.%int.convert_checked +// CHECK:STDOUT: %int.convert_checked.loc14_29.2 => constants.%int.convert_checked.12c // CHECK:STDOUT: %array_type.loc14_30.2 => constants.%array_type // CHECK:STDOUT: %ptr.loc14_31.2 => constants.%ptr.0ad // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c7e diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index 832b260aac25..50954d7afb7a 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -57,12 +57,12 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: --- call_defined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %Defined.type: type = fn_type @Defined [concrete] // CHECK:STDOUT: %Defined: %Defined.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -78,15 +78,15 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.6, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] // CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.197 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.6(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined, @Defined(%i32) [concrete] @@ -119,13 +119,13 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: @Defined.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Defined.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] -// CHECK:STDOUT: %T.loc4_12.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @Defined.%T.loc4_12.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] -// CHECK:STDOUT: %x: @Defined.%T.loc4_12.2 (%T) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @Defined.%T.loc4_12.2 (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Defined.%T.loc4_12.2 (%T) = return_slot %return.param +// CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_12.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x.param: @Defined.%T.loc4_12.2 (%T.8b3) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x: @Defined.%T.loc4_12.2 (%T.8b3) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @Defined.%T.loc4_12.2 (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Defined.%T.loc4_12.2 (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallDefined.decl: %CallDefined.type = fn_decl @CallDefined [concrete = constants.%CallDefined] { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] @@ -139,15 +139,15 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Defined(%T.loc4_12.1: type) { -// CHECK:STDOUT: %T.loc4_12.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_12.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_12.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_12.2 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @Defined.%T.loc4_12.2 (%T)) -> @Defined.%T.loc4_12.2 (%T) { +// CHECK:STDOUT: fn(%x.param: @Defined.%T.loc4_12.2 (%T.8b3)) -> @Defined.%T.loc4_12.2 (%T.8b3) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Defined.%T.loc4_12.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Defined.%T.loc4_12.2 (%T.8b3) = name_ref x, %x // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -160,7 +160,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc9_20.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_20.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc9_20.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -172,8 +172,8 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: return %.loc9_27.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Defined(constants.%T) { -// CHECK:STDOUT: %T.loc4_12.2 => constants.%T +// CHECK:STDOUT: specific @Defined(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_12.2 => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -188,9 +188,9 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: --- call_defined_late.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %Defined.type: type = fn_type @Defined [concrete] // CHECK:STDOUT: %Defined: %Defined.type = struct_value () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -207,20 +207,20 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.6, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] // CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.197 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.6(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined, @Defined(%i32) [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -250,13 +250,13 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: @Defined.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Defined.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] -// CHECK:STDOUT: %T.loc4_12.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T)] -// CHECK:STDOUT: %x.param.loc4: @Defined.%T.loc4_12.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] -// CHECK:STDOUT: %x.loc4: @Defined.%T.loc4_12.2 (%T) = bind_name x, %x.param.loc4 -// CHECK:STDOUT: %return.param.loc4: ref @Defined.%T.loc4_12.2 (%T) = out_param call_param1 -// CHECK:STDOUT: %return.loc4: ref @Defined.%T.loc4_12.2 (%T) = return_slot %return.param.loc4 +// CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_12.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x.param.loc4: @Defined.%T.loc4_12.2 (%T.8b3) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x.loc4: @Defined.%T.loc4_12.2 (%T.8b3) = bind_name x, %x.param.loc4 +// CHECK:STDOUT: %return.param.loc4: ref @Defined.%T.loc4_12.2 (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return.loc4: ref @Defined.%T.loc4_12.2 (%T.8b3) = return_slot %return.param.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %CallDefined.decl: %CallDefined.type = fn_decl @CallDefined [concrete = constants.%CallDefined] { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] @@ -274,26 +274,26 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: @Defined.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Defined.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc10_31: type = name_ref T, %T.loc10 [symbolic = %T.loc4_12.2 (constants.%T)] -// CHECK:STDOUT: %T.loc10: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T)] -// CHECK:STDOUT: %x.param.loc10: @Defined.%T.loc4_12.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10 [symbolic = %T.loc4_12.2 (constants.%T)] -// CHECK:STDOUT: %x.loc10: @Defined.%T.loc4_12.2 (%T) = bind_name x, %x.param.loc10 -// CHECK:STDOUT: %return.param.loc10: ref @Defined.%T.loc4_12.2 (%T) = out_param call_param1 -// CHECK:STDOUT: %return.loc10: ref @Defined.%T.loc4_12.2 (%T) = return_slot %return.param.loc10 +// CHECK:STDOUT: %T.ref.loc10_31: type = name_ref T, %T.loc10 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc10: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x.param.loc10: @Defined.%T.loc4_12.2 (%T.8b3) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x.loc10: @Defined.%T.loc4_12.2 (%T.8b3) = bind_name x, %x.param.loc10 +// CHECK:STDOUT: %return.param.loc10: ref @Defined.%T.loc4_12.2 (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return.loc10: ref @Defined.%T.loc4_12.2 (%T.8b3) = return_slot %return.param.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Defined(%T.loc4_12.1: type) { -// CHECK:STDOUT: %T.loc4_12.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_12.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.2 (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_12.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_12.2 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param.loc10: @Defined.%T.loc4_12.2 (%T)) -> @Defined.%T.loc4_12.2 (%T) { +// CHECK:STDOUT: fn(%x.param.loc10: @Defined.%T.loc4_12.2 (%T.8b3)) -> @Defined.%T.loc4_12.2 (%T.8b3) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Defined.%T.loc4_12.2 (%T) = name_ref x, %x.loc10 +// CHECK:STDOUT: %x.ref: @Defined.%T.loc4_12.2 (%T.8b3) = name_ref x, %x.loc10 // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -306,7 +306,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc7_20.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_20.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc7_20.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -318,8 +318,8 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: return %.loc7_27.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Defined(constants.%T) { -// CHECK:STDOUT: %T.loc4_12.2 => constants.%T +// CHECK:STDOUT: specific @Defined(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_12.2 => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -334,9 +334,9 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: --- fail_call_undefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %Undefined.type: type = fn_type @Undefined [concrete] // CHECK:STDOUT: %Undefined: %Undefined.type = struct_value () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -352,15 +352,15 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.6, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] // CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.197 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.6(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Undefined.specific_fn: = specific_function %Undefined, @Undefined(%i32) [concrete] @@ -393,13 +393,13 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: @Undefined.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Undefined.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_33: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T)] -// CHECK:STDOUT: %T.loc4_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_14.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @Undefined.%T.loc4_14.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc4_27: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T)] -// CHECK:STDOUT: %x: @Undefined.%T.loc4_14.2 (%T) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @Undefined.%T.loc4_14.2 (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Undefined.%T.loc4_14.2 (%T) = return_slot %return.param +// CHECK:STDOUT: %T.ref.loc4_33: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_14.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x.param: @Undefined.%T.loc4_14.2 (%T.8b3) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc4_27: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x: @Undefined.%T.loc4_14.2 (%T.8b3) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @Undefined.%T.loc4_14.2 (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Undefined.%T.loc4_14.2 (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallUndefined.decl: %CallUndefined.type = fn_decl @CallUndefined [concrete = constants.%CallUndefined] { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] @@ -413,10 +413,10 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Undefined(%T.loc4_14.1: type) { -// CHECK:STDOUT: %T.loc4_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_14.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_14.2 (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_14.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @Undefined.%T.loc4_14.2 (%T)) -> @Undefined.%T.loc4_14.2 (%T); +// CHECK:STDOUT: fn(%x.param: @Undefined.%T.loc4_14.2 (%T.8b3)) -> @Undefined.%T.loc4_14.2 (%T.8b3); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallUndefined() -> %i32 { @@ -427,7 +427,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc14_22.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_22.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_22.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc14_22.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -439,8 +439,8 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: return %.loc14_29.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Undefined(constants.%T) { -// CHECK:STDOUT: %T.loc4_14.2 => constants.%T +// CHECK:STDOUT: specific @Undefined(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_14.2 => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/call_basic_depth.carbon b/toolchain/check/testdata/generic/call_basic_depth.carbon index dab87c0ecdae..c2780ac5a423 100644 --- a/toolchain/check/testdata/generic/call_basic_depth.carbon +++ b/toolchain/check/testdata/generic/call_basic_depth.carbon @@ -47,26 +47,26 @@ fn M() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %Cfn.type: type = fn_type @Cfn [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Cfn: %Cfn.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] -// CHECK:STDOUT: %F.specific_fn.ef1: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %F.specific_fn.ef1: = specific_function %F, @F(%T.8b3) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %H.specific_fn.1ed: = specific_function %H, @H(%T) [symbolic] -// CHECK:STDOUT: %Cfn.specific_fn.53f: = specific_function %Cfn, @Cfn(%T) [symbolic] +// CHECK:STDOUT: %H.specific_fn.1ed: = specific_function %H, @H(%T.8b3) [symbolic] +// CHECK:STDOUT: %Cfn.specific_fn.53f: = specific_function %Cfn, @Cfn(%T.8b3) [symbolic] // CHECK:STDOUT: %M.type: type = fn_type @M [concrete] -// CHECK:STDOUT: %M: %M.type = struct_value () [concrete] +// CHECK:STDOUT: %M.e98: %M.type = struct_value () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -80,15 +80,15 @@ fn M() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %F.specific_fn.501: = specific_function %F, @F(%i32) [concrete] @@ -126,10 +126,10 @@ fn M() { // CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc19_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @F.%T.loc19_6.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)] -// CHECK:STDOUT: %x: @F.%T.loc19_6.2 (%T) = bind_name x, %x.param +// CHECK:STDOUT: %T.loc19_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x.param: @F.%T.loc19_6.2 (%T.8b3) = value_param call_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x: @F.%T.loc19_6.2 (%T.8b3) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -138,13 +138,13 @@ fn M() { // CHECK:STDOUT: %return.patt: @H.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @H.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc22_25: type = name_ref T, %T.loc22_6.1 [symbolic = %T.loc22_6.2 (constants.%T)] -// CHECK:STDOUT: %T.loc22_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @H.%T.loc22_6.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc22_19: type = name_ref T, %T.loc22_6.1 [symbolic = %T.loc22_6.2 (constants.%T)] -// CHECK:STDOUT: %x: @H.%T.loc22_6.2 (%T) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @H.%T.loc22_6.2 (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @H.%T.loc22_6.2 (%T) = return_slot %return.param +// CHECK:STDOUT: %T.ref.loc22_25: type = name_ref T, %T.loc22_6.1 [symbolic = %T.loc22_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc22_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x.param: @H.%T.loc22_6.2 (%T.8b3) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc22_19: type = name_ref T, %T.loc22_6.1 [symbolic = %T.loc22_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x: @H.%T.loc22_6.2 (%T.8b3) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @H.%T.loc22_6.2 (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return: ref @H.%T.loc22_6.2 (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -153,15 +153,15 @@ fn M() { // CHECK:STDOUT: %return.patt: @G.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @G.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc28_25: type = name_ref T, %T.loc28_6.1 [symbolic = %T.loc28_6.2 (constants.%T)] -// CHECK:STDOUT: %T.loc28_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_6.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @G.%T.loc28_6.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc28_19: type = name_ref T, %T.loc28_6.1 [symbolic = %T.loc28_6.2 (constants.%T)] -// CHECK:STDOUT: %x: @G.%T.loc28_6.2 (%T) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @G.%T.loc28_6.2 (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @G.%T.loc28_6.2 (%T) = return_slot %return.param +// CHECK:STDOUT: %T.ref.loc28_25: type = name_ref T, %T.loc28_6.1 [symbolic = %T.loc28_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc28_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x.param: @G.%T.loc28_6.2 (%T.8b3) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc28_19: type = name_ref T, %T.loc28_6.1 [symbolic = %T.loc28_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %x: @G.%T.loc28_6.2 (%T.8b3) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @G.%T.loc28_6.2 (%T.8b3) = out_param call_param1 +// CHECK:STDOUT: %return: ref @G.%T.loc28_6.2 (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %M.decl: %M.type = fn_decl @M [concrete = constants.%M] {} {} +// CHECK:STDOUT: %M.decl: %M.type = fn_decl @M [concrete = constants.%M.e98] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -175,10 +175,10 @@ fn M() { // CHECK:STDOUT: %self.param: %C = value_param call_param0 // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %T.loc15_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @Cfn.%T.loc15_22.1 (%T) = value_param call_param1 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_22.2 [symbolic = %T.loc15_22.1 (constants.%T)] -// CHECK:STDOUT: %x: @Cfn.%T.loc15_22.1 (%T) = bind_name x, %x.param +// CHECK:STDOUT: %T.loc15_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T.8b3)] +// CHECK:STDOUT: %x.param: @Cfn.%T.loc15_22.1 (%T.8b3) = value_param call_param1 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_22.2 [symbolic = %T.loc15_22.1 (constants.%T.8b3)] +// CHECK:STDOUT: %x: @Cfn.%T.loc15_22.1 (%T.8b3) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -190,52 +190,52 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Cfn(%T.loc15_22.2: type) { -// CHECK:STDOUT: %T.loc15_22.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T)] +// CHECK:STDOUT: %T.loc15_22.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc15_22.1 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc15_22.1 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: %C, %x.param: @Cfn.%T.loc15_22.1 (%T)) { +// CHECK:STDOUT: fn(%self.param: %C, %x.param: @Cfn.%T.loc15_22.1 (%T.8b3)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc19_6.1: type) { -// CHECK:STDOUT: %T.loc19_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc19_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc19_6.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc19_6.2 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%T.loc19_6.2 (%T)) { +// CHECK:STDOUT: fn(%x.param: @F.%T.loc19_6.2 (%T.8b3)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @H(%T.loc22_6.1: type) { -// CHECK:STDOUT: %T.loc22_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc22_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc22_6.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc22_6.2 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: %F.specific_fn.loc24_3.2: = specific_function constants.%F, @F(%T.loc22_6.2) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.ef1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @H.%T.loc22_6.2 (%T)) -> @H.%T.loc22_6.2 (%T) { +// CHECK:STDOUT: fn(%x.param: @H.%T.loc22_6.2 (%T.8b3)) -> @H.%T.loc22_6.2 (%T.8b3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %x.ref.loc24: @H.%T.loc22_6.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %F.specific_fn.loc24_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.ef1)] +// CHECK:STDOUT: %x.ref.loc24: @H.%T.loc22_6.2 (%T.8b3) = name_ref x, %x +// CHECK:STDOUT: %F.specific_fn.loc24_3.1: = specific_function %F.ref, @F(constants.%T.8b3) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.ef1)] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc24_3.1(%x.ref.loc24) -// CHECK:STDOUT: %x.ref.loc25: @H.%T.loc22_6.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc25: @H.%T.loc22_6.2 (%T.8b3) = name_ref x, %x // CHECK:STDOUT: return %x.ref.loc25 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(%T.loc28_6.1: type) { -// CHECK:STDOUT: %T.loc28_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc28_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc28_6.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -244,15 +244,15 @@ fn M() { // CHECK:STDOUT: %F.specific_fn.loc30_3.2: = specific_function constants.%F, @F(%T.loc28_6.2) [symbolic = %F.specific_fn.loc30_3.2 (constants.%F.specific_fn.ef1)] // CHECK:STDOUT: %Cfn.specific_fn.loc33_4.2: = specific_function constants.%Cfn, @Cfn(%T.loc28_6.2) [symbolic = %Cfn.specific_fn.loc33_4.2 (constants.%Cfn.specific_fn.53f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @G.%T.loc28_6.2 (%T)) -> @G.%T.loc28_6.2 (%T) { +// CHECK:STDOUT: fn(%x.param: @G.%T.loc28_6.2 (%T.8b3)) -> @G.%T.loc28_6.2 (%T.8b3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [concrete = constants.%H] -// CHECK:STDOUT: %x.ref.loc29: @G.%T.loc28_6.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %H.specific_fn.loc29_3.1: = specific_function %H.ref, @H(constants.%T) [symbolic = %H.specific_fn.loc29_3.2 (constants.%H.specific_fn.1ed)] -// CHECK:STDOUT: %H.call: init @G.%T.loc28_6.2 (%T) = call %H.specific_fn.loc29_3.1(%x.ref.loc29) +// CHECK:STDOUT: %x.ref.loc29: @G.%T.loc28_6.2 (%T.8b3) = name_ref x, %x +// CHECK:STDOUT: %H.specific_fn.loc29_3.1: = specific_function %H.ref, @H(constants.%T.8b3) [symbolic = %H.specific_fn.loc29_3.2 (constants.%H.specific_fn.1ed)] +// CHECK:STDOUT: %H.call: init @G.%T.loc28_6.2 (%T.8b3) = call %H.specific_fn.loc29_3.1(%x.ref.loc29) // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %x.ref.loc30: @G.%T.loc28_6.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %F.specific_fn.loc30_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc30_3.2 (constants.%F.specific_fn.ef1)] +// CHECK:STDOUT: %x.ref.loc30: @G.%T.loc28_6.2 (%T.8b3) = name_ref x, %x +// CHECK:STDOUT: %F.specific_fn.loc30_3.1: = specific_function %F.ref, @F(constants.%T.8b3) [symbolic = %F.specific_fn.loc30_3.2 (constants.%F.specific_fn.ef1)] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc30_3.1(%x.ref.loc30) // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %pattern_type.c48 = binding_pattern c [concrete] @@ -264,12 +264,12 @@ fn M() { // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %Cfn.ref: %Cfn.type = name_ref Cfn, @C.%Cfn.decl [concrete = constants.%Cfn] // CHECK:STDOUT: %Cfn.bound: = bound_method %c.ref, %Cfn.ref -// CHECK:STDOUT: %x.ref.loc33: @G.%T.loc28_6.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %Cfn.specific_fn.loc33_4.1: = specific_function %Cfn.ref, @Cfn(constants.%T) [symbolic = %Cfn.specific_fn.loc33_4.2 (constants.%Cfn.specific_fn.53f)] +// CHECK:STDOUT: %x.ref.loc33: @G.%T.loc28_6.2 (%T.8b3) = name_ref x, %x +// CHECK:STDOUT: %Cfn.specific_fn.loc33_4.1: = specific_function %Cfn.ref, @Cfn(constants.%T.8b3) [symbolic = %Cfn.specific_fn.loc33_4.2 (constants.%Cfn.specific_fn.53f)] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %Cfn.specific_fn.loc33_4.1 // CHECK:STDOUT: %.loc33: %C = bind_value %c.ref // CHECK:STDOUT: %Cfn.call: init %empty_tuple.type = call %bound_method(%.loc33, %x.ref.loc33) -// CHECK:STDOUT: %x.ref.loc34: @G.%T.loc28_6.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc34: @G.%T.loc28_6.2 (%T.8b3) = name_ref x, %x // CHECK:STDOUT: return %x.ref.loc34 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -284,7 +284,7 @@ fn M() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc38_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc38_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc38_3.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc38_3: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] @@ -319,24 +319,24 @@ fn M() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Cfn(constants.%T) { -// CHECK:STDOUT: %T.loc15_22.1 => constants.%T +// CHECK:STDOUT: specific @Cfn(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc15_22.1 => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc19_6.2 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc19_6.2 => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @H(constants.%T) { -// CHECK:STDOUT: %T.loc22_6.2 => constants.%T +// CHECK:STDOUT: specific @H(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc22_6.2 => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -344,8 +344,8 @@ fn M() { // CHECK:STDOUT: %F.specific_fn.loc24_3.2 => constants.%F.specific_fn.ef1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.loc28_6.2 => constants.%T +// CHECK:STDOUT: specific @G(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc28_6.2 => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/dependent_param.carbon b/toolchain/check/testdata/generic/dependent_param.carbon index 759a2ff3befd..5ffaaf569c09 100644 --- a/toolchain/check/testdata/generic/dependent_param.carbon +++ b/toolchain/check/testdata/generic/dependent_param.carbon @@ -26,21 +26,21 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: --- nested_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [concrete] // CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [concrete] -// CHECK:STDOUT: %Outer.9d6: type = class_type @Outer, @Outer(%T) [symbolic] -// CHECK:STDOUT: %U: %T = bind_symbolic_name U, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] -// CHECK:STDOUT: %Inner.type.eae: type = generic_class_type @Inner, @Outer(%T) [symbolic] +// CHECK:STDOUT: %Outer.9d6: type = class_type @Outer, @Outer(%T.8b3) [symbolic] +// CHECK:STDOUT: %U.f22: %T.8b3 = bind_symbolic_name U, 1 [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] +// CHECK:STDOUT: %Inner.type.eae: type = generic_class_type @Inner, @Outer(%T.8b3) [symbolic] // CHECK:STDOUT: %Inner.generic.137: %Inner.type.eae = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.879: type = class_type @Inner, @Inner(%T, %U) [symbolic] -// CHECK:STDOUT: %Get.type.889: type = fn_type @Get, @Inner(%T, %U) [symbolic] +// CHECK:STDOUT: %Inner.879: type = class_type @Inner, @Inner(%T.8b3, %U.f22) [symbolic] +// CHECK:STDOUT: %Get.type.889: type = fn_type @Get, @Inner(%T.8b3, %U.f22) [symbolic] // CHECK:STDOUT: %Get.118: %Get.type.889 = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -57,15 +57,15 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42.20e, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.c68: %i32 = int_value 42 [concrete] // CHECK:STDOUT: %Inner.025: type = class_type @Inner, @Inner(%i32, %int_42.c68) [concrete] @@ -97,7 +97,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n [concrete] @@ -112,7 +112,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Outer(%T.loc4_13.1: type) { -// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc4_13.2) [symbolic = %Inner.type (constants.%Inner.type.eae)] @@ -122,8 +122,8 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.eae) = class_decl @Inner [symbolic = @Outer.%Inner.generic (constants.%Inner.generic.137)] { // CHECK:STDOUT: %U.patt: @Inner.%pattern_type (%pattern_type.7dcd0a.1) = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %U.loc5_15.1: @Inner.%T (%T) = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.2 (constants.%U)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T.8b3)] +// CHECK:STDOUT: %U.loc5_15.1: @Inner.%T (%T.8b3) = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.2 (constants.%U.f22)] // CHECK:STDOUT: } // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -136,9 +136,9 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_13.1: type, %U.loc5_15.1: @Inner.%T (%T)) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %U.loc5_15.2: @Inner.%T (%T) = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.2 (constants.%U)] +// CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_13.1: type, %U.loc5_15.1: @Inner.%T (%T.8b3)) { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] +// CHECK:STDOUT: %U.loc5_15.2: @Inner.%T (%T.8b3) = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.2 (constants.%U.f22)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -150,9 +150,9 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %return.patt: @Get.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Get.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %return.param: ref @Get.%T (%T) = out_param call_param0 -// CHECK:STDOUT: %return: ref @Get.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T.8b3)] +// CHECK:STDOUT: %return.param: ref @Get.%T (%T.8b3) = out_param call_param0 +// CHECK:STDOUT: %return: ref @Get.%T (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -166,17 +166,17 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Get(@Outer.%T.loc4_13.1: type, @Inner.%U.loc5_15.1: @Inner.%T (%T)) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic fn @Get(@Outer.%T.loc4_13.1: type, @Inner.%U.loc5_15.1: @Inner.%T (%T.8b3)) { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.4ae)] -// CHECK:STDOUT: %U: @Get.%T (%T) = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)] +// CHECK:STDOUT: %U: @Get.%T (%T.8b3) = bind_symbolic_name U, 1 [symbolic = %U (constants.%U.f22)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @Get.%T (%T) { +// CHECK:STDOUT: fn() -> @Get.%T (%T.8b3) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %U.ref: @Get.%T (%T) = name_ref U, @Inner.%U.loc5_15.1 [symbolic = %U (constants.%U)] +// CHECK:STDOUT: %U.ref: @Get.%T (%T.8b3) = name_ref U, @Inner.%U.loc5_15.1 [symbolic = %U (constants.%U.f22)] // CHECK:STDOUT: return %U.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -192,7 +192,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_33.1: = bound_method constants.%int_42.20e, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_33.2: = bound_method constants.%int_42.20e, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc10_33.2(constants.%int_42.20e) [concrete = constants.%int_42.c68] // CHECK:STDOUT: %.loc10_33.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_42.c68] @@ -206,17 +206,17 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(constants.%T) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%T +// CHECK:STDOUT: specific @Outer(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%T.8b3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type => constants.%Inner.type.eae // CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.137 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(constants.%T, constants.%U) { -// CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %U.loc5_15.2 => constants.%U +// CHECK:STDOUT: specific @Inner(constants.%T.8b3, constants.%U.f22) { +// CHECK:STDOUT: %T => constants.%T.8b3 +// CHECK:STDOUT: %U.loc5_15.2 => constants.%U.f22 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -224,8 +224,8 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Get => constants.%Get.118 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Get(constants.%T, constants.%U) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Get(constants.%T.8b3, constants.%U.f22) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index 3386a3ddfc3c..8235940db9e4 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -51,14 +51,14 @@ class C(C:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.f06: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %C.elem.cca: type = unbound_element_type %C.f06, %T [symbolic] -// CHECK:STDOUT: %struct_type.x.2ac: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %C.f06: type = class_type @C, @C(%T.8b3) [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] +// CHECK:STDOUT: %C.elem.cca: type = unbound_element_type %C.f06, %T.8b3 [symbolic] +// CHECK:STDOUT: %struct_type.x.2ac: type = struct_type {.x: %T.8b3} [symbolic] // CHECK:STDOUT: %complete_type.4339: = complete_type_witness %struct_type.x.2ac [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -78,15 +78,15 @@ class C(C:! type) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %C.val: %C.d45 = struct_value (%int_1.5d2) [concrete] @@ -115,19 +115,19 @@ class C(C:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc5_11.1: type) { -// CHECK:STDOUT: %T.loc5_11.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_11.2 (constants.%T)] +// CHECK:STDOUT: %T.loc5_11.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_11.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc5_11.2 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc5_11.2) [symbolic = %C (constants.%C.f06)] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %T.loc5_11.2 [symbolic = %C.elem (constants.%C.elem.cca)] -// CHECK:STDOUT: %struct_type.x.loc7_3.2: type = struct_type {.x: @C.%T.loc5_11.2 (%T)} [symbolic = %struct_type.x.loc7_3.2 (constants.%struct_type.x.2ac)] +// CHECK:STDOUT: %struct_type.x.loc7_3.2: type = struct_type {.x: @C.%T.loc5_11.2 (%T.8b3)} [symbolic = %struct_type.x.loc7_3.2 (constants.%struct_type.x.2ac)] // CHECK:STDOUT: %complete_type.loc7_3.2: = complete_type_witness %struct_type.x.loc7_3.2 [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.4339)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_11.1 [symbolic = %T.loc5_11.2 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_11.1 [symbolic = %T.loc5_11.2 (constants.%T.8b3)] // CHECK:STDOUT: %.loc6: @C.%C.elem (%C.elem.cca) = field_decl x, element0 [concrete] -// CHECK:STDOUT: %struct_type.x.loc7_3.1: type = struct_type {.x: %T} [symbolic = %struct_type.x.loc7_3.2 (constants.%struct_type.x.2ac)] +// CHECK:STDOUT: %struct_type.x.loc7_3.1: type = struct_type {.x: %T.8b3} [symbolic = %struct_type.x.loc7_3.2 (constants.%struct_type.x.2ac)] // CHECK:STDOUT: %complete_type.loc7_3.1: = complete_type_witness %struct_type.x.loc7_3.1 [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.4339)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc7_3.1 // CHECK:STDOUT: @@ -143,7 +143,7 @@ class C(C:! type) { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc5_11.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_11.2 (constants.%T)] +// CHECK:STDOUT: %T.loc5_11.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_11.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: %pattern_type.7db = binding_pattern v [concrete] @@ -154,7 +154,7 @@ class C(C:! type) { // CHECK:STDOUT: %.loc8_26.1: %struct_type.x.c96 = struct_literal (%int_1) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_26.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_26.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc8_26.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_26.2: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] @@ -173,8 +173,8 @@ class C(C:! type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { -// CHECK:STDOUT: %T.loc5_11.2 => constants.%T +// CHECK:STDOUT: specific @C(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc5_11.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { diff --git a/toolchain/check/testdata/generic/template/convert.carbon b/toolchain/check/testdata/generic/template/convert.carbon index 86afd2be2b02..e0d7956552c3 100644 --- a/toolchain/check/testdata/generic/template/convert.carbon +++ b/toolchain/check/testdata/generic/template/convert.carbon @@ -61,9 +61,9 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: --- convert.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, template [template] +// CHECK:STDOUT: %T.8b3d5d.1: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [template] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3d5d.1 [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -73,7 +73,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] // CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [template] +// CHECK:STDOUT: %require_complete.4aeca8.1: = require_complete_type %T.8b3d5d.1 [template] // CHECK:STDOUT: %Test1.type: type = fn_type @Test1 [concrete] // CHECK:STDOUT: %Test1: %Test1.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn.501: = specific_function %F, @F(%i32) [concrete] @@ -87,7 +87,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %Convert.type.dae: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.937: %Convert.type.dae = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value %C, (%ImplicitAs.impl_witness.96d) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.564: %ImplicitAs.type.205 = facet_value %C, (%ImplicitAs.impl_witness.96d) [concrete] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.54b: = complete_type_witness %struct_type.n [concrete] // CHECK:STDOUT: %Test2.type: type = fn_type @Test2 [concrete] @@ -102,11 +102,11 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %inst.as_compatible.c0a: = inst_value [concrete] { // CHECK:STDOUT: %.fbe: %C = as_compatible @F.%x.ref // CHECK:STDOUT: } -// CHECK:STDOUT: %.2ce: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %.2ce: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.564 [concrete] // CHECK:STDOUT: %inst.splice_block.1fd: = inst_value [concrete] { // CHECK:STDOUT: %.96d: %i32 = splice_block %.521 { -// CHECK:STDOUT: %impl.elem0: %.2ce = impl_witness_access %ImplicitAs.impl_witness.96d, element0 [concrete = %Convert.937] -// CHECK:STDOUT: %bound_method: = bound_method %.fbe, %impl.elem0 +// CHECK:STDOUT: %impl.elem0.2ce: %.2ce = impl_witness_access %ImplicitAs.impl_witness.96d, element0 [concrete = %Convert.937] +// CHECK:STDOUT: %bound_method: = bound_method %.fbe, %impl.elem0.2ce // CHECK:STDOUT: %Convert.call: init %i32 = call %bound_method(%.fbe) // CHECK:STDOUT: %.fa7: %i32 = value_of_initializer %Convert.call // CHECK:STDOUT: %.521: %i32 = converted %.fbe, %.fa7 @@ -143,10 +143,10 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @F.%T.loc4_15.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %x: @F.%T.loc4_15.2 (%T) = bind_name x, %x.param +// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %x.param: @F.%T.loc4_15.2 (%T.8b3d5d.1) = value_param call_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %x: @F.%T.loc4_15.2 (%T.8b3d5d.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -229,18 +229,18 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc4_15.1: type) { -// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_15.2 [template = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4ae)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4aeca8.1)] // CHECK:STDOUT: %.loc5_11.3: = refine_type_action %x.ref, %T.loc4_15.2 [template] // CHECK:STDOUT: %.loc5_11.4: = convert_to_value_action %.loc5_11.1, constants.%i32 [template] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%T.loc4_15.2 (%T)) -> %i32 { +// CHECK:STDOUT: fn(%x.param: @F.%T.loc4_15.2 (%T.8b3d5d.1)) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @F.%T.loc4_15.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc5_11.1: @F.%T.loc4_15.2 (%T) = splice_inst %.loc5_11.3 +// CHECK:STDOUT: %x.ref: @F.%T.loc4_15.2 (%T.8b3d5d.1) = name_ref x, %x +// CHECK:STDOUT: %.loc5_11.1: @F.%T.loc4_15.2 (%T.8b3d5d.1) = splice_inst %.loc5_11.3 // CHECK:STDOUT: %.loc5_11.2: %i32 = splice_inst %.loc5_11.4 // CHECK:STDOUT: return %.loc5_11.2 // CHECK:STDOUT: } @@ -277,8 +277,8 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: return %.loc20_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc4_15.2 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.8b3d5d.1) { +// CHECK:STDOUT: %T.loc4_15.2 => constants.%T.8b3d5d.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -305,9 +305,9 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: --- fail_cannot_convert.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, template [template] +// CHECK:STDOUT: %T.8b3d5d.1: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [template] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3d5d.1 [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -315,7 +315,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [template] +// CHECK:STDOUT: %require_complete.4aeca8.1: = require_complete_type %T.8b3d5d.1 [template] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -363,10 +363,10 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @F.%T.loc4_15.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %x: @F.%T.loc4_15.2 (%T) = bind_name x, %x.param +// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %x.param: @F.%T.loc4_15.2 (%T.8b3d5d.1) = value_param call_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %x: @F.%T.loc4_15.2 (%T.8b3d5d.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -397,18 +397,18 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc4_15.1: type) { -// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_15.2 [template = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4ae)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4aeca8.1)] // CHECK:STDOUT: %.loc11_11.3: = refine_type_action %x.ref, %T.loc4_15.2 [template] // CHECK:STDOUT: %.loc11_11.4: = convert_to_value_action %.loc11_11.1, constants.%i32 [template] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%T.loc4_15.2 (%T)) -> %i32 { +// CHECK:STDOUT: fn(%x.param: @F.%T.loc4_15.2 (%T.8b3d5d.1)) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @F.%T.loc4_15.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc11_11.1: @F.%T.loc4_15.2 (%T) = splice_inst %.loc11_11.3 +// CHECK:STDOUT: %x.ref: @F.%T.loc4_15.2 (%T.8b3d5d.1) = name_ref x, %x +// CHECK:STDOUT: %.loc11_11.1: @F.%T.loc4_15.2 (%T.8b3d5d.1) = splice_inst %.loc11_11.3 // CHECK:STDOUT: %.loc11_11.2: %i32 = splice_inst %.loc11_11.4 // CHECK:STDOUT: return %.loc11_11.2 // CHECK:STDOUT: } @@ -425,8 +425,8 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: return %.loc21_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc4_15.2 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.8b3d5d.1) { +// CHECK:STDOUT: %T.loc4_15.2 => constants.%T.8b3d5d.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/template/member_access.carbon b/toolchain/check/testdata/generic/template/member_access.carbon index e59fb7f15342..2351cb30ad07 100644 --- a/toolchain/check/testdata/generic/template/member_access.carbon +++ b/toolchain/check/testdata/generic/template/member_access.carbon @@ -414,9 +414,9 @@ fn Test(e: E) { // CHECK:STDOUT: --- fail_member_wrong_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, template [template] +// CHECK:STDOUT: %T.8b3d5d.1: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [template] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3d5d.1 [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -424,7 +424,7 @@ fn Test(e: E) { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.c41: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [template] +// CHECK:STDOUT: %require_complete.4aeca8.1: = require_complete_type %T.8b3d5d.1 [template] // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %F.a8a: type = class_type @F.2 [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -483,10 +483,10 @@ fn Test(e: E) { // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @F.1.%T.loc4_15.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %x: @F.1.%T.loc4_15.2 (%T) = bind_name x, %x.param +// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %x.param: @F.1.%T.loc4_15.2 (%T.8b3d5d.1) = value_param call_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %x: @F.1.%T.loc4_15.2 (%T.8b3d5d.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -525,20 +525,20 @@ fn Test(e: E) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(%T.loc4_15.1: type) { -// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_15.2 [template = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4ae)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4aeca8.1)] // CHECK:STDOUT: %.loc11_11.3: = refine_type_action %x.ref, %T.loc4_15.2 [template] // CHECK:STDOUT: %.loc11_11.4: = access_member_action %.loc11_11.1, n [template] // CHECK:STDOUT: %.loc11_11.5: type = type_of_inst %.loc11_11.4 [template] // CHECK:STDOUT: %.loc11_13.2: = convert_to_value_action %.loc11_11.2, constants.%i32 [template] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.1.%T.loc4_15.2 (%T)) -> %i32 { +// CHECK:STDOUT: fn(%x.param: @F.1.%T.loc4_15.2 (%T.8b3d5d.1)) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @F.1.%T.loc4_15.2 (%T) = name_ref x, %x -// CHECK:STDOUT: %.loc11_11.1: @F.1.%T.loc4_15.2 (%T) = splice_inst %.loc11_11.3 +// CHECK:STDOUT: %x.ref: @F.1.%T.loc4_15.2 (%T.8b3d5d.1) = name_ref x, %x +// CHECK:STDOUT: %.loc11_11.1: @F.1.%T.loc4_15.2 (%T.8b3d5d.1) = splice_inst %.loc11_11.3 // CHECK:STDOUT: %.loc11_11.2: @F.1.%.loc11_11.5 (@F.1.%.loc11_11.5) = splice_inst %.loc11_11.4 // CHECK:STDOUT: %.loc11_13.1: %i32 = splice_inst %.loc11_13.2 // CHECK:STDOUT: return %.loc11_13.1 @@ -554,8 +554,8 @@ fn Test(e: E) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T) { -// CHECK:STDOUT: %T.loc4_15.2 => constants.%T +// CHECK:STDOUT: specific @F.1(constants.%T.8b3d5d.1) { +// CHECK:STDOUT: %T.loc4_15.2 => constants.%T.8b3d5d.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/template/unimplemented.carbon b/toolchain/check/testdata/generic/template/unimplemented.carbon index bc2597ee809c..820f7b26c53f 100644 --- a/toolchain/check/testdata/generic/template/unimplemented.carbon +++ b/toolchain/check/testdata/generic/template/unimplemented.carbon @@ -18,7 +18,7 @@ library "[[@TEST_NAME]]"; // Check that we get a reasonable diagnostic for an unimplemented operation on a // template dependent expression. fn F[template T:! type](x: T) -> i32 { - // CHECK:STDERR: fail_todo_unimplemented_operator.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Mul` in type `` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_todo_unimplemented_operator.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.MulWith(Core.IntLiteral)` in type `` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return x.n * 3; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -37,7 +37,7 @@ class C { // template dependent value where the type is concrete but determined through // the template dependent value. fn F(template c:! C) -> i32 { - // CHECK:STDERR: fail_todo_unimplemented_value.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Mul` in type `` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_todo_unimplemented_value.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.MulWith(Core.IntLiteral)` in type `` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return c.n * 3; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -74,7 +74,7 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [template] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -84,18 +84,19 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %Mul.type: type = facet_type <@Mul> [concrete] +// CHECK:STDOUT: %MulWith.type.8b4: type = generic_interface_type @MulWith [concrete] +// CHECK:STDOUT: %MulWith.generic: %MulWith.type.8b4 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Mul = %Core.Mul +// CHECK:STDOUT: .MulWith = %Core.MulWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Mul: type = import_ref Core//prelude/operators/arithmetic, Mul, loaded [concrete = constants.%Mul.type] +// CHECK:STDOUT: %Core.MulWith: %MulWith.type.8b4 = import_ref Core//prelude/operators/arithmetic, MulWith, loaded [concrete = constants.%MulWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -106,8 +107,8 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0, template [concrete] -// CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.7dc) = binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @F.%pattern_type (%pattern_type.7dc) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { @@ -124,7 +125,7 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_15.1: type) { // CHECK:STDOUT: %T.loc6_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc6_15.2 (constants.%T)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc6_15.2 [template = %pattern_type (constants.%pattern_type.7dc)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc6_15.2 [template = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc6_15.2 [template = %require_complete (constants.%require_complete.4ae)] @@ -144,7 +145,7 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc6_15.2 => constants.%T -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_unimplemented_value.carbon @@ -164,18 +165,19 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %Mul.type: type = facet_type <@Mul> [concrete] +// CHECK:STDOUT: %MulWith.type.8b4: type = generic_interface_type @MulWith [concrete] +// CHECK:STDOUT: %MulWith.generic: %MulWith.type.8b4 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Mul = %Core.Mul +// CHECK:STDOUT: .MulWith = %Core.MulWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Mul: type = import_ref Core//prelude/operators/arithmetic, Mul, loaded [concrete = constants.%Mul.type] +// CHECK:STDOUT: %Core.MulWith: %MulWith.type.8b4 = import_ref Core//prelude/operators/arithmetic, MulWith, loaded [concrete = constants.%MulWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -236,16 +238,16 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: --- fail_todo_unimplemented_convert.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, template [template] +// CHECK:STDOUT: %T.8b3d5d.1: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [template] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3d5d.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [template] +// CHECK:STDOUT: %require_complete.4aeca8.1: = require_complete_type %T.8b3d5d.1 [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.d628ce.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [template] +// CHECK:STDOUT: %ImplicitAs.type.d628ce.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.8b3d5d.1)> [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -275,43 +277,43 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @F.%T.loc4_15.2 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %x: @F.%T.loc4_15.2 (%T) = bind_name x, %x.param +// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %x.param: @F.%T.loc4_15.2 (%T.8b3d5d.1) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %x: @F.%T.loc4_15.2 (%T.8b3d5d.1) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc4_15.1: type) { -// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_15.2 [template = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4ae)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4aeca8.1)] // CHECK:STDOUT: %ImplicitAs.type.loc14_3.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc4_15.2)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.d628ce.2)] // CHECK:STDOUT: %.loc14_3.3: = access_member_action %ImplicitAs.type.loc14_3.1, Convert [template] // CHECK:STDOUT: %.loc14_3.4: type = type_of_inst %.loc14_3.3 [template] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%T.loc4_15.2 (%T)) { +// CHECK:STDOUT: fn(%x.param: @F.%T.loc4_15.2 (%T.8b3d5d.1)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = var_pattern %v.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %v.var: ref @F.%T.loc4_15.2 (%T) = var %v.var_patt +// CHECK:STDOUT: %v.var: ref @F.%T.loc4_15.2 (%T.8b3d5d.1) = var %v.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %ImplicitAs.type.loc14_3.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.d628ce.2)] +// CHECK:STDOUT: %ImplicitAs.type.loc14_3.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T.8b3d5d.1)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.d628ce.2)] // CHECK:STDOUT: %.loc14_3.1: @F.%.loc14_3.4 (@F.%.loc14_3.4) = splice_inst %.loc14_3.3 -// CHECK:STDOUT: %.loc14_3.2: @F.%T.loc4_15.2 (%T) = converted %int_0, [concrete = ] +// CHECK:STDOUT: %.loc14_3.2: @F.%T.loc4_15.2 (%T.8b3d5d.1) = converted %int_0, [concrete = ] // CHECK:STDOUT: assign %v.var, -// CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T)] -// CHECK:STDOUT: %v: ref @F.%T.loc4_15.2 (%T) = bind_name v, %v.var +// CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %v: ref @F.%T.loc4_15.2 (%T.8b3d5d.1) = bind_name v, %v.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt: %pattern_type.7ce = binding_pattern w [concrete] // CHECK:STDOUT: %w.var_patt: %pattern_type.7ce = var_pattern %w.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt -// CHECK:STDOUT: %x.ref: @F.%T.loc4_15.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @F.%T.loc4_15.2 (%T.8b3d5d.1) = name_ref x, %x // CHECK:STDOUT: %.loc22_3: %i32 = converted %x.ref, [concrete = ] // CHECK:STDOUT: assign %w.var, // CHECK:STDOUT: %.loc22_10: type = splice_block %i32 [concrete = constants.%i32] { @@ -323,8 +325,8 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.loc4_15.2 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.8b3d5d.1) { +// CHECK:STDOUT: %T.loc4_15.2 => constants.%T.8b3d5d.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 64d181478e47..1465d0534048 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -39,15 +39,15 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.6a9) [concrete] @@ -121,7 +121,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %.loc15_29.1: %tuple.type = tuple_literal (%int_0.loc15_27) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_29.1: = bound_method %int_0.loc15_27, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_29.2: = bound_method %int_0.loc15_27, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_29.2(%int_0.loc15_27) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_29.2: init %i32 = converted %int_0.loc15_27, %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 191c2fed00b8..c9df28a5b115 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -51,15 +51,15 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] @@ -171,7 +171,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -184,7 +184,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_25.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] @@ -250,7 +250,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc26_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc26_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] @@ -326,7 +326,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc32_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc32_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc32_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index 52e6a16586ba..875ff64740d8 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -34,16 +34,16 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] @@ -124,7 +124,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -137,7 +137,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_25.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index e411cadd6c67..4c6ef2194b92 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -34,15 +34,15 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -133,7 +133,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %i32.loc15_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc15_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_1, %impl.elem0.loc15_25 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc15_25: = specific_function %impl.elem0.loc15_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_25: = specific_function %impl.elem0.loc15_25, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_25.2: = bound_method %int_1, %specific_fn.loc15_25 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc15_25: init %i32 = call %bound_method.loc15_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked.loc15_25 [concrete = constants.%int_1.5d2] @@ -144,7 +144,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc15_32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_32.1: = bound_method %int_2, %impl.elem0.loc15_32 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc15_32: = specific_function %impl.elem0.loc15_32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_32: = specific_function %impl.elem0.loc15_32, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_32.2: = bound_method %int_2, %specific_fn.loc15_32 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc15_32: init %i32 = call %bound_method.loc15_32.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc15_32.1: %i32 = value_of_initializer %int.convert_checked.loc15_32 [concrete = constants.%int_2.ef8] @@ -165,7 +165,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %i32.loc15_49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc15_49: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_49.1: = bound_method %int_3, %impl.elem0.loc15_49 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc15_49: = specific_function %impl.elem0.loc15_49, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_49: = specific_function %impl.elem0.loc15_49, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_49.2: = bound_method %int_3, %specific_fn.loc15_49 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc15_49: init %i32 = call %bound_method.loc15_49.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc15_49.1: %i32 = value_of_initializer %int.convert_checked.loc15_49 [concrete = constants.%int_3.822] @@ -176,7 +176,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc15_56: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_56.1: = bound_method %int_4, %impl.elem0.loc15_56 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc15_56: = specific_function %impl.elem0.loc15_56, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_56: = specific_function %impl.elem0.loc15_56, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_56.2: = bound_method %int_4, %specific_fn.loc15_56 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc15_56: init %i32 = call %bound_method.loc15_56.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc15_56.1: %i32 = value_of_initializer %int.convert_checked.loc15_56 [concrete = constants.%int_4.940] diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index 051dc2070e33..6e0fe68cfae7 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -43,15 +43,15 @@ fn F(cond: bool) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -124,7 +124,7 @@ fn F(cond: bool) { // CHECK:STDOUT: %.loc17_46.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %impl.elem0.loc17_46.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_46.1: = bound_method %int_1, %impl.elem0.loc17_46.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17_46.1: = specific_function %impl.elem0.loc17_46.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_46.1: = specific_function %impl.elem0.loc17_46.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_46.2: = bound_method %int_1, %specific_fn.loc17_46.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc17_46.1: init %i32 = call %bound_method.loc17_46.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_46.2: init %i32 = converted %int_1, %int.convert_checked.loc17_46.1 [concrete = constants.%int_1.5d2] @@ -132,7 +132,7 @@ fn F(cond: bool) { // CHECK:STDOUT: %.loc17_46.4: init %i32 = initialize_from %.loc17_46.2 to %.loc17_46.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc17_46.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_46.3: = bound_method %int_2, %impl.elem0.loc17_46.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc17_46.2: = specific_function %impl.elem0.loc17_46.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_46.2: = specific_function %impl.elem0.loc17_46.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_46.4: = bound_method %int_2, %specific_fn.loc17_46.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc17_46.2: init %i32 = call %bound_method.loc17_46.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc17_46.5: init %i32 = converted %int_2, %int.convert_checked.loc17_46.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index 45aace90b7e3..abaf056b6898 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -103,20 +103,20 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic] +// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.8268 [symbolic] // CHECK:STDOUT: %require_complete.9b1: = require_complete_type %Self.as_type.b70 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0.45f: %I.assoc_type = assoc_entity element0, @I.%V [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] -// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] -// CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.541: type = facet_access_type %.Self.258 [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.258, @I [symbolic_self] +// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type.541, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type.541 [symbolic_self] +// CHECK:STDOUT: %impl.elem0.d8c: %.Self.as_type.541 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] -// CHECK:STDOUT: %I_where.type.6ef: type = facet_type <@I where %impl.elem0 = %empty_struct> [concrete] +// CHECK:STDOUT: %I_where.type.6ef: type = facet_type <@I where %impl.elem0.d8c = %empty_struct> [concrete] // CHECK:STDOUT: %I.impl_witness.3d1: = impl_witness file.%I.impl_witness_table.loc8 [concrete] // CHECK:STDOUT: %I.facet.b01: %I.type = facet_value %empty_struct_type, (%I.impl_witness.3d1) [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -125,7 +125,7 @@ fn CallF() { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %I_where.type.3d4: type = facet_type <@I where %impl.elem0 = %int_0.5c6> [concrete] +// CHECK:STDOUT: %I_where.type.3d4: type = facet_type <@I where %impl.elem0.d8c = %int_0.5c6> [concrete] // CHECK:STDOUT: %I.impl_witness.5ef: = impl_witness file.%I.impl_witness_table.loc10 [concrete] // CHECK:STDOUT: %I.facet.4b7: %I.type = facet_value %i32, (%I.impl_witness.5ef) [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] @@ -135,15 +135,15 @@ fn CallF() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -172,12 +172,12 @@ fn CallF() { // CHECK:STDOUT: %.loc8_7.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.45f] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type.541 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.d8c] // CHECK:STDOUT: %.loc8_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_26.2: %empty_struct_type = converted %.loc8_26.1, %empty_struct [concrete = constants.%empty_struct] @@ -192,12 +192,12 @@ fn CallF() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.45f] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type.541 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.d8c] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc10_15: type = where_expr %.Self [concrete = constants.%I_where.type.3d4] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 @@ -207,7 +207,7 @@ fn CallF() { // CHECK:STDOUT: %I.impl_witness.loc10: = impl_witness %I.impl_witness_table.loc10 [concrete = constants.%I.impl_witness.5ef] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_15.1: = bound_method constants.%int_0.5c6, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_15.2: = bound_method constants.%int_0.5c6, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc10_15.2(constants.%int_0.5c6) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc10_15.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -216,7 +216,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] // CHECK:STDOUT: %V: @V.%Self.as_type (%Self.as_type.b70) = assoc_const_decl @V [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.45f] // CHECK:STDOUT: } @@ -228,7 +228,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.8268)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.b70)] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic = %require_complete (constants.%require_complete.9b1)] // CHECK:STDOUT: @@ -245,15 +245,15 @@ fn CallF() { // CHECK:STDOUT: witness = file.%I.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%Self.826) { -// CHECK:STDOUT: %Self => constants.%Self.826 +// CHECK:STDOUT: specific @V(constants.%Self.8268) { +// CHECK:STDOUT: %Self => constants.%Self.8268 // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.b70 // CHECK:STDOUT: %require_complete => constants.%require_complete.9b1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @V(constants.%I.facet.74c) { // CHECK:STDOUT: %Self => constants.%I.facet.74c -// CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type +// CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type.541 // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c // CHECK:STDOUT: } // CHECK:STDOUT: @@ -310,7 +310,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: impl_decl @impl [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.f49 [concrete] {} { // CHECK:STDOUT: %.loc15_7.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] @@ -325,7 +325,7 @@ fn CallF() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.f49 [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %.loc15: %empty_struct_type = converted constants.%int_0, [concrete = ] // CHECK:STDOUT: %impl_witness_assoc_constant: = impl_witness_assoc_constant [concrete = ] @@ -351,7 +351,7 @@ fn CallF() { // CHECK:STDOUT: assoc_const V:! @V.%Self.as_type (%Self.as_type.b70); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc15_7.2 as %.loc15_14 { +// CHECK:STDOUT: impl @impl.f49: %.loc15_7.2 as %.loc15_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } @@ -391,12 +391,12 @@ fn CallF() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.15e: type = facet_type <@ImplicitAs, @ImplicitAs(%C)> [concrete] // CHECK:STDOUT: %Convert.type.56d: type = fn_type @Convert.1, @ImplicitAs(%C) [concrete] -// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness file.%ImplicitAs.impl_witness_table [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.ace: = impl_witness file.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %Convert.type.721: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.155: %Convert.type.721 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.15e = facet_value %empty_tuple.type, (%ImplicitAs.impl_witness) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.15e = facet_value %empty_tuple.type, (%ImplicitAs.impl_witness.ace) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] @@ -439,7 +439,7 @@ fn CallF() { // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%C)> [concrete = constants.%ImplicitAs.type.15e] // CHECK:STDOUT: } // CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (@impl.e86.%Convert.decl), @impl.e86 [concrete] -// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness.ace] // CHECK:STDOUT: impl_decl @impl.cbe [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] @@ -458,7 +458,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.cbe [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] -// CHECK:STDOUT: %impl.elem0: %.5c3 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Convert.155] +// CHECK:STDOUT: %impl.elem0: %.5c3 = impl_witness_access constants.%ImplicitAs.impl_witness.ace, element0 [concrete = constants.%Convert.155] // CHECK:STDOUT: %bound_method: = bound_method constants.%empty_tuple, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %.loc18_13.1: ref %C = temporary_storage // CHECK:STDOUT: %Convert.call: init %C = call %bound_method(constants.%empty_tuple) to %.loc18_13.1 @@ -575,18 +575,18 @@ fn CallF() { // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.63a: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] -// CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %int_1, %Op.bba [concrete] +// CHECK:STDOUT: %.d3d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.7 [concrete] +// CHECK:STDOUT: %Op.99f: %Op.type.18a = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %int_1, %Op.99f [concrete] // CHECK:STDOUT: %int_-1: Core.IntLiteral = int_value -1 [concrete] // CHECK:STDOUT: %I.type.057: type = facet_type <@I, @I(%int_-1)> [concrete] -// CHECK:STDOUT: %.Self: %I.type.057 = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.e4b: %I.type.057 = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Self.e2e: %I.type.057 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %I.assoc_type.247: type = assoc_entity_type @I, @I(%int_-1) [concrete] // CHECK:STDOUT: %assoc0.350: %I.assoc_type.247 = assoc_entity element0, @I.%V [concrete] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I, @I(%int_-1) [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.e4b [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.e4b, @I, @I(%int_-1) [symbolic_self] // CHECK:STDOUT: %I.facet: %I.type.057 = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -599,8 +599,9 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.c15: %Op.type.1be = import_ref Core//prelude/operators/arithmetic, loc94_31, loaded [concrete = constants.%Op.bba] -// CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.c15), @impl.8cb [concrete] +// CHECK:STDOUT: %Core.import_ref.abd = import_ref Core//prelude/operators/arithmetic, loc111_50, unloaded +// CHECK:STDOUT: %Core.import_ref.5e6: %Op.type.18a = import_ref Core//prelude/operators/arithmetic, loc112_31, loaded [concrete = constants.%Op.99f] +// CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.abd, %Core.import_ref.5e6), @impl.0ef [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -626,22 +627,22 @@ fn CallF() { // CHECK:STDOUT: %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem0.loc15_14: %.63a = impl_witness_access constants.%Negate.impl_witness, element0 [concrete = constants.%Op.bba] -// CHECK:STDOUT: %bound_method: = bound_method %int_1, %impl.elem0.loc15_14 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem1: %.d3d = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Op.99f] +// CHECK:STDOUT: %bound_method: = bound_method %int_1, %impl.elem1 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method(%int_1) [concrete = constants.%int_-1] // CHECK:STDOUT: %.loc15_16.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-1] // CHECK:STDOUT: %.loc15_16.2: Core.IntLiteral = converted %int.snegate, %.loc15_16.1 [concrete = constants.%int_-1] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%int_-1)> [concrete = constants.%I.type.057] -// CHECK:STDOUT: %.Self: %I.type.057 = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I.type.057 = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %I.type.057 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.e4b] +// CHECK:STDOUT: %.Self.ref: %I.type.057 = name_ref .Self, %.Self [symbolic_self = constants.%.Self.e4b] // CHECK:STDOUT: %.loc15_24.1: %I.assoc_type.247 = specific_constant @V.%assoc0, @I(constants.%int_-1) [concrete = constants.%assoc0.350] // CHECK:STDOUT: %V.ref: %I.assoc_type.247 = name_ref V, %.loc15_24.1 [concrete = constants.%assoc0.350] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc15_24.2: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impl.elem0.loc15_24: = impl_witness_access constants.%I.lookup_impl_witness, element0 [concrete = ] +// CHECK:STDOUT: %impl.elem0: = impl_witness_access constants.%I.lookup_impl_witness, element0 [concrete = ] // CHECK:STDOUT: %.loc15_30: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_18: type = where_expr %.Self [concrete = ] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc15_24, +// CHECK:STDOUT: requirement_rewrite %impl.elem0, // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index 32068634e268..dc1c7b88b305 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -53,16 +53,16 @@ class X(U:! type) { // CHECK:STDOUT: --- extend_impl_generic_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %HasF.type.fe3: type = generic_interface_type @HasF [concrete] // CHECK:STDOUT: %HasF.generic: %HasF.type.fe3 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.type.901: type = facet_type <@HasF, @HasF(%T)> [symbolic] +// CHECK:STDOUT: %HasF.type.901: type = facet_type <@HasF, @HasF(%T.8b3)> [symbolic] // CHECK:STDOUT: %Self.322: %HasF.type.901 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] -// CHECK:STDOUT: %F.type.46c: type = fn_type @F.1, @HasF(%T) [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] +// CHECK:STDOUT: %F.type.46c: type = fn_type @F.1, @HasF(%T.8b3) [symbolic] // CHECK:STDOUT: %F.823: %F.type.46c = struct_value () [symbolic] -// CHECK:STDOUT: %HasF.assoc_type.dd8: type = assoc_entity_type @HasF, @HasF(%T) [symbolic] +// CHECK:STDOUT: %HasF.assoc_type.dd8: type = assoc_entity_type @HasF, @HasF(%T.8b3) [symbolic] // CHECK:STDOUT: %assoc0.d31: %HasF.assoc_type.dd8 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %Param: type = class_type @Param [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -93,16 +93,16 @@ class X(U:! type) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %Param.val: %Param = struct_value (%int_2.ef8) [concrete] @@ -137,7 +137,7 @@ class X(U:! type) { // CHECK:STDOUT: %HasF.decl: %HasF.type.fe3 = interface_decl @HasF [concrete = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %Param.decl: type = class_decl @Param [concrete = constants.%Param] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -152,7 +152,7 @@ class X(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @HasF(%T.loc4_16.1: type) { -// CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.2)> [symbolic = %HasF.type (constants.%HasF.type.901)] @@ -168,9 +168,9 @@ class X(U:! type) { // CHECK:STDOUT: %return.patt: @F.1.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @HasF.%T.loc4_16.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %return.param: ref @F.1.%T (%T) = out_param call_param0 -// CHECK:STDOUT: %return: ref @F.1.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %T.ref: type = name_ref T, @HasF.%T.loc4_16.1 [symbolic = %T (constants.%T.8b3)] +// CHECK:STDOUT: %return.param: ref @F.1.%T (%T.8b3) = out_param call_param0 +// CHECK:STDOUT: %return: ref @F.1.%T (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0.loc5_14.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.dd8) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.d31)] // CHECK:STDOUT: @@ -234,10 +234,10 @@ class X(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%T.loc4_16.1: type, @HasF.%Self.1: @HasF.%HasF.type (%HasF.type.901)) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @F.1.%T (%T); +// CHECK:STDOUT: fn() -> @F.1.%T (%T.8b3); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %return.param: %Param { @@ -246,7 +246,7 @@ class X(U:! type) { // CHECK:STDOUT: %.loc15_21.1: %struct_type.x.c96 = struct_literal (%int_2) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_21.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_21.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_21.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc15_21.2: init %i32 = converted %int_2, %int.convert_checked [concrete = constants.%int_2.ef8] @@ -300,12 +300,12 @@ class X(U:! type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(constants.%T) { -// CHECK:STDOUT: %T.loc4_16.2 => constants.%T +// CHECK:STDOUT: specific @HasF(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_16.2 => constants.%T.8b3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.322) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @F.1(constants.%T.8b3, constants.%Self.322) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: 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 3c306454380e..fe2eb4c8510b 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -243,7 +243,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] @@ -338,18 +338,18 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %F.be86c9.2: %F.type.d3b58f.2 = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete] // CHECK:STDOUT: %Self.2ff: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type.e1e: type = facet_access_type %Self.2ff [symbolic] -// CHECK:STDOUT: %ptr.e87: type = ptr_type %Self.as_type.e1e [symbolic] +// CHECK:STDOUT: %Self.as_type.e1e8: type = facet_access_type %Self.2ff [symbolic] +// CHECK:STDOUT: %ptr.e87: type = ptr_type %Self.as_type.e1e8 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %struct_type.x.y.81e: type = struct_type {.x: %Self.as_type.e1e, .y: %i32} [symbolic] +// CHECK:STDOUT: %struct_type.x.y.81e: type = struct_type {.x: %Self.as_type.e1e8, .y: %i32} [symbolic] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.type.229: type = tuple_type (%ptr.e87, %struct_type.x.y.81e) [symbolic] // CHECK:STDOUT: %pattern_type.ced: type = pattern_type %tuple.type.229 [symbolic] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete] -// CHECK:STDOUT: %array_type.873: type = array_type %int_4, %Self.as_type.e1e [symbolic] +// CHECK:STDOUT: %array_type.873: type = array_type %int_4, %Self.as_type.e1e8 [symbolic] // CHECK:STDOUT: %pattern_type.c7e: type = pattern_type %array_type.873 [symbolic] // CHECK:STDOUT: %F.type.6ed: type = fn_type @F.20 [concrete] // CHECK:STDOUT: %F.998: %F.type.6ed = struct_value () [concrete] @@ -443,7 +443,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] {} {} // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.82e] // CHECK:STDOUT: @@ -501,21 +501,21 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc210_50: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %Self.as_type.loc210_50: type = facet_access_type %Self.ref.loc210_50 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e)] -// CHECK:STDOUT: %.loc210_50: type = converted %Self.ref.loc210_50, %Self.as_type.loc210_50 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %Self.as_type.loc210_50: type = facet_access_type %Self.ref.loc210_50 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] +// CHECK:STDOUT: %.loc210_50: type = converted %Self.ref.loc210_50, %Self.as_type.loc210_50 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] // CHECK:STDOUT: %array_type.loc210_57.2: type = array_type %int_4, %.loc210_50 [symbolic = %array_type.loc210_57.1 (constants.%array_type.873)] // CHECK:STDOUT: %x.param: @F.20.%tuple.type (%tuple.type.229) = value_param call_param0 // CHECK:STDOUT: %.loc210_38.1: type = splice_block %.loc210_38.3 [symbolic = %tuple.type (constants.%tuple.type.229)] { // CHECK:STDOUT: %Self.ref.loc210_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] -// CHECK:STDOUT: %Self.as_type.loc210_16.2: type = facet_access_type %Self.ref.loc210_12 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e)] -// CHECK:STDOUT: %.loc210_16: type = converted %Self.ref.loc210_12, %Self.as_type.loc210_16.2 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %Self.as_type.loc210_16.2: type = facet_access_type %Self.ref.loc210_12 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] +// CHECK:STDOUT: %.loc210_16: type = converted %Self.ref.loc210_12, %Self.as_type.loc210_16.2 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] // CHECK:STDOUT: %ptr.loc210_16.2: type = ptr_type %.loc210_16 [symbolic = %ptr.loc210_16.1 (constants.%ptr.e87)] // CHECK:STDOUT: %Self.ref.loc210_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] -// CHECK:STDOUT: %Self.as_type.loc210_24: type = facet_access_type %Self.ref.loc210_24 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e)] -// CHECK:STDOUT: %.loc210_24: type = converted %Self.ref.loc210_24, %Self.as_type.loc210_24 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %Self.as_type.loc210_24: type = facet_access_type %Self.ref.loc210_24 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] +// CHECK:STDOUT: %.loc210_24: type = converted %Self.ref.loc210_24, %Self.as_type.loc210_24 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.x.y.loc210_37.2: type = struct_type {.x: @F.20.%Self.as_type.loc210_16.1 (%Self.as_type.e1e), .y: %i32} [symbolic = %struct_type.x.y.loc210_37.1 (constants.%struct_type.x.y.81e)] +// CHECK:STDOUT: %struct_type.x.y.loc210_37.2: type = struct_type {.x: @F.20.%Self.as_type.loc210_16.1 (%Self.as_type.e1e8), .y: %i32} [symbolic = %struct_type.x.y.loc210_37.1 (constants.%struct_type.x.y.81e)] // CHECK:STDOUT: %.loc210_38.2: %tuple.type.24b = tuple_literal (%ptr.loc210_16.2, %struct_type.x.y.loc210_37.2) // CHECK:STDOUT: %.loc210_38.3: type = converted %.loc210_38.2, constants.%tuple.type.229 [symbolic = %tuple.type (constants.%tuple.type.229)] // CHECK:STDOUT: } @@ -1309,9 +1309,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.20(@SelfNested.%Self: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2ff)] -// CHECK:STDOUT: %Self.as_type.loc210_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %Self.as_type.loc210_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] // CHECK:STDOUT: %ptr.loc210_16.1: type = ptr_type %Self.as_type.loc210_16.1 [symbolic = %ptr.loc210_16.1 (constants.%ptr.e87)] -// CHECK:STDOUT: %struct_type.x.y.loc210_37.1: type = struct_type {.x: @F.20.%Self.as_type.loc210_16.1 (%Self.as_type.e1e), .y: %i32} [symbolic = %struct_type.x.y.loc210_37.1 (constants.%struct_type.x.y.81e)] +// CHECK:STDOUT: %struct_type.x.y.loc210_37.1: type = struct_type {.x: @F.20.%Self.as_type.loc210_16.1 (%Self.as_type.e1e8), .y: %i32} [symbolic = %struct_type.x.y.loc210_37.1 (constants.%struct_type.x.y.81e)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc210_16.1, %struct_type.x.y.loc210_37.1) [symbolic = %tuple.type (constants.%tuple.type.229)] // CHECK:STDOUT: %pattern_type.loc210_8: type = pattern_type %tuple.type [symbolic = %pattern_type.loc210_8 (constants.%pattern_type.ced)] // CHECK:STDOUT: %array_type.loc210_57.1: type = array_type constants.%int_4, %Self.as_type.loc210_16.1 [symbolic = %array_type.loc210_57.1 (constants.%array_type.873)] @@ -1349,7 +1349,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Self.826) {} +// CHECK:STDOUT: specific @F.1(constants.%Self.8268) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%I.facet.fa4) {} // CHECK:STDOUT: @@ -1373,7 +1373,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.20(constants.%Self.2ff) { // CHECK:STDOUT: %Self => constants.%Self.2ff -// CHECK:STDOUT: %Self.as_type.loc210_16.1 => constants.%Self.as_type.e1e +// CHECK:STDOUT: %Self.as_type.loc210_16.1 => constants.%Self.as_type.e1e8 // CHECK:STDOUT: %ptr.loc210_16.1 => constants.%ptr.e87 // CHECK:STDOUT: %struct_type.x.y.loc210_37.1 => constants.%struct_type.x.y.81e // CHECK:STDOUT: %tuple.type => constants.%tuple.type.229 diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index cbad72a70951..9184e59d75a9 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -84,15 +84,15 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11: type = converted @impl.%false, [concrete = ] -// CHECK:STDOUT: impl_decl @impl [concrete] {} { +// CHECK:STDOUT: %.loc11: type = converted @impl.cf0.%false, [concrete = ] +// CHECK:STDOUT: impl_decl @impl.cf0 [concrete] {} { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %i32 as { +// CHECK:STDOUT: impl @impl.cf0: %i32 as { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index 499f4c39f1c7..04b55a5f4796 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -45,20 +45,20 @@ impl i32 as I { // CHECK:STDOUT: --- fail_self_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %X: %T.8b3 = bind_symbolic_name X, 1 [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.b36: type = class_type @C, @C(%T, %X) [symbolic] +// CHECK:STDOUT: %C.b36: type = class_type @C, @C(%T.8b3, %X) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %pattern_type.2b5: type = pattern_type %I.type [concrete] -// CHECK:STDOUT: %C.dbb: type = class_type @C, @C(%I.type, %Self.826) [symbolic] +// CHECK:STDOUT: %C.dbb: type = class_type @C, @C(%I.type, %Self.8268) [symbolic] // CHECK:STDOUT: %pattern_type.4fb: type = pattern_type %C.dbb [symbolic] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] @@ -114,18 +114,18 @@ impl i32 as I { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %X.patt: @C.%pattern_type (%pattern_type.7dcd0a.1) = symbolic_binding_pattern X, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc14_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.2 (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_9.1 [symbolic = %T.loc14_9.2 (constants.%T)] -// CHECK:STDOUT: %X.loc14_19.1: @C.%T.loc14_9.2 (%T) = bind_symbolic_name X, 1 [symbolic = %X.loc14_19.2 (constants.%X)] +// CHECK:STDOUT: %T.loc14_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_9.1 [symbolic = %T.loc14_9.2 (constants.%T.8b3)] +// CHECK:STDOUT: %X.loc14_19.1: @C.%T.loc14_9.2 (%T.8b3) = bind_symbolic_name X, 1 [symbolic = %X.loc14_19.2 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: impl_decl @impl.049 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.049f [concrete] {} { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc27_6.1: type = value_of_initializer %bool.make_type [concrete = bool] // CHECK:STDOUT: %.loc27_6.2: type = converted %bool.make_type, %.loc27_6.1 [concrete = bool] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.impl_witness_table.loc27 = impl_witness_table (@impl.049.%F.decl), @impl.049 [concrete] +// CHECK:STDOUT: %I.impl_witness_table.loc27 = impl_witness_table (@impl.049f.%F.decl), @impl.049f [concrete] // CHECK:STDOUT: %I.impl_witness.loc27: = impl_witness %I.impl_witness_table.loc27 [concrete = constants.%I.impl_witness.c21] // CHECK:STDOUT: impl_decl @impl.a9a [concrete] {} { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -137,7 +137,7 @@ impl i32 as I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] { // CHECK:STDOUT: %c.patt: @F.1.%pattern_type (%pattern_type.4fb) = binding_pattern c [concrete] // CHECK:STDOUT: %c.param_patt: @F.1.%pattern_type (%pattern_type.4fb) = value_param_pattern %c.patt, call_param0 [concrete] @@ -145,8 +145,8 @@ impl i32 as I { // CHECK:STDOUT: %c.param: @F.1.%C.loc24_17.1 (%C.dbb) = value_param call_param0 // CHECK:STDOUT: %.loc24: type = splice_block %C.loc24_17.2 [symbolic = %C.loc24_17.1 (constants.%C.dbb)] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] -// CHECK:STDOUT: %C.loc24_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self.826) [symbolic = %C.loc24_17.1 (constants.%C.dbb)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.8268)] +// CHECK:STDOUT: %C.loc24_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self.8268) [symbolic = %C.loc24_17.1 (constants.%C.dbb)] // CHECK:STDOUT: } // CHECK:STDOUT: %c: @F.1.%C.loc24_17.1 (%C.dbb) = bind_name c, %c.param // CHECK:STDOUT: } @@ -159,7 +159,7 @@ impl i32 as I { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.049: %.loc27_6.2 as %I.ref { +// CHECK:STDOUT: impl @impl.049f: %.loc27_6.2 as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.8ba = fn_decl @F.2 [concrete = constants.%F.2cf] { // CHECK:STDOUT: %c.patt: %pattern_type.225 = binding_pattern c [concrete] // CHECK:STDOUT: %c.param_patt: %pattern_type.225 = value_param_pattern %c.patt, call_param0 [concrete] @@ -211,9 +211,9 @@ impl i32 as I { // CHECK:STDOUT: witness = file.%I.impl_witness.loc34 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%T.loc14_9.1: type, %X.loc14_19.1: @C.%T.loc14_9.2 (%T)) { -// CHECK:STDOUT: %T.loc14_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.2 (constants.%T)] -// CHECK:STDOUT: %X.loc14_19.2: @C.%T.loc14_9.2 (%T) = bind_symbolic_name X, 1 [symbolic = %X.loc14_19.2 (constants.%X)] +// CHECK:STDOUT: generic class @C(%T.loc14_9.1: type, %X.loc14_19.1: @C.%T.loc14_9.2 (%T.8b3)) { +// CHECK:STDOUT: %T.loc14_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.2 (constants.%T.8b3)] +// CHECK:STDOUT: %X.loc14_19.2: @C.%T.loc14_9.2 (%T.8b3) = bind_symbolic_name X, 1 [symbolic = %X.loc14_19.2 (constants.%X)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc14_9.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -229,7 +229,7 @@ impl i32 as I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.8268)] // CHECK:STDOUT: %C.loc24_17.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc24_17.1 (constants.%C.dbb)] // CHECK:STDOUT: %pattern_type: type = pattern_type %C.loc24_17.1 [symbolic = %pattern_type (constants.%pattern_type.4fb)] // CHECK:STDOUT: @@ -249,20 +249,20 @@ impl i32 as I { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T, constants.%X) { -// CHECK:STDOUT: %T.loc14_9.2 => constants.%T +// CHECK:STDOUT: specific @C(constants.%T.8b3, constants.%X) { +// CHECK:STDOUT: %T.loc14_9.2 => constants.%T.8b3 // CHECK:STDOUT: %X.loc14_19.2 => constants.%X // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%I.type, constants.%Self.826) { +// CHECK:STDOUT: specific @C(constants.%I.type, constants.%Self.8268) { // CHECK:STDOUT: %T.loc14_9.2 => constants.%I.type -// CHECK:STDOUT: %X.loc14_19.2 => constants.%Self.826 +// CHECK:STDOUT: %X.loc14_19.2 => constants.%Self.8268 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2b5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Self.826) { -// CHECK:STDOUT: %Self => constants.%Self.826 +// CHECK:STDOUT: specific @F.1(constants.%Self.8268) { +// CHECK:STDOUT: %Self => constants.%Self.8268 // CHECK:STDOUT: %C.loc24_17.1 => constants.%C.dbb // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4fb // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/forward_decls.carbon b/toolchain/check/testdata/impl/forward_decls.carbon index 454bb57823c1..7818662f16b6 100644 --- a/toolchain/check/testdata/impl/forward_decls.carbon +++ b/toolchain/check/testdata/impl/forward_decls.carbon @@ -412,27 +412,29 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %I.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %I.type, %Op.ff4 [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -449,7 +451,7 @@ interface I { // CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc4_12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: %I.ref.loc4_16: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] -// CHECK:STDOUT: %impl.elem0.loc4: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc4: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc4: = bound_method %I.ref.loc4_12, %impl.elem0.loc4 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc4: init type = call %bound_method.loc4(%I.ref.loc4_12, %I.ref.loc4_16) [concrete = constants.%I.type] // CHECK:STDOUT: } @@ -463,7 +465,7 @@ interface I { // CHECK:STDOUT: %.loc7_7.2: type = converted %.loc7_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc7_12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: %I.ref.loc7_16: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] -// CHECK:STDOUT: %impl.elem0.loc7: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc7: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc7: = bound_method %I.ref.loc7_12, %impl.elem0.loc7 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc7: init type = call %bound_method.loc7(%I.ref.loc7_12, %I.ref.loc7_16) [concrete = constants.%I.type] // CHECK:STDOUT: } @@ -1332,14 +1334,16 @@ interface I { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %I.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %I.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type: type = facet_type <@I & @J> [concrete] // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic] @@ -1347,13 +1351,13 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1372,7 +1376,7 @@ interface I { // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl.loc4 [concrete = constants.%J.type] -// CHECK:STDOUT: %impl.elem0: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method: = bound_method %I.ref, %impl.elem0 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and: init type = call %bound_method(%I.ref, %J.ref) [concrete = constants.%facet_type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon b/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon index 319b3e16a4cc..f99459b975bd 100644 --- a/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon +++ b/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon @@ -35,7 +35,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] @@ -47,11 +47,11 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %struct_type.a.b.fe2: type = struct_type {.a: bool, .b: %tuple.type.d07} [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0.e7f: %I.assoc_type = assoc_entity element0, @I.%X [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %struct_type.a.b.fe2 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.541: type = facet_access_type %.Self.258 [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.258, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type.541, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.74b: %struct_type.a.b.fe2 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -62,17 +62,23 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] -// CHECK:STDOUT: %Div.type: type = facet_type <@Div> [concrete] -// CHECK:STDOUT: %Sub.type: type = facet_type <@Sub> [concrete] +// CHECK:STDOUT: %DivWith.type.fc9: type = generic_interface_type @DivWith [concrete] +// CHECK:STDOUT: %DivWith.generic: %DivWith.type.fc9 = struct_value () [concrete] +// CHECK:STDOUT: %DivWith.type.f3e: type = facet_type <@DivWith, @DivWith(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %Op.type.c64: type = fn_type @Op.2, @DivWith(Core.IntLiteral) [concrete] +// CHECK:STDOUT: %SubWith.type.378: type = generic_interface_type @SubWith [concrete] +// CHECK:STDOUT: %SubWith.generic: %SubWith.type.378 = struct_value () [concrete] +// CHECK:STDOUT: %SubWith.type.039: type = facet_type <@SubWith, @SubWith(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %Op.type.95d: type = fn_type @Op.5, @SubWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -82,22 +88,20 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %struct: %struct_type.a.b.fe2 = struct_value (%true, %tuple) [concrete] // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %Op.type.111: type = fn_type @Op.23 [concrete] -// CHECK:STDOUT: %Sub.impl_witness.37d: = impl_witness imports.%Sub.impl_witness_table.d7b [concrete] -// CHECK:STDOUT: %Sub.facet: %Sub.type = facet_value Core.IntLiteral, (%Sub.impl_witness.37d) [concrete] -// CHECK:STDOUT: %.07b: type = fn_type_with_self_type %Op.type.111, %Sub.facet [concrete] -// CHECK:STDOUT: %Op.type.2b9: type = fn_type @Op.24 [concrete] -// CHECK:STDOUT: %Op.667: %Op.type.2b9 = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound.645: = bound_method %int_3, %Op.667 [concrete] +// CHECK:STDOUT: %SubWith.impl_witness.72e: = impl_witness imports.%SubWith.impl_witness_table.ad5 [concrete] +// CHECK:STDOUT: %SubWith.facet: %SubWith.type.039 = facet_value Core.IntLiteral, (%SubWith.impl_witness.72e) [concrete] +// CHECK:STDOUT: %.4ae: type = fn_type_with_self_type %Op.type.95d, %SubWith.facet [concrete] +// CHECK:STDOUT: %Op.type.ff7: type = fn_type @Op.95 [concrete] +// CHECK:STDOUT: %Op.9f1: %Op.type.ff7 = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound.02a: = bound_method %int_3, %Op.9f1 [concrete] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete] -// CHECK:STDOUT: %Op.type.784: type = fn_type @Op.25 [concrete] -// CHECK:STDOUT: %Div.impl_witness.ec4: = impl_witness imports.%Div.impl_witness_table.381 [concrete] -// CHECK:STDOUT: %Div.facet: %Div.type = facet_value Core.IntLiteral, (%Div.impl_witness.ec4) [concrete] -// CHECK:STDOUT: %.d13: type = fn_type_with_self_type %Op.type.784, %Div.facet [concrete] -// CHECK:STDOUT: %Op.type.c38: type = fn_type @Op.26 [concrete] -// CHECK:STDOUT: %Op.553: %Op.type.c38 = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound.2e7: = bound_method %int_4, %Op.553 [concrete] -// CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %struct> [concrete] +// CHECK:STDOUT: %DivWith.impl_witness.130: = impl_witness imports.%DivWith.impl_witness_table.cc4 [concrete] +// CHECK:STDOUT: %DivWith.facet: %DivWith.type.f3e = facet_value Core.IntLiteral, (%DivWith.impl_witness.130) [concrete] +// CHECK:STDOUT: %.f62: type = fn_type_with_self_type %Op.type.c64, %DivWith.facet [concrete] +// CHECK:STDOUT: %Op.type.c21: type = fn_type @Op.96 [concrete] +// CHECK:STDOUT: %Op.32d: %Op.type.c21 = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound.997: = bound_method %int_4, %Op.32d [concrete] +// CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0.74b = %struct> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,8 +110,8 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Sub = %Core.Sub -// CHECK:STDOUT: .Div = %Core.Div +// CHECK:STDOUT: .SubWith = %Core.SubWith +// CHECK:STDOUT: .DivWith = %Core.DivWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -116,12 +120,14 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.Sub: type = import_ref Core//prelude/operators/arithmetic, Sub, loaded [concrete = constants.%Sub.type] -// CHECK:STDOUT: %Core.import_ref.6c4: %Op.type.2b9 = import_ref Core//prelude/operators/arithmetic, loc98_42, loaded [concrete = constants.%Op.667] -// CHECK:STDOUT: %Sub.impl_witness_table.d7b = impl_witness_table (%Core.import_ref.6c4), @impl.bf8 [concrete] -// CHECK:STDOUT: %Core.Div: type = import_ref Core//prelude/operators/arithmetic, Div, loaded [concrete = constants.%Div.type] -// CHECK:STDOUT: %Core.import_ref.dfd: %Op.type.c38 = import_ref Core//prelude/operators/arithmetic, loc82_42, loaded [concrete = constants.%Op.553] -// CHECK:STDOUT: %Div.impl_witness_table.381 = impl_witness_table (%Core.import_ref.dfd), @impl.f0e [concrete] +// CHECK:STDOUT: %Core.SubWith: %SubWith.type.378 = import_ref Core//prelude/operators/arithmetic, SubWith, loaded [concrete = constants.%SubWith.generic] +// CHECK:STDOUT: %Core.import_ref.abd97d.1 = import_ref Core//prelude/operators/arithmetic, loc115_57, unloaded +// CHECK:STDOUT: %Core.import_ref.252: %Op.type.ff7 = import_ref Core//prelude/operators/arithmetic, loc116_42, loaded [concrete = constants.%Op.9f1] +// CHECK:STDOUT: %SubWith.impl_witness_table.ad5 = impl_witness_table (%Core.import_ref.abd97d.1, %Core.import_ref.252), @impl.e41 [concrete] +// CHECK:STDOUT: %Core.DivWith: %DivWith.type.fc9 = import_ref Core//prelude/operators/arithmetic, DivWith, loaded [concrete = constants.%DivWith.generic] +// CHECK:STDOUT: %Core.import_ref.abd97d.2 = import_ref Core//prelude/operators/arithmetic, loc99_57, unloaded +// CHECK:STDOUT: %Core.import_ref.0316: %Op.type.c21 = import_ref Core//prelude/operators/arithmetic, loc100_42, loaded [concrete = constants.%Op.32d] +// CHECK:STDOUT: %DivWith.impl_witness_table.cc4 = impl_witness_table (%Core.import_ref.abd97d.2, %Core.import_ref.0316), @impl.ba5 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -135,12 +141,12 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.loc6_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc6_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc6_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %X.ref.loc6_20: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.e7f] -// CHECK:STDOUT: %.Self.as_type.loc6_20: type = facet_access_type %.Self.ref.loc6_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6_20, %.Self.as_type.loc6_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impl.elem0.loc6_20: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %.Self.as_type.loc6_20: type = facet_access_type %.Self.ref.loc6_20 [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6_20, %.Self.as_type.loc6_20 [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %impl.elem0.loc6_20: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.74b] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc6_46: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] @@ -148,14 +154,14 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.loc6_48.1: %struct_type.a.b.aa4 = struct_literal (%true, %.loc6_47.1) // CHECK:STDOUT: %impl.elem0.loc6_47.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_47.1: = bound_method %int_1, %impl.elem0.loc6_47.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc6_47.1: = specific_function %impl.elem0.loc6_47.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6_47.1: = specific_function %impl.elem0.loc6_47.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.2: = bound_method %int_1, %specific_fn.loc6_47.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc6_47.1: init %i32 = call %bound_method.loc6_47.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_47.2: %i32 = value_of_initializer %int.convert_checked.loc6_47.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_47.3: %i32 = converted %int_1, %.loc6_47.2 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc6_47.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_47.3: = bound_method %int_2.loc6_46, %impl.elem0.loc6_47.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc6_47.2: = specific_function %impl.elem0.loc6_47.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6_47.2: = specific_function %impl.elem0.loc6_47.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.4: = bound_method %int_2.loc6_46, %specific_fn.loc6_47.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc6_47.2: init %i32 = call %bound_method.loc6_47.4(%int_2.loc6_46) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc6_47.4: %i32 = value_of_initializer %int.convert_checked.loc6_47.2 [concrete = constants.%int_2.ef8] @@ -164,28 +170,28 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.loc6_48.2: %tuple.type.d07 = converted %.loc6_47.1, %tuple.loc6_47 [concrete = constants.%tuple] // CHECK:STDOUT: %struct.loc6_48: %struct_type.a.b.fe2 = struct_value (%true, %.loc6_48.2) [concrete = constants.%struct] // CHECK:STDOUT: %.loc6_48.3: %struct_type.a.b.fe2 = converted %.loc6_48.1, %struct.loc6_48 [concrete = constants.%struct] -// CHECK:STDOUT: %.Self.ref.loc6_54: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc6_54: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %X.ref.loc6_54: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.e7f] -// CHECK:STDOUT: %.Self.as_type.loc6_54: type = facet_access_type %.Self.ref.loc6_54 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc6_54: type = converted %.Self.ref.loc6_54, %.Self.as_type.loc6_54 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impl.elem0.loc6_54: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %.Self.as_type.loc6_54: type = facet_access_type %.Self.ref.loc6_54 [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %.loc6_54: type = converted %.Self.ref.loc6_54, %.Self.as_type.loc6_54 [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %impl.elem0.loc6_54: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.74b] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %.loc6_65: bool = not %false [concrete = constants.%true] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] // CHECK:STDOUT: %int_2.loc6_86: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc6_84: %.07b = impl_witness_access constants.%Sub.impl_witness.37d, element0 [concrete = constants.%Op.667] -// CHECK:STDOUT: %bound_method.loc6_84: = bound_method %int_3, %impl.elem0.loc6_84 [concrete = constants.%Op.bound.645] +// CHECK:STDOUT: %impl.elem1.loc6_84: %.4ae = impl_witness_access constants.%SubWith.impl_witness.72e, element1 [concrete = constants.%Op.9f1] +// CHECK:STDOUT: %bound_method.loc6_84: = bound_method %int_3, %impl.elem1.loc6_84 [concrete = constants.%Op.bound.02a] // CHECK:STDOUT: %int.ssub: init Core.IntLiteral = call %bound_method.loc6_84(%int_3, %int_2.loc6_86) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %int_2.loc6_93: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc6_91: %.d13 = impl_witness_access constants.%Div.impl_witness.ec4, element0 [concrete = constants.%Op.553] -// CHECK:STDOUT: %bound_method.loc6_91: = bound_method %int_4, %impl.elem0.loc6_91 [concrete = constants.%Op.bound.2e7] +// CHECK:STDOUT: %impl.elem1.loc6_91: %.f62 = impl_witness_access constants.%DivWith.impl_witness.130, element1 [concrete = constants.%Op.32d] +// CHECK:STDOUT: %bound_method.loc6_91: = bound_method %int_4, %impl.elem1.loc6_91 [concrete = constants.%Op.bound.997] // CHECK:STDOUT: %int.sdiv: init Core.IntLiteral = call %bound_method.loc6_91(%int_4, %int_2.loc6_93) [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc6_94.1: %tuple.type.f94 = tuple_literal (%int.ssub, %int.sdiv) // CHECK:STDOUT: %.loc6_95.1: %struct_type.a.b.aa4 = struct_literal (%.loc6_65, %.loc6_94.1) // CHECK:STDOUT: %impl.elem0.loc6_94.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_94.1: = bound_method %int.ssub, %impl.elem0.loc6_94.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc6_94.1: = specific_function %impl.elem0.loc6_94.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6_94.1: = specific_function %impl.elem0.loc6_94.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_94.2: = bound_method %int.ssub, %specific_fn.loc6_94.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %.loc6_84.1: Core.IntLiteral = value_of_initializer %int.ssub [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc6_84.2: Core.IntLiteral = converted %int.ssub, %.loc6_84.1 [concrete = constants.%int_1.5b8] @@ -194,7 +200,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.loc6_94.3: %i32 = converted %int.ssub, %.loc6_94.2 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc6_94.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_94.3: = bound_method %int.sdiv, %impl.elem0.loc6_94.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc6_94.2: = specific_function %impl.elem0.loc6_94.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6_94.2: = specific_function %impl.elem0.loc6_94.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_94.4: = bound_method %int.sdiv, %specific_fn.loc6_94.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %.loc6_91.1: Core.IntLiteral = value_of_initializer %int.sdiv [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc6_91.2: Core.IntLiteral = converted %int.sdiv, %.loc6_91.1 [concrete = constants.%int_2.ecc] @@ -216,7 +222,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] // CHECK:STDOUT: %X: %struct_type.a.b.fe2 = assoc_const_decl @X [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%X [concrete = constants.%assoc0.e7f] // CHECK:STDOUT: } @@ -236,7 +242,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Self.826) {} +// CHECK:STDOUT: specific @X(constants.%Self.8268) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%I.facet) {} // CHECK:STDOUT: @@ -244,7 +250,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] @@ -256,11 +262,11 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %struct_type.a.b.fe2: type = struct_type {.a: bool, .b: %tuple.type.d07} [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0.e7f: %I.assoc_type = assoc_entity element0, @I.%X [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %struct_type.a.b.fe2 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.541: type = facet_access_type %.Self.258 [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.258, @I [symbolic_self] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type.541, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.74b: %struct_type.a.b.fe2 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -271,15 +277,15 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -326,12 +332,12 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.loc10_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc10_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc10_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %X.ref.loc10_20: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.e7f] -// CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impl.elem0.loc10_20: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %impl.elem0.loc10_20: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.74b] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] @@ -339,14 +345,14 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.loc10_48.1: %struct_type.a.b.aa4 = struct_literal (%true, %.loc10_47.1) // CHECK:STDOUT: %impl.elem0.loc10_47.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_47.1: = bound_method %int_1, %impl.elem0.loc10_47.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc10_47.1: = specific_function %impl.elem0.loc10_47.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_47.1: = specific_function %impl.elem0.loc10_47.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_47.2: = bound_method %int_1, %specific_fn.loc10_47.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc10_47.1: init %i32 = call %bound_method.loc10_47.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_47.2: %i32 = value_of_initializer %int.convert_checked.loc10_47.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_47.3: %i32 = converted %int_1, %.loc10_47.2 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc10_47.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_47.3: = bound_method %int_2, %impl.elem0.loc10_47.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc10_47.2: = specific_function %impl.elem0.loc10_47.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_47.2: = specific_function %impl.elem0.loc10_47.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_47.4: = bound_method %int_2, %specific_fn.loc10_47.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc10_47.2: init %i32 = call %bound_method.loc10_47.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc10_47.4: %i32 = value_of_initializer %int.convert_checked.loc10_47.2 [concrete = constants.%int_2.ef8] @@ -355,11 +361,11 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.loc10_48.2: %tuple.type.d07 = converted %.loc10_47.1, %tuple.loc10_47 [concrete = constants.%tuple.21c] // CHECK:STDOUT: %struct.loc10_48: %struct_type.a.b.fe2 = struct_value (%true, %.loc10_48.2) [concrete = constants.%struct.682] // CHECK:STDOUT: %.loc10_48.3: %struct_type.a.b.fe2 = converted %.loc10_48.1, %struct.loc10_48 [concrete = constants.%struct.682] -// CHECK:STDOUT: %.Self.ref.loc10_54: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc10_54: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %X.ref.loc10_54: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.e7f] -// CHECK:STDOUT: %.Self.as_type.loc10_54: type = facet_access_type %.Self.ref.loc10_54 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc10_54: type = converted %.Self.ref.loc10_54, %.Self.as_type.loc10_54 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impl.elem0.loc10_54: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %.Self.as_type.loc10_54: type = facet_access_type %.Self.ref.loc10_54 [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %.loc10_54: type = converted %.Self.ref.loc10_54, %.Self.as_type.loc10_54 [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %impl.elem0.loc10_54: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.74b] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] @@ -367,14 +373,14 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.loc10_83.1: %struct_type.a.b.aa4 = struct_literal (%false, %.loc10_82.1) // CHECK:STDOUT: %impl.elem0.loc10_82.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_82.1: = bound_method %int_3, %impl.elem0.loc10_82.1 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc10_82.1: = specific_function %impl.elem0.loc10_82.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_82.1: = specific_function %impl.elem0.loc10_82.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_82.2: = bound_method %int_3, %specific_fn.loc10_82.1 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc10_82.1: init %i32 = call %bound_method.loc10_82.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc10_82.2: %i32 = value_of_initializer %int.convert_checked.loc10_82.1 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc10_82.3: %i32 = converted %int_3, %.loc10_82.2 [concrete = constants.%int_3.822] // CHECK:STDOUT: %impl.elem0.loc10_82.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_82.3: = bound_method %int_4, %impl.elem0.loc10_82.2 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc10_82.2: = specific_function %impl.elem0.loc10_82.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_82.2: = specific_function %impl.elem0.loc10_82.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_82.4: = bound_method %int_4, %specific_fn.loc10_82.2 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc10_82.2: init %i32 = call %bound_method.loc10_82.4(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc10_82.4: %i32 = value_of_initializer %int.convert_checked.loc10_82.2 [concrete = constants.%int_4.940] @@ -391,7 +397,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] // CHECK:STDOUT: %X: %struct_type.a.b.fe2 = assoc_const_decl @X [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%X [concrete = constants.%assoc0.e7f] // CHECK:STDOUT: } @@ -411,7 +417,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Self.826) {} +// CHECK:STDOUT: specific @X(constants.%Self.8268) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%I.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon index 3871faa3bb9d..edb8dee72f48 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -66,14 +66,16 @@ fn G() { // CHECK:STDOUT: %JJ.5f5: %JJ.type.622 = struct_value () [concrete] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.78c: %J.assoc_type = assoc_entity element0, @J.%JJ.decl [concrete] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %I.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %I.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type: type = facet_type <@I & @J> [concrete] // CHECK:STDOUT: %T: %facet_type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f8f: type = pattern_type %facet_type [concrete] @@ -111,13 +113,13 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -139,7 +141,7 @@ fn G() { // CHECK:STDOUT: %.loc22_12.1: type = splice_block %.loc22_12.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %I.ref.loc22: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %J.ref.loc22: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %impl.elem0.loc22: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc22: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc22: = bound_method %I.ref.loc22, %impl.elem0.loc22 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and: init type = call %bound_method.loc22(%I.ref.loc22, %J.ref.loc22) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc22_12.2: type = value_of_initializer %type.and [concrete = constants.%facet_type] diff --git a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon index 8b4d8b9cd917..b3adc8998ce2 100644 --- a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon +++ b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon @@ -420,14 +420,16 @@ fn F() { // CHECK:STDOUT: %Z2.impl_witness: = impl_witness file.%Z2.impl_witness_table [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %Z1.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %Z1.type, %Op.ff4 [concrete] // CHECK:STDOUT: %facet_type: type = facet_type <@Z1 & @Z2> [concrete] // CHECK:STDOUT: %facet_value.74b: %facet_type = facet_value %empty_tuple.type, (%Z1.impl_witness, %Z2.impl_witness) [concrete] // CHECK:STDOUT: %Z1.facet: %Z1.type = facet_value %empty_tuple.type, (%Z1.impl_witness) [concrete] @@ -454,13 +456,13 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -669,7 +671,7 @@ fn F() { // CHECK:STDOUT: %.loc21_10: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %Z1.ref.loc21_16: type = name_ref Z1, file.%Z1.decl [concrete = constants.%Z1.type] // CHECK:STDOUT: %Z2.ref.loc21_21: type = name_ref Z2, file.%Z2.decl [concrete = constants.%Z2.type] -// CHECK:STDOUT: %impl.elem0.loc21_19: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc21_19: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc21_19: = bound_method %Z1.ref.loc21_16, %impl.elem0.loc21_19 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc21_19: init type = call %bound_method.loc21_19(%Z1.ref.loc21_16, %Z2.ref.loc21_21) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %type.and.loc21_19 [concrete = constants.%facet_type] @@ -686,7 +688,7 @@ fn F() { // CHECK:STDOUT: %.loc21_35: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %Z1.ref.loc21_41: type = name_ref Z1, file.%Z1.decl [concrete = constants.%Z1.type] // CHECK:STDOUT: %Z2.ref.loc21_46: type = name_ref Z2, file.%Z2.decl [concrete = constants.%Z2.type] -// CHECK:STDOUT: %impl.elem0.loc21_44: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc21_44: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc21_44: = bound_method %Z1.ref.loc21_41, %impl.elem0.loc21_44 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc21_44: init type = call %bound_method.loc21_44(%Z1.ref.loc21_41, %Z2.ref.loc21_46) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc21_48.1: type = value_of_initializer %type.and.loc21_44 [concrete = constants.%facet_type] diff --git a/toolchain/check/testdata/impl/use_assoc_const.carbon b/toolchain/check/testdata/impl/use_assoc_const.carbon index 9751203a28d1..b83b461513b5 100644 --- a/toolchain/check/testdata/impl/use_assoc_const.carbon +++ b/toolchain/check/testdata/impl/use_assoc_const.carbon @@ -89,13 +89,17 @@ fn CallGeneric(e: E) -> i32 { // --- use_constraint_on_associated_type.carbon library "[[@TEST_NAME]]"; +interface I { + fn Op[self: Self](b: Self) -> Self; +} + interface J { - let U:! Core.Add; + let U:! I; fn F(u: U) -> U; } -fn GenericAddResult[T:! J](t: T, u: T.U) -> T.U { - return t.F(u) + T.F(u); +fn GenericResult[T:! J](t: T, u: T.U) -> T.U { + return t.F(u).(I.Op)(T.F(u)); } // --- interface_qualified.carbon @@ -292,16 +296,17 @@ fn F() { // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] -// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] +// CHECK:STDOUT: %assoc1.572: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] +// CHECK:STDOUT: %.Self.968: %J.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.78d: type = facet_access_type %.Self.968 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self.968, @J [symbolic_self] +// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type.78d, (%J.lookup_impl_witness.25c) [symbolic_self] // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %Int.49d0e6.1: type = class_type @Int, @Int(%N) [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %J_where.type.b64: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete] // CHECK:STDOUT: %J.impl_witness.e42: = impl_witness file.%J.impl_witness_table.loc8 [concrete] @@ -311,28 +316,37 @@ fn F() { // CHECK:STDOUT: %F.46e: %F.type.7d4 = struct_value () [concrete] // CHECK:STDOUT: %J.facet.ecc: %J.type = facet_value %empty_tuple.type, (%J.impl_witness.e42) [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] -// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.type.d7d: type = facet_type <@AddWith, @AddWith(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %Op.type.0ee: type = fn_type @Op.1, @AddWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] -// CHECK:STDOUT: %Op.type.52d: type = fn_type @Op.2, @impl.2c2(%N) [symbolic] -// CHECK:STDOUT: %Op.12d: %Op.type.52d = struct_value () [symbolic] -// CHECK:STDOUT: %Add.impl_witness.dbc: = impl_witness imports.%Add.impl_witness_table, @impl.2c2(%int_32) [concrete] -// CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete] -// CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete] -// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c82, @Op.2(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.type.080b83.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Int.49d0e6.1)> [symbolic] +// CHECK:STDOUT: %U: %ImplicitAs.type.080b83.2 = bind_symbolic_name U, 1 [symbolic] +// CHECK:STDOUT: %Op.type.c98676.1: type = fn_type @Op.12, @impl.b98(%N, %U) [symbolic] +// CHECK:STDOUT: %Op.aee6d7.1: %Op.type.c98676.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Op.type.c98676.2: type = fn_type @Op.13, @impl.b98(%N, %U) [symbolic] +// CHECK:STDOUT: %Op.aee6d7.2: %Op.type.c98676.2 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %AddWith.impl_witness.5e4: = impl_witness imports.%AddWith.impl_witness_table.61f, @impl.b98(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.type.0437e0.1: type = fn_type @Op.12, @impl.b98(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.a9544c.1: %Op.type.0437e0.1 = struct_value () [concrete] +// CHECK:STDOUT: %Op.type.0437e0.2: type = fn_type @Op.13, @impl.b98(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.a9544c.2: %Op.type.0437e0.2 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.facet: %AddWith.type.d7d = facet_value %i32, (%AddWith.impl_witness.5e4) [concrete] +// CHECK:STDOUT: %.b70: type = fn_type_with_self_type %Op.type.0ee, %AddWith.facet [concrete] +// CHECK:STDOUT: %Op.specific_fn.418e74.1: = specific_function %Op.a9544c.2, @Op.13(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.specific_fn.418e74.2: = specific_function %Op.a9544c.1, @Op.12(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] @@ -358,17 +372,19 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Add = %Core.Add +// CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] +// CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.import_ref.344: @impl.2c2.%Op.type (%Op.type.52d) = import_ref Core//prelude/types/int, loc58_42, loaded [symbolic = @impl.2c2.%Op (constants.%Op.12d)] -// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Core.import_ref.344), @impl.2c2 [concrete] +// CHECK:STDOUT: %Core.import_ref.5f5145.7 = import_ref Core//prelude/types/int, loc124_49, unloaded +// CHECK:STDOUT: %Core.import_ref.34c: @impl.b98.%Op.type.2 (%Op.type.c98676.2) = import_ref Core//prelude/types/int, loc125_48, loaded [symbolic = @impl.b98.%Op.2 (constants.%Op.aee6d7.2)] +// CHECK:STDOUT: %AddWith.impl_witness_table.61f = impl_witness_table (%Core.import_ref.5f5145.7, %Core.import_ref.34c), @impl.b98 [concrete] +// CHECK:STDOUT: %Core.Op.574: @impl.b98.%Op.type.1 (%Op.type.c98676.1) = import_ref Core//prelude/types/int, Op, loaded [symbolic = @impl.b98.%Op.1 (constants.%Op.aee6d7.1)] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -385,11 +401,11 @@ fn F() { // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.78d] +// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.78d] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -421,11 +437,11 @@ fn F() { // CHECK:STDOUT: impl_decl @impl.043 [concrete] {} { // CHECK:STDOUT: %C.ref.loc21_6: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc21_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.78d] +// CHECK:STDOUT: %.loc21_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.78d] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // CHECK:STDOUT: %C.ref.loc21_24: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %.loc21_13: type = where_expr %.Self [concrete = constants.%J_where.type.0bc] { @@ -468,7 +484,7 @@ fn F() { // CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = out_param call_param2 // CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1.572] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -562,18 +578,25 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc9_46: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] -// CHECK:STDOUT: %bound_method.loc9_46.1: = bound_method %u.ref, %impl.elem0.loc9_46 -// CHECK:STDOUT: %specific_fn.loc9_46: = specific_function %impl.elem0.loc9_46, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.c75) [concrete = constants.%ImplicitAs.facet.921] +// CHECK:STDOUT: %.loc9_46.1: %ImplicitAs.type.205 = converted Core.IntLiteral, %ImplicitAs.facet [concrete = constants.%ImplicitAs.facet.921] +// CHECK:STDOUT: %impl.elem1: %.b70 = impl_witness_access constants.%AddWith.impl_witness.5e4, element1 [concrete = constants.%Op.a9544c.2] +// CHECK:STDOUT: %bound_method.loc9_46.1: = bound_method %u.ref, %impl.elem1 +// CHECK:STDOUT: %specific_fn.loc9_46: = specific_function %impl.elem1, @Op.13(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.specific_fn.418e74.1] // CHECK:STDOUT: %bound_method.loc9_46.2: = bound_method %u.ref, %specific_fn.loc9_46 -// CHECK:STDOUT: %impl.elem0.loc9_48: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc9_48.1: = bound_method %int_2, %impl.elem0.loc9_48 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc9_48: = specific_function %impl.elem0.loc9_48, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %.loc9_46.2: %Op.type.0437e0.1 = specific_constant imports.%Core.Op.574, @impl.b98(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.a9544c.1] +// CHECK:STDOUT: %Op.ref: %Op.type.0437e0.1 = name_ref Op, %.loc9_46.2 [concrete = constants.%Op.a9544c.1] +// CHECK:STDOUT: %Op.bound: = bound_method %u.ref, %Op.ref +// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ref, @Op.12(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.specific_fn.418e74.2] +// CHECK:STDOUT: %bound_method.loc9_46.3: = bound_method %u.ref, %Op.specific_fn +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc9_48.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc9_48: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_48.2: = bound_method %int_2, %specific_fn.loc9_48 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_48.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_48.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_48.2: %i32 = converted %int_2, %.loc9_48.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc9_46.2(%u.ref, %.loc9_48.2) +// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc9_46.3(%u.ref, %.loc9_48.2) // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.sadd // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.sadd, %.loc9_49.1 // CHECK:STDOUT: return %.loc9_49.2 @@ -583,7 +606,7 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] +// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572] // CHECK:STDOUT: %impl.elem1: %.597 = impl_witness_access constants.%J.impl_witness.e42, element1 [concrete = constants.%F.46e] // CHECK:STDOUT: %bound_method.loc13_11: = bound_method %x.ref, %impl.elem1 // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40.f80] @@ -653,19 +676,20 @@ fn F() { // CHECK:STDOUT: %pattern_type.b98: type = pattern_type %impl.elem0.11f [symbolic] // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] +// CHECK:STDOUT: %assoc1.572: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] -// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] +// CHECK:STDOUT: %.Self.968: %J.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.78d: type = facet_access_type %.Self.968 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self.968, @J [symbolic_self] +// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type.78d, (%J.lookup_impl_witness.25c) [symbolic_self] // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %Int.49d0e6.1: type = class_type @Int, @Int(%N) [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness file.%J.impl_witness_table [concrete] @@ -674,28 +698,37 @@ fn F() { // CHECK:STDOUT: %F.b9c: %F.type.5d3 = struct_value () [concrete] // CHECK:STDOUT: %J.facet.183: %J.type = facet_value %D, (%J.impl_witness) [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] -// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.type.d7d: type = facet_type <@AddWith, @AddWith(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %Op.type.0ee: type = fn_type @Op.1, @AddWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] -// CHECK:STDOUT: %Op.type.52d: type = fn_type @Op.2, @impl.2c2(%N) [symbolic] -// CHECK:STDOUT: %Op.12d: %Op.type.52d = struct_value () [symbolic] -// CHECK:STDOUT: %Add.impl_witness.dbc: = impl_witness imports.%Add.impl_witness_table, @impl.2c2(%int_32) [concrete] -// CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete] -// CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete] -// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c82, @Op.2(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.type.080b83.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Int.49d0e6.1)> [symbolic] +// CHECK:STDOUT: %U: %ImplicitAs.type.080b83.2 = bind_symbolic_name U, 1 [symbolic] +// CHECK:STDOUT: %Op.type.c98676.1: type = fn_type @Op.12, @impl.b98(%N, %U) [symbolic] +// CHECK:STDOUT: %Op.aee6d7.1: %Op.type.c98676.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Op.type.c98676.2: type = fn_type @Op.13, @impl.b98(%N, %U) [symbolic] +// CHECK:STDOUT: %Op.aee6d7.2: %Op.type.c98676.2 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %AddWith.impl_witness.5e4: = impl_witness imports.%AddWith.impl_witness_table.61f, @impl.b98(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.type.0437e0.1: type = fn_type @Op.12, @impl.b98(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.a9544c.1: %Op.type.0437e0.1 = struct_value () [concrete] +// CHECK:STDOUT: %Op.type.0437e0.2: type = fn_type @Op.13, @impl.b98(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.a9544c.2: %Op.type.0437e0.2 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.facet: %AddWith.type.d7d = facet_value %i32, (%AddWith.impl_witness.5e4) [concrete] +// CHECK:STDOUT: %.b70: type = fn_type_with_self_type %Op.type.0ee, %AddWith.facet [concrete] +// CHECK:STDOUT: %Op.specific_fn.418e74.1: = specific_function %Op.a9544c.2, @Op.13(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.specific_fn.418e74.2: = specific_function %Op.a9544c.1, @Op.12(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] @@ -712,17 +745,19 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Add = %Core.Add +// CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] +// CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.import_ref.344: @impl.2c2.%Op.type (%Op.type.52d) = import_ref Core//prelude/types/int, loc58_42, loaded [symbolic = @impl.2c2.%Op (constants.%Op.12d)] -// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Core.import_ref.344), @impl.2c2 [concrete] +// CHECK:STDOUT: %Core.import_ref.5f5145.7 = import_ref Core//prelude/types/int, loc124_49, unloaded +// CHECK:STDOUT: %Core.import_ref.34c: @impl.b98.%Op.type.2 (%Op.type.c98676.2) = import_ref Core//prelude/types/int, loc125_48, loaded [symbolic = @impl.b98.%Op.2 (constants.%Op.aee6d7.2)] +// CHECK:STDOUT: %AddWith.impl_witness_table.61f = impl_witness_table (%Core.import_ref.5f5145.7, %Core.import_ref.34c), @impl.b98 [concrete] +// CHECK:STDOUT: %Core.Op.574: @impl.b98.%Op.type.1 (%Op.type.c98676.1) = import_ref Core//prelude/types/int, Op, loaded [symbolic = @impl.b98.%Op.1 (constants.%Op.aee6d7.1)] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -739,11 +774,11 @@ fn F() { // CHECK:STDOUT: impl_decl @impl.fc1 [concrete] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc10_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.78d] +// CHECK:STDOUT: %.loc10_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.78d] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -787,7 +822,7 @@ fn F() { // CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1.572] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -846,18 +881,25 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc11_34: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] -// CHECK:STDOUT: %bound_method.loc11_34.1: = bound_method %u.ref, %impl.elem0.loc11_34 -// CHECK:STDOUT: %specific_fn.loc11_34: = specific_function %impl.elem0.loc11_34, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.c75) [concrete = constants.%ImplicitAs.facet.921] +// CHECK:STDOUT: %.loc11_34.1: %ImplicitAs.type.205 = converted Core.IntLiteral, %ImplicitAs.facet [concrete = constants.%ImplicitAs.facet.921] +// CHECK:STDOUT: %impl.elem1: %.b70 = impl_witness_access constants.%AddWith.impl_witness.5e4, element1 [concrete = constants.%Op.a9544c.2] +// CHECK:STDOUT: %bound_method.loc11_34.1: = bound_method %u.ref, %impl.elem1 +// CHECK:STDOUT: %specific_fn.loc11_34: = specific_function %impl.elem1, @Op.13(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.specific_fn.418e74.1] // CHECK:STDOUT: %bound_method.loc11_34.2: = bound_method %u.ref, %specific_fn.loc11_34 -// CHECK:STDOUT: %impl.elem0.loc11_36: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc11_36.1: = bound_method %int_3, %impl.elem0.loc11_36 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc11_36: = specific_function %impl.elem0.loc11_36, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %.loc11_34.2: %Op.type.0437e0.1 = specific_constant imports.%Core.Op.574, @impl.b98(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.a9544c.1] +// CHECK:STDOUT: %Op.ref: %Op.type.0437e0.1 = name_ref Op, %.loc11_34.2 [concrete = constants.%Op.a9544c.1] +// CHECK:STDOUT: %Op.bound: = bound_method %u.ref, %Op.ref +// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ref, @Op.12(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.specific_fn.418e74.2] +// CHECK:STDOUT: %bound_method.loc11_34.3: = bound_method %u.ref, %Op.specific_fn +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc11_36.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound.b30] +// CHECK:STDOUT: %specific_fn.loc11_36: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_36.2: = bound_method %int_3, %specific_fn.loc11_36 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc11_36.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc11_36.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc11_36.2: %i32 = converted %int_3, %.loc11_36.1 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc11_34.2(%u.ref, %.loc11_36.2) +// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc11_34.3(%u.ref, %.loc11_36.2) // CHECK:STDOUT: %.loc11_37.1: %i32 = value_of_initializer %int.sadd // CHECK:STDOUT: %.loc11_37.2: %i32 = converted %int.sadd, %.loc11_37.1 // CHECK:STDOUT: return %.loc11_37.2 @@ -867,7 +909,7 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] +// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572] // CHECK:STDOUT: %J.facet: %J.type = facet_value constants.%D, (constants.%J.impl_witness) [concrete = constants.%J.facet.183] // CHECK:STDOUT: %.loc15_11: %J.type = converted %D.ref, %J.facet [concrete = constants.%J.facet.183] // CHECK:STDOUT: %impl.elem1: %.490 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.b9c] @@ -919,21 +961,22 @@ fn F() { // CHECK:STDOUT: %pattern_type.b984e7.1: type = pattern_type %impl.elem0.11fef0.1 [symbolic] // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] +// CHECK:STDOUT: %assoc1.572: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] // CHECK:STDOUT: %pattern_type.4ca604.1: type = pattern_type %Self.as_type.3df [symbolic] // CHECK:STDOUT: %G.type.285: type = fn_type @G.1 [concrete] // CHECK:STDOUT: %G.e4b: %G.type.285 = struct_value () [concrete] -// CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, @J.%G.decl [concrete] +// CHECK:STDOUT: %assoc2.d75: %J.assoc_type = assoc_entity element2, @J.%G.decl [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] -// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] +// CHECK:STDOUT: %.Self.968: %J.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.78d: type = facet_access_type %.Self.968 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self.968, @J [symbolic_self] +// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type.78d, (%J.lookup_impl_witness.25c) [symbolic_self] // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %Int.49d0e6.1: type = class_type @Int, @Int(%N) [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness @E.%J.impl_witness_table [concrete] @@ -949,28 +992,39 @@ fn F() { // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] // CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] -// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.type.d7d: type = facet_type <@AddWith, @AddWith(Core.IntLiteral)> [concrete] +// CHECK:STDOUT: %Op.type.0ee: type = fn_type @Op.1, @AddWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] -// CHECK:STDOUT: %Op.type.52d: type = fn_type @Op.2, @impl.2c2(%N) [symbolic] -// CHECK:STDOUT: %Op.12d: %Op.type.52d = struct_value () [symbolic] -// CHECK:STDOUT: %Add.impl_witness.dbc: = impl_witness imports.%Add.impl_witness_table, @impl.2c2(%int_32) [concrete] -// CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete] -// CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete] -// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] -// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.c82, @Op.2(%int_32) [concrete] +// CHECK:STDOUT: %ImplicitAs.type.080b83.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Int.49d0e6.1)> [symbolic] +// CHECK:STDOUT: %Op.type.41a: type = fn_type @Op.6, @impl.144(%N) [symbolic] +// CHECK:STDOUT: %Op.fdd: %Op.type.41a = struct_value () [symbolic] +// CHECK:STDOUT: %U: %ImplicitAs.type.080b83.2 = bind_symbolic_name U, 1 [symbolic] +// CHECK:STDOUT: %Op.type.c98676.1: type = fn_type @Op.12, @impl.b98(%N, %U) [symbolic] +// CHECK:STDOUT: %Op.aee6d7.1: %Op.type.c98676.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Op.type.c98676.2: type = fn_type @Op.13, @impl.b98(%N, %U) [symbolic] +// CHECK:STDOUT: %Op.aee6d7.2: %Op.type.c98676.2 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %AddWith.impl_witness.5e4: = impl_witness imports.%AddWith.impl_witness_table.61f, @impl.b98(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.type.0437e0.1: type = fn_type @Op.12, @impl.b98(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.a9544c.1: %Op.type.0437e0.1 = struct_value () [concrete] +// CHECK:STDOUT: %Op.type.0437e0.2: type = fn_type @Op.13, @impl.b98(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.a9544c.2: %Op.type.0437e0.2 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.facet.e10: %AddWith.type.d7d = facet_value %i32, (%AddWith.impl_witness.5e4) [concrete] +// CHECK:STDOUT: %.b70: type = fn_type_with_self_type %Op.type.0ee, %AddWith.facet.e10 [concrete] +// CHECK:STDOUT: %Op.specific_fn.418e74.1: = specific_function %Op.a9544c.2, @Op.13(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %Op.specific_fn.418e74.2: = specific_function %Op.a9544c.1, @Op.12(%int_32, %ImplicitAs.facet.921) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] @@ -987,6 +1041,14 @@ fn F() { // CHECK:STDOUT: %Convert.bound.b30: = bound_method %int_3.1ba, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.047: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] +// CHECK:STDOUT: %AddWith.type.1d9: type = facet_type <@AddWith, @AddWith(%i32)> [concrete] +// CHECK:STDOUT: %Op.type.5eb: type = fn_type @Op.1, @AddWith(%i32) [concrete] +// CHECK:STDOUT: %AddWith.impl_witness.091: = impl_witness imports.%AddWith.impl_witness_table.e20, @impl.144(%int_32) [concrete] +// CHECK:STDOUT: %Op.type.630: type = fn_type @Op.6, @impl.144(%int_32) [concrete] +// CHECK:STDOUT: %Op.04c: %Op.type.630 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.facet.be2: %AddWith.type.1d9 = facet_value %i32, (%AddWith.impl_witness.091) [concrete] +// CHECK:STDOUT: %.8f4: type = fn_type_with_self_type %Op.type.5eb, %AddWith.facet.be2 [concrete] +// CHECK:STDOUT: %Op.specific_fn.951: = specific_function %Op.04c, @Op.6(%int_32) [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %Convert.bound.ac3: = bound_method %int_4.0c1, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.1da: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] @@ -999,21 +1061,21 @@ fn F() { // CHECK:STDOUT: %Convert.bound.ce9: = bound_method %int_6.462, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.efa: = bound_method %int_6.462, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_6.e56: %i32 = int_value 6 [concrete] -// CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.ccd: %J.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.28e: type = pattern_type %J.type [concrete] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.4ca604.2: type = pattern_type %T.as_type [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: = lookup_impl_witness %T, @J [symbolic] -// CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.64628e.2) [symbolic] +// CHECK:STDOUT: %T.as_type.3df: type = facet_access_type %T.ccd [symbolic] +// CHECK:STDOUT: %pattern_type.4ca604.2: type = pattern_type %T.as_type.3df [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: = lookup_impl_witness %T.ccd, @J [symbolic] +// CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %T.as_type.3df, (%J.lookup_impl_witness.64628e.2) [symbolic] // CHECK:STDOUT: %impl.elem0.11fef0.2: type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic] // CHECK:STDOUT: %pattern_type.b984e7.2: type = pattern_type %impl.elem0.11fef0.2 [symbolic] // CHECK:STDOUT: %GenericCallF.type: type = fn_type @GenericCallF [concrete] // CHECK:STDOUT: %GenericCallF: %GenericCallF.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.58f: = require_complete_type %impl.elem0.11fef0.2 [symbolic] -// CHECK:STDOUT: %require_complete.2a5: = require_complete_type %T.as_type [symbolic] +// CHECK:STDOUT: %require_complete.2a5: = require_complete_type %T.as_type.3df [symbolic] // CHECK:STDOUT: %.d43: type = fn_type_with_self_type %F.type.c14, %J.facet.5210a7.2 [symbolic] // CHECK:STDOUT: %impl.elem1: %.d43 = impl_witness_access %J.lookup_impl_witness.64628e.2, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @F.1(%J.facet.5210a7.2) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.fe8: = specific_impl_function %impl.elem1, @F.1(%J.facet.5210a7.2) [symbolic] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete] // CHECK:STDOUT: %GenericCallF.specific_fn: = specific_function %GenericCallF, @GenericCallF(%J.facet.ee5) [concrete] @@ -1022,17 +1084,22 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Add = %Core.Add +// CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] +// CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.import_ref.344: @impl.2c2.%Op.type (%Op.type.52d) = import_ref Core//prelude/types/int, loc58_42, loaded [symbolic = @impl.2c2.%Op (constants.%Op.12d)] -// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Core.import_ref.344), @impl.2c2 [concrete] +// CHECK:STDOUT: %Core.import_ref.5f5145.1 = import_ref Core//prelude/types/int, loc92_50, unloaded +// CHECK:STDOUT: %Core.import_ref.bbf: @impl.144.%Op.type (%Op.type.41a) = import_ref Core//prelude/types/int, loc93_42, loaded [symbolic = @impl.144.%Op (constants.%Op.fdd)] +// CHECK:STDOUT: %AddWith.impl_witness_table.e20 = impl_witness_table (%Core.import_ref.5f5145.1, %Core.import_ref.bbf), @impl.144 [concrete] +// CHECK:STDOUT: %Core.import_ref.5f5145.7 = import_ref Core//prelude/types/int, loc124_49, unloaded +// CHECK:STDOUT: %Core.import_ref.34c: @impl.b98.%Op.type.2 (%Op.type.c98676.2) = import_ref Core//prelude/types/int, loc125_48, loaded [symbolic = @impl.b98.%Op.2 (constants.%Op.aee6d7.2)] +// CHECK:STDOUT: %AddWith.impl_witness_table.61f = impl_witness_table (%Core.import_ref.5f5145.7, %Core.import_ref.34c), @impl.b98 [concrete] +// CHECK:STDOUT: %Core.Op.574: @impl.b98.%Op.type.1 (%Op.type.c98676.1) = import_ref Core//prelude/types/int, Op, loaded [symbolic = @impl.b98.%Op.1 (constants.%Op.aee6d7.1)] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1071,26 +1138,26 @@ fn F() { // CHECK:STDOUT: %return.patt: @GenericCallF.%pattern_type.loc24_30 (%pattern_type.b984e7.2) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @GenericCallF.%pattern_type.loc24_30 (%pattern_type.b984e7.2) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc24_41: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc24_41: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T.ccd)] // CHECK:STDOUT: %U.ref.loc24_42: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] -// CHECK:STDOUT: %T.as_type.loc24_42: type = facet_access_type %T.ref.loc24_41 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc24_42: type = converted %T.ref.loc24_41, %T.as_type.loc24_42 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc24_42: type = facet_access_type %T.ref.loc24_41 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] +// CHECK:STDOUT: %.loc24_42: type = converted %T.ref.loc24_41, %T.as_type.loc24_42 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] // CHECK:STDOUT: %impl.elem0.loc24_42: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %T.loc24_17.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc24_17.2 (constants.%T)] -// CHECK:STDOUT: %t.param: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc24_27.1: type = splice_block %.loc24_27.2 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc24_27: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc24_27.1: type = facet_access_type %T.ref.loc24_27 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc24_27.2: type = converted %T.ref.loc24_27, %T.as_type.loc24_27.1 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc24_17.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc24_17.2 (constants.%T.ccd)] +// CHECK:STDOUT: %t.param: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type.3df) = value_param call_param0 +// CHECK:STDOUT: %.loc24_27.1: type = splice_block %.loc24_27.2 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] { +// CHECK:STDOUT: %T.ref.loc24_27: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T.ccd)] +// CHECK:STDOUT: %T.as_type.loc24_27.1: type = facet_access_type %T.ref.loc24_27 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] +// CHECK:STDOUT: %.loc24_27.2: type = converted %T.ref.loc24_27, %T.as_type.loc24_27.1 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = bind_name t, %t.param +// CHECK:STDOUT: %t: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type.3df) = bind_name t, %t.param // CHECK:STDOUT: %u.param: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = value_param call_param1 // CHECK:STDOUT: %.loc24_34.1: type = splice_block %impl.elem0.loc24_34.1 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)] { -// CHECK:STDOUT: %T.ref.loc24_33: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc24_33: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T.ccd)] // CHECK:STDOUT: %U.ref.loc24_34: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] -// CHECK:STDOUT: %T.as_type.loc24_34: type = facet_access_type %T.ref.loc24_33 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc24_34.2: type = converted %T.ref.loc24_33, %T.as_type.loc24_34 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc24_34: type = facet_access_type %T.ref.loc24_33 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] +// CHECK:STDOUT: %.loc24_34.2: type = converted %T.ref.loc24_33, %T.as_type.loc24_34 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] // CHECK:STDOUT: %impl.elem0.loc24_34.1: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %u: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = bind_name u, %u.param @@ -1135,7 +1202,7 @@ fn F() { // CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1.572] // CHECK:STDOUT: %G.decl: %G.type.285 = fn_decl @G.1 [concrete = constants.%G.e4b] { // CHECK:STDOUT: %self.patt: @G.1.%pattern_type.loc6_8 (%pattern_type.4ca604.1) = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @G.1.%pattern_type.loc6_8 (%pattern_type.4ca604.1) = value_param_pattern %self.patt, call_param0 [concrete] @@ -1162,7 +1229,7 @@ fn F() { // CHECK:STDOUT: %return.param: ref @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = out_param call_param2 // CHECK:STDOUT: %return: ref @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, %G.decl [concrete = constants.%assoc2] +// CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, %G.decl [concrete = constants.%assoc2.d75] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -1227,11 +1294,11 @@ fn F() { // CHECK:STDOUT: impl_decl @impl.939 [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc10_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.78d] +// CHECK:STDOUT: %.loc10_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.78d] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -1278,18 +1345,25 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc12_16: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] -// CHECK:STDOUT: %bound_method.loc12_16.1: = bound_method %u.ref, %impl.elem0.loc12_16 -// CHECK:STDOUT: %specific_fn.loc12_16: = specific_function %impl.elem0.loc12_16, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.c75) [concrete = constants.%ImplicitAs.facet.921] +// CHECK:STDOUT: %.loc12_16.1: %ImplicitAs.type.205 = converted Core.IntLiteral, %ImplicitAs.facet [concrete = constants.%ImplicitAs.facet.921] +// CHECK:STDOUT: %impl.elem1: %.b70 = impl_witness_access constants.%AddWith.impl_witness.5e4, element1 [concrete = constants.%Op.a9544c.2] +// CHECK:STDOUT: %bound_method.loc12_16.1: = bound_method %u.ref, %impl.elem1 +// CHECK:STDOUT: %specific_fn.loc12_16: = specific_function %impl.elem1, @Op.13(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.specific_fn.418e74.1] // CHECK:STDOUT: %bound_method.loc12_16.2: = bound_method %u.ref, %specific_fn.loc12_16 -// CHECK:STDOUT: %impl.elem0.loc12_18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc12_18.1: = bound_method %int_1, %impl.elem0.loc12_18 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc12_18: = specific_function %impl.elem0.loc12_18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %.loc12_16.2: %Op.type.0437e0.1 = specific_constant imports.%Core.Op.574, @impl.b98(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.a9544c.1] +// CHECK:STDOUT: %Op.ref: %Op.type.0437e0.1 = name_ref Op, %.loc12_16.2 [concrete = constants.%Op.a9544c.1] +// CHECK:STDOUT: %Op.bound: = bound_method %u.ref, %Op.ref +// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ref, @Op.12(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.specific_fn.418e74.2] +// CHECK:STDOUT: %bound_method.loc12_16.3: = bound_method %u.ref, %Op.specific_fn +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc12_18.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc12_18: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_18.2: = bound_method %int_1, %specific_fn.loc12_18 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc12_18.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc12_18.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc12_18.2: %i32 = converted %int_1, %.loc12_18.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc12_16.2(%u.ref, %.loc12_18.2) +// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc12_16.3(%u.ref, %.loc12_18.2) // CHECK:STDOUT: %.loc12_19.1: %i32 = value_of_initializer %int.sadd // CHECK:STDOUT: %.loc12_19.2: %i32 = converted %int.sadd, %.loc12_19.1 // CHECK:STDOUT: return %.loc12_19.2 @@ -1299,18 +1373,25 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.ref: %i32 = name_ref v, %v // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc15_16: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] -// CHECK:STDOUT: %bound_method.loc15_16.1: = bound_method %v.ref, %impl.elem0.loc15_16 -// CHECK:STDOUT: %specific_fn.loc15_16: = specific_function %impl.elem0.loc15_16, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.c75) [concrete = constants.%ImplicitAs.facet.921] +// CHECK:STDOUT: %.loc15_16.1: %ImplicitAs.type.205 = converted Core.IntLiteral, %ImplicitAs.facet [concrete = constants.%ImplicitAs.facet.921] +// CHECK:STDOUT: %impl.elem1: %.b70 = impl_witness_access constants.%AddWith.impl_witness.5e4, element1 [concrete = constants.%Op.a9544c.2] +// CHECK:STDOUT: %bound_method.loc15_16.1: = bound_method %v.ref, %impl.elem1 +// CHECK:STDOUT: %specific_fn.loc15_16: = specific_function %impl.elem1, @Op.13(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.specific_fn.418e74.1] // CHECK:STDOUT: %bound_method.loc15_16.2: = bound_method %v.ref, %specific_fn.loc15_16 -// CHECK:STDOUT: %impl.elem0.loc15_18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_18.1: = bound_method %int_2, %impl.elem0.loc15_18 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc15_18: = specific_function %impl.elem0.loc15_18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %.loc15_16.2: %Op.type.0437e0.1 = specific_constant imports.%Core.Op.574, @impl.b98(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.a9544c.1] +// CHECK:STDOUT: %Op.ref: %Op.type.0437e0.1 = name_ref Op, %.loc15_16.2 [concrete = constants.%Op.a9544c.1] +// CHECK:STDOUT: %Op.bound: = bound_method %v.ref, %Op.ref +// CHECK:STDOUT: %Op.specific_fn: = specific_function %Op.ref, @Op.12(constants.%int_32, constants.%ImplicitAs.facet.921) [concrete = constants.%Op.specific_fn.418e74.2] +// CHECK:STDOUT: %bound_method.loc15_16.3: = bound_method %v.ref, %Op.specific_fn +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc15_18.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc15_18: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_18.2: = bound_method %int_2, %specific_fn.loc15_18 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_18.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc15_18.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc15_18.2: %i32 = converted %int_2, %.loc15_18.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc15_16.2(%v.ref, %.loc15_18.2) +// CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc15_16.3(%v.ref, %.loc15_18.2) // CHECK:STDOUT: %.loc15_19.1: %i32 = value_of_initializer %int.sadd // CHECK:STDOUT: %.loc15_19.2: %i32 = converted %int.sadd, %.loc15_19.1 // CHECK:STDOUT: return %.loc15_19.2 @@ -1319,7 +1400,7 @@ fn F() { // CHECK:STDOUT: fn @CallBoth(%e.param: %E) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %e.ref.loc21_10: %E = name_ref e, %e -// CHECK:STDOUT: %F.ref.loc21_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] +// CHECK:STDOUT: %F.ref.loc21_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572] // CHECK:STDOUT: %impl.elem1.loc21_11: %.29b = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.b07] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc21_14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] @@ -1331,7 +1412,7 @@ fn F() { // CHECK:STDOUT: %.loc21_14.2: %i32 = converted %int_2, %.loc21_14.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %F.call.loc21_15: init %i32 = call %impl.elem1.loc21_11(%.loc21_14.2) // CHECK:STDOUT: %e.ref.loc21_19: %E = name_ref e, %e -// CHECK:STDOUT: %G.ref.loc21_20: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2] +// CHECK:STDOUT: %G.ref.loc21_20: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2.d75] // CHECK:STDOUT: %impl.elem2.loc21_20: %.ff5 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.553] // CHECK:STDOUT: %bound_method.loc21_20: = bound_method %e.ref.loc21_19, %impl.elem2.loc21_20 // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -1343,9 +1424,9 @@ fn F() { // CHECK:STDOUT: %.loc21_23.1: %i32 = value_of_initializer %int.convert_checked.loc21_23 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc21_23.2: %i32 = converted %int_3, %.loc21_23.1 [concrete = constants.%int_3.822] // CHECK:STDOUT: %G.call.loc21_24: init %i32 = call %bound_method.loc21_20(%e.ref.loc21_19, %.loc21_23.2) -// CHECK:STDOUT: %impl.elem0.loc21_17: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] -// CHECK:STDOUT: %bound_method.loc21_17.1: = bound_method %F.call.loc21_15, %impl.elem0.loc21_17 -// CHECK:STDOUT: %specific_fn.loc21_17: = specific_function %impl.elem0.loc21_17, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %impl.elem1.loc21_17: %.8f4 = impl_witness_access constants.%AddWith.impl_witness.091, element1 [concrete = constants.%Op.04c] +// CHECK:STDOUT: %bound_method.loc21_17.1: = bound_method %F.call.loc21_15, %impl.elem1.loc21_17 +// CHECK:STDOUT: %specific_fn.loc21_17: = specific_function %impl.elem1.loc21_17, @Op.6(constants.%int_32) [concrete = constants.%Op.specific_fn.951] // CHECK:STDOUT: %bound_method.loc21_17.2: = bound_method %F.call.loc21_15, %specific_fn.loc21_17 // CHECK:STDOUT: %.loc21_15.1: %i32 = value_of_initializer %F.call.loc21_15 // CHECK:STDOUT: %.loc21_15.2: %i32 = converted %F.call.loc21_15, %.loc21_15.1 @@ -1353,7 +1434,7 @@ fn F() { // CHECK:STDOUT: %.loc21_24.2: %i32 = converted %G.call.loc21_24, %.loc21_24.1 // CHECK:STDOUT: %int.sadd.loc21_17: init %i32 = call %bound_method.loc21_17.2(%.loc21_15.2, %.loc21_24.2) // CHECK:STDOUT: %E.ref.loc21_28: type = name_ref E, file.%E.decl [concrete = constants.%E] -// CHECK:STDOUT: %F.ref.loc21_29: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] +// CHECK:STDOUT: %F.ref.loc21_29: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572] // CHECK:STDOUT: %impl.elem1.loc21_29: %.29b = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.b07] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc21_32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] @@ -1364,9 +1445,9 @@ fn F() { // CHECK:STDOUT: %.loc21_32.1: %i32 = value_of_initializer %int.convert_checked.loc21_32 [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc21_32.2: %i32 = converted %int_4, %.loc21_32.1 [concrete = constants.%int_4.940] // CHECK:STDOUT: %F.call.loc21_33: init %i32 = call %impl.elem1.loc21_29(%.loc21_32.2) -// CHECK:STDOUT: %impl.elem0.loc21_26: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] -// CHECK:STDOUT: %bound_method.loc21_26.1: = bound_method %int.sadd.loc21_17, %impl.elem0.loc21_26 -// CHECK:STDOUT: %specific_fn.loc21_26: = specific_function %impl.elem0.loc21_26, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %impl.elem1.loc21_26: %.8f4 = impl_witness_access constants.%AddWith.impl_witness.091, element1 [concrete = constants.%Op.04c] +// CHECK:STDOUT: %bound_method.loc21_26.1: = bound_method %int.sadd.loc21_17, %impl.elem1.loc21_26 +// CHECK:STDOUT: %specific_fn.loc21_26: = specific_function %impl.elem1.loc21_26, @Op.6(constants.%int_32) [concrete = constants.%Op.specific_fn.951] // CHECK:STDOUT: %bound_method.loc21_26.2: = bound_method %int.sadd.loc21_17, %specific_fn.loc21_26 // CHECK:STDOUT: %.loc21_17.1: %i32 = value_of_initializer %int.sadd.loc21_17 // CHECK:STDOUT: %.loc21_17.2: %i32 = converted %int.sadd.loc21_17, %.loc21_17.1 @@ -1375,7 +1456,7 @@ fn F() { // CHECK:STDOUT: %int.sadd.loc21_26: init %i32 = call %bound_method.loc21_26.2(%.loc21_17.2, %.loc21_33.2) // CHECK:STDOUT: %e.ref.loc21_37: %E = name_ref e, %e // CHECK:STDOUT: %E.ref.loc21_40: type = name_ref E, file.%E.decl [concrete = constants.%E] -// CHECK:STDOUT: %G.ref.loc21_41: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2] +// CHECK:STDOUT: %G.ref.loc21_41: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2.d75] // CHECK:STDOUT: %impl.elem2.loc21_41: %.ff5 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.553] // CHECK:STDOUT: %bound_method.loc21_38: = bound_method %e.ref.loc21_37, %impl.elem2.loc21_41 // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] @@ -1387,9 +1468,9 @@ fn F() { // CHECK:STDOUT: %.loc21_45.1: %i32 = value_of_initializer %int.convert_checked.loc21_45 [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc21_45.2: %i32 = converted %int_5, %.loc21_45.1 [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %G.call.loc21_46: init %i32 = call %bound_method.loc21_38(%e.ref.loc21_37, %.loc21_45.2) -// CHECK:STDOUT: %impl.elem0.loc21_35: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] -// CHECK:STDOUT: %bound_method.loc21_35.1: = bound_method %int.sadd.loc21_26, %impl.elem0.loc21_35 -// CHECK:STDOUT: %specific_fn.loc21_35: = specific_function %impl.elem0.loc21_35, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %impl.elem1.loc21_35: %.8f4 = impl_witness_access constants.%AddWith.impl_witness.091, element1 [concrete = constants.%Op.04c] +// CHECK:STDOUT: %bound_method.loc21_35.1: = bound_method %int.sadd.loc21_26, %impl.elem1.loc21_35 +// CHECK:STDOUT: %specific_fn.loc21_35: = specific_function %impl.elem1.loc21_35, @Op.6(constants.%int_32) [concrete = constants.%Op.specific_fn.951] // CHECK:STDOUT: %bound_method.loc21_35.2: = bound_method %int.sadd.loc21_26, %specific_fn.loc21_35 // CHECK:STDOUT: %.loc21_26.1: %i32 = value_of_initializer %int.sadd.loc21_26 // CHECK:STDOUT: %.loc21_26.2: %i32 = converted %int.sadd.loc21_26, %.loc21_26.1 @@ -1398,7 +1479,7 @@ fn F() { // CHECK:STDOUT: %int.sadd.loc21_35: init %i32 = call %bound_method.loc21_35.2(%.loc21_26.2, %.loc21_46.2) // CHECK:STDOUT: %e.ref.loc21_50: %E = name_ref e, %e // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %G.ref.loc21_54: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2] +// CHECK:STDOUT: %G.ref.loc21_54: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2.d75] // CHECK:STDOUT: %impl.elem2.loc21_51: %.ff5 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.553] // CHECK:STDOUT: %bound_method.loc21_51: = bound_method %e.ref.loc21_50, %impl.elem2.loc21_51 // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] @@ -1410,9 +1491,9 @@ fn F() { // CHECK:STDOUT: %.loc21_58.1: %i32 = value_of_initializer %int.convert_checked.loc21_58 [concrete = constants.%int_6.e56] // CHECK:STDOUT: %.loc21_58.2: %i32 = converted %int_6, %.loc21_58.1 [concrete = constants.%int_6.e56] // CHECK:STDOUT: %G.call.loc21_59: init %i32 = call %bound_method.loc21_51(%e.ref.loc21_50, %.loc21_58.2) -// CHECK:STDOUT: %impl.elem0.loc21_48: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] -// CHECK:STDOUT: %bound_method.loc21_48.1: = bound_method %int.sadd.loc21_35, %impl.elem0.loc21_48 -// CHECK:STDOUT: %specific_fn.loc21_48: = specific_function %impl.elem0.loc21_48, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn] +// CHECK:STDOUT: %impl.elem1.loc21_48: %.8f4 = impl_witness_access constants.%AddWith.impl_witness.091, element1 [concrete = constants.%Op.04c] +// CHECK:STDOUT: %bound_method.loc21_48.1: = bound_method %int.sadd.loc21_35, %impl.elem1.loc21_48 +// CHECK:STDOUT: %specific_fn.loc21_48: = specific_function %impl.elem1.loc21_48, @Op.6(constants.%int_32) [concrete = constants.%Op.specific_fn.951] // CHECK:STDOUT: %bound_method.loc21_48.2: = bound_method %int.sadd.loc21_35, %specific_fn.loc21_48 // CHECK:STDOUT: %.loc21_35.1: %i32 = value_of_initializer %int.sadd.loc21_35 // CHECK:STDOUT: %.loc21_35.2: %i32 = converted %int.sadd.loc21_35, %.loc21_35.1 @@ -1425,8 +1506,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @GenericCallF(%T.loc24_17.1: %J.type) { -// CHECK:STDOUT: %T.loc24_17.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc24_17.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc24_27.2: type = facet_access_type %T.loc24_17.2 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc24_17.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc24_17.2 (constants.%T.ccd)] +// CHECK:STDOUT: %T.as_type.loc24_27.2: type = facet_access_type %T.loc24_17.2 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] // CHECK:STDOUT: %pattern_type.loc24_24: type = pattern_type %T.as_type.loc24_27.2 [symbolic = %pattern_type.loc24_24 (constants.%pattern_type.4ca604.2)] // CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc24_17.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)] // CHECK:STDOUT: %impl.elem0.loc24_34.2: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)] @@ -1438,17 +1519,17 @@ fn F() { // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc24_27.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.5210a7.2)] // CHECK:STDOUT: %.loc25_11.2: type = fn_type_with_self_type constants.%F.type.c14, %J.facet [symbolic = %.loc25_11.2 (constants.%.d43)] // CHECK:STDOUT: %impl.elem1.loc25_11.2: @GenericCallF.%.loc25_11.2 (%.d43) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc25_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc25_11.2: = specific_impl_function %impl.elem1.loc25_11.2, @F.1(%J.facet) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc25_11.2: = specific_impl_function %impl.elem1.loc25_11.2, @F.1(%J.facet) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn.fe8)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type), %u.param: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2)) -> @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) { +// CHECK:STDOUT: fn(%t.param: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type.3df), %u.param: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2)) -> @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %T.as_type.loc25: type = facet_access_type constants.%T [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc25_11.1: type = converted constants.%T, %T.as_type.loc25 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] +// CHECK:STDOUT: %t.ref: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type.3df) = name_ref t, %t +// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572] +// CHECK:STDOUT: %T.as_type.loc25: type = facet_access_type constants.%T.ccd [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] +// CHECK:STDOUT: %.loc25_11.1: type = converted constants.%T.ccd, %T.as_type.loc25 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type.3df)] // CHECK:STDOUT: %impl.elem1.loc25_11.1: @GenericCallF.%.loc25_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc25_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %u.ref: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = name_ref u, %u -// CHECK:STDOUT: %specific_impl_fn.loc25_11.1: = specific_impl_function %impl.elem1.loc25_11.1, @F.1(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc25_11.1: = specific_impl_function %impl.elem1.loc25_11.1, @F.1(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn.fe8)] // CHECK:STDOUT: %.loc25_15: init @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = call %specific_impl_fn.loc25_11.1(%u.ref) // CHECK:STDOUT: %.loc25_16.1: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = value_of_initializer %.loc25_15 // CHECK:STDOUT: %.loc25_16.2: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = converted %.loc25_15, %.loc25_16.1 @@ -1519,9 +1600,9 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericCallF(constants.%T) { -// CHECK:STDOUT: %T.loc24_17.2 => constants.%T -// CHECK:STDOUT: %T.as_type.loc24_27.2 => constants.%T.as_type +// CHECK:STDOUT: specific @GenericCallF(constants.%T.ccd) { +// CHECK:STDOUT: %T.loc24_17.2 => constants.%T.ccd +// CHECK:STDOUT: %T.as_type.loc24_27.2 => constants.%T.as_type.3df // CHECK:STDOUT: %pattern_type.loc24_24 => constants.%pattern_type.4ca604.2 // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 // CHECK:STDOUT: %impl.elem0.loc24_34.2 => constants.%impl.elem0.11fef0.2 @@ -1555,17 +1636,24 @@ fn F() { // CHECK:STDOUT: --- use_constraint_on_associated_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] +// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic] +// CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type.b70 [symbolic] +// CHECK:STDOUT: %Op.type: type = fn_type @Op [concrete] +// CHECK:STDOUT: %Op: %Op.type = struct_value () [concrete] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] +// CHECK:STDOUT: %assoc0.ea8: %I.assoc_type = assoc_entity element0, @I.%Op.decl [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.304: %J.assoc_type = assoc_entity element0, @J.%U [concrete] +// CHECK:STDOUT: %assoc0.5be: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] // CHECK:STDOUT: %J.lookup_impl_witness.64628e.1: = lookup_impl_witness %Self.ccd, @J [symbolic] // CHECK:STDOUT: %J.facet.5210a7.1: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.64628e.1) [symbolic] -// CHECK:STDOUT: %impl.elem0.9980b1.1: %Add.type = impl_witness_access %J.lookup_impl_witness.64628e.1, element0 [symbolic] -// CHECK:STDOUT: %as_type.1a19b2.1: type = facet_access_type %impl.elem0.9980b1.1 [symbolic] -// CHECK:STDOUT: %pattern_type.aea692.1: type = pattern_type %as_type.1a19b2.1 [symbolic] +// CHECK:STDOUT: %impl.elem0.5205fd.1: %I.type = impl_witness_access %J.lookup_impl_witness.64628e.1, element0 [symbolic] +// CHECK:STDOUT: %as_type.f5d8f3.1: type = facet_access_type %impl.elem0.5205fd.1 [symbolic] +// CHECK:STDOUT: %pattern_type.74afd4.1: type = pattern_type %as_type.f5d8f3.1 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] @@ -1575,192 +1663,246 @@ fn F() { // CHECK:STDOUT: %pattern_type.4ca: type = pattern_type %T.as_type [symbolic] // CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: = lookup_impl_witness %T, @J [symbolic] // CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.64628e.2) [symbolic] -// CHECK:STDOUT: %impl.elem0.9980b1.2: %Add.type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic] -// CHECK:STDOUT: %as_type.1a19b2.2: type = facet_access_type %impl.elem0.9980b1.2 [symbolic] -// CHECK:STDOUT: %pattern_type.aea692.2: type = pattern_type %as_type.1a19b2.2 [symbolic] -// CHECK:STDOUT: %GenericAddResult.type: type = fn_type @GenericAddResult [concrete] -// CHECK:STDOUT: %GenericAddResult: %GenericAddResult.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.9b6: = require_complete_type %as_type.1a19b2.2 [symbolic] +// CHECK:STDOUT: %impl.elem0.5205fd.2: %I.type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic] +// CHECK:STDOUT: %as_type.f5d8f3.2: type = facet_access_type %impl.elem0.5205fd.2 [symbolic] +// CHECK:STDOUT: %pattern_type.74afd4.2: type = pattern_type %as_type.f5d8f3.2 [symbolic] +// CHECK:STDOUT: %GenericResult.type: type = fn_type @GenericResult [concrete] +// CHECK:STDOUT: %GenericResult: %GenericResult.type = struct_value () [concrete] +// CHECK:STDOUT: %require_complete.b33: = require_complete_type %as_type.f5d8f3.2 [symbolic] // CHECK:STDOUT: %require_complete.2a5: = require_complete_type %T.as_type [symbolic] // CHECK:STDOUT: %.d43: type = fn_type_with_self_type %F.type, %J.facet.5210a7.2 [symbolic] // CHECK:STDOUT: %impl.elem1: %.d43 = impl_witness_access %J.lookup_impl_witness.64628e.2, element1 [symbolic] // CHECK:STDOUT: %specific_impl_fn.fe8: = specific_impl_function %impl.elem1, @F(%J.facet.5210a7.2) [symbolic] -// CHECK:STDOUT: %Op.type: type = fn_type @Op [concrete] -// CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %impl.elem0.9980b1.2, @Add [symbolic] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %as_type.1a19b2.2, (%Add.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.59f: type = fn_type_with_self_type %Op.type, %Add.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.5fb: %.59f = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.015: = specific_impl_function %impl.elem0.5fb, @Op(%Add.facet) [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %impl.elem0.5205fd.2, @I [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %as_type.f5d8f3.2, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %.c9a: type = fn_type_with_self_type %Op.type, %I.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.45a: %.c9a = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.2ec: = specific_impl_function %impl.elem0.45a, @Op(%I.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Add = %Core.Add // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: .J = %J.decl -// CHECK:STDOUT: .GenericAddResult = %GenericAddResult.decl +// CHECK:STDOUT: .GenericResult = %GenericResult.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} -// CHECK:STDOUT: %GenericAddResult.decl: %GenericAddResult.type = fn_decl @GenericAddResult [concrete = constants.%GenericAddResult] { +// CHECK:STDOUT: %GenericResult.decl: %GenericResult.type = fn_decl @GenericResult [concrete = constants.%GenericResult] { // CHECK:STDOUT: %T.patt: %pattern_type.28e = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %t.patt: @GenericAddResult.%pattern_type.loc8_28 (%pattern_type.4ca) = binding_pattern t [concrete] -// CHECK:STDOUT: %t.param_patt: @GenericAddResult.%pattern_type.loc8_28 (%pattern_type.4ca) = value_param_pattern %t.patt, call_param0 [concrete] -// CHECK:STDOUT: %u.patt: @GenericAddResult.%pattern_type.loc8_34 (%pattern_type.aea692.2) = binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @GenericAddResult.%pattern_type.loc8_34 (%pattern_type.aea692.2) = value_param_pattern %u.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @GenericAddResult.%pattern_type.loc8_34 (%pattern_type.aea692.2) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @GenericAddResult.%pattern_type.loc8_34 (%pattern_type.aea692.2) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %t.patt: @GenericResult.%pattern_type.loc12_25 (%pattern_type.4ca) = binding_pattern t [concrete] +// CHECK:STDOUT: %t.param_patt: @GenericResult.%pattern_type.loc12_25 (%pattern_type.4ca) = value_param_pattern %t.patt, call_param0 [concrete] +// CHECK:STDOUT: %u.patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.74afd4.2) = binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.74afd4.2) = value_param_pattern %u.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.74afd4.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.74afd4.2) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_45: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)] -// CHECK:STDOUT: %U.ref.loc8_46: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.304] -// CHECK:STDOUT: %T.as_type.loc8_46: type = facet_access_type %T.ref.loc8_45 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_46.1: type = converted %T.ref.loc8_45, %T.as_type.loc8_46 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem0.loc8_46: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] -// CHECK:STDOUT: %as_type.loc8_46: type = facet_access_type %impl.elem0.loc8_46 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] -// CHECK:STDOUT: %.loc8_46.2: type = converted %impl.elem0.loc8_46, %as_type.loc8_46 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] +// CHECK:STDOUT: %T.ref.loc12_42: %J.type = name_ref T, %T.loc12_18.1 [symbolic = %T.loc12_18.2 (constants.%T)] +// CHECK:STDOUT: %U.ref.loc12_43: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.5be] +// CHECK:STDOUT: %T.as_type.loc12_43: type = facet_access_type %T.ref.loc12_42 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc12_43.1: type = converted %T.ref.loc12_42, %T.as_type.loc12_43 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem0.loc12_43: %I.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc12_35.2 (constants.%impl.elem0.5205fd.2)] +// CHECK:STDOUT: %as_type.loc12_43: type = facet_access_type %impl.elem0.loc12_43 [symbolic = %as_type.loc12_35.2 (constants.%as_type.f5d8f3.2)] +// CHECK:STDOUT: %.loc12_43.2: type = converted %impl.elem0.loc12_43, %as_type.loc12_43 [symbolic = %as_type.loc12_35.2 (constants.%as_type.f5d8f3.2)] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %T.loc8_21.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_21.2 (constants.%T)] -// CHECK:STDOUT: %t.param: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc8_31.1: type = splice_block %.loc8_31.2 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc8_31: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_31.1: type = facet_access_type %T.ref.loc8_31 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_31.2: type = converted %T.ref.loc8_31, %T.as_type.loc8_31.1 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc12_18.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_18.2 (constants.%T)] +// CHECK:STDOUT: %t.param: @GenericResult.%T.as_type.loc12_28.2 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc12_28.1: type = splice_block %.loc12_28.2 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc12_28: %J.type = name_ref T, %T.loc12_18.1 [symbolic = %T.loc12_18.2 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc12_28.1: type = facet_access_type %T.ref.loc12_28 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc12_28.2: type = converted %T.ref.loc12_28, %T.as_type.loc12_28.1 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = bind_name t, %t.param -// CHECK:STDOUT: %u.param: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_param call_param1 -// CHECK:STDOUT: %.loc8_38.1: type = splice_block %.loc8_38.3 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] { -// CHECK:STDOUT: %T.ref.loc8_37: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)] -// CHECK:STDOUT: %U.ref.loc8_38: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.304] -// CHECK:STDOUT: %T.as_type.loc8_38: type = facet_access_type %T.ref.loc8_37 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_38.2: type = converted %T.ref.loc8_37, %T.as_type.loc8_38 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem0.loc8_38.1: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] -// CHECK:STDOUT: %as_type.loc8_38.1: type = facet_access_type %impl.elem0.loc8_38.1 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] -// CHECK:STDOUT: %.loc8_38.3: type = converted %impl.elem0.loc8_38.1, %as_type.loc8_38.1 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] +// CHECK:STDOUT: %t: @GenericResult.%T.as_type.loc12_28.2 (%T.as_type) = bind_name t, %t.param +// CHECK:STDOUT: %u.param: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = value_param call_param1 +// CHECK:STDOUT: %.loc12_35.1: type = splice_block %.loc12_35.3 [symbolic = %as_type.loc12_35.2 (constants.%as_type.f5d8f3.2)] { +// CHECK:STDOUT: %T.ref.loc12_34: %J.type = name_ref T, %T.loc12_18.1 [symbolic = %T.loc12_18.2 (constants.%T)] +// CHECK:STDOUT: %U.ref.loc12_35: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.5be] +// CHECK:STDOUT: %T.as_type.loc12_35: type = facet_access_type %T.ref.loc12_34 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc12_35.2: type = converted %T.ref.loc12_34, %T.as_type.loc12_35 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem0.loc12_35.1: %I.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc12_35.2 (constants.%impl.elem0.5205fd.2)] +// CHECK:STDOUT: %as_type.loc12_35.1: type = facet_access_type %impl.elem0.loc12_35.1 [symbolic = %as_type.loc12_35.2 (constants.%as_type.f5d8f3.2)] +// CHECK:STDOUT: %.loc12_35.3: type = converted %impl.elem0.loc12_35.1, %as_type.loc12_35.1 [symbolic = %as_type.loc12_35.2 (constants.%as_type.f5d8f3.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = out_param call_param2 -// CHECK:STDOUT: %return: ref @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = return_slot %return.param +// CHECK:STDOUT: %u: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = out_param call_param2 +// CHECK:STDOUT: %return: ref @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: interface @I { +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Op.decl: %Op.type = fn_decl @Op [concrete = constants.%Op] { +// CHECK:STDOUT: %self.patt: @Op.%pattern_type (%pattern_type.6de) = binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Op.%pattern_type (%pattern_type.6de) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %b.patt: @Op.%pattern_type (%pattern_type.6de) = binding_pattern b [concrete] +// CHECK:STDOUT: %b.param_patt: @Op.%pattern_type (%pattern_type.6de) = value_param_pattern %b.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @Op.%pattern_type (%pattern_type.6de) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Op.%pattern_type (%pattern_type.6de) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Self.ref.loc4_33: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc4_33: type = facet_access_type %Self.ref.loc4_33 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %.loc4_33: type = converted %Self.ref.loc4_33, %Self.as_type.loc4_33 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %self.param: @Op.%Self.as_type.loc4_15.1 (%Self.as_type.b70) = value_param call_param0 +// CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.b70)] { +// CHECK:STDOUT: %Self.ref.loc4_15: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc4_15.2: type = facet_access_type %Self.ref.loc4_15 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref.loc4_15, %Self.as_type.loc4_15.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %self: @Op.%Self.as_type.loc4_15.1 (%Self.as_type.b70) = bind_name self, %self.param +// CHECK:STDOUT: %b.param: @Op.%Self.as_type.loc4_15.1 (%Self.as_type.b70) = value_param call_param1 +// CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.b70)] { +// CHECK:STDOUT: %Self.ref.loc4_24: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc4_24: type = facet_access_type %Self.ref.loc4_24 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %.loc4_24.2: type = converted %Self.ref.loc4_24, %Self.as_type.loc4_24 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %b: @Op.%Self.as_type.loc4_15.1 (%Self.as_type.b70) = bind_name b, %b.param +// CHECK:STDOUT: %return.param: ref @Op.%Self.as_type.loc4_15.1 (%Self.as_type.b70) = out_param call_param2 +// CHECK:STDOUT: %return: ref @Op.%Self.as_type.loc4_15.1 (%Self.as_type.b70) = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %Op.decl [concrete = constants.%assoc0.ea8] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Op = %assoc0 +// CHECK:STDOUT: witness = (%Op.decl) +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd] -// CHECK:STDOUT: %U: %Add.type = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.304] +// CHECK:STDOUT: %U: %I.type = assoc_const_decl @U [concrete] { +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.5be] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %u.patt: @F.%pattern_type (%pattern_type.aea692.1) = binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @F.%pattern_type (%pattern_type.aea692.1) = value_param_pattern %u.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @F.%pattern_type (%pattern_type.aea692.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @F.%pattern_type (%pattern_type.aea692.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %u.patt: @F.%pattern_type (%pattern_type.74afd4.1) = binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @F.%pattern_type (%pattern_type.74afd4.1) = value_param_pattern %u.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @F.%pattern_type (%pattern_type.74afd4.1) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @F.%pattern_type (%pattern_type.74afd4.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc5_17: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] -// CHECK:STDOUT: %U.ref.loc5_17: %Add.type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] -// CHECK:STDOUT: %U.as_type.loc5_17: type = facet_access_type %U.ref.loc5_17 [symbolic = %as_type (constants.%as_type.1a19b2.1)] -// CHECK:STDOUT: %.loc5_17: type = converted %U.ref.loc5_17, %U.as_type.loc5_17 [symbolic = %as_type (constants.%as_type.1a19b2.1)] -// CHECK:STDOUT: %u.param: @F.%as_type (%as_type.1a19b2.1) = value_param call_param0 -// CHECK:STDOUT: %.loc5_11.1: type = splice_block %.loc5_11.2 [symbolic = %as_type (constants.%as_type.1a19b2.1)] { -// CHECK:STDOUT: %impl.elem0.loc5_11.2: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] -// CHECK:STDOUT: %U.ref.loc5_11: %Add.type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] -// CHECK:STDOUT: %U.as_type.loc5_11: type = facet_access_type %U.ref.loc5_11 [symbolic = %as_type (constants.%as_type.1a19b2.1)] -// CHECK:STDOUT: %.loc5_11.2: type = converted %U.ref.loc5_11, %U.as_type.loc5_11 [symbolic = %as_type (constants.%as_type.1a19b2.1)] +// CHECK:STDOUT: %impl.elem0.loc9_17: %I.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.5205fd.1)] +// CHECK:STDOUT: %U.ref.loc9_17: %I.type = name_ref U, %impl.elem0.loc9_17 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.5205fd.1)] +// CHECK:STDOUT: %U.as_type.loc9_17: type = facet_access_type %U.ref.loc9_17 [symbolic = %as_type (constants.%as_type.f5d8f3.1)] +// CHECK:STDOUT: %.loc9_17: type = converted %U.ref.loc9_17, %U.as_type.loc9_17 [symbolic = %as_type (constants.%as_type.f5d8f3.1)] +// CHECK:STDOUT: %u.param: @F.%as_type (%as_type.f5d8f3.1) = value_param call_param0 +// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.2 [symbolic = %as_type (constants.%as_type.f5d8f3.1)] { +// CHECK:STDOUT: %impl.elem0.loc9_11.2: %I.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.5205fd.1)] +// CHECK:STDOUT: %U.ref.loc9_11: %I.type = name_ref U, %impl.elem0.loc9_11.2 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.5205fd.1)] +// CHECK:STDOUT: %U.as_type.loc9_11: type = facet_access_type %U.ref.loc9_11 [symbolic = %as_type (constants.%as_type.f5d8f3.1)] +// CHECK:STDOUT: %.loc9_11.2: type = converted %U.ref.loc9_11, %U.as_type.loc9_11 [symbolic = %as_type (constants.%as_type.f5d8f3.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @F.%as_type (%as_type.1a19b2.1) = bind_name u, %u.param -// CHECK:STDOUT: %return.param: ref @F.%as_type (%as_type.1a19b2.1) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%as_type (%as_type.1a19b2.1) = return_slot %return.param +// CHECK:STDOUT: %u: @F.%as_type (%as_type.f5d8f3.1) = bind_name u, %u.param +// CHECK:STDOUT: %return.param: ref @F.%as_type (%as_type.f5d8f3.1) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%as_type (%as_type.f5d8f3.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .I = // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .F = %assoc1 // CHECK:STDOUT: witness = (%U, %F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! %Add.type; +// CHECK:STDOUT: assoc_const U:! %I.type; +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Op(@I.%Self: %I.type) { +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.as_type.loc4_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type.b70)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_15.1 [symbolic = %pattern_type (constants.%pattern_type.6de)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%self.param: @Op.%Self.as_type.loc4_15.1 (%Self.as_type.b70), %b.param: @Op.%Self.as_type.loc4_15.1 (%Self.as_type.b70)) -> @Op.%Self.as_type.loc4_15.1 (%Self.as_type.b70); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@J.%Self: %J.type) { // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)] // CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)] -// CHECK:STDOUT: %impl.elem0.loc5_11.1: %Add.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc5_11.1 [symbolic = %as_type (constants.%as_type.1a19b2.1)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %as_type [symbolic = %pattern_type (constants.%pattern_type.aea692.1)] +// CHECK:STDOUT: %impl.elem0.loc9_11.1: %I.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.5205fd.1)] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc9_11.1 [symbolic = %as_type (constants.%as_type.f5d8f3.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %as_type [symbolic = %pattern_type (constants.%pattern_type.74afd4.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @F.%as_type (%as_type.1a19b2.1)) -> @F.%as_type (%as_type.1a19b2.1); +// CHECK:STDOUT: fn(%u.param: @F.%as_type (%as_type.f5d8f3.1)) -> @F.%as_type (%as_type.f5d8f3.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GenericAddResult(%T.loc8_21.1: %J.type) { -// CHECK:STDOUT: %T.loc8_21.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_21.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_31.2: type = facet_access_type %T.loc8_21.2 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc8_28: type = pattern_type %T.as_type.loc8_31.2 [symbolic = %pattern_type.loc8_28 (constants.%pattern_type.4ca)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_21.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)] -// CHECK:STDOUT: %impl.elem0.loc8_38.2: %Add.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] -// CHECK:STDOUT: %as_type.loc8_38.2: type = facet_access_type %impl.elem0.loc8_38.2 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] -// CHECK:STDOUT: %pattern_type.loc8_34: type = pattern_type %as_type.loc8_38.2 [symbolic = %pattern_type.loc8_34 (constants.%pattern_type.aea692.2)] +// CHECK:STDOUT: generic fn @GenericResult(%T.loc12_18.1: %J.type) { +// CHECK:STDOUT: %T.loc12_18.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_18.2 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc12_28.2: type = facet_access_type %T.loc12_18.2 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type.loc12_25: type = pattern_type %T.as_type.loc12_28.2 [symbolic = %pattern_type.loc12_25 (constants.%pattern_type.4ca)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc12_18.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)] +// CHECK:STDOUT: %impl.elem0.loc12_35.2: %I.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_35.2 (constants.%impl.elem0.5205fd.2)] +// CHECK:STDOUT: %as_type.loc12_35.2: type = facet_access_type %impl.elem0.loc12_35.2 [symbolic = %as_type.loc12_35.2 (constants.%as_type.f5d8f3.2)] +// CHECK:STDOUT: %pattern_type.loc12_31: type = pattern_type %as_type.loc12_35.2 [symbolic = %pattern_type.loc12_31 (constants.%pattern_type.74afd4.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8_42: = require_complete_type %as_type.loc8_38.2 [symbolic = %require_complete.loc8_42 (constants.%require_complete.9b6)] -// CHECK:STDOUT: %require_complete.loc8_29: = require_complete_type %T.as_type.loc8_31.2 [symbolic = %require_complete.loc8_29 (constants.%require_complete.2a5)] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_31.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.5210a7.2)] -// CHECK:STDOUT: %.loc9_11.2: type = fn_type_with_self_type constants.%F.type, %J.facet [symbolic = %.loc9_11.2 (constants.%.d43)] -// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericAddResult.%.loc9_11.2 (%.d43) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem1.loc9_11.2, @F(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.fe8)] -// CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc8_38.2, @Add [symbolic = %Add.lookup_impl_witness (constants.%Add.lookup_impl_witness)] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %as_type.loc8_38.2, (%Add.lookup_impl_witness) [symbolic = %Add.facet (constants.%Add.facet)] -// CHECK:STDOUT: %.loc9_17.4: type = fn_type_with_self_type constants.%Op.type, %Add.facet [symbolic = %.loc9_17.4 (constants.%.59f)] -// CHECK:STDOUT: %impl.elem0.loc9_17.2: @GenericAddResult.%.loc9_17.4 (%.59f) = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_17.2 (constants.%impl.elem0.5fb)] -// CHECK:STDOUT: %specific_impl_fn.loc9_17.2: = specific_impl_function %impl.elem0.loc9_17.2, @Op(%Add.facet) [symbolic = %specific_impl_fn.loc9_17.2 (constants.%specific_impl_fn.015)] +// CHECK:STDOUT: %require_complete.loc12_39: = require_complete_type %as_type.loc12_35.2 [symbolic = %require_complete.loc12_39 (constants.%require_complete.b33)] +// CHECK:STDOUT: %require_complete.loc12_26: = require_complete_type %T.as_type.loc12_28.2 [symbolic = %require_complete.loc12_26 (constants.%require_complete.2a5)] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc12_28.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.5210a7.2)] +// CHECK:STDOUT: %.loc13_11.2: type = fn_type_with_self_type constants.%F.type, %J.facet [symbolic = %.loc13_11.2 (constants.%.d43)] +// CHECK:STDOUT: %impl.elem1.loc13_11.2: @GenericResult.%.loc13_11.2 (%.d43) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %specific_impl_fn.loc13_11.2: = specific_impl_function %impl.elem1.loc13_11.2, @F(%J.facet) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.fe8)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc12_35.2, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %as_type.loc12_35.2, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet)] +// CHECK:STDOUT: %.loc13_16: type = fn_type_with_self_type constants.%Op.type, %I.facet [symbolic = %.loc13_16 (constants.%.c9a)] +// CHECK:STDOUT: %impl.elem0.loc13_16.2: @GenericResult.%.loc13_16 (%.c9a) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.45a)] +// CHECK:STDOUT: %specific_impl_fn.loc13_16.2: = specific_impl_function %impl.elem0.loc13_16.2, @Op(%I.facet) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.2ec)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type), %u.param: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2)) -> @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) { +// CHECK:STDOUT: fn(%t.param: @GenericResult.%T.as_type.loc12_28.2 (%T.as_type), %u.param: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2)) -> @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %F.ref.loc9_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %T.as_type.loc9_11: type = facet_access_type constants.%T [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_11.1: type = converted constants.%T, %T.as_type.loc9_11 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericAddResult.%.loc9_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref.loc9_14: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = name_ref u, %u -// CHECK:STDOUT: %.loc9_15.1: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] -// CHECK:STDOUT: %.loc9_15.2: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @F(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.fe8)] -// CHECK:STDOUT: %.loc9_15.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = call %specific_impl_fn.loc9_11.1(%u.ref.loc9_14) -// CHECK:STDOUT: %T.ref.loc9: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)] -// CHECK:STDOUT: %F.ref.loc9_20: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %T.as_type.loc9_20: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_20: type = converted %T.ref.loc9, %T.as_type.loc9_20 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem1.loc9_20: @GenericAddResult.%.loc9_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %u.ref.loc9_23: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = name_ref u, %u -// CHECK:STDOUT: %.loc9_24.1: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] -// CHECK:STDOUT: %.loc9_24.2: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] -// CHECK:STDOUT: %specific_impl_fn.loc9_20: = specific_impl_function %impl.elem1.loc9_20, @F(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.fe8)] -// CHECK:STDOUT: %.loc9_24.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = call %specific_impl_fn.loc9_20(%u.ref.loc9_23) -// CHECK:STDOUT: %impl.elem0.loc9_17.1: @GenericAddResult.%.loc9_17.4 (%.59f) = impl_witness_access constants.%Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_17.2 (constants.%impl.elem0.5fb)] -// CHECK:STDOUT: %bound_method.loc9_17.1: = bound_method %.loc9_15.3, %impl.elem0.loc9_17.1 -// CHECK:STDOUT: %.loc9_17.1: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] -// CHECK:STDOUT: %.loc9_17.2: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)] -// CHECK:STDOUT: %specific_impl_fn.loc9_17.1: = specific_impl_function %impl.elem0.loc9_17.1, @Op(constants.%Add.facet) [symbolic = %specific_impl_fn.loc9_17.2 (constants.%specific_impl_fn.015)] -// CHECK:STDOUT: %bound_method.loc9_17.2: = bound_method %.loc9_15.3, %specific_impl_fn.loc9_17.1 -// CHECK:STDOUT: %.loc9_15.4: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_of_initializer %.loc9_15.3 -// CHECK:STDOUT: %.loc9_15.5: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = converted %.loc9_15.3, %.loc9_15.4 -// CHECK:STDOUT: %.loc9_24.4: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_of_initializer %.loc9_24.3 -// CHECK:STDOUT: %.loc9_24.5: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = converted %.loc9_24.3, %.loc9_24.4 -// CHECK:STDOUT: %.loc9_17.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = call %bound_method.loc9_17.2(%.loc9_15.5, %.loc9_24.5) -// CHECK:STDOUT: %.loc9_25.1: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_of_initializer %.loc9_17.3 -// CHECK:STDOUT: %.loc9_25.2: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = converted %.loc9_17.3, %.loc9_25.1 -// CHECK:STDOUT: return %.loc9_25.2 +// CHECK:STDOUT: %t.ref: @GenericResult.%T.as_type.loc12_28.2 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %F.ref.loc13_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] +// CHECK:STDOUT: %T.as_type.loc13_11: type = facet_access_type constants.%T [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc13_11.1: type = converted constants.%T, %T.as_type.loc13_11 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem1.loc13_11.1: @GenericResult.%.loc13_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %u.ref.loc13_14: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = name_ref u, %u +// CHECK:STDOUT: %.loc13_15.1: %I.type = converted constants.%as_type.f5d8f3.2, constants.%impl.elem0.5205fd.2 [symbolic = %impl.elem0.loc12_35.2 (constants.%impl.elem0.5205fd.2)] +// CHECK:STDOUT: %.loc13_15.2: %I.type = converted constants.%as_type.f5d8f3.2, constants.%impl.elem0.5205fd.2 [symbolic = %impl.elem0.loc12_35.2 (constants.%impl.elem0.5205fd.2)] +// CHECK:STDOUT: %specific_impl_fn.loc13_11.1: = specific_impl_function %impl.elem1.loc13_11.1, @F(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.fe8)] +// CHECK:STDOUT: %.loc13_15.3: init @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = call %specific_impl_fn.loc13_11.1(%u.ref.loc13_14) +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, @I.%assoc0 [concrete = constants.%assoc0.ea8] +// CHECK:STDOUT: %impl.elem0.loc13_16.1: @GenericResult.%.loc13_16 (%.c9a) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.45a)] +// CHECK:STDOUT: %bound_method.loc13_16: = bound_method %.loc13_15.3, %impl.elem0.loc13_16.1 +// CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc12_18.1 [symbolic = %T.loc12_18.2 (constants.%T)] +// CHECK:STDOUT: %F.ref.loc13_25: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] +// CHECK:STDOUT: %T.as_type.loc13_25: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc13_25: type = converted %T.ref.loc13, %T.as_type.loc13_25 [symbolic = %T.as_type.loc12_28.2 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem1.loc13_25: @GenericResult.%.loc13_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %u.ref.loc13_28: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = name_ref u, %u +// CHECK:STDOUT: %.loc13_29.1: %I.type = converted constants.%as_type.f5d8f3.2, constants.%impl.elem0.5205fd.2 [symbolic = %impl.elem0.loc12_35.2 (constants.%impl.elem0.5205fd.2)] +// CHECK:STDOUT: %.loc13_29.2: %I.type = converted constants.%as_type.f5d8f3.2, constants.%impl.elem0.5205fd.2 [symbolic = %impl.elem0.loc12_35.2 (constants.%impl.elem0.5205fd.2)] +// CHECK:STDOUT: %specific_impl_fn.loc13_25: = specific_impl_function %impl.elem1.loc13_25, @F(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.fe8)] +// CHECK:STDOUT: %.loc13_29.3: init @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = call %specific_impl_fn.loc13_25(%u.ref.loc13_28) +// CHECK:STDOUT: %.loc13_30.1: %I.type = converted constants.%as_type.f5d8f3.2, constants.%impl.elem0.5205fd.2 [symbolic = %impl.elem0.loc12_35.2 (constants.%impl.elem0.5205fd.2)] +// CHECK:STDOUT: %.loc13_30.2: %I.type = converted constants.%as_type.f5d8f3.2, constants.%impl.elem0.5205fd.2 [symbolic = %impl.elem0.loc12_35.2 (constants.%impl.elem0.5205fd.2)] +// CHECK:STDOUT: %specific_impl_fn.loc13_16.1: = specific_impl_function %impl.elem0.loc13_16.1, @Op(constants.%I.facet) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.2ec)] +// CHECK:STDOUT: %bound_method.loc13_30: = bound_method %.loc13_15.3, %specific_impl_fn.loc13_16.1 +// CHECK:STDOUT: %.loc13_15.4: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = value_of_initializer %.loc13_15.3 +// CHECK:STDOUT: %.loc13_15.5: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = converted %.loc13_15.3, %.loc13_15.4 +// CHECK:STDOUT: %.loc13_29.4: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = value_of_initializer %.loc13_29.3 +// CHECK:STDOUT: %.loc13_29.5: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = converted %.loc13_29.3, %.loc13_29.4 +// CHECK:STDOUT: %.loc13_30.3: init @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = call %bound_method.loc13_30(%.loc13_15.5, %.loc13_29.5) +// CHECK:STDOUT: %.loc13_31.1: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = value_of_initializer %.loc13_30.3 +// CHECK:STDOUT: %.loc13_31.2: @GenericResult.%as_type.loc12_35.2 (%as_type.f5d8f3.2) = converted %.loc13_30.3, %.loc13_31.1 +// CHECK:STDOUT: return %.loc13_31.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Op(constants.%Self.826) { +// CHECK:STDOUT: %Self => constants.%Self.826 +// CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%Self.as_type.b70 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%Self.ccd) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.1) {} @@ -1768,29 +1910,35 @@ fn F() { // CHECK:STDOUT: specific @F(constants.%Self.ccd) { // CHECK:STDOUT: %Self => constants.%Self.ccd // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.9980b1.1 -// CHECK:STDOUT: %as_type => constants.%as_type.1a19b2.1 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.aea692.1 +// CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.5205fd.1 +// CHECK:STDOUT: %as_type => constants.%as_type.f5d8f3.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.74afd4.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericAddResult(constants.%T) { -// CHECK:STDOUT: %T.loc8_21.2 => constants.%T -// CHECK:STDOUT: %T.as_type.loc8_31.2 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc8_28 => constants.%pattern_type.4ca +// CHECK:STDOUT: specific @GenericResult(constants.%T) { +// CHECK:STDOUT: %T.loc12_18.2 => constants.%T +// CHECK:STDOUT: %T.as_type.loc12_28.2 => constants.%T.as_type +// CHECK:STDOUT: %pattern_type.loc12_25 => constants.%pattern_type.4ca // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 -// CHECK:STDOUT: %impl.elem0.loc8_38.2 => constants.%impl.elem0.9980b1.2 -// CHECK:STDOUT: %as_type.loc8_38.2 => constants.%as_type.1a19b2.2 -// CHECK:STDOUT: %pattern_type.loc8_34 => constants.%pattern_type.aea692.2 +// CHECK:STDOUT: %impl.elem0.loc12_35.2 => constants.%impl.elem0.5205fd.2 +// CHECK:STDOUT: %as_type.loc12_35.2 => constants.%as_type.f5d8f3.2 +// CHECK:STDOUT: %pattern_type.loc12_31 => constants.%pattern_type.74afd4.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%J.facet.5210a7.2) { // CHECK:STDOUT: %Self => constants.%J.facet.5210a7.2 // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2 -// CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.9980b1.2 -// CHECK:STDOUT: %as_type => constants.%as_type.1a19b2.2 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.aea692.2 +// CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.5205fd.2 +// CHECK:STDOUT: %as_type => constants.%as_type.f5d8f3.2 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.74afd4.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Op(constants.%I.facet) { +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%as_type.f5d8f3.2 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.74afd4.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- interface_qualified.carbon @@ -2013,45 +2161,45 @@ fn F() { // CHECK:STDOUT: %pattern_type.b98: type = pattern_type %impl.elem0.11f [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] -// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] +// CHECK:STDOUT: %assoc1.572: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] +// CHECK:STDOUT: %.Self.968: %J.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.78d: type = facet_access_type %.Self.968 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self.968, @J [symbolic_self] +// CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type.78d, (%J.lookup_impl_witness.25c) [symbolic_self] // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete] -// CHECK:STDOUT: %T: %J_where.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.c74: %J_where.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.a22: type = pattern_type %J_where.type [concrete] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.b32: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %T.as_type.f20: type = facet_access_type %T.c74 [symbolic] +// CHECK:STDOUT: %pattern_type.b32: type = pattern_type %T.as_type.f20 [symbolic] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %GenericCallFI32.type: type = fn_type @GenericCallFI32 [concrete] // CHECK:STDOUT: %GenericCallFI32: %GenericCallFI32.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.5de: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness.bee: = lookup_impl_witness %T, @J [symbolic] -// CHECK:STDOUT: %J.facet.487: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.bee) [symbolic] +// CHECK:STDOUT: %require_complete.5de: = require_complete_type %T.as_type.f20 [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness.bee: = lookup_impl_witness %T.c74, @J [symbolic] +// CHECK:STDOUT: %J.facet.487: %J.type = facet_value %T.as_type.f20, (%J.lookup_impl_witness.bee) [symbolic] // CHECK:STDOUT: %.9b0: type = fn_type_with_self_type %F.type, %J.facet.487 [symbolic] // CHECK:STDOUT: %impl.elem1: %.9b0 = impl_witness_access %J.lookup_impl_witness.bee, element1 [symbolic] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @F(%J.facet.487) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.30b: = specific_impl_function %impl.elem1, @F(%J.facet.487) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: } @@ -2088,11 +2236,11 @@ fn F() { // CHECK:STDOUT: %i32.loc8_51: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc8_26.1: type = splice_block %.loc8_26.2 [concrete = constants.%J_where.type] { // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.78d] +// CHECK:STDOUT: %.loc8_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.78d] // CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // CHECK:STDOUT: %int_32.loc8_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc8_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -2100,14 +2248,14 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8, %i32.loc8_37 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_20.1: %J_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T)] -// CHECK:STDOUT: %t.param: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc8_45.1: type = splice_block %.loc8_45.2 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %J_where.type = name_ref T, %T.loc8_20.1 [symbolic = %T.loc8_20.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_45.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_45.2: type = converted %T.ref, %T.as_type.loc8_45.1 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc8_20.1: %J_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T.c74)] +// CHECK:STDOUT: %t.param: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type.f20) = value_param call_param0 +// CHECK:STDOUT: %.loc8_45.1: type = splice_block %.loc8_45.2 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type.f20)] { +// CHECK:STDOUT: %T.ref: %J_where.type = name_ref T, %T.loc8_20.1 [symbolic = %T.loc8_20.2 (constants.%T.c74)] +// CHECK:STDOUT: %T.as_type.loc8_45.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type.f20)] +// CHECK:STDOUT: %.loc8_45.2: type = converted %T.ref, %T.as_type.loc8_45.1 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type.f20)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type) = bind_name t, %t.param +// CHECK:STDOUT: %t: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type.f20) = bind_name t, %t.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -2135,7 +2283,7 @@ fn F() { // CHECK:STDOUT: %return.param: ref @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1.572] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2158,8 +2306,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @GenericCallFI32(%T.loc8_20.1: %J_where.type) { -// CHECK:STDOUT: %T.loc8_20.2: %J_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_45.2: type = facet_access_type %T.loc8_20.2 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc8_20.2: %J_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T.c74)] +// CHECK:STDOUT: %T.as_type.loc8_45.2: type = facet_access_type %T.loc8_20.2 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type.f20)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_45.2 [symbolic = %pattern_type (constants.%pattern_type.b32)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2168,20 +2316,20 @@ fn F() { // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_45.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.487)] // CHECK:STDOUT: %.loc9_11.2: type = fn_type_with_self_type constants.%F.type, %J.facet [symbolic = %.loc9_11.2 (constants.%.9b0)] // CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallFI32.%.loc9_11.2 (%.9b0) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem1.loc9_11.2, @F(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem1.loc9_11.2, @F(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.30b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type)) -> %i32 { +// CHECK:STDOUT: fn(%t.param: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type.f20)) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type constants.%T [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_11.1: type = converted constants.%T, %T.as_type.loc9 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] +// CHECK:STDOUT: %t.ref: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type.f20) = name_ref t, %t +// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572] +// CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type constants.%T.c74 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type.f20)] +// CHECK:STDOUT: %.loc9_11.1: type = converted constants.%T.c74, %T.as_type.loc9 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type.f20)] // CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallFI32.%.loc9_11.2 (%.9b0) = impl_witness_access constants.%J.lookup_impl_witness.bee, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @F(constants.%J.facet.487) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @F(constants.%J.facet.487) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.30b)] // CHECK:STDOUT: %impl.elem0.loc9: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_14.1: = bound_method %int_2, %impl.elem0.loc9 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc9, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_14.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_14.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_14.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] @@ -2206,9 +2354,9 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @U(constants.%J.facet.330) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericCallFI32(constants.%T) { -// CHECK:STDOUT: %T.loc8_20.2 => constants.%T -// CHECK:STDOUT: %T.as_type.loc8_45.2 => constants.%T.as_type +// CHECK:STDOUT: specific @GenericCallFI32(constants.%T.c74) { +// CHECK:STDOUT: %T.loc8_20.2 => constants.%T.c74 +// CHECK:STDOUT: %T.as_type.loc8_45.2 => constants.%T.as_type.f20 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2233,7 +2381,7 @@ fn F() { // CHECK:STDOUT: %pattern_type.b98: type = pattern_type %impl.elem0.11f [symbolic] // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] +// CHECK:STDOUT: %assoc1.572: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] @@ -2257,20 +2405,21 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] +// CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Add = %Core.Add +// CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] +// CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2306,7 +2455,7 @@ fn F() { // CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1.572] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2319,7 +2468,7 @@ fn F() { // CHECK:STDOUT: assoc_const U:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %Self.ref as %.loc9_20 { +// CHECK:STDOUT: impl @impl.939: %Self.ref as %.loc9_20 { // CHECK:STDOUT: %F.decl.loc24_21.1: %F.type.b842fd.1 = fn_decl @F.2 [concrete = constants.%F.b07d12.1] { // CHECK:STDOUT: %u.patt: = binding_pattern u [concrete] // CHECK:STDOUT: %u.param_patt: = value_param_pattern %u.patt, call_param0 [concrete] @@ -2356,7 +2505,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @E { -// CHECK:STDOUT: impl_decl @impl [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.939 [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] @@ -2371,7 +2520,7 @@ fn F() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.%F.decl.loc24_21.2), @impl [concrete] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.939.%F.decl.loc24_21.2), @impl.939 [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] @@ -2382,7 +2531,7 @@ fn F() { // CHECK:STDOUT: .Self = constants.%E // CHECK:STDOUT: .J = // CHECK:STDOUT: .U = -// CHECK:STDOUT: extend @impl.%.loc9_20 +// CHECK:STDOUT: extend @impl.939.%.loc9_20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) { @@ -2398,13 +2547,13 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: = name_ref u, %u [concrete = ] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] +// CHECK:STDOUT: %impl.elem1: = impl_witness_access , element1 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.3(%u.param: %i32) -> %i32 [thunk @impl.%F.decl.loc24_21.1] { +// CHECK:STDOUT: fn @F.3(%u.param: %i32) -> %i32 [thunk @impl.939.%F.decl.loc24_21.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.b842fd.1 = name_ref F, @impl.%F.decl.loc24_21.1 [concrete = constants.%F.b07d12.1] +// CHECK:STDOUT: %F.ref: %F.type.b842fd.1 = name_ref F, @impl.939.%F.decl.loc24_21.1 [concrete = constants.%F.b07d12.1] // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u.param // CHECK:STDOUT: %return.ref: ref %i32 = name_ref , %return.param // CHECK:STDOUT: %F.call: init = call %F.ref() @@ -3314,7 +3463,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -3322,11 +3471,11 @@ fn F() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0.995: %I.assoc_type = assoc_entity element0, @I.%N [concrete] -// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic] +// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.8268 [symbolic] // CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type.b70 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %I.lookup_impl_witness.5d6: = lookup_impl_witness %Self.826, @I [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness.5d6: = lookup_impl_witness %Self.8268, @I [symbolic] // CHECK:STDOUT: %I.facet.93d: %I.type = facet_value %Self.as_type.b70, (%I.lookup_impl_witness.5d6) [symbolic] // CHECK:STDOUT: %impl.elem0.fab: %i32 = impl_witness_access %I.lookup_impl_witness.5d6, element0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] @@ -3334,40 +3483,41 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic] +// CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.4, @impl.971(%From) [symbolic] // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete] // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete] // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete] // CHECK:STDOUT: %Convert.bound.44d: = bound_method %impl.elem0.fab, %Convert.960 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.8a8: = specific_function %Convert.960, @Convert.4(%int_32) [concrete] // CHECK:STDOUT: %bound_method.81c: = bound_method %impl.elem0.fab, %Convert.specific_fn.8a8 [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method.81c(%impl.elem0.fab) [symbolic] -// CHECK:STDOUT: %array_type.377: type = array_type %int.convert_checked, bool [symbolic] +// CHECK:STDOUT: %int.convert_checked.acf: init Core.IntLiteral = call %bound_method.81c(%impl.elem0.fab) [symbolic] +// CHECK:STDOUT: %array_type.377: type = array_type %int.convert_checked.acf, bool [symbolic] // CHECK:STDOUT: %pattern_type.bc6: type = pattern_type %array_type.377 [symbolic] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%F.decl [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness.5f5: = lookup_impl_witness %.Self, @I [symbolic_self] -// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness.5f5) [symbolic_self] +// CHECK:STDOUT: %assoc1.dfe: %I.assoc_type = assoc_entity element1, @I.%F.decl [concrete] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type.541: type = facet_access_type %.Self.258 [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness.5f5: = lookup_impl_witness %.Self.258, @I [symbolic_self] +// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type.541, (%I.lookup_impl_witness.5f5) [symbolic_self] // CHECK:STDOUT: %impl.elem0.d4d: %i32 = impl_witness_access %I.lookup_impl_witness.5f5, element0 [symbolic_self] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn.b6f: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b92: = bound_method %int_2.ecc, %Convert.specific_fn.b6f [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0.d4d = %int_2.ef8> [concrete] @@ -3384,7 +3534,6 @@ fn F() { // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (bool, bool) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %array: %array_type.c9b = tuple_value (%true, %false) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3416,16 +3565,16 @@ fn F() { // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %N.ref: %I.assoc_type = name_ref N, @N.%assoc0 [concrete = constants.%assoc0.995] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.541] +// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.541] // CHECK:STDOUT: %impl.elem0.loc8_20: %i32 = impl_witness_access constants.%I.lookup_impl_witness.5f5, element0 [symbolic_self = constants.%impl.elem0.d4d] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc8_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_2, %impl.elem0.loc8_25 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc8_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc8_25, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f] // CHECK:STDOUT: %bound_method.loc8_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc8_25.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc8_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] @@ -3440,7 +3589,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%N [concrete = constants.%assoc0.995] // CHECK:STDOUT: } @@ -3457,15 +3606,15 @@ fn F() { // CHECK:STDOUT: %.loc5_31.2: type = converted %bool.make_type, %.loc5_31.1 [concrete = bool] // CHECK:STDOUT: %impl.elem0.loc5_37.3: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960] // CHECK:STDOUT: %bound_method.loc5_37.2: = bound_method %N.ref, %impl.elem0.loc5_37.3 [symbolic = %Convert.bound (constants.%Convert.bound.44d)] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc5_37.3, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc5_37.3, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8] // CHECK:STDOUT: %bound_method.loc5_37.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.81c)] -// CHECK:STDOUT: %int.convert_checked.loc5_37.2: init Core.IntLiteral = call %bound_method.loc5_37.3(%N.ref) [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc5_37.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_37.2 [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc5_37.2: Core.IntLiteral = converted %N.ref, %.loc5_37.1 [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc5_37.2: init Core.IntLiteral = call %bound_method.loc5_37.3(%N.ref) [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked.acf)] +// CHECK:STDOUT: %.loc5_37.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_37.2 [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked.acf)] +// CHECK:STDOUT: %.loc5_37.2: Core.IntLiteral = converted %N.ref, %.loc5_37.1 [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked.acf)] // CHECK:STDOUT: %array_type.loc5_38.2: type = array_type %.loc5_37.2, %.loc5_31.2 [symbolic = %array_type.loc5_38.1 (constants.%array_type.377)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.8268)] // CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: } @@ -3473,7 +3622,7 @@ fn F() { // CHECK:STDOUT: %return.param: ref @F.1.%array_type.loc5_38.1 (%array_type.377) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.1.%array_type.loc5_38.1 (%array_type.377) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1.dfe] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -3511,14 +3660,14 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.8268)] // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)] // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.6de)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness.5d6)] // CHECK:STDOUT: %impl.elem0.loc5_37.1: %i32 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.fab)] // CHECK:STDOUT: %Convert.bound: = bound_method %impl.elem0.loc5_37.1, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound.44d)] // CHECK:STDOUT: %bound_method.loc5_37.1: = bound_method %impl.elem0.loc5_37.1, constants.%Convert.specific_fn.8a8 [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.81c)] -// CHECK:STDOUT: %int.convert_checked.loc5_37.1: init Core.IntLiteral = call %bound_method.loc5_37.1(%impl.elem0.loc5_37.1) [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.convert_checked.loc5_37.1: init Core.IntLiteral = call %bound_method.loc5_37.1(%impl.elem0.loc5_37.1) [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked.acf)] // CHECK:STDOUT: %array_type.loc5_38.1: type = array_type %int.convert_checked.loc5_37.1, bool [symbolic = %array_type.loc5_38.1 (constants.%array_type.377)] // CHECK:STDOUT: %pattern_type.loc5_22: type = pattern_type %array_type.loc5_38.1 [symbolic = %pattern_type.loc5_22 (constants.%pattern_type.bc6)] // CHECK:STDOUT: @@ -3541,19 +3690,19 @@ fn F() { // CHECK:STDOUT: return %.loc9_62 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%Self.826) {} +// CHECK:STDOUT: specific @N(constants.%Self.8268) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%I.facet.93d) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Self.826) { -// CHECK:STDOUT: %Self => constants.%Self.826 +// CHECK:STDOUT: specific @F.1(constants.%Self.8268) { +// CHECK:STDOUT: %Self => constants.%Self.8268 // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.b70 // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.6de // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.5d6 // CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%impl.elem0.fab // CHECK:STDOUT: %Convert.bound => constants.%Convert.bound.44d // CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.81c -// CHECK:STDOUT: %int.convert_checked.loc5_37.1 => constants.%int.convert_checked +// CHECK:STDOUT: %int.convert_checked.loc5_37.1 => constants.%int.convert_checked.acf // CHECK:STDOUT: %array_type.loc5_38.1 => constants.%array_type.377 // CHECK:STDOUT: %pattern_type.loc5_22 => constants.%pattern_type.bc6 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index 60fb4db59fde..04a685f96898 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -35,19 +35,19 @@ var d: i32 = a[b]; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.1e1: %i32 = int_value 12 [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef4: = bound_method %int_24.e3c, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.477: = bound_method %int_24.e3c, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_24.365: %i32 = int_value 24 [concrete] @@ -133,7 +133,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc14_31.1: %tuple.type = tuple_literal (%int_12, %int_24) // CHECK:STDOUT: %impl.elem0.loc14_31.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_31.1: = bound_method %int_12, %impl.elem0.loc14_31.1 [concrete = constants.%Convert.bound.221] -// CHECK:STDOUT: %specific_fn.loc14_31.1: = specific_function %impl.elem0.loc14_31.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_31.1: = specific_function %impl.elem0.loc14_31.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_31.2: = bound_method %int_12, %specific_fn.loc14_31.1 [concrete = constants.%bound_method.dae] // CHECK:STDOUT: %int.convert_checked.loc14_31.1: init %i32 = call %bound_method.loc14_31.2(%int_12) [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %.loc14_31.2: init %i32 = converted %int_12, %int.convert_checked.loc14_31.1 [concrete = constants.%int_12.1e1] @@ -142,7 +142,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc14_31.4: init %i32 = initialize_from %.loc14_31.2 to %.loc14_31.3 [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %impl.elem0.loc14_31.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_31.3: = bound_method %int_24, %impl.elem0.loc14_31.2 [concrete = constants.%Convert.bound.ef4] -// CHECK:STDOUT: %specific_fn.loc14_31.2: = specific_function %impl.elem0.loc14_31.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_31.2: = specific_function %impl.elem0.loc14_31.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_31.4: = bound_method %int_24, %specific_fn.loc14_31.2 [concrete = constants.%bound_method.477] // CHECK:STDOUT: %int.convert_checked.loc14_31.2: init %i32 = call %bound_method.loc14_31.4(%int_24) [concrete = constants.%int_24.365] // CHECK:STDOUT: %.loc14_31.5: init %i32 = converted %int_24, %int.convert_checked.loc14_31.2 [concrete = constants.%int_24.365] @@ -155,7 +155,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_1.1: = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_1.2: = bound_method %int_1.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %bound_method.loc15_1.2(%int_1.loc15) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15: init %i32 = converted %int_1.loc15, %int.convert_checked.loc15 [concrete = constants.%int_1.5d2] @@ -166,7 +166,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_16.1: = bound_method %int_0.loc16, %impl.elem0.loc16 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_16.2: = bound_method %int_0.loc16, %specific_fn.loc16 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %bound_method.loc16_16.2(%int_0.loc16) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc16_16.1: %i32 = value_of_initializer %int.convert_checked.loc16 [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index c74f2e343f03..140308fd4dd1 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -54,15 +54,15 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -160,7 +160,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc17_34.1: %tuple.type = tuple_literal (%int_1.loc17_27, %int_2.loc17_30, %int_3.loc17_33) // CHECK:STDOUT: %impl.elem0.loc17_34.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_34.1: = bound_method %int_1.loc17_27, %impl.elem0.loc17_34.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17_34.1: = specific_function %impl.elem0.loc17_34.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_34.1: = specific_function %impl.elem0.loc17_34.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_34.2: = bound_method %int_1.loc17_27, %specific_fn.loc17_34.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc17_34.1: init %i32 = call %bound_method.loc17_34.2(%int_1.loc17_27) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_34.2: init %i32 = converted %int_1.loc17_27, %int.convert_checked.loc17_34.1 [concrete = constants.%int_1.5d2] @@ -169,7 +169,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc17_34.4: init %i32 = initialize_from %.loc17_34.2 to %.loc17_34.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc17_34.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_34.3: = bound_method %int_2.loc17_30, %impl.elem0.loc17_34.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc17_34.2: = specific_function %impl.elem0.loc17_34.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_34.2: = specific_function %impl.elem0.loc17_34.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_34.4: = bound_method %int_2.loc17_30, %specific_fn.loc17_34.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc17_34.2: init %i32 = call %bound_method.loc17_34.4(%int_2.loc17_30) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc17_34.5: init %i32 = converted %int_2.loc17_30, %int.convert_checked.loc17_34.2 [concrete = constants.%int_2.ef8] @@ -178,7 +178,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc17_34.7: init %i32 = initialize_from %.loc17_34.5 to %.loc17_34.6 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %impl.elem0.loc17_34.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_34.5: = bound_method %int_3.loc17_33, %impl.elem0.loc17_34.3 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc17_34.3: = specific_function %impl.elem0.loc17_34.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_34.3: = specific_function %impl.elem0.loc17_34.3, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_34.6: = bound_method %int_3.loc17_33, %specific_fn.loc17_34.3 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc17_34.3: init %i32 = call %bound_method.loc17_34.6(%int_3.loc17_33) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc17_34.8: init %i32 = converted %int_3.loc17_33, %int.convert_checked.loc17_34.3 [concrete = constants.%int_3.822] @@ -206,7 +206,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %i32.loc20_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc20: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_21.1: = bound_method %int_0.loc20, %impl.elem0.loc20 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_21.2: = bound_method %int_0.loc20, %specific_fn.loc20 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %bound_method.loc20_21.2(%int_0.loc20) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc20_21.1: %i32 = value_of_initializer %int.convert_checked.loc20 [concrete = constants.%int_0.6a9] @@ -226,7 +226,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc21_5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_5.1: = bound_method %int_0.loc21, %impl.elem0.loc21_5 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc21_5: = specific_function %impl.elem0.loc21_5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc21_5: = specific_function %impl.elem0.loc21_5, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_5.2: = bound_method %int_0.loc21, %specific_fn.loc21_5 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc21_5: init %i32 = call %bound_method.loc21_5.2(%int_0.loc21) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc21_5.1: %i32 = value_of_initializer %int.convert_checked.loc21_5 [concrete = constants.%int_0.6a9] @@ -235,7 +235,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc21_8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_8.1: = bound_method %int_4, %impl.elem0.loc21_8 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc21_8: = specific_function %impl.elem0.loc21_8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc21_8: = specific_function %impl.elem0.loc21_8, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_8.2: = bound_method %int_4, %specific_fn.loc21_8 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc21_8: init %i32 = call %bound_method.loc21_8.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc21_8: init %i32 = converted %int_4, %int.convert_checked.loc21_8 [concrete = constants.%int_4.940] @@ -256,7 +256,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc25_34.1: %tuple.type = tuple_literal (%int_1.loc25_27, %int_2.loc25_30, %int_3.loc25_33) // CHECK:STDOUT: %impl.elem0.loc25_34.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_34.1: = bound_method %int_1.loc25_27, %impl.elem0.loc25_34.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc25_34.1: = specific_function %impl.elem0.loc25_34.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_34.1: = specific_function %impl.elem0.loc25_34.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_34.2: = bound_method %int_1.loc25_27, %specific_fn.loc25_34.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc25_34.1: init %i32 = call %bound_method.loc25_34.2(%int_1.loc25_27) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc25_34.2: init %i32 = converted %int_1.loc25_27, %int.convert_checked.loc25_34.1 [concrete = constants.%int_1.5d2] @@ -265,7 +265,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc25_34.4: init %i32 = initialize_from %.loc25_34.2 to %.loc25_34.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc25_34.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_34.3: = bound_method %int_2.loc25_30, %impl.elem0.loc25_34.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc25_34.2: = specific_function %impl.elem0.loc25_34.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_34.2: = specific_function %impl.elem0.loc25_34.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_34.4: = bound_method %int_2.loc25_30, %specific_fn.loc25_34.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc25_34.2: init %i32 = call %bound_method.loc25_34.4(%int_2.loc25_30) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc25_34.5: init %i32 = converted %int_2.loc25_30, %int.convert_checked.loc25_34.2 [concrete = constants.%int_2.ef8] @@ -274,7 +274,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc25_34.7: init %i32 = initialize_from %.loc25_34.5 to %.loc25_34.6 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %impl.elem0.loc25_34.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_34.5: = bound_method %int_3.loc25_33, %impl.elem0.loc25_34.3 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc25_34.3: = specific_function %impl.elem0.loc25_34.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25_34.3: = specific_function %impl.elem0.loc25_34.3, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_34.6: = bound_method %int_3.loc25_33, %specific_fn.loc25_34.3 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc25_34.3: init %i32 = call %bound_method.loc25_34.6(%int_3.loc25_33) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc25_34.8: init %i32 = converted %int_3.loc25_33, %int.convert_checked.loc25_34.3 [concrete = constants.%int_3.822] @@ -297,7 +297,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc29: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_5.1: = bound_method %int_0.loc29, %impl.elem0.loc29 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_5.2: = bound_method %int_0.loc29, %specific_fn.loc29 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %bound_method.loc29_5.2(%int_0.loc29) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc29_5.1: %i32 = value_of_initializer %int.convert_checked.loc29 [concrete = constants.%int_0.6a9] @@ -309,7 +309,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc30: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc30_5.1: = bound_method %int_0.loc30, %impl.elem0.loc30 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc30_5.2: = bound_method %int_0.loc30, %specific_fn.loc30 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %bound_method.loc30_5.2(%int_0.loc30) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc30_5.1: %i32 = value_of_initializer %int.convert_checked.loc30 [concrete = constants.%int_0.6a9] @@ -326,7 +326,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %i32.loc31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc31: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc31_7.1: = bound_method %int_0.loc31, %impl.elem0.loc31 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc31_7.2: = bound_method %int_0.loc31, %specific_fn.loc31 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %bound_method.loc31_7.2(%int_0.loc31) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc31_7.1: %i32 = value_of_initializer %int.convert_checked.loc31 [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index 9ec0affb2010..c4fc8a6271eb 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -43,16 +43,16 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.1e1: %i32 = int_value 12 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.1e1) [concrete] @@ -126,7 +126,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %.loc14_28.1: %tuple.type = tuple_literal (%int_12) // CHECK:STDOUT: %impl.elem0.loc14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_28.1: = bound_method %int_12, %impl.elem0.loc14 [concrete = constants.%Convert.bound.221] -// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_28.2: = bound_method %int_12, %specific_fn.loc14 [concrete = constants.%bound_method.dae] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %bound_method.loc14_28.2(%int_12) [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %.loc14_28.2: init %i32 = converted %int_12, %int.convert_checked.loc14 [concrete = constants.%int_12.1e1] @@ -142,7 +142,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc20: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_16.1: = bound_method %int_1, %impl.elem0.loc20 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_16.2: = bound_method %int_1, %specific_fn.loc20 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %bound_method.loc20_16.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_16.1: %i32 = value_of_initializer %int.convert_checked.loc20 [concrete = constants.%int_1.5d2] @@ -156,7 +156,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_16.1: = bound_method %int_2147483647, %impl.elem0.loc26 [concrete = constants.%Convert.bound.f38] -// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_16.2: = bound_method %int_2147483647, %specific_fn.loc26 [concrete = constants.%bound_method.8e1] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %bound_method.loc26_16.2(%int_2147483647) [concrete = constants.%int_2147483647.a74] // CHECK:STDOUT: %.loc26_16.1: %i32 = value_of_initializer %int.convert_checked.loc26 [concrete = constants.%int_2147483647.a74] 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 faf324c8218f..599161e75f6c 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -39,16 +39,16 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.1e1: %i32 = int_value 12 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.1e1) [concrete] @@ -105,7 +105,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %.loc14_28.1: %tuple.type = tuple_literal (%int_12) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_28.1: = bound_method %int_12, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_28.2: = bound_method %int_12, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_28.2(%int_12) [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %.loc14_28.2: init %i32 = converted %int_12, %int.convert_checked [concrete = constants.%int_12.1e1] diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index b08208cd2dca..ae14182970fa 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -36,16 +36,16 @@ var b: i32 = a[1]; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.1e1: %i32 = int_value 12 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.1e1) [concrete] @@ -104,7 +104,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: %.loc14_28.1: %tuple.type = tuple_literal (%int_12) // CHECK:STDOUT: %impl.elem0.loc14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_28.1: = bound_method %int_12, %impl.elem0.loc14 [concrete = constants.%Convert.bound.221] -// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_28.2: = bound_method %int_12, %specific_fn.loc14 [concrete = constants.%bound_method.dae] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %bound_method.loc14_28.2(%int_12) [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %.loc14_28.2: init %i32 = converted %int_12, %int.convert_checked.loc14 [concrete = constants.%int_12.1e1] @@ -120,7 +120,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_16.1: = bound_method %int_1, %impl.elem0.loc19 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_16.2: = bound_method %int_1, %specific_fn.loc19 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %bound_method.loc19_16.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc19_16.1: %i32 = value_of_initializer %int.convert_checked.loc19 [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 64d357f70c4e..9f6ec5a66321 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -62,15 +62,15 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] @@ -140,7 +140,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %i32.loc22_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc22: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_21.1: = bound_method %int_0.loc22, %impl.elem0.loc22 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_21.2: = bound_method %int_0.loc22, %specific_fn.loc22 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %bound_method.loc22_21.2(%int_0.loc22) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc22_21.1: %i32 = value_of_initializer %int.convert_checked.loc22 [concrete = constants.%int_0.6a9] @@ -162,7 +162,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc27_5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc27_5.1: = bound_method %int_0.loc27, %impl.elem0.loc27_5 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc27_5: = specific_function %impl.elem0.loc27_5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc27_5: = specific_function %impl.elem0.loc27_5, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_5.2: = bound_method %int_0.loc27, %specific_fn.loc27_5 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc27_5: init %i32 = call %bound_method.loc27_5.2(%int_0.loc27) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc27_5.1: %i32 = value_of_initializer %int.convert_checked.loc27_5 [concrete = constants.%int_0.6a9] @@ -173,7 +173,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int_4.loc27: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc27_8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc27_8.1: = bound_method %int_4.loc27, %impl.elem0.loc27_8 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc27_8: = specific_function %impl.elem0.loc27_8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc27_8: = specific_function %impl.elem0.loc27_8, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_8.2: = bound_method %int_4.loc27, %specific_fn.loc27_8 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc27_8: init %i32 = call %bound_method.loc27_8.2(%int_4.loc27) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc27_8: init %i32 = converted %int_4.loc27, %int.convert_checked.loc27_8 [concrete = constants.%int_4.940] @@ -192,7 +192,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %i32.loc35_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc35: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc35_23.1: = bound_method %int_0.loc35, %impl.elem0.loc35 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc35_23.2: = bound_method %int_0.loc35, %specific_fn.loc35 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %bound_method.loc35_23.2(%int_0.loc35) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc35_23.1: %i32 = value_of_initializer %int.convert_checked.loc35 [concrete = constants.%int_0.6a9] @@ -216,7 +216,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %i32.loc40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc40_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc40_7.1: = bound_method %int_0.loc40, %impl.elem0.loc40_7 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc40_7: = specific_function %impl.elem0.loc40_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc40_7: = specific_function %impl.elem0.loc40_7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc40_7.2: = bound_method %int_0.loc40, %specific_fn.loc40_7 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc40_7: init %i32 = call %bound_method.loc40_7.2(%int_0.loc40) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc40_7.1: %i32 = value_of_initializer %int.convert_checked.loc40_7 [concrete = constants.%int_0.6a9] @@ -226,7 +226,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int_4.loc40: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc40_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc40_10.1: = bound_method %int_4.loc40, %impl.elem0.loc40_10 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc40_10: = specific_function %impl.elem0.loc40_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc40_10: = specific_function %impl.elem0.loc40_10, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc40_10.2: = bound_method %int_4.loc40, %specific_fn.loc40_10 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc40_10: init %i32 = call %bound_method.loc40_10.2(%int_4.loc40) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc40_10: init %i32 = converted %int_4.loc40, %int.convert_checked.loc40_10 [concrete = constants.%int_4.940] diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 84348202afe8..1b2f2b12b569 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -37,29 +37,29 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.132: = bound_method %int_42.20e, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.8c1: = bound_method %int_42.20e, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.c68: %i32 = int_value 42 [concrete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_42.c68, %int_42.c68) [concrete] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete] -// CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.23 [concrete] -// CHECK:STDOUT: %Negate.impl_witness.561: = impl_witness imports.%Negate.impl_witness_table.e09 [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.561) [concrete] -// CHECK:STDOUT: %.63a: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] -// CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.24 [concrete] -// CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %int_10, %Op.bba [concrete] +// CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.95 [concrete] +// CHECK:STDOUT: %Negate.impl_witness.973: = impl_witness imports.%Negate.impl_witness_table.b22 [concrete] +// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.973) [concrete] +// CHECK:STDOUT: %.d3d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.96 [concrete] +// CHECK:STDOUT: %Op.99f: %Op.type.18a = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %int_10, %Op.99f [concrete] // CHECK:STDOUT: %int_-10.06d: Core.IntLiteral = int_value -10 [concrete] // CHECK:STDOUT: %Convert.bound.1ca: = bound_method %int_-10.06d, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.af0: = bound_method %int_-10.06d, %Convert.specific_fn [concrete] @@ -79,8 +79,9 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.c15: %Op.type.1be = import_ref Core//prelude/operators/arithmetic, loc94_31, loaded [concrete = constants.%Op.bba] -// CHECK:STDOUT: %Negate.impl_witness_table.e09 = impl_witness_table (%Core.import_ref.c15), @impl.8cb [concrete] +// CHECK:STDOUT: %Core.import_ref.abd9 = import_ref Core//prelude/operators/arithmetic, loc111_50, unloaded +// CHECK:STDOUT: %Core.import_ref.5e6a: %Op.type.18a = import_ref Core//prelude/operators/arithmetic, loc112_31, loaded [concrete = constants.%Op.99f] +// CHECK:STDOUT: %Negate.impl_witness_table.b22 = impl_witness_table (%Core.import_ref.abd9, %Core.import_ref.5e6a), @impl.0ef [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -121,7 +122,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %.loc14_31.1: %tuple.type = tuple_literal (%int_42.loc14_25, %int_42.loc14_29) // CHECK:STDOUT: %impl.elem0.loc14_31.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_31.1: = bound_method %int_42.loc14_25, %impl.elem0.loc14_31.1 [concrete = constants.%Convert.bound.132] -// CHECK:STDOUT: %specific_fn.loc14_31.1: = specific_function %impl.elem0.loc14_31.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_31.1: = specific_function %impl.elem0.loc14_31.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_31.2: = bound_method %int_42.loc14_25, %specific_fn.loc14_31.1 [concrete = constants.%bound_method.8c1] // CHECK:STDOUT: %int.convert_checked.loc14_31.1: init %i32 = call %bound_method.loc14_31.2(%int_42.loc14_25) [concrete = constants.%int_42.c68] // CHECK:STDOUT: %.loc14_31.2: init %i32 = converted %int_42.loc14_25, %int.convert_checked.loc14_31.1 [concrete = constants.%int_42.c68] @@ -130,7 +131,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %.loc14_31.4: init %i32 = initialize_from %.loc14_31.2 to %.loc14_31.3 [concrete = constants.%int_42.c68] // CHECK:STDOUT: %impl.elem0.loc14_31.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_31.3: = bound_method %int_42.loc14_29, %impl.elem0.loc14_31.2 [concrete = constants.%Convert.bound.132] -// CHECK:STDOUT: %specific_fn.loc14_31.2: = specific_function %impl.elem0.loc14_31.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_31.2: = specific_function %impl.elem0.loc14_31.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_31.4: = bound_method %int_42.loc14_29, %specific_fn.loc14_31.2 [concrete = constants.%bound_method.8c1] // CHECK:STDOUT: %int.convert_checked.loc14_31.2: init %i32 = call %bound_method.loc14_31.4(%int_42.loc14_29) [concrete = constants.%int_42.c68] // CHECK:STDOUT: %.loc14_31.5: init %i32 = converted %int_42.loc14_29, %int.convert_checked.loc14_31.2 [concrete = constants.%int_42.c68] @@ -142,14 +143,14 @@ var d: i32 = c[-10]; // CHECK:STDOUT: assign file.%c.var, %.loc14_1 // CHECK:STDOUT: %c.ref: ref %array_type = name_ref c, file.%c [concrete = file.%c.var] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] -// CHECK:STDOUT: %impl.elem0.loc19_16.1: %.63a = impl_witness_access constants.%Negate.impl_witness.561, element0 [concrete = constants.%Op.bba] -// CHECK:STDOUT: %bound_method.loc19_16.1: = bound_method %int_10, %impl.elem0.loc19_16.1 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem1: %.d3d = impl_witness_access constants.%Negate.impl_witness.973, element1 [concrete = constants.%Op.99f] +// CHECK:STDOUT: %bound_method.loc19_16.1: = bound_method %int_10, %impl.elem1 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method.loc19_16.1(%int_10) [concrete = constants.%int_-10.06d] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19_16.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc19_16.2: = bound_method %int.snegate, %impl.elem0.loc19_16.2 [concrete = constants.%Convert.bound.1ca] -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19_16.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc19_16.2: = bound_method %int.snegate, %impl.elem0.loc19 [concrete = constants.%Convert.bound.1ca] +// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_16.3: = bound_method %int.snegate, %specific_fn.loc19 [concrete = constants.%bound_method.af0] // CHECK:STDOUT: %.loc19_16.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-10.06d] // CHECK:STDOUT: %.loc19_16.2: Core.IntLiteral = converted %int.snegate, %.loc19_16.1 [concrete = constants.%int_-10.06d] diff --git a/toolchain/check/testdata/interface/compound_member_access.carbon b/toolchain/check/testdata/interface/compound_member_access.carbon index e9a1f9bbbef9..39b2b2079331 100644 --- a/toolchain/check/testdata/interface/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/compound_member_access.carbon @@ -1178,28 +1178,30 @@ fn Works() { // CHECK:STDOUT: %Fails.type: type = fn_type @Fails [concrete] // CHECK:STDOUT: %Fails: %Fails.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %A.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %A.type, %Op.ff4 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1269,7 +1271,7 @@ fn Works() { // CHECK:STDOUT: %.loc22_7: ref %C = converted %.loc22_5.1, %.loc22_5.4 // CHECK:STDOUT: %A.ref.loc22_15: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc22_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc22: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc22: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc22: = bound_method %A.ref.loc22_15, %impl.elem0.loc22 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc22: init type = call %bound_method.loc22(%A.ref.loc22_15, %A.ref.loc22_19) [concrete = constants.%A.type] // CHECK:STDOUT: %G.ref.loc22: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52] @@ -1283,7 +1285,7 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc30_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc30_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc30_26: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc30_26: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc30_26: = bound_method %A.ref.loc30_24, %impl.elem0.loc30_26 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc30_26: init type = call %bound_method.loc30_26(%A.ref.loc30_24, %A.ref.loc30_28) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc30_29.1: type = value_of_initializer %type.and.loc30_26 [concrete = constants.%A.type] @@ -1294,7 +1296,7 @@ fn Works() { // CHECK:STDOUT: %.loc30_30: type = converted %.loc30_20, %as_type.loc30 [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc30_35: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc30_39: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc30_37: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc30_37: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc30_37: = bound_method %A.ref.loc30_35, %impl.elem0.loc30_37 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc30_37: init type = call %bound_method.loc30_37(%A.ref.loc30_35, %A.ref.loc30_39) [concrete = constants.%A.type] // CHECK:STDOUT: %G.ref.loc30: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52] @@ -1308,7 +1310,7 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc38_18: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc38_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc38_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc38: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc38: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc38: = bound_method %A.ref.loc38_24, %impl.elem0.loc38 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc38: init type = call %bound_method.loc38(%A.ref.loc38_24, %A.ref.loc38_28) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc38_29.1: type = value_of_initializer %type.and.loc38 [concrete = constants.%A.type] @@ -1346,26 +1348,28 @@ fn Works() { // CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%A.impl_witness) [concrete] // CHECK:STDOUT: %Works.type: type = fn_type @Works [concrete] // CHECK:STDOUT: %Works: %Works.type = struct_value () [concrete] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness imports.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %Op.type.c1b: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.0a6: %Op.type.c1b = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %A.type, %Op.0a6 [concrete] +// CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] +// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] +// CHECK:STDOUT: %Op.type.9a3: type = fn_type @Op.1, @BitAndWith(type) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.e8c = facet_value type, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %.2af: type = fn_type_with_self_type %Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %Op.type.1cc: type = fn_type @Op.2 [concrete] +// CHECK:STDOUT: %Op.ff4: %Op.type.1cc = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %A.type, %Op.ff4 [concrete] // CHECK:STDOUT: %.e63: type = fn_type_with_self_type %G.type.c3a, %A.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd +// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.import_ref.d90: %Op.type.c1b = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.0a6] -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (%Core.import_ref.d90), @impl.13c [concrete] +// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] +// CHECK:STDOUT: %Core.import_ref.012: %Op.type.1cc = import_ref Core//prelude, loc13_42, loaded [concrete = constants.%Op.ff4] +// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.012), @impl.865 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1429,7 +1433,7 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc13_7: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc13_11: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc13_9: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc13_9: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc13: = bound_method %A.ref.loc13_7, %impl.elem0.loc13_9 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc13: init type = call %bound_method.loc13(%A.ref.loc13_7, %A.ref.loc13_11) [concrete = constants.%A.type] // CHECK:STDOUT: %G.ref.loc13: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52] @@ -1440,7 +1444,7 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc14_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc14_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc14_12: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc14_12: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc14_12: = bound_method %A.ref.loc14_10, %impl.elem0.loc14_12 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc14_12: init type = call %bound_method.loc14_12(%A.ref.loc14_10, %A.ref.loc14_14) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %type.and.loc14_12 [concrete = constants.%A.type] @@ -1449,7 +1453,7 @@ fn Works() { // CHECK:STDOUT: %.loc14_6: %A.type = converted %C.ref.loc14, %A.facet.loc14 [concrete = constants.%A.facet] // CHECK:STDOUT: %A.ref.loc14_20: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc14_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc14_22: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc14_22: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc14_22: = bound_method %A.ref.loc14_20, %impl.elem0.loc14_22 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc14_22: init type = call %bound_method.loc14_22(%A.ref.loc14_20, %A.ref.loc14_24) [concrete = constants.%A.type] // CHECK:STDOUT: %G.ref.loc14: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52] @@ -1458,7 +1462,7 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc15_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc15_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc15_12: %.6bf = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.0a6] +// CHECK:STDOUT: %impl.elem0.loc15_12: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%Op.ff4] // CHECK:STDOUT: %bound_method.loc15: = bound_method %A.ref.loc15_10, %impl.elem0.loc15_12 [concrete = constants.%Op.bound] // CHECK:STDOUT: %type.and.loc15: init type = call %bound_method.loc15(%A.ref.loc15_10, %A.ref.loc15_14) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %type.and.loc15 [concrete = constants.%A.type] diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index 518b1924a3e9..3b2f132156b0 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -28,7 +28,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0.cd1: %I.assoc_type = assoc_entity element0, @I.%T [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -37,22 +37,22 @@ interface I { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%N [concrete] +// CHECK:STDOUT: %assoc1.d15: %I.assoc_type = assoc_entity element1, @I.%N [concrete] // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42.20e, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.c68: %i32 = int_value 42 [concrete] // CHECK:STDOUT: } @@ -80,7 +80,7 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.cd1] // CHECK:STDOUT: %int_32.loc19_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -91,11 +91,11 @@ interface I { // CHECK:STDOUT: %.loc19_36: type = converted %.loc19_35, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] // CHECK:STDOUT: } // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%N [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%N [concrete = constants.%assoc1.d15] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc24_27.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_27.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc24_27.2(%int_42) [concrete = constants.%int_42.c68] // CHECK:STDOUT: %.loc24_27.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_42.c68] @@ -121,7 +121,7 @@ interface I { // CHECK:STDOUT: assoc_const N:! %i32 = %.loc24_27.2; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.826) {} +// CHECK:STDOUT: specific @T(constants.%Self.8268) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%Self.826) {} +// CHECK:STDOUT: specific @N(constants.%Self.8268) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index 3a5dfed9a861..268fbca11eb7 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -54,25 +54,25 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: --- member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Interface.type.e32: type = generic_interface_type @Interface [concrete] // CHECK:STDOUT: %Interface.generic: %Interface.type.e32 = struct_value () [concrete] -// CHECK:STDOUT: %Interface.type.d32: type = facet_type <@Interface, @Interface(%T)> [symbolic] +// CHECK:STDOUT: %Interface.type.d32: type = facet_type <@Interface, @Interface(%T.8b3)> [symbolic] // CHECK:STDOUT: %Self.a5f: %Interface.type.d32 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %Interface.assoc_type.0d9: type = assoc_entity_type @Interface, @Interface(%T) [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] +// CHECK:STDOUT: %Interface.assoc_type.0d9: type = assoc_entity_type @Interface, @Interface(%T.8b3) [symbolic] // CHECK:STDOUT: %assoc0.dbe: %Interface.assoc_type.0d9 = assoc_entity element0, @Interface.%X [symbolic] // CHECK:STDOUT: %I.a5f: %Interface.type.d32 = bind_symbolic_name I, 1 [symbolic] // CHECK:STDOUT: %pattern_type.f17: type = pattern_type %Interface.type.d32 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %AccessGeneric.type: type = fn_type @AccessGeneric [concrete] // CHECK:STDOUT: %AccessGeneric: %AccessGeneric.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.6f3: = require_complete_type %Interface.type.d32 [symbolic] // CHECK:STDOUT: %I.as_type.59e: type = facet_access_type %I.a5f [symbolic] -// CHECK:STDOUT: %Interface.lookup_impl_witness.854: = lookup_impl_witness %I.a5f, @Interface, @Interface(%T) [symbolic] +// CHECK:STDOUT: %Interface.lookup_impl_witness.854: = lookup_impl_witness %I.a5f, @Interface, @Interface(%T.8b3) [symbolic] // CHECK:STDOUT: %Interface.facet.e18: %Interface.type.d32 = facet_value %I.as_type.59e, (%Interface.lookup_impl_witness.854) [symbolic] -// CHECK:STDOUT: %impl.elem0.7b9: %T = impl_witness_access %Interface.lookup_impl_witness.854, element0 [symbolic] +// CHECK:STDOUT: %impl.elem0.7b9: %T.8b3 = impl_witness_access %Interface.lookup_impl_witness.854, element0 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -114,7 +114,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.decl: %Interface.type.e32 = interface_decl @Interface [concrete = constants.%Interface.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_21.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_21.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %AccessGeneric.decl: %AccessGeneric.type = fn_decl @AccessGeneric [concrete = constants.%AccessGeneric] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -122,16 +122,16 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %return.patt: @AccessGeneric.%pattern_type.loc8_46 (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @AccessGeneric.%pattern_type.loc8_46 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T)] -// CHECK:STDOUT: %T.loc8_18.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_18.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc8_18.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_18.2 (constants.%T.8b3)] // CHECK:STDOUT: %.loc8: type = splice_block %Interface.type.loc8_43.1 [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.d32)] { // CHECK:STDOUT: %Interface.ref: %Interface.type.e32 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] -// CHECK:STDOUT: %T.ref.loc8_42: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T)] -// CHECK:STDOUT: %Interface.type.loc8_43.1: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.d32)] +// CHECK:STDOUT: %T.ref.loc8_42: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T.8b3)] +// CHECK:STDOUT: %Interface.type.loc8_43.1: type = facet_type <@Interface, @Interface(constants.%T.8b3)> [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.d32)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.loc8_28.1: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.d32) = bind_symbolic_name I, 1 [symbolic = %I.loc8_28.2 (constants.%I.a5f)] -// CHECK:STDOUT: %return.param: ref @AccessGeneric.%T.loc8_18.2 (%T) = out_param call_param0 -// CHECK:STDOUT: %return: ref @AccessGeneric.%T.loc8_18.2 (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @AccessGeneric.%T.loc8_18.2 (%T.8b3) = out_param call_param0 +// CHECK:STDOUT: %return: ref @AccessGeneric.%T.loc8_18.2 (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessConcrete.decl: %AccessConcrete.type = fn_decl @AccessConcrete [concrete = constants.%AccessConcrete] { // CHECK:STDOUT: %I.patt: %pattern_type.875 = symbolic_binding_pattern I, 0 [concrete] @@ -153,7 +153,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Interface(%T.loc4_21.1: type) { -// CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T)] +// CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.2 (constants.%T.8b3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(%T.loc4_21.2)> [symbolic = %Interface.type (constants.%Interface.type.d32)] @@ -163,7 +163,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @Interface.%Interface.type (%Interface.type.d32) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.a5f)] -// CHECK:STDOUT: %X: @X.%T (%T) = assoc_const_decl @X [concrete] { +// CHECK:STDOUT: %X: @X.%T (%T.8b3) = assoc_const_decl @X [concrete] { // CHECK:STDOUT: %assoc0: @Interface.%Interface.assoc_type (%Interface.assoc_type.0d9) = assoc_entity element0, @Interface.%X [symbolic = @Interface.%assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -176,14 +176,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic assoc_const @X(@Interface.%T.loc4_21.1: type, @Interface.%Self.1: @Interface.%Interface.type (%Interface.type.d32)) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: assoc_const X:! @X.%T (%T); +// CHECK:STDOUT: assoc_const X:! @X.%T (%T.8b3); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @AccessGeneric(%T.loc8_18.1: type, %I.loc8_28.1: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.d32)) { -// CHECK:STDOUT: %T.loc8_18.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_18.2 (constants.%T)] +// CHECK:STDOUT: %T.loc8_18.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_18.2 (constants.%T.8b3)] // CHECK:STDOUT: %Interface.type.loc8_43.2: type = facet_type <@Interface, @Interface(%T.loc8_18.2)> [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.d32)] // CHECK:STDOUT: %I.loc8_28.2: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.d32) = bind_symbolic_name I, 1 [symbolic = %I.loc8_28.2 (constants.%I.a5f)] // CHECK:STDOUT: %pattern_type.loc8_28: type = pattern_type %Interface.type.loc8_43.2 [symbolic = %pattern_type.loc8_28 (constants.%pattern_type.f17)] @@ -195,17 +195,17 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %assoc0: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = assoc_entity element0, @Interface.%X [symbolic = %assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: %I.as_type.loc9_11.2: type = facet_access_type %I.loc8_28.2 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.59e)] // CHECK:STDOUT: %Interface.lookup_impl_witness: = lookup_impl_witness %I.loc8_28.2, @Interface, @Interface(%T.loc8_18.2) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.854)] -// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%T.loc8_18.2 (%T) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] +// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%T.loc8_18.2 (%T.8b3) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] // CHECK:STDOUT: %require_complete.loc9_13: = require_complete_type %T.loc8_18.2 [symbolic = %require_complete.loc9_13 (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @AccessGeneric.%T.loc8_18.2 (%T) { +// CHECK:STDOUT: fn() -> @AccessGeneric.%T.loc8_18.2 (%T.8b3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %I.ref: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.d32) = name_ref I, %I.loc8_28.1 [symbolic = %I.loc8_28.2 (constants.%I.a5f)] -// CHECK:STDOUT: %.loc9_11.1: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = specific_constant @X.%assoc0, @Interface(constants.%T) [symbolic = %assoc0 (constants.%assoc0.dbe)] +// CHECK:STDOUT: %.loc9_11.1: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = specific_constant @X.%assoc0, @Interface(constants.%T.8b3) [symbolic = %assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: %X.ref: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.0d9) = name_ref X, %.loc9_11.1 [symbolic = %assoc0 (constants.%assoc0.dbe)] // CHECK:STDOUT: %I.as_type.loc9_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.59e)] // CHECK:STDOUT: %.loc9_11.2: type = converted %I.ref, %I.as_type.loc9_11.1 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.59e)] -// CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%T.loc8_18.2 (%T) = impl_witness_access constants.%Interface.lookup_impl_witness.854, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] +// CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%T.loc8_18.2 (%T.8b3) = impl_witness_access constants.%Interface.lookup_impl_witness.854, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.7b9)] // CHECK:STDOUT: return %impl.elem0.loc9_11.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -230,8 +230,8 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface(constants.%T) { -// CHECK:STDOUT: %T.loc4_21.2 => constants.%T +// CHECK:STDOUT: specific @Interface(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc4_21.2 => constants.%T.8b3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.d32 @@ -240,21 +240,21 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %assoc0 => constants.%assoc0.dbe // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T, constants.%Self.a5f) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @X(constants.%T.8b3, constants.%Self.a5f) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AccessGeneric(constants.%T, constants.%I.a5f) { -// CHECK:STDOUT: %T.loc8_18.2 => constants.%T +// CHECK:STDOUT: specific @AccessGeneric(constants.%T.8b3, constants.%I.a5f) { +// CHECK:STDOUT: %T.loc8_18.2 => constants.%T.8b3 // CHECK:STDOUT: %Interface.type.loc8_43.2 => constants.%Interface.type.d32 // CHECK:STDOUT: %I.loc8_28.2 => constants.%I.a5f // CHECK:STDOUT: %pattern_type.loc8_28 => constants.%pattern_type.f17 // CHECK:STDOUT: %pattern_type.loc8_46 => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T, constants.%Interface.facet.e18) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @X(constants.%T.8b3, constants.%Interface.facet.e18) { +// CHECK:STDOUT: %T => constants.%T.8b3 // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // 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 fa6852593137..8782dc7944b1 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -26,7 +26,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] @@ -38,26 +38,26 @@ interface I { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%G.decl [concrete] -// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%T [concrete] +// CHECK:STDOUT: %assoc1.0f3: %I.assoc_type = assoc_entity element1, @I.%G.decl [concrete] +// CHECK:STDOUT: %assoc2.e9c: %I.assoc_type = assoc_entity element2, @I.%T [concrete] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete] -// CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.%N [concrete] +// CHECK:STDOUT: %assoc3.fc8: %I.assoc_type = assoc_entity element3, @I.%N [concrete] // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42.20e, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.c68: %i32 = int_value 42 [concrete] // CHECK:STDOUT: } @@ -85,7 +85,7 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.82e] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { @@ -113,9 +113,9 @@ interface I { // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1.0f3] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { -// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%T [concrete = constants.%assoc2] +// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%T [concrete = constants.%assoc2.e9c] // CHECK:STDOUT: %int_32.loc21_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc21_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_32.loc21_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -124,11 +124,11 @@ interface I { // CHECK:STDOUT: %.loc21_28: type = converted %.loc21_27, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] // CHECK:STDOUT: } // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { -// CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.%N [concrete = constants.%assoc3] +// CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.%N [concrete = constants.%assoc3.fc8] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_19.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_19.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc22_19.2(%int_42) [concrete = constants.%int_42.c68] // CHECK:STDOUT: %.loc22_19.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_42.c68] @@ -171,11 +171,11 @@ interface I { // CHECK:STDOUT: fn(%a.param: %i32, %b.param: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%Self.826) {} +// CHECK:STDOUT: specific @F(constants.%Self.8268) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%Self.826) {} +// CHECK:STDOUT: specific @G(constants.%Self.8268) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.826) {} +// CHECK:STDOUT: specific @T(constants.%Self.8268) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%Self.826) {} +// CHECK:STDOUT: specific @N(constants.%Self.8268) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function_param_int16.carbon b/toolchain/check/testdata/interop/cpp/function_param_int16.carbon index fe7cf05cc73b..09c8a5073798 100644 --- a/toolchain/check/testdata/interop/cpp/function_param_int16.carbon +++ b/toolchain/check/testdata/interop/cpp/function_param_int16.carbon @@ -315,15 +315,15 @@ fn F() { // CHECK:STDOUT: %As.type.a96: type = facet_type <@As, @As(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.be5: type = fn_type @Convert.1, @As(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.0ef: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.5, @impl.686(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.6, @impl.686(%int_16) [concrete] // CHECK:STDOUT: %Convert.489: %Convert.type.172 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.a96 = facet_value Core.IntLiteral, (%As.impl_witness.0ef) [concrete] // CHECK:STDOUT: %.91d: type = fn_type_with_self_type %Convert.type.be5, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.489 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.5(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.6(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -378,7 +378,7 @@ fn F() { // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] // CHECK:STDOUT: %impl.elem0: %.91d = impl_witness_access constants.%As.impl_witness.0ef, element0 [concrete = constants.%Convert.489] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_13.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.1: %i16 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.f90] @@ -408,15 +408,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.adb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.fa6: type = fn_type @Convert.1, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.97b: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.2, @impl.4f9(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.3, @impl.4f9(%int_16) [concrete] // CHECK:STDOUT: %Convert.d0a: %Convert.type.33c = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] -// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.6f2: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] +// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet.6f2 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_32767.f4b, %Convert.d0a [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.2(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.3(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_32767.f4b, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_32767.faa: %i16 = int_value 32767 [concrete] // CHECK:STDOUT: } @@ -469,7 +469,7 @@ fn F() { // CHECK:STDOUT: %int_32767: Core.IntLiteral = int_value 32767 [concrete = constants.%int_32767.f4b] // CHECK:STDOUT: %impl.elem0: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_32767, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_32767, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_11.2(%int_32767) [concrete = constants.%int_32767.faa] // CHECK:STDOUT: %.loc7_11.1: %i16 = value_of_initializer %int.convert_checked [concrete = constants.%int_32767.faa] @@ -499,15 +499,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.adb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.fa6: type = fn_type @Convert.1, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.97b: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.2, @impl.4f9(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.3, @impl.4f9(%int_16) [concrete] // CHECK:STDOUT: %Convert.d0a: %Convert.type.33c = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] -// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.6f2: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] +// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet.6f2 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_32768.4d0, %Convert.d0a [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.2(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.3(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_32768.4d0, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_32768.e7f: %i16 = int_value 32768 [concrete] // CHECK:STDOUT: } @@ -560,7 +560,7 @@ fn F() { // CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [concrete = constants.%int_32768.4d0] // CHECK:STDOUT: %impl.elem0: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] // CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_32768, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int_32768, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc12_11.2(%int_32768) [concrete = constants.%int_32768.e7f] // CHECK:STDOUT: %.loc12_11.1: %i16 = value_of_initializer %int.convert_checked [concrete = constants.%int_32768.e7f] @@ -587,27 +587,27 @@ fn F() { // CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Negate.impl_witness.561: = impl_witness imports.%Negate.impl_witness_table.e09 [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.561) [concrete] -// CHECK:STDOUT: %.63a: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] -// CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %int_32768, %Op.bba [concrete] +// CHECK:STDOUT: %Negate.impl_witness.973: = impl_witness imports.%Negate.impl_witness_table.b22 [concrete] +// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.973) [concrete] +// CHECK:STDOUT: %.d3d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.7 [concrete] +// CHECK:STDOUT: %Op.99f: %Op.type.18a = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %int_32768, %Op.99f [concrete] // CHECK:STDOUT: %int_-32768.882: Core.IntLiteral = int_value -32768 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.adb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.fa6: type = fn_type @Convert.1, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.97b: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.2, @impl.4f9(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.3, @impl.4f9(%int_16) [concrete] // CHECK:STDOUT: %Convert.d0a: %Convert.type.33c = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] -// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.6f2: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] +// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet.6f2 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_-32768.882, %Convert.d0a [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.2(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.3(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_-32768.882, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_-32768.7e5: %i16 = int_value -32768 [concrete] // CHECK:STDOUT: } @@ -637,8 +637,9 @@ fn F() { // CHECK:STDOUT: %a: %i16 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.c15: %Op.type.1be = import_ref Core//prelude/operators/arithmetic, loc94_31, loaded [concrete = constants.%Op.bba] -// CHECK:STDOUT: %Negate.impl_witness_table.e09 = impl_witness_table (%Core.import_ref.c15), @impl.8cb [concrete] +// CHECK:STDOUT: %Core.import_ref.abd9 = import_ref Core//prelude/operators/arithmetic, loc111_50, unloaded +// CHECK:STDOUT: %Core.import_ref.5e6a: %Op.type.18a = import_ref Core//prelude/operators/arithmetic, loc112_31, loaded [concrete = constants.%Op.99f] +// CHECK:STDOUT: %Negate.impl_witness_table.b22 = impl_witness_table (%Core.import_ref.abd9, %Core.import_ref.5e6a), @impl.0ef [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] @@ -662,12 +663,12 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, imports.%foo.decl [concrete = constants.%foo] // CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [concrete = constants.%int_32768] -// CHECK:STDOUT: %impl.elem0.loc7_11.1: %.63a = impl_witness_access constants.%Negate.impl_witness.561, element0 [concrete = constants.%Op.bba] -// CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_32768, %impl.elem0.loc7_11.1 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem1: %.d3d = impl_witness_access constants.%Negate.impl_witness.973, element1 [concrete = constants.%Op.99f] +// CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_32768, %impl.elem1 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method.loc7_11.1(%int_32768) [concrete = constants.%int_-32768.882] -// CHECK:STDOUT: %impl.elem0.loc7_11.2: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] -// CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int.snegate, %impl.elem0.loc7_11.2 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc7_11.2, @Convert.2(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %impl.elem0: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] +// CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int.snegate, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.3: = bound_method %int.snegate, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %.loc7_11.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-32768.882] // CHECK:STDOUT: %.loc7_11.2: Core.IntLiteral = converted %int.snegate, %.loc7_11.1 [concrete = constants.%int_-32768.882] @@ -696,27 +697,27 @@ fn F() { // CHECK:STDOUT: %int_32769: Core.IntLiteral = int_value 32769 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Negate.impl_witness.561: = impl_witness imports.%Negate.impl_witness_table.e09 [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.561) [concrete] -// CHECK:STDOUT: %.63a: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] -// CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %int_32769, %Op.bba [concrete] +// CHECK:STDOUT: %Negate.impl_witness.973: = impl_witness imports.%Negate.impl_witness_table.b22 [concrete] +// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.973) [concrete] +// CHECK:STDOUT: %.d3d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.7 [concrete] +// CHECK:STDOUT: %Op.99f: %Op.type.18a = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %int_32769, %Op.99f [concrete] // CHECK:STDOUT: %int_-32769.5a5: Core.IntLiteral = int_value -32769 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.adb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.fa6: type = fn_type @Convert.1, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.97b: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.2, @impl.4f9(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.3, @impl.4f9(%int_16) [concrete] // CHECK:STDOUT: %Convert.d0a: %Convert.type.33c = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] -// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.6f2: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] +// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet.6f2 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_-32769.5a5, %Convert.d0a [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.2(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.3(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_-32769.5a5, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_-32769.883: %i16 = int_value -32769 [concrete] // CHECK:STDOUT: } @@ -746,8 +747,9 @@ fn F() { // CHECK:STDOUT: %a: %i16 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.c15: %Op.type.1be = import_ref Core//prelude/operators/arithmetic, loc94_31, loaded [concrete = constants.%Op.bba] -// CHECK:STDOUT: %Negate.impl_witness_table.e09 = impl_witness_table (%Core.import_ref.c15), @impl.8cb [concrete] +// CHECK:STDOUT: %Core.import_ref.abd9 = import_ref Core//prelude/operators/arithmetic, loc111_50, unloaded +// CHECK:STDOUT: %Core.import_ref.5e6a: %Op.type.18a = import_ref Core//prelude/operators/arithmetic, loc112_31, loaded [concrete = constants.%Op.99f] +// CHECK:STDOUT: %Negate.impl_witness_table.b22 = impl_witness_table (%Core.import_ref.abd9, %Core.import_ref.5e6a), @impl.0ef [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] @@ -771,12 +773,12 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, imports.%foo.decl [concrete = constants.%foo] // CHECK:STDOUT: %int_32769: Core.IntLiteral = int_value 32769 [concrete = constants.%int_32769] -// CHECK:STDOUT: %impl.elem0.loc12_11.1: %.63a = impl_witness_access constants.%Negate.impl_witness.561, element0 [concrete = constants.%Op.bba] -// CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_32769, %impl.elem0.loc12_11.1 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem1: %.d3d = impl_witness_access constants.%Negate.impl_witness.973, element1 [concrete = constants.%Op.99f] +// CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_32769, %impl.elem1 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method.loc12_11.1(%int_32769) [concrete = constants.%int_-32769.5a5] -// CHECK:STDOUT: %impl.elem0.loc12_11.2: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] -// CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int.snegate, %impl.elem0.loc12_11.2 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc12_11.2, @Convert.2(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %impl.elem0: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] +// CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int.snegate, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.3: = bound_method %int.snegate, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %.loc12_11.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-32769.5a5] // CHECK:STDOUT: %.loc12_11.2: Core.IntLiteral = converted %int.snegate, %.loc12_11.1 [concrete = constants.%int_-32769.5a5] @@ -809,18 +811,18 @@ fn F() { // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.6, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] // CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.197 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.6(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -877,7 +879,7 @@ fn F() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc15_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_13.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_13.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -908,15 +910,15 @@ fn F() { // CHECK:STDOUT: %As.type.a96: type = facet_type <@As, @As(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.be5: type = fn_type @Convert.1, @As(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.0ef: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.5, @impl.686(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.6, @impl.686(%int_16) [concrete] // CHECK:STDOUT: %Convert.489: %Convert.type.172 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.a96 = facet_value Core.IntLiteral, (%As.impl_witness.0ef) [concrete] // CHECK:STDOUT: %.91d: type = fn_type_with_self_type %Convert.type.be5, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.489 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.5(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.6(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -971,7 +973,7 @@ fn F() { // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] // CHECK:STDOUT: %impl.elem0: %.91d = impl_witness_access constants.%As.impl_witness.0ef, element0 [concrete = constants.%Convert.489] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_13.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.1: %i16 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.f90] @@ -1001,15 +1003,15 @@ fn F() { // CHECK:STDOUT: %As.type.a96: type = facet_type <@As, @As(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.be5: type = fn_type @Convert.1, @As(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.0ef: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.5, @impl.686(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.6, @impl.686(%int_16) [concrete] // CHECK:STDOUT: %Convert.489: %Convert.type.172 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.a96 = facet_value Core.IntLiteral, (%As.impl_witness.0ef) [concrete] // CHECK:STDOUT: %.91d: type = fn_type_with_self_type %Convert.type.be5, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.489 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.5(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.6(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1064,7 +1066,7 @@ fn F() { // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] // CHECK:STDOUT: %impl.elem0: %.91d = impl_witness_access constants.%As.impl_witness.0ef, element0 [concrete = constants.%Convert.489] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_13.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.1: %i16 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.f90] @@ -1094,15 +1096,15 @@ fn F() { // CHECK:STDOUT: %As.type.a96: type = facet_type <@As, @As(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.be5: type = fn_type @Convert.1, @As(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.0ef: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.5, @impl.686(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.6, @impl.686(%int_16) [concrete] // CHECK:STDOUT: %Convert.489: %Convert.type.172 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.a96 = facet_value Core.IntLiteral, (%As.impl_witness.0ef) [concrete] // CHECK:STDOUT: %.91d: type = fn_type_with_self_type %Convert.type.be5, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.489 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.5(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.6(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1157,7 +1159,7 @@ fn F() { // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] // CHECK:STDOUT: %impl.elem0: %.91d = impl_witness_access constants.%As.impl_witness.0ef, element0 [concrete = constants.%Convert.489] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_13.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.1: %i16 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.f90] @@ -1187,15 +1189,15 @@ fn F() { // CHECK:STDOUT: %As.type.a96: type = facet_type <@As, @As(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.be5: type = fn_type @Convert.1, @As(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.0ef: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.5, @impl.686(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.6, @impl.686(%int_16) [concrete] // CHECK:STDOUT: %Convert.489: %Convert.type.172 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.a96 = facet_value Core.IntLiteral, (%As.impl_witness.0ef) [concrete] // CHECK:STDOUT: %.91d: type = fn_type_with_self_type %Convert.type.be5, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.489 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.5(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.6(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1250,7 +1252,7 @@ fn F() { // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] // CHECK:STDOUT: %impl.elem0: %.91d = impl_witness_access constants.%As.impl_witness.0ef, element0 [concrete = constants.%Convert.489] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_13.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.1: %i16 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.f90] @@ -1280,15 +1282,15 @@ fn F() { // CHECK:STDOUT: %As.type.a96: type = facet_type <@As, @As(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.be5: type = fn_type @Convert.1, @As(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.0ef: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.5, @impl.686(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.172: type = fn_type @Convert.6, @impl.686(%int_16) [concrete] // CHECK:STDOUT: %Convert.489: %Convert.type.172 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.a96 = facet_value Core.IntLiteral, (%As.impl_witness.0ef) [concrete] // CHECK:STDOUT: %.91d: type = fn_type_with_self_type %Convert.type.be5, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.489 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.5(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.489, @Convert.6(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1343,7 +1345,7 @@ fn F() { // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] // CHECK:STDOUT: %impl.elem0: %.91d = impl_witness_access constants.%As.impl_witness.0ef, element0 [concrete = constants.%Convert.489] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_13.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.1: %i16 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.f90] @@ -1370,15 +1372,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.adb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.fa6: type = fn_type @Convert.1, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.97b: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.2, @impl.4f9(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.3, @impl.4f9(%int_16) [concrete] // CHECK:STDOUT: %Convert.d0a: %Convert.type.33c = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] -// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.6f2: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] +// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet.6f2 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.d0a [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.2(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.3(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1423,7 +1425,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_3: init %i16 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.f90] @@ -1455,15 +1457,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.adb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.fa6: type = fn_type @Convert.1, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.97b: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.2, @impl.4f9(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.3, @impl.4f9(%int_16) [concrete] // CHECK:STDOUT: %Convert.d0a: %Convert.type.33c = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] -// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.6f2: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] +// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet.6f2 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.d0a [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.2(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.3(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1508,7 +1510,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_3: init %i16 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.f90] @@ -1540,15 +1542,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.adb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.fa6: type = fn_type @Convert.1, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.97b: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.2, @impl.4f9(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.3, @impl.4f9(%int_16) [concrete] // CHECK:STDOUT: %Convert.d0a: %Convert.type.33c = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] -// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.6f2: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] +// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet.6f2 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.d0a [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.2(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.3(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: %ptr.251: type = ptr_type %i16 [concrete] @@ -1594,7 +1596,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_3: init %i16 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.f90] @@ -1627,15 +1629,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.adb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] // CHECK:STDOUT: %Convert.type.fa6: type = fn_type @Convert.1, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.97b: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_16) [concrete] -// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.2, @impl.4f9(%int_16) [concrete] +// CHECK:STDOUT: %Convert.type.33c: type = fn_type @Convert.3, @impl.4f9(%int_16) [concrete] // CHECK:STDOUT: %Convert.d0a: %Convert.type.33c = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] -// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.6f2: %ImplicitAs.type.adb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.97b) [concrete] +// CHECK:STDOUT: %.236: type = fn_type_with_self_type %Convert.type.fa6, %ImplicitAs.facet.6f2 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.d0a [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.2(%int_16) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.d0a, @Convert.3(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: %ptr.251: type = ptr_type %i16 [concrete] @@ -1681,7 +1683,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.236 = impl_witness_access constants.%ImplicitAs.impl_witness.97b, element0 [concrete = constants.%Convert.d0a] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_16) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_16) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i16 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_3: init %i16 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.f90] diff --git a/toolchain/check/testdata/interop/cpp/function_param_int32.carbon b/toolchain/check/testdata/interop/cpp/function_param_int32.carbon index e6eed6e9f5de..847601ca5cfb 100644 --- a/toolchain/check/testdata/interop/cpp/function_param_int32.carbon +++ b/toolchain/check/testdata/interop/cpp/function_param_int32.carbon @@ -369,15 +369,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -430,7 +430,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -460,15 +460,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2147483647.d89, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2147483647.d89, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2147483647.a74: %i32 = int_value 2147483647 [concrete] // CHECK:STDOUT: } @@ -521,7 +521,7 @@ fn F() { // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_2147483647, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_2147483647, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_11.2(%int_2147483647) [concrete = constants.%int_2147483647.a74] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2147483647.a74] @@ -551,15 +551,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2147483648.1db, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2147483648.1db, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2147483648.8df: %i32 = int_value 2147483648 [concrete] // CHECK:STDOUT: } @@ -612,7 +612,7 @@ fn F() { // CHECK:STDOUT: %int_2147483648: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_2147483648, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int_2147483648, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc12_11.2(%int_2147483648) [concrete = constants.%int_2147483648.8df] // CHECK:STDOUT: %.loc12_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2147483648.8df] @@ -639,27 +639,27 @@ fn F() { // CHECK:STDOUT: %int_2147483648: Core.IntLiteral = int_value 2147483648 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Negate.impl_witness.561: = impl_witness imports.%Negate.impl_witness_table.e09 [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.561) [concrete] -// CHECK:STDOUT: %.63a: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] -// CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %int_2147483648, %Op.bba [concrete] +// CHECK:STDOUT: %Negate.impl_witness.973: = impl_witness imports.%Negate.impl_witness_table.b22 [concrete] +// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.973) [concrete] +// CHECK:STDOUT: %.d3d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.7 [concrete] +// CHECK:STDOUT: %Op.99f: %Op.type.18a = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %int_2147483648, %Op.99f [concrete] // CHECK:STDOUT: %int_-2147483648.3b9: Core.IntLiteral = int_value -2147483648 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_-2147483648.3b9, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_-2147483648.3b9, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_-2147483648.95c: %i32 = int_value -2147483648 [concrete] // CHECK:STDOUT: } @@ -689,8 +689,9 @@ fn F() { // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.c15: %Op.type.1be = import_ref Core//prelude/operators/arithmetic, loc94_31, loaded [concrete = constants.%Op.bba] -// CHECK:STDOUT: %Negate.impl_witness_table.e09 = impl_witness_table (%Core.import_ref.c15), @impl.8cb [concrete] +// CHECK:STDOUT: %Core.import_ref.abd9 = import_ref Core//prelude/operators/arithmetic, loc111_50, unloaded +// CHECK:STDOUT: %Core.import_ref.5e6a: %Op.type.18a = import_ref Core//prelude/operators/arithmetic, loc112_31, loaded [concrete = constants.%Op.99f] +// CHECK:STDOUT: %Negate.impl_witness_table.b22 = impl_witness_table (%Core.import_ref.abd9, %Core.import_ref.5e6a), @impl.0ef [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] @@ -714,12 +715,12 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, imports.%foo.decl [concrete = constants.%foo] // CHECK:STDOUT: %int_2147483648: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648] -// CHECK:STDOUT: %impl.elem0.loc7_11.1: %.63a = impl_witness_access constants.%Negate.impl_witness.561, element0 [concrete = constants.%Op.bba] -// CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_2147483648, %impl.elem0.loc7_11.1 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem1: %.d3d = impl_witness_access constants.%Negate.impl_witness.973, element1 [concrete = constants.%Op.99f] +// CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_2147483648, %impl.elem1 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method.loc7_11.1(%int_2147483648) [concrete = constants.%int_-2147483648.3b9] -// CHECK:STDOUT: %impl.elem0.loc7_11.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int.snegate, %impl.elem0.loc7_11.2 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc7_11.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int.snegate, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.3: = bound_method %int.snegate, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %.loc7_11.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-2147483648.3b9] // CHECK:STDOUT: %.loc7_11.2: Core.IntLiteral = converted %int.snegate, %.loc7_11.1 [concrete = constants.%int_-2147483648.3b9] @@ -748,27 +749,27 @@ fn F() { // CHECK:STDOUT: %int_2147483649: Core.IntLiteral = int_value 2147483649 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %Negate.impl_witness.561: = impl_witness imports.%Negate.impl_witness_table.e09 [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.561) [concrete] -// CHECK:STDOUT: %.63a: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] -// CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [concrete] -// CHECK:STDOUT: %Op.bound: = bound_method %int_2147483649, %Op.bba [concrete] +// CHECK:STDOUT: %Negate.impl_witness.973: = impl_witness imports.%Negate.impl_witness_table.b22 [concrete] +// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.973) [concrete] +// CHECK:STDOUT: %.d3d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.7 [concrete] +// CHECK:STDOUT: %Op.99f: %Op.type.18a = struct_value () [concrete] +// CHECK:STDOUT: %Op.bound: = bound_method %int_2147483649, %Op.99f [concrete] // CHECK:STDOUT: %int_-2147483649.df1: Core.IntLiteral = int_value -2147483649 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_-2147483649.df1, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_-2147483649.df1, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_-2147483649.74e: %i32 = int_value -2147483649 [concrete] // CHECK:STDOUT: } @@ -798,8 +799,9 @@ fn F() { // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.c15: %Op.type.1be = import_ref Core//prelude/operators/arithmetic, loc94_31, loaded [concrete = constants.%Op.bba] -// CHECK:STDOUT: %Negate.impl_witness_table.e09 = impl_witness_table (%Core.import_ref.c15), @impl.8cb [concrete] +// CHECK:STDOUT: %Core.import_ref.abd9 = import_ref Core//prelude/operators/arithmetic, loc111_50, unloaded +// CHECK:STDOUT: %Core.import_ref.5e6a: %Op.type.18a = import_ref Core//prelude/operators/arithmetic, loc112_31, loaded [concrete = constants.%Op.99f] +// CHECK:STDOUT: %Negate.impl_witness_table.b22 = impl_witness_table (%Core.import_ref.abd9, %Core.import_ref.5e6a), @impl.0ef [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] @@ -823,12 +825,12 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, imports.%foo.decl [concrete = constants.%foo] // CHECK:STDOUT: %int_2147483649: Core.IntLiteral = int_value 2147483649 [concrete = constants.%int_2147483649] -// CHECK:STDOUT: %impl.elem0.loc12_11.1: %.63a = impl_witness_access constants.%Negate.impl_witness.561, element0 [concrete = constants.%Op.bba] -// CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_2147483649, %impl.elem0.loc12_11.1 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %impl.elem1: %.d3d = impl_witness_access constants.%Negate.impl_witness.973, element1 [concrete = constants.%Op.99f] +// CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_2147483649, %impl.elem1 [concrete = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method.loc12_11.1(%int_2147483649) [concrete = constants.%int_-2147483649.df1] -// CHECK:STDOUT: %impl.elem0.loc12_11.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int.snegate, %impl.elem0.loc12_11.2 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc12_11.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int.snegate, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.3: = bound_method %int.snegate, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %.loc12_11.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-2147483649.df1] // CHECK:STDOUT: %.loc12_11.2: Core.IntLiteral = converted %int.snegate, %.loc12_11.1 [concrete = constants.%int_-2147483649.df1] @@ -860,15 +862,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -921,7 +923,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -951,15 +953,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1012,7 +1014,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -1042,15 +1044,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1103,7 +1105,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -1134,15 +1136,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -1207,14 +1209,14 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc7_11: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0.loc7_11 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc7_11: = specific_function %impl.elem0.loc7_11, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7_11: = specific_function %impl.elem0.loc7_11, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn.loc7_11 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc7_11: init %i32 = call %bound_method.loc7_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked.loc7_11 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.2: %i32 = converted %int_1, %.loc7_11.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc7_14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_14.1: = bound_method %int_2, %impl.elem0.loc7_14 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc7_14: = specific_function %impl.elem0.loc7_14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7_14: = specific_function %impl.elem0.loc7_14, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_14.2: = bound_method %int_2, %specific_fn.loc7_14 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc7_14: init %i32 = call %bound_method.loc7_14.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc7_14.1: %i32 = value_of_initializer %int.convert_checked.loc7_14 [concrete = constants.%int_2.ef8] @@ -1245,15 +1247,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -1348,14 +1350,14 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc7_12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_12.1: = bound_method %int_1, %impl.elem0.loc7_12 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc7_12: = specific_function %impl.elem0.loc7_12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7_12: = specific_function %impl.elem0.loc7_12, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_12.2: = bound_method %int_1, %specific_fn.loc7_12 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc7_12: init %i32 = call %bound_method.loc7_12.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_12.1: %i32 = value_of_initializer %int.convert_checked.loc7_12 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_12.2: %i32 = converted %int_1, %.loc7_12.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc7_15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_15.1: = bound_method %int_2, %impl.elem0.loc7_15 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc7_15: = specific_function %impl.elem0.loc7_15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7_15: = specific_function %impl.elem0.loc7_15, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_15.2: = bound_method %int_2, %specific_fn.loc7_15 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc7_15: init %i32 = call %bound_method.loc7_15.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc7_15.1: %i32 = value_of_initializer %int.convert_checked.loc7_15 [concrete = constants.%int_2.ef8] @@ -1367,14 +1369,14 @@ fn F() { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc8_12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %int_3, %impl.elem0.loc8_12 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc8_12: = specific_function %impl.elem0.loc8_12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8_12: = specific_function %impl.elem0.loc8_12, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %int_3, %specific_fn.loc8_12 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc8_12: init %i32 = call %bound_method.loc8_12.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc8_12.1: %i32 = value_of_initializer %int.convert_checked.loc8_12 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc8_12.2: %i32 = converted %int_3, %.loc8_12.1 [concrete = constants.%int_3.822] // CHECK:STDOUT: %impl.elem0.loc8_15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %int_4, %impl.elem0.loc8_15 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc8_15: = specific_function %impl.elem0.loc8_15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8_15: = specific_function %impl.elem0.loc8_15, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %int_4, %specific_fn.loc8_15 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc8_15: init %i32 = call %bound_method.loc8_15.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc8_15.1: %i32 = value_of_initializer %int.convert_checked.loc8_15 [concrete = constants.%int_4.940] @@ -1406,15 +1408,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1467,7 +1469,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -1557,15 +1559,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1618,7 +1620,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -1648,15 +1650,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1709,7 +1711,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] @@ -1736,15 +1738,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1789,7 +1791,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] @@ -1821,15 +1823,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -1874,7 +1876,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] @@ -1906,15 +1908,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] @@ -1960,7 +1962,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] @@ -1993,15 +1995,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] @@ -2047,7 +2049,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 520e78777856..969efc51d367 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -600,15 +600,15 @@ impl i32 as Empty { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -655,7 +655,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc5_20.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc5_20.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc5_20.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -683,18 +683,18 @@ impl i32 as Empty { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] @@ -746,7 +746,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_22.1: = bound_method %int_0, %impl.elem0.loc6 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_22.2: = bound_method %int_0, %specific_fn.loc6 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %bound_method.loc6_22.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_22.1: %i32 = value_of_initializer %int.convert_checked.loc6 [concrete = constants.%int_0.6a9] @@ -759,7 +759,7 @@ impl i32 as Empty { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc9: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_11.1: = bound_method %int_1, %impl.elem0.loc9 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_11.2: = bound_method %int_1, %specific_fn.loc9 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %bound_method.loc9_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_11.1: %i32 = value_of_initializer %int.convert_checked.loc9 [concrete = constants.%int_1.5d2] @@ -985,15 +985,15 @@ impl i32 as Empty { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -1046,7 +1046,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_20.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc11_20.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc11_20.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/let/convert.carbon b/toolchain/check/testdata/let/convert.carbon index 64a629e9e97f..b1e77e9f77b4 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -40,15 +40,15 @@ fn F() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -103,7 +103,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc15_36.1: %tuple.type.37f = tuple_literal (%int_1.loc15, %int_2, %int_3) // CHECK:STDOUT: %impl.elem0.loc15_36.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_36.1: = bound_method %int_1.loc15, %impl.elem0.loc15_36.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc15_36.1: = specific_function %impl.elem0.loc15_36.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_36.1: = specific_function %impl.elem0.loc15_36.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_36.2: = bound_method %int_1.loc15, %specific_fn.loc15_36.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc15_36.1: init %i32 = call %bound_method.loc15_36.2(%int_1.loc15) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_36.2: init %i32 = converted %int_1.loc15, %int.convert_checked.loc15_36.1 [concrete = constants.%int_1.5d2] @@ -111,7 +111,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc15_36.3: init %i32 = initialize_from %.loc15_36.2 to %tuple.elem0 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc15_36.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_36.3: = bound_method %int_2, %impl.elem0.loc15_36.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc15_36.2: = specific_function %impl.elem0.loc15_36.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_36.2: = specific_function %impl.elem0.loc15_36.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_36.4: = bound_method %int_2, %specific_fn.loc15_36.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc15_36.2: init %i32 = call %bound_method.loc15_36.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc15_36.4: init %i32 = converted %int_2, %int.convert_checked.loc15_36.2 [concrete = constants.%int_2.ef8] @@ -119,7 +119,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc15_36.5: init %i32 = initialize_from %.loc15_36.4 to %tuple.elem1.loc15 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %impl.elem0.loc15_36.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_36.5: = bound_method %int_3, %impl.elem0.loc15_36.3 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc15_36.3: = specific_function %impl.elem0.loc15_36.3, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_36.3: = specific_function %impl.elem0.loc15_36.3, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_36.6: = bound_method %int_3, %specific_fn.loc15_36.3 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc15_36.3: init %i32 = call %bound_method.loc15_36.6(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc15_36.6: init %i32 = converted %int_3, %int.convert_checked.loc15_36.3 [concrete = constants.%int_3.822] diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 80d409fce691..418d76672273 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -39,15 +39,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -90,7 +90,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_16.1: = bound_method %int_1, %impl.elem0.loc15 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_16.2: = bound_method %int_1, %specific_fn.loc15 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %bound_method.loc15_16.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_16.1: %i32 = value_of_initializer %int.convert_checked.loc15 [concrete = constants.%int_1.5d2] @@ -106,7 +106,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc23_16.1: = bound_method %int_2, %impl.elem0.loc23 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_16.2: = bound_method %int_2, %specific_fn.loc23 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %bound_method.loc23_16.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc23_16.1: %i32 = value_of_initializer %int.convert_checked.loc23 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index 337c7f904003..fe4167674bb8 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -42,9 +42,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] @@ -52,8 +52,8 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %Convert.type.2751f3.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.42ebb8.1: %Convert.type.2751f3.1 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ca0d85.1: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.d628ce.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type.ca0d85.2: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.d628ce.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.8b3)> [symbolic] +// CHECK:STDOUT: %ImplicitAs.assoc_type.ca0d85.2: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T.8b3) [symbolic] // CHECK:STDOUT: %assoc0.9f5e6b.2: %ImplicitAs.assoc_type.ca0d85.2 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] // CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0d85.1 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic] // CHECK:STDOUT: } @@ -104,18 +104,18 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %i32.loc16 [symbolic = constants.%T] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %i32.loc16 [symbolic = constants.%T.8b3] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type.7dcd0a.1 = binding_pattern x [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T)> [symbolic = constants.%ImplicitAs.type.d628ce.2] -// CHECK:STDOUT: %.loc24_14.1: %ImplicitAs.assoc_type.ca0d85.2 = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%T) [symbolic = constants.%assoc0.9f5e6b.2] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T.8b3] +// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T.8b3)> [symbolic = constants.%ImplicitAs.type.d628ce.2] +// CHECK:STDOUT: %.loc24_14.1: %ImplicitAs.assoc_type.ca0d85.2 = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%T.8b3) [symbolic = constants.%assoc0.9f5e6b.2] // CHECK:STDOUT: %Convert.ref: %ImplicitAs.assoc_type.ca0d85.2 = name_ref Convert, %.loc24_14.1 [symbolic = constants.%assoc0.9f5e6b.2] -// CHECK:STDOUT: %.loc24_14.2: %T = converted %int_5, [concrete = ] -// CHECK:STDOUT: %x: %T = bind_name x, [concrete = ] -// CHECK:STDOUT: %x.ref: %T = name_ref x, %x [concrete = ] +// CHECK:STDOUT: %.loc24_14.2: %T.8b3 = converted %int_5, [concrete = ] +// CHECK:STDOUT: %x: %T.8b3 = bind_name x, [concrete = ] +// CHECK:STDOUT: %x.ref: %T.8b3 = name_ref x, %x [concrete = ] // CHECK:STDOUT: %.loc32: %i32 = converted %x.ref, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index bcd90be31ba1..56616caf88bb 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -101,15 +101,15 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -149,7 +149,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_24.1: = bound_method @__global_init.%int_1.loc18, %impl.elem0.loc18 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_24.2: = bound_method @__global_init.%int_1.loc18, %specific_fn.loc18 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %bound_method.loc18_24.2(@__global_init.%int_1.loc18) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_24.1: %i32 = value_of_initializer %int.convert_checked.loc18 [concrete = constants.%int_1.5d2] @@ -164,7 +164,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc24: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc24_22.1: = bound_method @__global_init.%int_1.loc24, %impl.elem0.loc24 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_22.2: = bound_method @__global_init.%int_1.loc24, %specific_fn.loc24 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %bound_method.loc24_22.2(@__global_init.%int_1.loc24) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc24_22.1: %i32 = value_of_initializer %int.convert_checked.loc24 [concrete = constants.%int_1.5d2] @@ -179,7 +179,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc30: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc30_20.1: = bound_method @__global_init.%int_1.loc30, %impl.elem0.loc30 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc30_20.2: = bound_method @__global_init.%int_1.loc30, %specific_fn.loc30 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %bound_method.loc30_20.2(@__global_init.%int_1.loc30) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc30_20.1: %i32 = value_of_initializer %int.convert_checked.loc30 [concrete = constants.%int_1.5d2] @@ -194,7 +194,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc36: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc36_22.1: = bound_method @__global_init.%int_1.loc36, %impl.elem0.loc36 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc36: = specific_function %impl.elem0.loc36, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc36: = specific_function %impl.elem0.loc36, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc36_22.2: = bound_method @__global_init.%int_1.loc36, %specific_fn.loc36 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %bound_method.loc36_22.2(@__global_init.%int_1.loc36) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc36_22.1: %i32 = value_of_initializer %int.convert_checked.loc36 [concrete = constants.%int_1.5d2] @@ -209,7 +209,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc49: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc49_28.1: = bound_method @__global_init.%int_1.loc49, %impl.elem0.loc49 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc49: = specific_function %impl.elem0.loc49, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc49: = specific_function %impl.elem0.loc49, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc49_28.2: = bound_method @__global_init.%int_1.loc49, %specific_fn.loc49 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc49: init %i32 = call %bound_method.loc49_28.2(@__global_init.%int_1.loc49) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc49_28.1: %i32 = value_of_initializer %int.convert_checked.loc49 [concrete = constants.%int_1.5d2] @@ -224,7 +224,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc62: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc62_30.1: = bound_method @__global_init.%int_1.loc62, %impl.elem0.loc62 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc62: = specific_function %impl.elem0.loc62, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc62: = specific_function %impl.elem0.loc62, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc62_30.2: = bound_method @__global_init.%int_1.loc62, %specific_fn.loc62 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc62: init %i32 = call %bound_method.loc62_30.2(@__global_init.%int_1.loc62) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc62_30.1: %i32 = value_of_initializer %int.convert_checked.loc62 [concrete = constants.%int_1.5d2] @@ -239,7 +239,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc75: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc75_32.1: = bound_method @__global_init.%int_1.loc75, %impl.elem0.loc75 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc75: = specific_function %impl.elem0.loc75, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc75: = specific_function %impl.elem0.loc75, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc75_32.2: = bound_method @__global_init.%int_1.loc75, %specific_fn.loc75 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc75: init %i32 = call %bound_method.loc75_32.2(@__global_init.%int_1.loc75) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc75_32.1: %i32 = value_of_initializer %int.convert_checked.loc75 [concrete = constants.%int_1.5d2] @@ -254,7 +254,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc88: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc88_34.1: = bound_method @__global_init.%int_1.loc88, %impl.elem0.loc88 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc88: = specific_function %impl.elem0.loc88, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc88: = specific_function %impl.elem0.loc88, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc88_34.2: = bound_method @__global_init.%int_1.loc88, %specific_fn.loc88 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc88: init %i32 = call %bound_method.loc88_34.2(@__global_init.%int_1.loc88) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc88_34.1: %i32 = value_of_initializer %int.convert_checked.loc88 [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index 2e560a7237b7..2c43d3bac86c 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -29,15 +29,15 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -73,7 +73,7 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_14.1: = bound_method @__global_init.%int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_14.2: = bound_method @__global_init.%int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_14.2(@__global_init.%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_14.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 4a2969144a2e..0347549a0948 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -33,15 +33,15 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -96,7 +96,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_16.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_16.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_16.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_16.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/main_run/return_i32.carbon b/toolchain/check/testdata/main_run/return_i32.carbon index f7532067892a..fe2ed0fc8db9 100644 --- a/toolchain/check/testdata/main_run/return_i32.carbon +++ b/toolchain/check/testdata/main_run/return_i32.carbon @@ -28,15 +28,15 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -78,7 +78,7 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc13_27.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc13_27.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc13_27.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index 26bcdb340ff8..0844df8eef91 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -59,15 +59,15 @@ var a: i32 = NS.A(); // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -124,7 +124,7 @@ var a: i32 = NS.A(); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_28.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc4_28.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc4_28.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index 8759e363348a..5b3d92cd7d01 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -39,15 +39,15 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] @@ -121,7 +121,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_28.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc18_28.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc18_28.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index 6a63ece587a9..1fd35e873c9e 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -41,15 +41,15 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -93,7 +93,7 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_28.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc26_28.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc26_28.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index 9ad09110ead3..4973a4cd52f9 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -52,15 +52,15 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -126,7 +126,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %int_0.loc25: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_5.1: = bound_method %int_0.loc25, %impl.elem0.loc25 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_5.2: = bound_method %int_0.loc25, %specific_fn.loc25 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %bound_method.loc25_5.2(%int_0.loc25) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc25_5: init %i32 = converted %int_0.loc25, %int.convert_checked.loc25 [concrete = constants.%int_0.6a9] @@ -144,7 +144,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %int_0.loc30: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc30: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc30_11.1: = bound_method %int_0.loc30, %impl.elem0.loc30 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc30_11.2: = bound_method %int_0.loc30, %specific_fn.loc30 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %bound_method.loc30_11.2(%int_0.loc30) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc30_11.1: %i32 = value_of_initializer %int.convert_checked.loc30 [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index f850c061d908..adbfbe51fbd4 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -45,15 +45,16 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.1e1: %i32 = int_value 12 [concrete] // CHECK:STDOUT: %int_9.988: Core.IntLiteral = int_value 9 [concrete] @@ -63,7 +64,6 @@ fn Main() { // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete] // CHECK:STDOUT: %pattern_type.511: type = pattern_type %tuple.type.d07 [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] @@ -131,7 +131,7 @@ fn Main() { // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_3.1: = bound_method %int_12, %impl.elem0.loc15 [concrete = constants.%Convert.bound.221] -// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_3.2: = bound_method %int_12, %specific_fn.loc15 [concrete = constants.%bound_method.dae] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %bound_method.loc15_3.2(%int_12) [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %.loc15_3: init %i32 = converted %int_12, %int.convert_checked.loc15 [concrete = constants.%int_12.1e1] @@ -145,7 +145,7 @@ fn Main() { // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988] // CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_5.1: = bound_method %int_9, %impl.elem0.loc16 [concrete = constants.%Convert.bound.9e2] -// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_5.2: = bound_method %int_9, %specific_fn.loc16 [concrete = constants.%bound_method.cd3] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %bound_method.loc16_5.2(%int_9) [concrete = constants.%int_9.f88] // CHECK:STDOUT: %.loc16: init %i32 = converted %int_9, %int.convert_checked.loc16 [concrete = constants.%int_9.f88] @@ -160,7 +160,7 @@ fn Main() { // CHECK:STDOUT: %.loc18_28.1: %tuple.type.f94 = tuple_literal (%int_1.loc18, %int_2.loc18) // CHECK:STDOUT: %impl.elem0.loc18_28.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_28.1: = bound_method %int_1.loc18, %impl.elem0.loc18_28.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc18_28.1: = specific_function %impl.elem0.loc18_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18_28.1: = specific_function %impl.elem0.loc18_28.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_28.2: = bound_method %int_1.loc18, %specific_fn.loc18_28.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc18_28.1: init %i32 = call %bound_method.loc18_28.2(%int_1.loc18) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_28.2: init %i32 = converted %int_1.loc18, %int.convert_checked.loc18_28.1 [concrete = constants.%int_1.5d2] @@ -168,7 +168,7 @@ fn Main() { // CHECK:STDOUT: %.loc18_28.3: init %i32 = initialize_from %.loc18_28.2 to %tuple.elem0.loc18 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc18_28.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_28.3: = bound_method %int_2.loc18, %impl.elem0.loc18_28.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc18_28.2: = specific_function %impl.elem0.loc18_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18_28.2: = specific_function %impl.elem0.loc18_28.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_28.4: = bound_method %int_2.loc18, %specific_fn.loc18_28.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc18_28.2: init %i32 = call %bound_method.loc18_28.4(%int_2.loc18) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc18_28.4: init %i32 = converted %int_2.loc18, %int.convert_checked.loc18_28.2 [concrete = constants.%int_2.ef8] @@ -192,7 +192,7 @@ fn Main() { // CHECK:STDOUT: %int_3.loc19: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_7.1: = bound_method %int_3.loc19, %impl.elem0.loc19 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_7.2: = bound_method %int_3.loc19, %specific_fn.loc19 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %bound_method.loc19_7.2(%int_3.loc19) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc19: init %i32 = converted %int_3.loc19, %int.convert_checked.loc19 [concrete = constants.%int_3.822] @@ -203,7 +203,7 @@ fn Main() { // CHECK:STDOUT: %int_4.loc20: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc20: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_7.1: = bound_method %int_4.loc20, %impl.elem0.loc20 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_7.2: = bound_method %int_4.loc20, %specific_fn.loc20 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %bound_method.loc20_7.2(%int_4.loc20) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc20: init %i32 = converted %int_4.loc20, %int.convert_checked.loc20 [concrete = constants.%int_4.940] @@ -218,7 +218,7 @@ fn Main() { // CHECK:STDOUT: %.loc22_46.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc22, %int_2.loc22) // CHECK:STDOUT: %impl.elem0.loc22_46.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_46.1: = bound_method %int_1.loc22, %impl.elem0.loc22_46.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc22_46.1: = specific_function %impl.elem0.loc22_46.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc22_46.1: = specific_function %impl.elem0.loc22_46.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_46.2: = bound_method %int_1.loc22, %specific_fn.loc22_46.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc22_46.1: init %i32 = call %bound_method.loc22_46.2(%int_1.loc22) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc22_46.2: init %i32 = converted %int_1.loc22, %int.convert_checked.loc22_46.1 [concrete = constants.%int_1.5d2] @@ -226,7 +226,7 @@ fn Main() { // CHECK:STDOUT: %.loc22_46.4: init %i32 = initialize_from %.loc22_46.2 to %.loc22_46.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc22_46.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc22_46.3: = bound_method %int_2.loc22, %impl.elem0.loc22_46.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc22_46.2: = specific_function %impl.elem0.loc22_46.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc22_46.2: = specific_function %impl.elem0.loc22_46.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_46.4: = bound_method %int_2.loc22, %specific_fn.loc22_46.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc22_46.2: init %i32 = call %bound_method.loc22_46.4(%int_2.loc22) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc22_46.5: init %i32 = converted %int_2.loc22, %int.convert_checked.loc22_46.2 [concrete = constants.%int_2.ef8] @@ -248,7 +248,7 @@ fn Main() { // CHECK:STDOUT: %int_3.loc23: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %impl.elem0.loc23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc23_7.1: = bound_method %int_3.loc23, %impl.elem0.loc23 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_7.2: = bound_method %int_3.loc23, %specific_fn.loc23 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %bound_method.loc23_7.2(%int_3.loc23) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc23_7: init %i32 = converted %int_3.loc23, %int.convert_checked.loc23 [concrete = constants.%int_3.822] @@ -258,7 +258,7 @@ fn Main() { // CHECK:STDOUT: %int_4.loc24: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %impl.elem0.loc24: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc24_7.1: = bound_method %int_4.loc24, %impl.elem0.loc24 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_7.2: = bound_method %int_4.loc24, %specific_fn.loc24 [concrete = constants.%bound_method.1da] // CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %bound_method.loc24_7.2(%int_4.loc24) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc24_7: init %i32 = converted %int_4.loc24, %int.convert_checked.loc24 [concrete = constants.%int_4.940] @@ -283,7 +283,7 @@ fn Main() { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %impl.elem0.loc27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc27_6.1: = bound_method %int_5, %impl.elem0.loc27 [concrete = constants.%Convert.bound.4e6] -// CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_6.2: = bound_method %int_5, %specific_fn.loc27 [concrete = constants.%bound_method.a25] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %bound_method.loc27_6.2(%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc27_6: init %i32 = converted %int_5, %int.convert_checked.loc27 [concrete = constants.%int_5.0f6] @@ -307,7 +307,7 @@ fn Main() { // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10.64f] // CHECK:STDOUT: %impl.elem0.loc29: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_29.1: = bound_method %int_10, %impl.elem0.loc29 [concrete = constants.%Convert.bound.491] -// CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_29.2: = bound_method %int_10, %specific_fn.loc29 [concrete = constants.%bound_method.5ba] // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %bound_method.loc29_29.2(%int_10) [concrete = constants.%int_10.265] // CHECK:STDOUT: %.loc29_29: init %i32 = converted %int_10, %int.convert_checked.loc29 [concrete = constants.%int_10.265] diff --git a/toolchain/check/testdata/operators/builtin/bit_and.carbon b/toolchain/check/testdata/operators/builtin/bit_and.carbon index cc51a1a431a9..611a01fb3b81 100644 --- a/toolchain/check/testdata/operators/builtin/bit_and.carbon +++ b/toolchain/check/testdata/operators/builtin/bit_and.carbon @@ -48,7 +48,7 @@ fn F3[T:! J & K](t: T) {} library "[[@TEST_NAME]]"; class J { adapt {}; } -impl J as Core.BitAnd { +impl J as Core.BitAndWith(J) where .Result = J { fn Op[self: Self](other: Self) -> Self { return {} as J; } } @@ -66,7 +66,7 @@ class J { adapt {}; } fn F() { let a: J = {} as J; let b: J = {} as J; - // CHECK:STDERR: fail_bit_and_values_no_impl.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.BitAnd` in type `J` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_bit_and_values_no_impl.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.BitAndWith(J)` in type `J` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: a & b; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index 9d916e0ee3c5..50637f90df80 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -79,15 +79,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] @@ -162,7 +162,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc26: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_7.1: = bound_method %int_1.loc26, %impl.elem0.loc26 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_7.2: = bound_method %int_1.loc26, %specific_fn.loc26 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %bound_method.loc26_7.2(%int_1.loc26) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc26: init %i32 = converted %int_1.loc26, %int.convert_checked.loc26 [concrete = constants.%int_1.5d2] @@ -190,7 +190,7 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc32_3.1: = bound_method %int_0, %impl.elem0.loc32 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_3.2: = bound_method %int_0, %specific_fn.loc32 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %bound_method.loc32_3.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc32_3: init %i32 = converted %int_0, %int.convert_checked.loc32 [concrete = constants.%int_0.6a9] @@ -208,7 +208,7 @@ fn Main() { // CHECK:STDOUT: %.loc37_17.1: %tuple.type.f94 = tuple_literal (%int_1.loc37, %int_2.loc37) // CHECK:STDOUT: %impl.elem0.loc37_17.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc37_17.1: = bound_method %int_1.loc37, %impl.elem0.loc37_17.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc37_17.1: = specific_function %impl.elem0.loc37_17.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc37_17.1: = specific_function %impl.elem0.loc37_17.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc37_17.2: = bound_method %int_1.loc37, %specific_fn.loc37_17.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc37_17.1: init %i32 = call %bound_method.loc37_17.2(%int_1.loc37) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc37_17.2: init %i32 = converted %int_1.loc37, %int.convert_checked.loc37_17.1 [concrete = constants.%int_1.5d2] @@ -216,7 +216,7 @@ fn Main() { // CHECK:STDOUT: %.loc37_17.3: init %i32 = initialize_from %.loc37_17.2 to %tuple.elem0.loc37 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc37_17.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc37_17.3: = bound_method %int_2.loc37, %impl.elem0.loc37_17.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc37_17.2: = specific_function %impl.elem0.loc37_17.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc37_17.2: = specific_function %impl.elem0.loc37_17.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc37_17.4: = bound_method %int_2.loc37, %specific_fn.loc37_17.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc37_17.2: init %i32 = call %bound_method.loc37_17.4(%int_2.loc37) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc37_17.4: init %i32 = converted %int_2.loc37, %int.convert_checked.loc37_17.2 [concrete = constants.%int_2.ef8] @@ -259,7 +259,7 @@ fn Main() { // CHECK:STDOUT: %i32.loc52: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc52_12: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc52_12.1: = bound_method %int_1.loc52, %impl.elem0.loc52_12 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc52_12: = specific_function %impl.elem0.loc52_12, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc52_12: = specific_function %impl.elem0.loc52_12, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc52_12.2: = bound_method %int_1.loc52, %specific_fn.loc52_12 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc52_12: init %i32 = call %bound_method.loc52_12.2(%int_1.loc52) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc52_12.1: %i32 = value_of_initializer %int.convert_checked.loc52_12 [concrete = constants.%int_1.5d2] @@ -270,7 +270,7 @@ fn Main() { // CHECK:STDOUT: %int_2.loc52: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc52_19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc52_19.1: = bound_method %int_2.loc52, %impl.elem0.loc52_19 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc52_19: = specific_function %impl.elem0.loc52_19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc52_19: = specific_function %impl.elem0.loc52_19, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc52_19.2: = bound_method %int_2.loc52, %specific_fn.loc52_19 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc52_19: init %i32 = call %bound_method.loc52_19.2(%int_2.loc52) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc52_19.1: %i32 = value_of_initializer %int.convert_checked.loc52_19 [concrete = constants.%int_2.ef8] @@ -282,7 +282,7 @@ fn Main() { // CHECK:STDOUT: %int_3.loc52: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %impl.elem0.loc52_27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc52_27.1: = bound_method %int_3.loc52, %impl.elem0.loc52_27 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc52_27: = specific_function %impl.elem0.loc52_27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc52_27: = specific_function %impl.elem0.loc52_27, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc52_27.2: = bound_method %int_3.loc52, %specific_fn.loc52_27 [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked.loc52_27: init %i32 = call %bound_method.loc52_27.2(%int_3.loc52) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc52_27: init %i32 = converted %int_3.loc52, %int.convert_checked.loc52_27 [concrete = constants.%int_3.822] @@ -315,7 +315,7 @@ fn Main() { // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10.64f] // CHECK:STDOUT: %impl.elem0.loc60: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc60_27.1: = bound_method %int_10, %impl.elem0.loc60 [concrete = constants.%Convert.bound.491] -// CHECK:STDOUT: %specific_fn.loc60: = specific_function %impl.elem0.loc60, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc60: = specific_function %impl.elem0.loc60, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc60_27.2: = bound_method %int_10, %specific_fn.loc60 [concrete = constants.%bound_method.5ba] // CHECK:STDOUT: %int.convert_checked.loc60: init %i32 = call %bound_method.loc60_27.2(%int_10) [concrete = constants.%int_10.265] // CHECK:STDOUT: %.loc60_27: init %i32 = converted %int_10, %int.convert_checked.loc60 [concrete = constants.%int_10.265] diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index 3bea1ce7d9eb..0d3ff514c0d2 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -43,15 +43,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Main.type: type = fn_type @Main [concrete] @@ -99,7 +99,7 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_25.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_25.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_25.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc14_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -117,7 +117,7 @@ fn Main() { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_3.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_3.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method.047] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc17_3.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc17_3: init %i32 = converted %int_3, %int.convert_checked [concrete = constants.%int_3.822] 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 181666ec8b5c..58ac68a83c1c 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -39,15 +39,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1ba, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %float: f64 = float_literal 5.6000000000000005 [concrete] @@ -85,7 +85,7 @@ fn Main() { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_3.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_3.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_3.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc15_3: init %i32 = converted %int_3, %int.convert_checked [concrete = constants.%int_3.822] diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon index 36f03262f78a..c43a5b57a286 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon @@ -14,7 +14,7 @@ fn Main() -> i32 { // The following line has two mismatches, but after the first, it shouldn't // keep erroring. - // CHECK:STDERR: fail_type_mismatch_once.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Add` in type `{}` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_type_mismatch_once.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.AddWith(f64)` in type `{}` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return {} + 3.4 + 12; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -33,19 +33,20 @@ fn Main() -> i32 { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %float: f64 = float_literal 3.4000000000000004 [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] +// CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete] // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Add = %Core.Add +// CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] +// CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -70,7 +71,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %.loc21: %empty_struct_type = struct_literal () // CHECK:STDOUT: %float: f64 = float_literal 3.4000000000000004 [concrete = constants.%float] // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] +// CHECK:STDOUT: %impl.elem1: = impl_witness_access , element1 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon index 8f358b644171..05ca536d7f9e 100644 --- a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon @@ -12,7 +12,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon fn Main() -> i32 { - // CHECK:STDERR: fail_unimplemented_op.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Add` in type `{}` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_unimplemented_op.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.AddWith(Core.IntLiteral)` in type `{}` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return {} + 34; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -31,18 +31,19 @@ fn Main() -> i32 { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] +// CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Add = %Core.Add +// CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] +// CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index 15a5190042df..b8c4d323cd16 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -17,205 +17,59 @@ package User; class C {}; -impl C as Core.Add { +impl C as Core.AddWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.AddAssign { +impl C as Core.AddAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a + b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a += b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- add.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] -// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Add.impl_witness: = impl_witness file.%Add.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.7a3: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.c84: %Op.type.7a3 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %C, (%Add.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [concrete] -// CHECK:STDOUT: %Op.type.421: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness file.%AddAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %AddWith.type.ffb: type = facet_type <@AddWith, @AddWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.45e: type = fn_type @Op.1, @AddWith(%C) [concrete] +// CHECK:STDOUT: %AddWith.impl_witness: = impl_witness file.%AddWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.638: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.276: %Op.type.638 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.facet.3ef: %AddWith.type.ffb = facet_value %C, (%AddWith.impl_witness) [concrete] +// CHECK:STDOUT: %AddAssignWith.type.393: type = facet_type <@AddAssignWith, @AddAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.5af: type = fn_type @Op.7, @AddAssignWith(%C) [concrete] +// CHECK:STDOUT: %AddAssignWith.impl_witness: = impl_witness file.%AddAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.0b8: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.d8e: %Op.type.0b8 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, (%AddAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.de4: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.6d3: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.0d7: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.572: %Op.type.0d7 = struct_value () [concrete] +// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.393 = facet_value %C, (%AddAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.268: type = fn_type_with_self_type %Op.type.45e, %AddWith.facet.3ef [concrete] +// CHECK:STDOUT: %.e2d: type = fn_type_with_self_type %Op.type.5af, %AddAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Add = %Core.Add -// CHECK:STDOUT: .AddAssign = %Core.AddAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] -// CHECK:STDOUT: %Core.AddAssign: type = import_ref Core//prelude/operators/arithmetic, AddAssign, loaded [concrete = constants.%AddAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.b32 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%Core.Add [concrete = constants.%Add.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (@impl.b32.%Op.decl), @impl.b32 [concrete] -// CHECK:STDOUT: %Add.impl_witness: = impl_witness %Add.impl_witness_table [concrete = constants.%Add.impl_witness] -// CHECK:STDOUT: impl_decl @impl.14c [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%Core.AddAssign [concrete = constants.%AddAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %AddAssign.impl_witness_table = impl_witness_table (@impl.14c.%Op.decl), @impl.14c [concrete] -// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness %AddAssign.impl_witness_table [concrete = constants.%AddAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.b32: %C.ref as %Add.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.7a3 = fn_decl @Op.2 [concrete = constants.%Op.c84] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Add.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.14c: %C.ref as %AddAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.0b8 = fn_decl @Op.4 [concrete = constants.%Op.d8e] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%AddAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.de4 = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.c84] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.268 = impl_witness_access constants.%AddWith.impl_witness, element1 [concrete = constants.%Op.276] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +77,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.6d3 = impl_witness_access constants.%AddAssign.impl_witness, element0 [concrete = constants.%Op.d8e] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.e2d = impl_witness_access constants.%AddAssignWith.impl_witness, element0 [concrete = constants.%Op.572] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/binary_op.carbon.tmpl b/toolchain/check/testdata/operators/overloaded/binary_op.carbon.tmpl index f90d2901cd40..ab37f8839991 100644 --- a/toolchain/check/testdata/operators/overloaded/binary_op.carbon.tmpl +++ b/toolchain/check/testdata/operators/overloaded/binary_op.carbon.tmpl @@ -13,19 +13,23 @@ package User; class C {}; -impl C as Core.INTERFACE { +impl C as Core.INTERFACEWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.INTERFACEAssign { +impl C as Core.INTERFACEAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a OP b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a OP= b; + //@dump-sem-ir-end } diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index 9ca2ff1c4d1a..be7b016b218e 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -17,205 +17,59 @@ package User; class C {}; -impl C as Core.BitAnd { +impl C as Core.BitAndWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.BitAndAssign { +impl C as Core.BitAndAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a & b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a &= b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- bit_and.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete] -// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness file.%BitAnd.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.45e: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.c43: %Op.type.45e = struct_value () [concrete] -// CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %C, (%BitAnd.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %BitAndAssign.type: type = facet_type <@BitAndAssign> [concrete] -// CHECK:STDOUT: %Op.type.93f: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %BitAndAssign.impl_witness: = impl_witness file.%BitAndAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %BitAndWith.type.e40: type = facet_type <@BitAndWith, @BitAndWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.914: type = fn_type @Op.1, @BitAndWith(%C) [concrete] +// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness file.%BitAndWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.bcc: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.c46: %Op.type.bcc = struct_value () [concrete] +// CHECK:STDOUT: %BitAndWith.facet.783: %BitAndWith.type.e40 = facet_value %C, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %BitAndAssignWith.type.e85: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.73d: type = fn_type @Op.7, @BitAndAssignWith(%C) [concrete] +// CHECK:STDOUT: %BitAndAssignWith.impl_witness: = impl_witness file.%BitAndAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.969: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.747: %Op.type.969 = struct_value () [concrete] -// CHECK:STDOUT: %BitAndAssign.facet: %BitAndAssign.type = facet_value %C, (%BitAndAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.670: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.c09: type = fn_type_with_self_type %Op.type.93f, %BitAndAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.115: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.270: %Op.type.115 = struct_value () [concrete] +// CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.e85 = facet_value %C, (%BitAndAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.04a: type = fn_type_with_self_type %Op.type.914, %BitAndWith.facet.783 [concrete] +// CHECK:STDOUT: %.554: type = fn_type_with_self_type %Op.type.73d, %BitAndAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitAnd = %Core.BitAnd -// CHECK:STDOUT: .BitAndAssign = %Core.BitAndAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitAnd: type = import_ref Core//prelude/operators/bitwise, BitAnd, loaded [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: %Core.BitAndAssign: type = import_ref Core//prelude/operators/bitwise, BitAndAssign, loaded [concrete = constants.%BitAndAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.c1a [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, imports.%Core.BitAnd [concrete = constants.%BitAnd.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.c1a.%Op.decl), @impl.c1a [concrete] -// CHECK:STDOUT: %BitAnd.impl_witness: = impl_witness %BitAnd.impl_witness_table [concrete = constants.%BitAnd.impl_witness] -// CHECK:STDOUT: impl_decl @impl.4ac [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %BitAndAssign.ref: type = name_ref BitAndAssign, imports.%Core.BitAndAssign [concrete = constants.%BitAndAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %BitAndAssign.impl_witness_table = impl_witness_table (@impl.4ac.%Op.decl), @impl.4ac [concrete] -// CHECK:STDOUT: %BitAndAssign.impl_witness: = impl_witness %BitAndAssign.impl_witness_table [concrete = constants.%BitAndAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.c1a: %C.ref as %BitAnd.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.45e = fn_decl @Op.2 [concrete = constants.%Op.c43] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%BitAnd.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.4ac: %C.ref as %BitAndAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.969 = fn_decl @Op.4 [concrete = constants.%Op.747] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%BitAndAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.670 = impl_witness_access constants.%BitAnd.impl_witness, element0 [concrete = constants.%Op.c43] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.04a = impl_witness_access constants.%BitAndWith.impl_witness, element1 [concrete = constants.%Op.c46] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +77,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.c09 = impl_witness_access constants.%BitAndAssign.impl_witness, element0 [concrete = constants.%Op.747] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.554 = impl_witness_access constants.%BitAndAssignWith.impl_witness, element0 [concrete = constants.%Op.270] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index 3d0239c225c5..d51f30816501 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -17,118 +17,40 @@ package User; class C {}; -impl C as Core.BitComplement { +impl C as Core.BitComplement where .Result = C { fn Op[self: C]() -> C { return {}; } } fn TestOp(a: C) -> C { + //@dump-sem-ir-begin return ^a; + //@dump-sem-ir-end } // CHECK:STDOUT: --- bit_complement.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %BitComplement.type: type = facet_type <@BitComplement> [concrete] -// CHECK:STDOUT: %Op.type.f25: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %Op.type.f25: type = fn_type @Op.6 [concrete] // CHECK:STDOUT: %BitComplement.impl_witness: = impl_witness file.%BitComplement.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.544: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.bf2: %Op.type.544 = struct_value () [concrete] -// CHECK:STDOUT: %BitComplement.facet: %BitComplement.type = facet_value %C, (%BitComplement.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.669: type = fn_type_with_self_type %Op.type.f25, %BitComplement.facet [concrete] +// CHECK:STDOUT: %Op.type.e57: type = fn_type @Op.7 [concrete] +// CHECK:STDOUT: %Op.d4b: %Op.type.e57 = struct_value () [concrete] +// CHECK:STDOUT: %BitComplement.facet.c4c: %BitComplement.type = facet_value %C, (%BitComplement.impl_witness) [concrete] +// CHECK:STDOUT: %.18b: type = fn_type_with_self_type %Op.type.f25, %BitComplement.facet.c4c [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitComplement = %Core.BitComplement -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitComplement: type = import_ref Core//prelude/operators/bitwise, BitComplement, loaded [concrete = constants.%BitComplement.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.5a3 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %BitComplement.ref: type = name_ref BitComplement, imports.%Core.BitComplement [concrete = constants.%BitComplement.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %BitComplement.impl_witness_table = impl_witness_table (@impl.5a3.%Op.decl), @impl.5a3 [concrete] -// CHECK:STDOUT: %BitComplement.impl_witness: = impl_witness %BitComplement.impl_witness_table [concrete = constants.%BitComplement.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param1 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.5a3: %C.ref as %BitComplement.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.544 = fn_decl @Op.2 [concrete = constants.%Op.bf2] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_23: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param1 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%BitComplement.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem0: %.669 = impl_witness_access constants.%BitComplement.impl_witness, element0 [concrete = constants.%Op.bf2] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.18b = impl_witness_access constants.%BitComplement.impl_witness, element1 [concrete = constants.%Op.d4b] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index e34ce6dafc88..f86506612153 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -17,205 +17,59 @@ package User; class C {}; -impl C as Core.BitOr { +impl C as Core.BitOrWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.BitOrAssign { +impl C as Core.BitOrAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a | b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a |= b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- bit_or.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %BitOr.type: type = facet_type <@BitOr> [concrete] -// CHECK:STDOUT: %Op.type.9bb: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %BitOr.impl_witness: = impl_witness file.%BitOr.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.951: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.59a: %Op.type.951 = struct_value () [concrete] -// CHECK:STDOUT: %BitOr.facet: %BitOr.type = facet_value %C, (%BitOr.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %BitOrAssign.type: type = facet_type <@BitOrAssign> [concrete] -// CHECK:STDOUT: %Op.type.099: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %BitOrAssign.impl_witness: = impl_witness file.%BitOrAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %BitOrWith.type.502: type = facet_type <@BitOrWith, @BitOrWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.501: type = fn_type @Op.1, @BitOrWith(%C) [concrete] +// CHECK:STDOUT: %BitOrWith.impl_witness: = impl_witness file.%BitOrWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.cc7: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.3e9: %Op.type.cc7 = struct_value () [concrete] +// CHECK:STDOUT: %BitOrWith.facet.f19: %BitOrWith.type.502 = facet_value %C, (%BitOrWith.impl_witness) [concrete] +// CHECK:STDOUT: %BitOrAssignWith.type.3e6: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.efc: type = fn_type @Op.7, @BitOrAssignWith(%C) [concrete] +// CHECK:STDOUT: %BitOrAssignWith.impl_witness: = impl_witness file.%BitOrAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.8ba: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.b27: %Op.type.8ba = struct_value () [concrete] -// CHECK:STDOUT: %BitOrAssign.facet: %BitOrAssign.type = facet_value %C, (%BitOrAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.421: type = fn_type_with_self_type %Op.type.9bb, %BitOr.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.8bd: type = fn_type_with_self_type %Op.type.099, %BitOrAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.4ee: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.afa: %Op.type.4ee = struct_value () [concrete] +// CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.3e6 = facet_value %C, (%BitOrAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.b8d: type = fn_type_with_self_type %Op.type.501, %BitOrWith.facet.f19 [concrete] +// CHECK:STDOUT: %.c8a: type = fn_type_with_self_type %Op.type.efc, %BitOrAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitOr = %Core.BitOr -// CHECK:STDOUT: .BitOrAssign = %Core.BitOrAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitOr: type = import_ref Core//prelude/operators/bitwise, BitOr, loaded [concrete = constants.%BitOr.type] -// CHECK:STDOUT: %Core.BitOrAssign: type = import_ref Core//prelude/operators/bitwise, BitOrAssign, loaded [concrete = constants.%BitOrAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.8f6 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %BitOr.ref: type = name_ref BitOr, imports.%Core.BitOr [concrete = constants.%BitOr.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %BitOr.impl_witness_table = impl_witness_table (@impl.8f6.%Op.decl), @impl.8f6 [concrete] -// CHECK:STDOUT: %BitOr.impl_witness: = impl_witness %BitOr.impl_witness_table [concrete = constants.%BitOr.impl_witness] -// CHECK:STDOUT: impl_decl @impl.04f [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %BitOrAssign.ref: type = name_ref BitOrAssign, imports.%Core.BitOrAssign [concrete = constants.%BitOrAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %BitOrAssign.impl_witness_table = impl_witness_table (@impl.04f.%Op.decl), @impl.04f [concrete] -// CHECK:STDOUT: %BitOrAssign.impl_witness: = impl_witness %BitOrAssign.impl_witness_table [concrete = constants.%BitOrAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.8f6: %C.ref as %BitOr.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.951 = fn_decl @Op.2 [concrete = constants.%Op.59a] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%BitOr.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.04f: %C.ref as %BitOrAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.8ba = fn_decl @Op.4 [concrete = constants.%Op.b27] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%BitOrAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.421 = impl_witness_access constants.%BitOr.impl_witness, element0 [concrete = constants.%Op.59a] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.b8d = impl_witness_access constants.%BitOrWith.impl_witness, element1 [concrete = constants.%Op.3e9] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +77,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.8bd = impl_witness_access constants.%BitOrAssign.impl_witness, element0 [concrete = constants.%Op.b27] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.c8a = impl_witness_access constants.%BitOrAssignWith.impl_witness, element0 [concrete = constants.%Op.afa] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index f7eb9b50c647..f78ee69fdd18 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -17,205 +17,59 @@ package User; class C {}; -impl C as Core.BitXor { +impl C as Core.BitXorWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.BitXorAssign { +impl C as Core.BitXorAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a ^ b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a ^= b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- bit_xor.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %BitXor.type: type = facet_type <@BitXor> [concrete] -// CHECK:STDOUT: %Op.type.e96: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %BitXor.impl_witness: = impl_witness file.%BitXor.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.672: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.442: %Op.type.672 = struct_value () [concrete] -// CHECK:STDOUT: %BitXor.facet: %BitXor.type = facet_value %C, (%BitXor.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %BitXorAssign.type: type = facet_type <@BitXorAssign> [concrete] -// CHECK:STDOUT: %Op.type.58d: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %BitXorAssign.impl_witness: = impl_witness file.%BitXorAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %BitXorWith.type.f9b: type = facet_type <@BitXorWith, @BitXorWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.502: type = fn_type @Op.1, @BitXorWith(%C) [concrete] +// CHECK:STDOUT: %BitXorWith.impl_witness: = impl_witness file.%BitXorWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.5e4: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.ef1: %Op.type.5e4 = struct_value () [concrete] +// CHECK:STDOUT: %BitXorWith.facet.d57: %BitXorWith.type.f9b = facet_value %C, (%BitXorWith.impl_witness) [concrete] +// CHECK:STDOUT: %BitXorAssignWith.type.57a: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.ad0: type = fn_type @Op.7, @BitXorAssignWith(%C) [concrete] +// CHECK:STDOUT: %BitXorAssignWith.impl_witness: = impl_witness file.%BitXorAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.8ab: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.67d: %Op.type.8ab = struct_value () [concrete] -// CHECK:STDOUT: %BitXorAssign.facet: %BitXorAssign.type = facet_value %C, (%BitXorAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.f3f: type = fn_type_with_self_type %Op.type.e96, %BitXor.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.100: type = fn_type_with_self_type %Op.type.58d, %BitXorAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.d64: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.5e5: %Op.type.d64 = struct_value () [concrete] +// CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.57a = facet_value %C, (%BitXorAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.c60: type = fn_type_with_self_type %Op.type.502, %BitXorWith.facet.d57 [concrete] +// CHECK:STDOUT: %.d8a: type = fn_type_with_self_type %Op.type.ad0, %BitXorAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .BitXor = %Core.BitXor -// CHECK:STDOUT: .BitXorAssign = %Core.BitXorAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.BitXor: type = import_ref Core//prelude/operators/bitwise, BitXor, loaded [concrete = constants.%BitXor.type] -// CHECK:STDOUT: %Core.BitXorAssign: type = import_ref Core//prelude/operators/bitwise, BitXorAssign, loaded [concrete = constants.%BitXorAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.2e5 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %BitXor.ref: type = name_ref BitXor, imports.%Core.BitXor [concrete = constants.%BitXor.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %BitXor.impl_witness_table = impl_witness_table (@impl.2e5.%Op.decl), @impl.2e5 [concrete] -// CHECK:STDOUT: %BitXor.impl_witness: = impl_witness %BitXor.impl_witness_table [concrete = constants.%BitXor.impl_witness] -// CHECK:STDOUT: impl_decl @impl.9ba [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %BitXorAssign.ref: type = name_ref BitXorAssign, imports.%Core.BitXorAssign [concrete = constants.%BitXorAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %BitXorAssign.impl_witness_table = impl_witness_table (@impl.9ba.%Op.decl), @impl.9ba [concrete] -// CHECK:STDOUT: %BitXorAssign.impl_witness: = impl_witness %BitXorAssign.impl_witness_table [concrete = constants.%BitXorAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2e5: %C.ref as %BitXor.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.672 = fn_decl @Op.2 [concrete = constants.%Op.442] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%BitXor.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.9ba: %C.ref as %BitXorAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.8ab = fn_decl @Op.4 [concrete = constants.%Op.67d] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%BitXorAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.f3f = impl_witness_access constants.%BitXor.impl_witness, element0 [concrete = constants.%Op.442] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.c60 = impl_witness_access constants.%BitXorWith.impl_witness, element1 [concrete = constants.%Op.ef1] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +77,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.100 = impl_witness_access constants.%BitXorAssign.impl_witness, element0 [concrete = constants.%Op.67d] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.d8a = impl_witness_access constants.%BitXorAssignWith.impl_witness, element0 [concrete = constants.%Op.5e5] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 7bf5dd40c83a..31d3c546a017 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -23,108 +23,37 @@ impl C as Core.Dec { fn TestOp() { var c: C = {}; + //@dump-sem-ir-begin --c; + //@dump-sem-ir-end } // CHECK:STDOUT: --- dec.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [concrete] // CHECK:STDOUT: %Op.type.633: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] // CHECK:STDOUT: %Dec.impl_witness: = impl_witness file.%Dec.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] // CHECK:STDOUT: %Op.type.9e0: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.cf9: %Op.type.9e0 = struct_value () [concrete] // CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %C, (%Dec.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %.859: type = fn_type_with_self_type %Op.type.633, %Dec.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Dec = %Core.Dec -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Dec: type = import_ref Core//prelude/operators/arithmetic, Dec, loaded [concrete = constants.%Dec.type] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.7f9 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Dec.ref: type = name_ref Dec, imports.%Core.Dec [concrete = constants.%Dec.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Dec.impl_witness_table = impl_witness_table (@impl.7f9.%Op.decl), @impl.7f9 [concrete] -// CHECK:STDOUT: %Dec.impl_witness: = impl_witness %Dec.impl_witness_table [concrete = constants.%Dec.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] {} {} -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.7f9: %C.ref as %Dec.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.9e0 = fn_decl @Op.2 [concrete = constants.%Op.cf9] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc21_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc21_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Dec.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %ptr.019); -// CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %c.patt: %pattern_type.c48 = binding_pattern c [concrete] -// CHECK:STDOUT: %c.var_patt: %pattern_type.c48 = var_pattern %c.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %c.var: ref %C = var %c.var_patt -// CHECK:STDOUT: %.loc25_15.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc25_15.2: init %C = class_init (), %c.var [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc25_3: init %C = converted %.loc25_15.1, %.loc25_15.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc25_3 -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var +// CHECK:STDOUT: // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %impl.elem0: %.859 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Op.cf9] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.ref // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index db0b4d7d52ea..ca603923da42 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -17,205 +17,59 @@ package User; class C {}; -impl C as Core.Div { +impl C as Core.DivWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.DivAssign { +impl C as Core.DivAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a / b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a /= b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %Div.type: type = facet_type <@Div> [concrete] -// CHECK:STDOUT: %Op.type.784: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Div.impl_witness: = impl_witness file.%Div.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.750: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.21e: %Op.type.750 = struct_value () [concrete] -// CHECK:STDOUT: %Div.facet: %Div.type = facet_value %C, (%Div.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %DivAssign.type: type = facet_type <@DivAssign> [concrete] -// CHECK:STDOUT: %Op.type.b95: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %DivAssign.impl_witness: = impl_witness file.%DivAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %DivWith.type.ead: type = facet_type <@DivWith, @DivWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.c4b: type = fn_type @Op.1, @DivWith(%C) [concrete] +// CHECK:STDOUT: %DivWith.impl_witness: = impl_witness file.%DivWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.a37: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.5b4: %Op.type.a37 = struct_value () [concrete] +// CHECK:STDOUT: %DivWith.facet.f3b: %DivWith.type.ead = facet_value %C, (%DivWith.impl_witness) [concrete] +// CHECK:STDOUT: %DivAssignWith.type.08b: type = facet_type <@DivAssignWith, @DivAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.629: type = fn_type @Op.7, @DivAssignWith(%C) [concrete] +// CHECK:STDOUT: %DivAssignWith.impl_witness: = impl_witness file.%DivAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.b04: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.27c: %Op.type.b04 = struct_value () [concrete] -// CHECK:STDOUT: %DivAssign.facet: %DivAssign.type = facet_value %C, (%DivAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.b77: type = fn_type_with_self_type %Op.type.784, %Div.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.20f: type = fn_type_with_self_type %Op.type.b95, %DivAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.1b1: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.27f: %Op.type.1b1 = struct_value () [concrete] +// CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.08b = facet_value %C, (%DivAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.bb6: type = fn_type_with_self_type %Op.type.c4b, %DivWith.facet.f3b [concrete] +// CHECK:STDOUT: %.f19: type = fn_type_with_self_type %Op.type.629, %DivAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Div = %Core.Div -// CHECK:STDOUT: .DivAssign = %Core.DivAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Div: type = import_ref Core//prelude/operators/arithmetic, Div, loaded [concrete = constants.%Div.type] -// CHECK:STDOUT: %Core.DivAssign: type = import_ref Core//prelude/operators/arithmetic, DivAssign, loaded [concrete = constants.%DivAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.534 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Div.ref: type = name_ref Div, imports.%Core.Div [concrete = constants.%Div.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Div.impl_witness_table = impl_witness_table (@impl.534.%Op.decl), @impl.534 [concrete] -// CHECK:STDOUT: %Div.impl_witness: = impl_witness %Div.impl_witness_table [concrete = constants.%Div.impl_witness] -// CHECK:STDOUT: impl_decl @impl.73d [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %DivAssign.ref: type = name_ref DivAssign, imports.%Core.DivAssign [concrete = constants.%DivAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %DivAssign.impl_witness_table = impl_witness_table (@impl.73d.%Op.decl), @impl.73d [concrete] -// CHECK:STDOUT: %DivAssign.impl_witness: = impl_witness %DivAssign.impl_witness_table [concrete = constants.%DivAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.534: %C.ref as %Div.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.750 = fn_decl @Op.2 [concrete = constants.%Op.21e] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Div.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.73d: %C.ref as %DivAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.b04 = fn_decl @Op.4 [concrete = constants.%Op.27c] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%DivAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.b77 = impl_witness_access constants.%Div.impl_witness, element0 [concrete = constants.%Op.21e] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.bb6 = impl_witness_access constants.%DivWith.impl_witness, element1 [concrete = constants.%Op.5b4] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +77,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.20f = impl_witness_access constants.%DivAssign.impl_witness, element0 [concrete = constants.%Op.27c] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.f19 = impl_witness_access constants.%DivAssignWith.impl_witness, element0 [concrete = constants.%Op.27f] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index f6b99bf089f5..28023019c622 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -17,7 +17,7 @@ package User; class C {}; -impl C as Core.Eq { +impl C as Core.EqWith(C) { fn Equal[self: C](other: C) -> bool; fn NotEqual[self: C](other: C) -> bool; } @@ -37,7 +37,7 @@ package FailNoImpl; class D {}; fn TestEqual(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Eq` in type `D` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.EqWith(D)` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a == b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -45,7 +45,7 @@ fn TestEqual(a: D, b: D) -> bool { } fn TestNotEqual(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Eq` in type `D` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.EqWith(D)` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a != b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -59,27 +59,21 @@ package FailNoImplForArgs; class C {}; class D {}; -impl C as Core.Eq { +impl C as Core.EqWith(C) { fn Equal[self: C](other: C) -> bool; fn NotEqual[self: C](other: C) -> bool; } fn TestRhsBad(a: C, b: D) -> bool { - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+10]]:15: error: cannot implicitly convert expression of type `D` to `C` [ConversionFailure] + // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.EqWith(D)` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a == b; - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+7]]:15: note: type `D` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessNote] - // CHECK:STDERR: return a == b; - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE-11]]:21: note: initializing function parameter [InCallToFunctionParam] - // CHECK:STDERR: fn Equal[self: C](other: C) -> bool; - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: return a == b; } fn TestLhsBad(a: D, b: C) -> bool { - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Eq` in type `D` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.EqWith(C)` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a != b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -92,35 +86,37 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [concrete] -// CHECK:STDOUT: %Equal.type.79c: type = fn_type @Equal.1 [concrete] +// CHECK:STDOUT: %EqWith.type.c2e: type = generic_interface_type @EqWith [concrete] +// CHECK:STDOUT: %EqWith.generic: %EqWith.type.c2e = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] -// CHECK:STDOUT: %NotEqual.type.e6c: type = fn_type @NotEqual.1 [concrete] -// CHECK:STDOUT: %Eq.impl_witness: = impl_witness file.%Eq.impl_witness_table [concrete] +// CHECK:STDOUT: %EqWith.type.04e: type = facet_type <@EqWith, @EqWith(%C)> [concrete] +// CHECK:STDOUT: %Equal.type.170: type = fn_type @Equal.1, @EqWith(%C) [concrete] +// CHECK:STDOUT: %NotEqual.type.694: type = fn_type @NotEqual.1, @EqWith(%C) [concrete] +// CHECK:STDOUT: %EqWith.impl_witness: = impl_witness file.%EqWith.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %Equal.type.b4a: type = fn_type @Equal.2 [concrete] -// CHECK:STDOUT: %Equal.f96: %Equal.type.b4a = struct_value () [concrete] -// CHECK:STDOUT: %NotEqual.type.a7d: type = fn_type @NotEqual.2 [concrete] -// CHECK:STDOUT: %NotEqual.c3f: %NotEqual.type.a7d = struct_value () [concrete] -// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value %C, (%Eq.impl_witness) [concrete] +// CHECK:STDOUT: %Equal.type.86d: type = fn_type @Equal.2 [concrete] +// CHECK:STDOUT: %Equal.fdb: %Equal.type.86d = struct_value () [concrete] +// CHECK:STDOUT: %NotEqual.type.0f4: type = fn_type @NotEqual.2 [concrete] +// CHECK:STDOUT: %NotEqual.133: %NotEqual.type.0f4 = struct_value () [concrete] +// CHECK:STDOUT: %EqWith.facet: %EqWith.type.04e = facet_value %C, (%EqWith.impl_witness) [concrete] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [concrete] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.b8f: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [concrete] +// CHECK:STDOUT: %.6b4: type = fn_type_with_self_type %Equal.type.170, %EqWith.facet [concrete] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [concrete] // CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.9a6: type = fn_type_with_self_type %NotEqual.type.e6c, %Eq.facet [concrete] +// CHECK:STDOUT: %.3b7: type = fn_type_with_self_type %NotEqual.type.694, %EqWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Eq = %Core.Eq +// CHECK:STDOUT: .EqWith = %Core.EqWith // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Eq: type = import_ref Core//prelude/operators/comparison, Eq, loaded [concrete = constants.%Eq.type] +// CHECK:STDOUT: %Core.EqWith: %EqWith.type.c2e = import_ref Core//prelude/operators/comparison, EqWith, loaded [concrete = constants.%EqWith.generic] // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -133,13 +129,15 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.100 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: impl_decl @impl.cac [concrete] {} { +// CHECK:STDOUT: %C.ref.loc6_6: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Eq.ref: type = name_ref Eq, imports.%Core.Eq [concrete = constants.%Eq.type] +// CHECK:STDOUT: %EqWith.ref: %EqWith.type.c2e = name_ref EqWith, imports.%Core.EqWith [concrete = constants.%EqWith.generic] +// CHECK:STDOUT: %C.ref.loc6_23: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %EqWith.type: type = facet_type <@EqWith, @EqWith(constants.%C)> [concrete = constants.%EqWith.type.04e] // CHECK:STDOUT: } -// CHECK:STDOUT: %Eq.impl_witness_table = impl_witness_table (@impl.100.%Equal.decl, @impl.100.%NotEqual.decl), @impl.100 [concrete] -// CHECK:STDOUT: %Eq.impl_witness: = impl_witness %Eq.impl_witness_table [concrete = constants.%Eq.impl_witness] +// CHECK:STDOUT: %EqWith.impl_witness_table = impl_witness_table (@impl.cac.%Equal.decl, @impl.cac.%NotEqual.decl), @impl.cac [concrete] +// CHECK:STDOUT: %EqWith.impl_witness: = impl_witness %EqWith.impl_witness_table [concrete = constants.%EqWith.impl_witness] // CHECK:STDOUT: %TestEqual.decl: %TestEqual.type = fn_decl @TestEqual [concrete = constants.%TestEqual] { // CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] @@ -182,8 +180,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.100: %C.ref as %Eq.ref { -// CHECK:STDOUT: %Equal.decl: %Equal.type.b4a = fn_decl @Equal.2 [concrete = constants.%Equal.f96] { +// CHECK:STDOUT: impl @impl.cac: %C.ref.loc6_6 as %EqWith.type { +// CHECK:STDOUT: %Equal.decl: %Equal.type.86d = fn_decl @Equal.2 [concrete = constants.%Equal.fdb] { // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] @@ -203,7 +201,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %NotEqual.decl: %NotEqual.type.a7d = fn_decl @NotEqual.2 [concrete = constants.%NotEqual.c3f] { +// CHECK:STDOUT: %NotEqual.decl: %NotEqual.type.0f4 = fn_decl @NotEqual.2 [concrete = constants.%NotEqual.133] { // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] @@ -228,7 +226,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: .C = // CHECK:STDOUT: .Equal = %Equal.decl // CHECK:STDOUT: .NotEqual = %NotEqual.decl -// CHECK:STDOUT: witness = file.%Eq.impl_witness +// CHECK:STDOUT: witness = file.%EqWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -248,7 +246,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.b8f = impl_witness_access constants.%Eq.impl_witness, element0 [concrete = constants.%Equal.f96] +// CHECK:STDOUT: %impl.elem0: %.6b4 = impl_witness_access constants.%EqWith.impl_witness, element0 [concrete = constants.%Equal.fdb] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %Equal.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call @@ -260,7 +258,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.9a6 = impl_witness_access constants.%Eq.impl_witness, element1 [concrete = constants.%NotEqual.c3f] +// CHECK:STDOUT: %impl.elem1: %.3b7 = impl_witness_access constants.%EqWith.impl_witness, element1 [concrete = constants.%NotEqual.133] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: %NotEqual.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call @@ -280,7 +278,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [concrete] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [concrete] +// CHECK:STDOUT: %EqWith.type.c2e: type = generic_interface_type @EqWith [concrete] +// CHECK:STDOUT: %EqWith.generic: %EqWith.type.c2e = struct_value () [concrete] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [concrete] // CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -288,12 +287,12 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool -// CHECK:STDOUT: .Eq = %Core.Eq +// CHECK:STDOUT: .EqWith = %Core.EqWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.Eq: type = import_ref Core//prelude/operators/comparison, Eq, loaded [concrete = constants.%Eq.type] +// CHECK:STDOUT: %Core.EqWith: %EqWith.type.c2e = import_ref Core//prelude/operators/comparison, EqWith, loaded [concrete = constants.%EqWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -377,39 +376,34 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] -// CHECK:STDOUT: %Eq.type: type = facet_type <@Eq> [concrete] -// CHECK:STDOUT: %Equal.type.79c: type = fn_type @Equal.1 [concrete] +// CHECK:STDOUT: %EqWith.type.c2e: type = generic_interface_type @EqWith [concrete] +// CHECK:STDOUT: %EqWith.generic: %EqWith.type.c2e = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] -// CHECK:STDOUT: %Eq.impl_witness: = impl_witness file.%Eq.impl_witness_table [concrete] +// CHECK:STDOUT: %EqWith.type.04e: type = facet_type <@EqWith, @EqWith(%C)> [concrete] +// CHECK:STDOUT: %EqWith.impl_witness: = impl_witness file.%EqWith.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %Equal.type.b4a: type = fn_type @Equal.2 [concrete] -// CHECK:STDOUT: %Equal.f96: %Equal.type.b4a = struct_value () [concrete] -// CHECK:STDOUT: %NotEqual.type.a7d: type = fn_type @NotEqual.2 [concrete] -// CHECK:STDOUT: %NotEqual.c3f: %NotEqual.type.a7d = struct_value () [concrete] -// CHECK:STDOUT: %Eq.facet: %Eq.type = facet_value %C, (%Eq.impl_witness) [concrete] +// CHECK:STDOUT: %Equal.type.86d: type = fn_type @Equal.2 [concrete] +// CHECK:STDOUT: %Equal.fdb: %Equal.type.86d = struct_value () [concrete] +// CHECK:STDOUT: %NotEqual.type.0f4: type = fn_type @NotEqual.2 [concrete] +// CHECK:STDOUT: %NotEqual.133: %NotEqual.type.0f4 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.510: type = pattern_type %D [concrete] // CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [concrete] // CHECK:STDOUT: %TestRhsBad: %TestRhsBad.type = struct_value () [concrete] -// CHECK:STDOUT: %.b8f: type = fn_type_with_self_type %Equal.type.79c, %Eq.facet [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [concrete] // CHECK:STDOUT: %TestLhsBad: %TestLhsBad.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Eq = %Core.Eq +// CHECK:STDOUT: .EqWith = %Core.EqWith // CHECK:STDOUT: .Bool = %Core.Bool -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Eq: type = import_ref Core//prelude/operators/comparison, Eq, loaded [concrete = constants.%Eq.type] +// CHECK:STDOUT: %Core.EqWith: %EqWith.type.c2e = import_ref Core//prelude/operators/comparison, EqWith, loaded [concrete = constants.%EqWith.generic] // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -423,13 +417,15 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} -// CHECK:STDOUT: impl_decl @impl.100 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: impl_decl @impl.cac [concrete] {} { +// CHECK:STDOUT: %C.ref.loc7_6: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Eq.ref: type = name_ref Eq, imports.%Core.Eq [concrete = constants.%Eq.type] +// CHECK:STDOUT: %EqWith.ref: %EqWith.type.c2e = name_ref EqWith, imports.%Core.EqWith [concrete = constants.%EqWith.generic] +// CHECK:STDOUT: %C.ref.loc7_23: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %EqWith.type: type = facet_type <@EqWith, @EqWith(constants.%C)> [concrete = constants.%EqWith.type.04e] // CHECK:STDOUT: } -// CHECK:STDOUT: %Eq.impl_witness_table = impl_witness_table (@impl.100.%Equal.decl, @impl.100.%NotEqual.decl), @impl.100 [concrete] -// CHECK:STDOUT: %Eq.impl_witness: = impl_witness %Eq.impl_witness_table [concrete = constants.%Eq.impl_witness] +// CHECK:STDOUT: %EqWith.impl_witness_table = impl_witness_table (@impl.cac.%Equal.decl, @impl.cac.%NotEqual.decl), @impl.cac [concrete] +// CHECK:STDOUT: %EqWith.impl_witness: = impl_witness %EqWith.impl_witness_table [concrete = constants.%EqWith.impl_witness] // CHECK:STDOUT: %TestRhsBad.decl: %TestRhsBad.type = fn_decl @TestRhsBad [concrete = constants.%TestRhsBad] { // CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] @@ -459,8 +455,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc26_30.1: type = value_of_initializer %bool.make_type [concrete = bool] -// CHECK:STDOUT: %.loc26_30.2: type = converted %bool.make_type, %.loc26_30.1 [concrete = bool] +// CHECK:STDOUT: %.loc20_30.1: type = value_of_initializer %bool.make_type [concrete = bool] +// CHECK:STDOUT: %.loc20_30.2: type = converted %bool.make_type, %.loc20_30.1 [concrete = bool] // CHECK:STDOUT: %a.param: %D = value_param call_param0 // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %a: %D = bind_name a, %a.param @@ -472,8 +468,8 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.100: %C.ref as %Eq.ref { -// CHECK:STDOUT: %Equal.decl: %Equal.type.b4a = fn_decl @Equal.2 [concrete = constants.%Equal.f96] { +// CHECK:STDOUT: impl @impl.cac: %C.ref.loc7_6 as %EqWith.type { +// CHECK:STDOUT: %Equal.decl: %Equal.type.86d = fn_decl @Equal.2 [concrete = constants.%Equal.fdb] { // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] @@ -493,7 +489,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %NotEqual.decl: %NotEqual.type.a7d = fn_decl @NotEqual.2 [concrete = constants.%NotEqual.c3f] { +// CHECK:STDOUT: %NotEqual.decl: %NotEqual.type.0f4 = fn_decl @NotEqual.2 [concrete = constants.%NotEqual.133] { // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] @@ -518,7 +514,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: .C = // CHECK:STDOUT: .Equal = %Equal.decl // CHECK:STDOUT: .NotEqual = %NotEqual.decl -// CHECK:STDOUT: witness = file.%Eq.impl_witness +// CHECK:STDOUT: witness = file.%EqWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -547,13 +543,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.b8f = impl_witness_access constants.%Eq.impl_witness, element0 [concrete = constants.%Equal.f96] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc23_15: %C = converted %b.ref, [concrete = ] -// CHECK:STDOUT: %Equal.call: init bool = call %bound_method(%a.ref, ) -// CHECK:STDOUT: %.loc23_16.1: bool = value_of_initializer %Equal.call -// CHECK:STDOUT: %.loc23_16.2: bool = converted %Equal.call, %.loc23_16.1 -// CHECK:STDOUT: return %.loc23_16.2 +// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestLhsBad(%a.param: %D, %b.param: %C) -> bool { 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 63c340a11750..c0894dec2ea1 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -18,7 +18,7 @@ class C {}; impl C as Core.Inc { fn Op[addr self: C*](); } -impl C as Core.AddAssign { +impl C as Core.AddAssignWith(C) { fn Op[addr self: C*](other: C); } @@ -60,30 +60,32 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %Op.type.73a: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.0c9: %Op.type.73a = struct_value () [concrete] // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, (%Inc.impl_witness) [concrete] -// CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [concrete] -// CHECK:STDOUT: %Op.type.421: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness file.%AddAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %AddAssignWith.type.fc6: type = generic_interface_type @AddAssignWith [concrete] +// CHECK:STDOUT: %AddAssignWith.generic: %AddAssignWith.type.fc6 = struct_value () [concrete] +// CHECK:STDOUT: %AddAssignWith.type.393: type = facet_type <@AddAssignWith, @AddAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.5af: type = fn_type @Op.3, @AddAssignWith(%C) [concrete] +// CHECK:STDOUT: %AddAssignWith.impl_witness: = impl_witness file.%AddAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.0b8: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.d8e: %Op.type.0b8 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, (%AddAssign.impl_witness) [concrete] +// CHECK:STDOUT: %Op.type.0d7: type = fn_type @Op.4 [concrete] +// CHECK:STDOUT: %Op.572: %Op.type.0d7 = struct_value () [concrete] +// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.393 = facet_value %C, (%AddAssignWith.impl_witness) [concrete] // CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [concrete] // CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [concrete] // CHECK:STDOUT: %.bc7: type = fn_type_with_self_type %Op.type.e3a, %Inc.facet [concrete] // CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [concrete] // CHECK:STDOUT: %TestAddAssignNonRef: %TestAddAssignNonRef.type = struct_value () [concrete] -// CHECK:STDOUT: %.6d3: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [concrete] +// CHECK:STDOUT: %.e2d: type = fn_type_with_self_type %Op.type.5af, %AddAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Inc = %Core.Inc -// CHECK:STDOUT: .AddAssign = %Core.AddAssign +// CHECK:STDOUT: .AddAssignWith = %Core.AddAssignWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] -// CHECK:STDOUT: %Core.AddAssign: type = import_ref Core//prelude/operators/arithmetic, AddAssign, loaded [concrete = constants.%AddAssign.type] +// CHECK:STDOUT: %Core.AddAssignWith: %AddAssignWith.type.fc6 = import_ref Core//prelude/operators/arithmetic, AddAssignWith, loaded [concrete = constants.%AddAssignWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -102,13 +104,15 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: } // CHECK:STDOUT: %Inc.impl_witness_table = impl_witness_table (@impl.c51.%Op.decl), @impl.c51 [concrete] // CHECK:STDOUT: %Inc.impl_witness: = impl_witness %Inc.impl_witness_table [concrete = constants.%Inc.impl_witness] -// CHECK:STDOUT: impl_decl @impl.14c [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: impl_decl @impl.a95 [concrete] {} { +// CHECK:STDOUT: %C.ref.loc21_6: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%Core.AddAssign [concrete = constants.%AddAssign.type] +// CHECK:STDOUT: %AddAssignWith.ref: %AddAssignWith.type.fc6 = name_ref AddAssignWith, imports.%Core.AddAssignWith [concrete = constants.%AddAssignWith.generic] +// CHECK:STDOUT: %C.ref.loc21_30: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %AddAssignWith.type: type = facet_type <@AddAssignWith, @AddAssignWith(constants.%C)> [concrete = constants.%AddAssignWith.type.393] // CHECK:STDOUT: } -// CHECK:STDOUT: %AddAssign.impl_witness_table = impl_witness_table (@impl.14c.%Op.decl), @impl.14c [concrete] -// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness %AddAssign.impl_witness_table [concrete = constants.%AddAssign.impl_witness] +// CHECK:STDOUT: %AddAssignWith.impl_witness_table = impl_witness_table (@impl.a95.%Op.decl), @impl.a95 [concrete] +// CHECK:STDOUT: %AddAssignWith.impl_witness: = impl_witness %AddAssignWith.impl_witness_table [concrete = constants.%AddAssignWith.impl_witness] // CHECK:STDOUT: %TestIncNonRef.decl: %TestIncNonRef.type = fn_decl @TestIncNonRef [concrete = constants.%TestIncNonRef] { // CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] @@ -152,8 +156,8 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: witness = file.%Inc.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.14c: %C.ref as %AddAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.0b8 = fn_decl @Op.4 [concrete = constants.%Op.d8e] { +// CHECK:STDOUT: impl @impl.a95: %C.ref.loc21_6 as %AddAssignWith.type { +// CHECK:STDOUT: %Op.decl: %Op.type.0d7 = fn_decl @Op.4 [concrete = constants.%Op.572] { // CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %.loc22_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] @@ -174,7 +178,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%AddAssign.impl_witness +// CHECK:STDOUT: witness = file.%AddAssignWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,7 +209,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.6d3 = impl_witness_access constants.%AddAssign.impl_witness, element0 [concrete = constants.%Op.d8e] +// CHECK:STDOUT: %impl.elem0: %.e2d = impl_witness_access constants.%AddAssignWith.impl_witness, element0 [concrete = constants.%Op.572] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc44: ref %C = temporary_storage // CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc44 diff --git a/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon b/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon index f2f6fb763cd7..6aa9e0a65615 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon @@ -36,36 +36,26 @@ fn G(n: i32) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] -// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %Op.type.52d: type = fn_type @Op.2, @impl.2c2(%N) [symbolic] -// CHECK:STDOUT: %Op.12d: %Op.type.52d = struct_value () [symbolic] -// CHECK:STDOUT: %Add.impl_witness.dbc: = impl_witness imports.%Add.impl_witness_table, @impl.2c2(%int_32) [concrete] -// CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete] -// CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete] -// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Add = %Core.Add +// CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] +// CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.import_ref.344: @impl.2c2.%Op.type (%Op.type.52d) = import_ref Core//prelude/types/int, loc58_42, loaded [symbolic = @impl.2c2.%Op (constants.%Op.12d)] -// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Core.import_ref.344), @impl.2c2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -94,7 +84,7 @@ fn G(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %undeclared.ref: = name_ref undeclared, [concrete = ] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access , element0 [concrete = ] +// CHECK:STDOUT: %impl.elem1: = impl_witness_access , element1 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -102,8 +92,6 @@ fn G(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %undeclared.ref: = name_ref undeclared, [concrete = ] -// CHECK:STDOUT: %impl.elem0: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82] -// CHECK:STDOUT: %bound_method: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index 6b086e2a6778..578f97794f85 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -24,7 +24,7 @@ fn TestUnary(a: C) -> C { } fn TestBinary(a: C, b: C) -> C { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Add` in type `C` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.AddWith(C)` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a + b; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -33,7 +33,7 @@ fn TestBinary(a: C, b: C) -> C { fn TestRef(b: C) { var a: C = {}; - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.AddAssign` in type `C` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.AddAssignWith(C)` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: a += b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -55,28 +55,30 @@ fn TestRef(b: C) { // CHECK:STDOUT: %TestUnary.type: type = fn_type @TestUnary [concrete] // CHECK:STDOUT: %TestUnary: %TestUnary.type = struct_value () [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] +// CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete] +// CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete] // CHECK:STDOUT: %TestBinary.type: type = fn_type @TestBinary [concrete] // CHECK:STDOUT: %TestBinary: %TestBinary.type = struct_value () [concrete] // CHECK:STDOUT: %TestRef.type: type = fn_type @TestRef [concrete] // CHECK:STDOUT: %TestRef: %TestRef.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [concrete] +// CHECK:STDOUT: %AddAssignWith.type.fc6: type = generic_interface_type @AddAssignWith [concrete] +// CHECK:STDOUT: %AddAssignWith.generic: %AddAssignWith.type.fc6 = struct_value () [concrete] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Negate = %Core.Negate -// CHECK:STDOUT: .Add = %Core.Add -// CHECK:STDOUT: .AddAssign = %Core.AddAssign +// CHECK:STDOUT: .AddWith = %Core.AddWith +// CHECK:STDOUT: .AddAssignWith = %Core.AddAssignWith // CHECK:STDOUT: .Inc = %Core.Inc // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] -// CHECK:STDOUT: %Core.AddAssign: type = import_ref Core//prelude/operators/arithmetic, AddAssign, loaded [concrete = constants.%AddAssign.type] +// CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic] +// CHECK:STDOUT: %Core.AddAssignWith: %AddAssignWith.type.fc6 = import_ref Core//prelude/operators/arithmetic, AddAssignWith, loaded [concrete = constants.%AddAssignWith.generic] // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] // 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 d8239e01aad1..7de92248798b 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 @@ -2,9 +2,6 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// // AUTOUPDATE // TIP: To test this file alone, run: // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon @@ -16,249 +13,33 @@ package User; class C {}; class D {}; -impl C as Core.Add { - fn Op[self: C](other: C) -> C; +impl forall [T:! Core.ImplicitAs(C)] C as Core.AddWith(T) where .Result = C { + fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.AddAssign { - fn Op[addr self: C*](other: C); +impl forall [T:! Core.ImplicitAs(C)] C as Core.AddAssignWith(T) { + fn Op[addr self: C*](other: C) {} } -fn Test(a: C, b: D) -> C { - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+10]]:14: error: cannot implicitly convert expression of type `D` to `C` [ConversionFailure] - // CHECK:STDERR: return a + b; - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+7]]:14: note: type `D` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessNote] - // CHECK:STDERR: return a + b; - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-13]]:18: note: initializing function parameter [InCallToFunctionParam] - // CHECK:STDERR: fn Op[self: C](other: C) -> C; - // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: - return a + b; +fn Test(a: C, b: D, z: bool) -> C { + if (z) { + return a + a; + } else { + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+4]]:12: error: cannot access member of interface `Core.AddWith(D)` in type `C` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: return a + b; + // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: + return a + b; + } } fn TestAssign(b: D) { var a: C = {}; - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+10]]:8: error: cannot implicitly convert expression of type `D` to `C` [ConversionFailure] + + a += a; + + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.AddAssignWith(D)` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: a += b; - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+7]]:8: note: type `D` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessNote] - // CHECK:STDERR: a += b; - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-25]]:24: note: initializing function parameter [InCallToFunctionParam] - // CHECK:STDERR: fn Op[addr self: C*](other: C); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: a += b; } - -// CHECK:STDOUT: --- fail_no_impl_for_arg.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %D: type = class_type @D [concrete] -// CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] -// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Add.impl_witness: = impl_witness file.%Add.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.7a3: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.c84: %Op.type.7a3 = struct_value () [concrete] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %C, (%Add.impl_witness) [concrete] -// CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [concrete] -// CHECK:STDOUT: %Op.type.421: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness file.%AddAssign.impl_witness_table [concrete] -// CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.0b8: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.d8e: %Op.type.0b8 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssign.facet: %AddAssign.type = facet_value %C, (%AddAssign.impl_witness) [concrete] -// CHECK:STDOUT: %pattern_type.510: type = pattern_type %D [concrete] -// CHECK:STDOUT: %Test.type: type = fn_type @Test [concrete] -// CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete] -// CHECK:STDOUT: %.de4: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete] -// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %.6d3: type = fn_type_with_self_type %Op.type.421, %AddAssign.facet [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Add = %Core.Add -// CHECK:STDOUT: .AddAssign = %Core.AddAssign -// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type] -// CHECK:STDOUT: %Core.AddAssign: type = import_ref Core//prelude/operators/arithmetic, AddAssign, loaded [concrete = constants.%AddAssign.type] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .D = %D.decl -// CHECK:STDOUT: .Test = %Test.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} -// CHECK:STDOUT: impl_decl @impl.b32 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%Core.Add [concrete = constants.%Add.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (@impl.b32.%Op.decl), @impl.b32 [concrete] -// CHECK:STDOUT: %Add.impl_witness: = impl_witness %Add.impl_witness_table [concrete = constants.%Add.impl_witness] -// CHECK:STDOUT: impl_decl @impl.14c [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %AddAssign.ref: type = name_ref AddAssign, imports.%Core.AddAssign [concrete = constants.%AddAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %AddAssign.impl_witness_table = impl_witness_table (@impl.14c.%Op.decl), @impl.14c [concrete] -// CHECK:STDOUT: %AddAssign.impl_witness: = impl_witness %AddAssign.impl_witness_table [concrete = constants.%AddAssign.impl_witness] -// CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.510 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.510 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_24: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc26_12: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %D = value_param call_param1 -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %b: %D = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %b.patt: %pattern_type.510 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.510 = value_param_pattern %b.patt, call_param0 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %b.param: %D = value_param call_param0 -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %b: %D = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.b32: %C.ref as %Add.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.7a3 = fn_decl @Op.2 [concrete = constants.%Op.c84] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc20_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc20_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc20_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Add.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.14c: %C.ref as %AddAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.0b8 = fn_decl @Op.4 [concrete = constants.%Op.d8e] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc23_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc23_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%AddAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @D { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C); -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Test(%a.param: %C, %b.param: %D) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.de4 = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%Op.c84] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %.loc37: %C = converted %b.ref, [concrete = ] -// CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, ) to %.loc26 -// CHECK:STDOUT: return %Op.call to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%b.param: %D) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.c48 = var_pattern %a.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a.var: ref %C = var %a.var_patt -// CHECK:STDOUT: %.loc41_15.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc41_15.2: init %C = class_init (), %a.var [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc41_3: init %C = converted %.loc41_15.1, %.loc41_15.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %a.var, %.loc41_3 -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: ref %C = bind_name a, %a.var -// CHECK:STDOUT: %a.ref: ref %C = name_ref a, %a -// CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.6d3 = impl_witness_access constants.%AddAssign.impl_witness, element0 [concrete = constants.%Op.d8e] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %a.ref -// CHECK:STDOUT: %.loc52: %C = converted %b.ref, [concrete = ] -// CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, ) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index 6eaed8017f79..314ebf31b9b8 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -69,12 +69,12 @@ fn Test() { // CHECK:STDOUT: %Sink_i32: %Sink_i32.type = struct_value () [concrete] // CHECK:STDOUT: %Sink_X.type: type = fn_type @Sink_X [concrete] // CHECK:STDOUT: %Sink_X: %Sink_X.type = struct_value () [concrete] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.2: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.2: type = pattern_type %T.8b3 [symbolic] // CHECK:STDOUT: %Source.type: type = fn_type @Source [concrete] // CHECK:STDOUT: %Source: %Source.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %Source.specific_fn.ff0: = specific_function %Source, @Source(%T) [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] +// CHECK:STDOUT: %Source.specific_fn.ff0: = specific_function %Source, @Source(%T.8b3) [symbolic] // CHECK:STDOUT: %Test.type: type = fn_type @Test [concrete] // CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete] // CHECK:STDOUT: %Source.specific_fn.363: = specific_function %Source, @Source(%X) [concrete] @@ -149,10 +149,10 @@ fn Test() { // CHECK:STDOUT: %return.patt: @Source.%pattern_type (%pattern_type.7dcd0a.2) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Source.%pattern_type (%pattern_type.7dcd0a.2) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc30_24: type = name_ref T, %T.loc30_11.1 [symbolic = %T.loc30_11.2 (constants.%T)] -// CHECK:STDOUT: %T.loc30_11.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc30_11.2 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @Source.%T.loc30_11.2 (%T) = out_param call_param0 -// CHECK:STDOUT: %return: ref @Source.%T.loc30_11.2 (%T) = return_slot %return.param +// CHECK:STDOUT: %T.ref.loc30_24: type = name_ref T, %T.loc30_11.1 [symbolic = %T.loc30_11.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc30_11.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc30_11.2 (constants.%T.8b3)] +// CHECK:STDOUT: %return.param: ref @Source.%T.loc30_11.2 (%T.8b3) = out_param call_param0 +// CHECK:STDOUT: %return: ref @Source.%T.loc30_11.2 (%T.8b3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] {} {} // CHECK:STDOUT: } @@ -241,21 +241,21 @@ fn Test() { // CHECK:STDOUT: fn @Sink_X(%x.param: %X); // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Source(%T.loc30_11.1: type) { -// CHECK:STDOUT: %T.loc30_11.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc30_11.2 (constants.%T)] +// CHECK:STDOUT: %T.loc30_11.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc30_11.2 (constants.%T.8b3)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc30_11.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc30_11.2 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: %Source.specific_fn.loc30_35.2: = specific_function constants.%Source, @Source(%T.loc30_11.2) [symbolic = %Source.specific_fn.loc30_35.2 (constants.%Source.specific_fn.ff0)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @Source.%T.loc30_11.2 (%T) { +// CHECK:STDOUT: fn() -> @Source.%T.loc30_11.2 (%T.8b3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Source.ref: %Source.type = name_ref Source, file.%Source.decl [concrete = constants.%Source] -// CHECK:STDOUT: %T.ref.loc30_42: type = name_ref T, %T.loc30_11.1 [symbolic = %T.loc30_11.2 (constants.%T)] -// CHECK:STDOUT: %Source.specific_fn.loc30_35.1: = specific_function %Source.ref, @Source(constants.%T) [symbolic = %Source.specific_fn.loc30_35.2 (constants.%Source.specific_fn.ff0)] -// CHECK:STDOUT: %Source.call: init @Source.%T.loc30_11.2 (%T) = call %Source.specific_fn.loc30_35.1() -// CHECK:STDOUT: %.loc30_44.1: @Source.%T.loc30_11.2 (%T) = value_of_initializer %Source.call -// CHECK:STDOUT: %.loc30_44.2: @Source.%T.loc30_11.2 (%T) = converted %Source.call, %.loc30_44.1 +// CHECK:STDOUT: %T.ref.loc30_42: type = name_ref T, %T.loc30_11.1 [symbolic = %T.loc30_11.2 (constants.%T.8b3)] +// CHECK:STDOUT: %Source.specific_fn.loc30_35.1: = specific_function %Source.ref, @Source(constants.%T.8b3) [symbolic = %Source.specific_fn.loc30_35.2 (constants.%Source.specific_fn.ff0)] +// CHECK:STDOUT: %Source.call: init @Source.%T.loc30_11.2 (%T.8b3) = call %Source.specific_fn.loc30_35.1() +// CHECK:STDOUT: %.loc30_44.1: @Source.%T.loc30_11.2 (%T.8b3) = value_of_initializer %Source.call +// CHECK:STDOUT: %.loc30_44.2: @Source.%T.loc30_11.2 (%T.8b3) = converted %Source.call, %.loc30_44.1 // CHECK:STDOUT: return %.loc30_44.2 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -295,8 +295,8 @@ fn Test() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Source(constants.%T) { -// CHECK:STDOUT: %T.loc30_11.2 => constants.%T +// CHECK:STDOUT: specific @Source(constants.%T.8b3) { +// CHECK:STDOUT: %T.loc30_11.2 => constants.%T.8b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index ec17812f2e29..435eb1d3e75d 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -23,108 +23,37 @@ impl C as Core.Inc { fn TestOp() { var c: C = {}; + //@dump-sem-ir-begin ++c; + //@dump-sem-ir-end } // CHECK:STDOUT: --- inc.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] // CHECK:STDOUT: %Op.type.e3a: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] // CHECK:STDOUT: %Inc.impl_witness: = impl_witness file.%Inc.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] // CHECK:STDOUT: %Op.type.73a: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.0c9: %Op.type.73a = struct_value () [concrete] // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, (%Inc.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %.bc7: type = fn_type_with_self_type %Op.type.e3a, %Inc.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Inc = %Core.Inc -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.c51 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Inc.ref: type = name_ref Inc, imports.%Core.Inc [concrete = constants.%Inc.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Inc.impl_witness_table = impl_witness_table (@impl.c51.%Op.decl), @impl.c51 [concrete] -// CHECK:STDOUT: %Inc.impl_witness: = impl_witness %Inc.impl_witness_table [concrete = constants.%Inc.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] {} {} -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.c51: %C.ref as %Inc.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.73a = fn_decl @Op.2 [concrete = constants.%Op.0c9] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc21_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc21_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Inc.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %ptr.019); -// CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %c.patt: %pattern_type.c48 = binding_pattern c [concrete] -// CHECK:STDOUT: %c.var_patt: %pattern_type.c48 = var_pattern %c.patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: %c.var: ref %C = var %c.var_patt -// CHECK:STDOUT: %.loc25_15.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc25_15.2: init %C = class_init (), %c.var [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc25_3: init %C = converted %.loc25_15.1, %.loc25_15.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc25_3 -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var +// CHECK:STDOUT: // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %impl.elem0: %.bc7 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Op.0c9] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %addr: %ptr.019 = addr_of %c.ref // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon b/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon index b66361aaf644..4085f5712915 100644 --- a/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon +++ b/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon @@ -269,15 +269,15 @@ let x: i32 = c[0]; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.4e6: = bound_method %int_5.64b, %Convert.956 [concrete] @@ -342,14 +342,14 @@ let x: i32 = c[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc10_26.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_26.1: = bound_method @__global_init.%int_1, %impl.elem0.loc10_26.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc10_26.1: = specific_function %impl.elem0.loc10_26.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_26.1: = specific_function %impl.elem0.loc10_26.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_26.2: = bound_method @__global_init.%int_1, %specific_fn.loc10_26.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %bound_method.loc10_26.2(@__global_init.%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_26.1: %i32 = value_of_initializer %int.convert_checked.loc10_26.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_26.2: %i32 = converted @__global_init.%int_1, %.loc10_26.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc10_26.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_26.3: = bound_method @__global_init.%int_5, %impl.elem0.loc10_26.2 [concrete = constants.%Convert.bound.4e6] -// CHECK:STDOUT: %specific_fn.loc10_26.2: = specific_function %impl.elem0.loc10_26.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_26.2: = specific_function %impl.elem0.loc10_26.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_26.4: = bound_method @__global_init.%int_5, %specific_fn.loc10_26.2 [concrete = constants.%bound_method.a25] // CHECK:STDOUT: %int.convert_checked.loc10_26.2: init %i32 = call %bound_method.loc10_26.4(@__global_init.%int_5) [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc10_26.3: %i32 = value_of_initializer %int.convert_checked.loc10_26.2 [concrete = constants.%int_5.0f6] @@ -415,7 +415,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc11_17.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc11_17.1: = bound_method %int_0, %impl.elem0.loc11_17.1 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc11_17.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc11_17.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_17.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc11_17.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc11_17.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -477,7 +477,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %ElementType.decl: type = class_decl @ElementType [concrete = constants.%ElementType.e6b] {} {} // CHECK:STDOUT: %SubscriptType.decl: type = class_decl @SubscriptType [concrete = constants.%SubscriptType.8ee] {} {} -// CHECK:STDOUT: impl_decl @impl [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.066 [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.504 = name_ref IndexWith, imports.%Core.IndexWith [concrete = constants.%IndexWith.generic] @@ -485,7 +485,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [concrete = constants.%ElementType.e6b] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%SubscriptType.8ee, constants.%ElementType.e6b)> [concrete = constants.%IndexWith.type.e80] // CHECK:STDOUT: } -// CHECK:STDOUT: %IndexWith.impl_witness_table = impl_witness_table (@impl.%At.decl), @impl [concrete] +// CHECK:STDOUT: %IndexWith.impl_witness_table = impl_witness_table (@impl.066.%At.decl), @impl.066 [concrete] // CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness %IndexWith.impl_witness_table [concrete = constants.%IndexWith.impl_witness] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %pattern_type.c48 = binding_pattern c [concrete] @@ -504,7 +504,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %x: ref %ElementType.e6b = bind_name x, %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %C.ref as %IndexWith.type { +// CHECK:STDOUT: impl @impl.066: %C.ref as %IndexWith.type { // CHECK:STDOUT: %At.decl: %At.type.178 = fn_decl @At.2 [concrete = constants.%At.d43] { // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] @@ -515,7 +515,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: } { // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [concrete = constants.%ElementType.e6b] // CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%C.ref [concrete = constants.%C] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.066.%C.ref [concrete = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: %SubscriptType.8ee = value_param call_param1 // CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, file.%SubscriptType.decl [concrete = constants.%SubscriptType.8ee] diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index 6a5974a0c3cb..22336bfcff57 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -17,205 +17,59 @@ package User; class C {}; -impl C as Core.LeftShift { +impl C as Core.LeftShiftWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.LeftShiftAssign { +impl C as Core.LeftShiftAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a << b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a <<= b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- left_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %LeftShift.type: type = facet_type <@LeftShift> [concrete] -// CHECK:STDOUT: %Op.type.789: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %LeftShift.impl_witness: = impl_witness file.%LeftShift.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.de2: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.df9: %Op.type.de2 = struct_value () [concrete] -// CHECK:STDOUT: %LeftShift.facet: %LeftShift.type = facet_value %C, (%LeftShift.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %LeftShiftAssign.type: type = facet_type <@LeftShiftAssign> [concrete] -// CHECK:STDOUT: %Op.type.1de: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %LeftShiftAssign.impl_witness: = impl_witness file.%LeftShiftAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %LeftShiftWith.type.f92: type = facet_type <@LeftShiftWith, @LeftShiftWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.097: type = fn_type @Op.1, @LeftShiftWith(%C) [concrete] +// CHECK:STDOUT: %LeftShiftWith.impl_witness: = impl_witness file.%LeftShiftWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.be6: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.4d9: %Op.type.be6 = struct_value () [concrete] +// CHECK:STDOUT: %LeftShiftWith.facet.662: %LeftShiftWith.type.f92 = facet_value %C, (%LeftShiftWith.impl_witness) [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.type.56d: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.30f: type = fn_type @Op.7, @LeftShiftAssignWith(%C) [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.impl_witness: = impl_witness file.%LeftShiftAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.386: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.8fc: %Op.type.386 = struct_value () [concrete] -// CHECK:STDOUT: %LeftShiftAssign.facet: %LeftShiftAssign.type = facet_value %C, (%LeftShiftAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.8a4: type = fn_type_with_self_type %Op.type.789, %LeftShift.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.1de, %LeftShiftAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.b1b6: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.07c: %Op.type.b1b6 = struct_value () [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.56d = facet_value %C, (%LeftShiftAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.cd9: type = fn_type_with_self_type %Op.type.097, %LeftShiftWith.facet.662 [concrete] +// CHECK:STDOUT: %.97b: type = fn_type_with_self_type %Op.type.30f, %LeftShiftAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .LeftShift = %Core.LeftShift -// CHECK:STDOUT: .LeftShiftAssign = %Core.LeftShiftAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.LeftShift: type = import_ref Core//prelude/operators/bitwise, LeftShift, loaded [concrete = constants.%LeftShift.type] -// CHECK:STDOUT: %Core.LeftShiftAssign: type = import_ref Core//prelude/operators/bitwise, LeftShiftAssign, loaded [concrete = constants.%LeftShiftAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.c6e [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %LeftShift.ref: type = name_ref LeftShift, imports.%Core.LeftShift [concrete = constants.%LeftShift.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %LeftShift.impl_witness_table = impl_witness_table (@impl.c6e.%Op.decl), @impl.c6e [concrete] -// CHECK:STDOUT: %LeftShift.impl_witness: = impl_witness %LeftShift.impl_witness_table [concrete = constants.%LeftShift.impl_witness] -// CHECK:STDOUT: impl_decl @impl.29d [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %LeftShiftAssign.ref: type = name_ref LeftShiftAssign, imports.%Core.LeftShiftAssign [concrete = constants.%LeftShiftAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %LeftShiftAssign.impl_witness_table = impl_witness_table (@impl.29d.%Op.decl), @impl.29d [concrete] -// CHECK:STDOUT: %LeftShiftAssign.impl_witness: = impl_witness %LeftShiftAssign.impl_witness_table [concrete = constants.%LeftShiftAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.c6e: %C.ref as %LeftShift.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.de2 = fn_decl @Op.2 [concrete = constants.%Op.df9] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%LeftShift.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.29d: %C.ref as %LeftShiftAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.386 = fn_decl @Op.4 [concrete = constants.%Op.8fc] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%LeftShiftAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.8a4 = impl_witness_access constants.%LeftShift.impl_witness, element0 [concrete = constants.%Op.df9] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.cd9 = impl_witness_access constants.%LeftShiftWith.impl_witness, element1 [concrete = constants.%Op.4d9] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +77,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.ac9 = impl_witness_access constants.%LeftShiftAssign.impl_witness, element0 [concrete = constants.%Op.8fc] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.97b = impl_witness_access constants.%LeftShiftAssignWith.impl_witness, element0 [concrete = constants.%Op.07c] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index c8fa4babafbd..8fb5bc2dcf09 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -17,205 +17,66 @@ package User; class C {}; -impl C as Core.Mod { +impl C as Core.ModWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.ModAssign { +impl C as Core.ModAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a % b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a %= b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- mod.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %Mod.type: type = facet_type <@Mod> [concrete] -// CHECK:STDOUT: %Op.type.860: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Mod.impl_witness: = impl_witness file.%Mod.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.fd2: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.777: %Op.type.fd2 = struct_value () [concrete] -// CHECK:STDOUT: %Mod.facet: %Mod.type = facet_value %C, (%Mod.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %ModAssign.type: type = facet_type <@ModAssign> [concrete] -// CHECK:STDOUT: %Op.type.fae: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %ModAssign.impl_witness: = impl_witness file.%ModAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %Other: type = bind_symbolic_name Other, 0 [symbolic] +// CHECK:STDOUT: %ModWith.type.bcb: type = facet_type <@ModWith, @ModWith(%Other)> [symbolic] +// CHECK:STDOUT: %Self.9cc: %ModWith.type.bcb = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %ModWith.type.4d0: type = facet_type <@ModWith, @ModWith(%C)> [concrete] +// CHECK:STDOUT: %.Self.d23: %ModWith.type.4d0 = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %Op.type.140: type = fn_type @Op.1, @ModWith(%C) [concrete] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.d23 [symbolic_self] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.e42: = lookup_impl_witness %.Self.d23, @ModWith, @ModWith(%C) [symbolic_self] +// CHECK:STDOUT: %ModWith.facet.d9a: %ModWith.type.4d0 = facet_value %.Self.as_type, (%ModWith.lookup_impl_witness.e42) [symbolic_self] +// CHECK:STDOUT: %ModWith.impl_witness: = impl_witness file.%ModWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.0ad: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.d57: %Op.type.0ad = struct_value () [concrete] +// CHECK:STDOUT: %ModWith.facet.517: %ModWith.type.4d0 = facet_value %C, (%ModWith.impl_witness) [concrete] +// CHECK:STDOUT: %ModAssignWith.type.8eb: type = facet_type <@ModAssignWith, @ModAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.dd0: type = fn_type @Op.7, @ModAssignWith(%C) [concrete] +// CHECK:STDOUT: %ModAssignWith.impl_witness: = impl_witness file.%ModAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.fa2: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.d6c: %Op.type.fa2 = struct_value () [concrete] -// CHECK:STDOUT: %ModAssign.facet: %ModAssign.type = facet_value %C, (%ModAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.0c1: type = fn_type_with_self_type %Op.type.860, %Mod.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.1f2: type = fn_type_with_self_type %Op.type.fae, %ModAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.4dd: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.4f0: %Op.type.4dd = struct_value () [concrete] +// CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.8eb = facet_value %C, (%ModAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.f08: type = fn_type_with_self_type %Op.type.140, %ModWith.facet.517 [concrete] +// CHECK:STDOUT: %.f3c: type = fn_type_with_self_type %Op.type.dd0, %ModAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Mod = %Core.Mod -// CHECK:STDOUT: .ModAssign = %Core.ModAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Mod: type = import_ref Core//prelude/operators/arithmetic, Mod, loaded [concrete = constants.%Mod.type] -// CHECK:STDOUT: %Core.ModAssign: type = import_ref Core//prelude/operators/arithmetic, ModAssign, loaded [concrete = constants.%ModAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.f96 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Mod.ref: type = name_ref Mod, imports.%Core.Mod [concrete = constants.%Mod.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Mod.impl_witness_table = impl_witness_table (@impl.f96.%Op.decl), @impl.f96 [concrete] -// CHECK:STDOUT: %Mod.impl_witness: = impl_witness %Mod.impl_witness_table [concrete = constants.%Mod.impl_witness] -// CHECK:STDOUT: impl_decl @impl.587 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %ModAssign.ref: type = name_ref ModAssign, imports.%Core.ModAssign [concrete = constants.%ModAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %ModAssign.impl_witness_table = impl_witness_table (@impl.587.%Op.decl), @impl.587 [concrete] -// CHECK:STDOUT: %ModAssign.impl_witness: = impl_witness %ModAssign.impl_witness_table [concrete = constants.%ModAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.f96: %C.ref as %Mod.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.fd2 = fn_decl @Op.2 [concrete = constants.%Op.777] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Mod.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.587: %C.ref as %ModAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.fa2 = fn_decl @Op.4 [concrete = constants.%Op.d6c] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%ModAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.0c1 = impl_witness_access constants.%Mod.impl_witness, element0 [concrete = constants.%Op.777] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.f08 = impl_witness_access constants.%ModWith.impl_witness, element1 [concrete = constants.%Op.d57] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +84,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.1f2 = impl_witness_access constants.%ModAssign.impl_witness, element0 [concrete = constants.%Op.d6c] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.f3c = impl_witness_access constants.%ModAssignWith.impl_witness, element0 [concrete = constants.%Op.4f0] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Result(constants.%Other, constants.%Self.9cc) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Result(constants.%C, constants.%ModWith.facet.d9a) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index e085fa8c3d53..e1404f596455 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -17,205 +17,59 @@ package User; class C {}; -impl C as Core.Mul { +impl C as Core.MulWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.MulAssign { +impl C as Core.MulAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a * b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a *= b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- mul.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %Mul.type: type = facet_type <@Mul> [concrete] -// CHECK:STDOUT: %Op.type.3ae: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Mul.impl_witness: = impl_witness file.%Mul.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.fa5: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.550: %Op.type.fa5 = struct_value () [concrete] -// CHECK:STDOUT: %Mul.facet: %Mul.type = facet_value %C, (%Mul.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %MulAssign.type: type = facet_type <@MulAssign> [concrete] -// CHECK:STDOUT: %Op.type.340: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %MulAssign.impl_witness: = impl_witness file.%MulAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %MulWith.type.3ed: type = facet_type <@MulWith, @MulWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.2c9: type = fn_type @Op.1, @MulWith(%C) [concrete] +// CHECK:STDOUT: %MulWith.impl_witness: = impl_witness file.%MulWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.304: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.7af: %Op.type.304 = struct_value () [concrete] +// CHECK:STDOUT: %MulWith.facet.6c2: %MulWith.type.3ed = facet_value %C, (%MulWith.impl_witness) [concrete] +// CHECK:STDOUT: %MulAssignWith.type.a15: type = facet_type <@MulAssignWith, @MulAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.5c8: type = fn_type @Op.7, @MulAssignWith(%C) [concrete] +// CHECK:STDOUT: %MulAssignWith.impl_witness: = impl_witness file.%MulAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.c02: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.a8c: %Op.type.c02 = struct_value () [concrete] -// CHECK:STDOUT: %MulAssign.facet: %MulAssign.type = facet_value %C, (%MulAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.ccd: type = fn_type_with_self_type %Op.type.3ae, %Mul.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.de8: type = fn_type_with_self_type %Op.type.340, %MulAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.e9a: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.d43: %Op.type.e9a = struct_value () [concrete] +// CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.a15 = facet_value %C, (%MulAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.6ce: type = fn_type_with_self_type %Op.type.2c9, %MulWith.facet.6c2 [concrete] +// CHECK:STDOUT: %.5e8: type = fn_type_with_self_type %Op.type.5c8, %MulAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Mul = %Core.Mul -// CHECK:STDOUT: .MulAssign = %Core.MulAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Mul: type = import_ref Core//prelude/operators/arithmetic, Mul, loaded [concrete = constants.%Mul.type] -// CHECK:STDOUT: %Core.MulAssign: type = import_ref Core//prelude/operators/arithmetic, MulAssign, loaded [concrete = constants.%MulAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.4f2 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Mul.ref: type = name_ref Mul, imports.%Core.Mul [concrete = constants.%Mul.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Mul.impl_witness_table = impl_witness_table (@impl.4f2.%Op.decl), @impl.4f2 [concrete] -// CHECK:STDOUT: %Mul.impl_witness: = impl_witness %Mul.impl_witness_table [concrete = constants.%Mul.impl_witness] -// CHECK:STDOUT: impl_decl @impl.009 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %MulAssign.ref: type = name_ref MulAssign, imports.%Core.MulAssign [concrete = constants.%MulAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %MulAssign.impl_witness_table = impl_witness_table (@impl.009.%Op.decl), @impl.009 [concrete] -// CHECK:STDOUT: %MulAssign.impl_witness: = impl_witness %MulAssign.impl_witness_table [concrete = constants.%MulAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.4f2: %C.ref as %Mul.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.fa5 = fn_decl @Op.2 [concrete = constants.%Op.550] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Mul.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.009: %C.ref as %MulAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.c02 = fn_decl @Op.4 [concrete = constants.%Op.a8c] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%MulAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.ccd = impl_witness_access constants.%Mul.impl_witness, element0 [concrete = constants.%Op.550] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.6ce = impl_witness_access constants.%MulWith.impl_witness, element1 [concrete = constants.%Op.7af] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +77,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.de8 = impl_witness_access constants.%MulAssign.impl_witness, element0 [concrete = constants.%Op.a8c] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.5e8 = impl_witness_access constants.%MulAssignWith.impl_witness, element0 [concrete = constants.%Op.d43] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index 42e07eca0948..00a4f7ec2be6 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -17,118 +17,40 @@ package User; class C {}; -impl C as Core.Negate { +impl C as Core.Negate where .Result = C { fn Op[self: C]() -> C { return {}; } } fn TestOp(a: C) -> C { + //@dump-sem-ir-begin return -a; + //@dump-sem-ir-end } // CHECK:STDOUT: --- negate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.1 [concrete] +// CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.6 [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness file.%Negate.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.67d: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.64c: %Op.type.67d = struct_value () [concrete] -// CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %C, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.365: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] +// CHECK:STDOUT: %Op.type.def: type = fn_type @Op.7 [concrete] +// CHECK:STDOUT: %Op.045: %Op.type.def = struct_value () [concrete] +// CHECK:STDOUT: %Negate.facet.b50: %Negate.type = facet_value %C, (%Negate.impl_witness) [concrete] +// CHECK:STDOUT: %.26d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet.b50 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Negate = %Core.Negate -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.c34 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Negate.ref: type = name_ref Negate, imports.%Core.Negate [concrete = constants.%Negate.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (@impl.c34.%Op.decl), @impl.c34 [concrete] -// CHECK:STDOUT: %Negate.impl_witness: = impl_witness %Negate.impl_witness_table [concrete = constants.%Negate.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param1 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.c34: %C.ref as %Negate.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.67d = fn_decl @Op.2 [concrete = constants.%Op.64c] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_23: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param1 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Negate.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem0: %.365 = impl_witness_access constants.%Negate.impl_witness, element0 [concrete = constants.%Op.64c] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.26d = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Op.045] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index 0ab54a059ff9..b6abac115719 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -17,7 +17,7 @@ package User; class C {}; -impl C as Core.Ordered { +impl C as Core.OrderedWith(C) { fn Less[self: C](other: C) -> bool; fn LessOrEquivalent[self: C](other: C) -> bool; fn Greater[self: C](other: C) -> bool; @@ -47,7 +47,7 @@ package FailNoImpl; class D {}; fn TestLess(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Ordered` in type `D` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.OrderedWith(D)` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a < b; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -55,7 +55,7 @@ fn TestLess(a: D, b: D) -> bool { } fn TestLessEqual(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Ordered` in type `D` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.OrderedWith(D)` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a <= b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -63,7 +63,7 @@ fn TestLessEqual(a: D, b: D) -> bool { } fn TestGreater(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Ordered` in type `D` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.OrderedWith(D)` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a > b; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -71,7 +71,7 @@ fn TestGreater(a: D, b: D) -> bool { } fn TestGreaterEqual(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.Ordered` in type `D` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.OrderedWith(D)` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a >= b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -84,47 +84,49 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %Ordered.type: type = facet_type <@Ordered> [concrete] -// CHECK:STDOUT: %Less.type.341: type = fn_type @Less.1 [concrete] +// CHECK:STDOUT: %OrderedWith.type.270: type = generic_interface_type @OrderedWith [concrete] +// CHECK:STDOUT: %OrderedWith.generic: %OrderedWith.type.270 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] -// CHECK:STDOUT: %LessOrEquivalent.type.859: type = fn_type @LessOrEquivalent.1 [concrete] -// CHECK:STDOUT: %Greater.type.270: type = fn_type @Greater.1 [concrete] -// CHECK:STDOUT: %GreaterOrEquivalent.type.8af: type = fn_type @GreaterOrEquivalent.1 [concrete] -// CHECK:STDOUT: %Ordered.impl_witness: = impl_witness file.%Ordered.impl_witness_table [concrete] +// CHECK:STDOUT: %OrderedWith.type.914: type = facet_type <@OrderedWith, @OrderedWith(%C)> [concrete] +// CHECK:STDOUT: %Less.type.ef8: type = fn_type @Less.1, @OrderedWith(%C) [concrete] +// CHECK:STDOUT: %LessOrEquivalent.type.718: type = fn_type @LessOrEquivalent.1, @OrderedWith(%C) [concrete] +// CHECK:STDOUT: %Greater.type.394: type = fn_type @Greater.1, @OrderedWith(%C) [concrete] +// CHECK:STDOUT: %GreaterOrEquivalent.type.f2b: type = fn_type @GreaterOrEquivalent.1, @OrderedWith(%C) [concrete] +// CHECK:STDOUT: %OrderedWith.impl_witness: = impl_witness file.%OrderedWith.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %Less.type.25a: type = fn_type @Less.2 [concrete] -// CHECK:STDOUT: %Less.738: %Less.type.25a = struct_value () [concrete] -// CHECK:STDOUT: %LessOrEquivalent.type.478: type = fn_type @LessOrEquivalent.2 [concrete] -// CHECK:STDOUT: %LessOrEquivalent.010: %LessOrEquivalent.type.478 = struct_value () [concrete] -// CHECK:STDOUT: %Greater.type.0a1: type = fn_type @Greater.2 [concrete] -// CHECK:STDOUT: %Greater.afe: %Greater.type.0a1 = struct_value () [concrete] -// CHECK:STDOUT: %GreaterOrEquivalent.type.caf: type = fn_type @GreaterOrEquivalent.2 [concrete] -// CHECK:STDOUT: %GreaterOrEquivalent.03b: %GreaterOrEquivalent.type.caf = struct_value () [concrete] -// CHECK:STDOUT: %Ordered.facet: %Ordered.type = facet_value %C, (%Ordered.impl_witness) [concrete] +// CHECK:STDOUT: %Less.type.e31: type = fn_type @Less.2 [concrete] +// CHECK:STDOUT: %Less.076: %Less.type.e31 = struct_value () [concrete] +// CHECK:STDOUT: %LessOrEquivalent.type.873: type = fn_type @LessOrEquivalent.2 [concrete] +// CHECK:STDOUT: %LessOrEquivalent.4d6: %LessOrEquivalent.type.873 = struct_value () [concrete] +// CHECK:STDOUT: %Greater.type.54b: type = fn_type @Greater.2 [concrete] +// CHECK:STDOUT: %Greater.548: %Greater.type.54b = struct_value () [concrete] +// CHECK:STDOUT: %GreaterOrEquivalent.type.311: type = fn_type @GreaterOrEquivalent.2 [concrete] +// CHECK:STDOUT: %GreaterOrEquivalent.1b2: %GreaterOrEquivalent.type.311 = struct_value () [concrete] +// CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.914 = facet_value %C, (%OrderedWith.impl_witness) [concrete] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [concrete] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [concrete] -// CHECK:STDOUT: %.d60: type = fn_type_with_self_type %Less.type.341, %Ordered.facet [concrete] +// CHECK:STDOUT: %.dc0: type = fn_type_with_self_type %Less.type.ef8, %OrderedWith.facet [concrete] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [concrete] // CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.6b1: type = fn_type_with_self_type %LessOrEquivalent.type.859, %Ordered.facet [concrete] +// CHECK:STDOUT: %.d74: type = fn_type_with_self_type %LessOrEquivalent.type.718, %OrderedWith.facet [concrete] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [concrete] // CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [concrete] -// CHECK:STDOUT: %.5ae: type = fn_type_with_self_type %Greater.type.270, %Ordered.facet [concrete] +// CHECK:STDOUT: %.aa9: type = fn_type_with_self_type %Greater.type.394, %OrderedWith.facet [concrete] // CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [concrete] // CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.0c4: type = fn_type_with_self_type %GreaterOrEquivalent.type.8af, %Ordered.facet [concrete] +// CHECK:STDOUT: %.af7: type = fn_type_with_self_type %GreaterOrEquivalent.type.f2b, %OrderedWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Ordered = %Core.Ordered +// CHECK:STDOUT: .OrderedWith = %Core.OrderedWith // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Ordered: type = import_ref Core//prelude/operators/comparison, Ordered, loaded [concrete = constants.%Ordered.type] +// CHECK:STDOUT: %Core.OrderedWith: %OrderedWith.type.270 = import_ref Core//prelude/operators/comparison, OrderedWith, loaded [concrete = constants.%OrderedWith.generic] // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -139,13 +141,15 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.d54 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: impl_decl @impl.ecd [concrete] {} { +// CHECK:STDOUT: %C.ref.loc6_6: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Ordered.ref: type = name_ref Ordered, imports.%Core.Ordered [concrete = constants.%Ordered.type] +// CHECK:STDOUT: %OrderedWith.ref: %OrderedWith.type.270 = name_ref OrderedWith, imports.%Core.OrderedWith [concrete = constants.%OrderedWith.generic] +// CHECK:STDOUT: %C.ref.loc6_28: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %OrderedWith.type: type = facet_type <@OrderedWith, @OrderedWith(constants.%C)> [concrete = constants.%OrderedWith.type.914] // CHECK:STDOUT: } -// CHECK:STDOUT: %Ordered.impl_witness_table = impl_witness_table (@impl.d54.%Less.decl, @impl.d54.%LessOrEquivalent.decl, @impl.d54.%Greater.decl, @impl.d54.%GreaterOrEquivalent.decl), @impl.d54 [concrete] -// CHECK:STDOUT: %Ordered.impl_witness: = impl_witness %Ordered.impl_witness_table [concrete = constants.%Ordered.impl_witness] +// CHECK:STDOUT: %OrderedWith.impl_witness_table = impl_witness_table (@impl.ecd.%Less.decl, @impl.ecd.%LessOrEquivalent.decl, @impl.ecd.%Greater.decl, @impl.ecd.%GreaterOrEquivalent.decl), @impl.ecd [concrete] +// CHECK:STDOUT: %OrderedWith.impl_witness: = impl_witness %OrderedWith.impl_witness_table [concrete = constants.%OrderedWith.impl_witness] // CHECK:STDOUT: %TestLess.decl: %TestLess.type = fn_decl @TestLess [concrete = constants.%TestLess] { // CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] @@ -228,8 +232,8 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.d54: %C.ref as %Ordered.ref { -// CHECK:STDOUT: %Less.decl: %Less.type.25a = fn_decl @Less.2 [concrete = constants.%Less.738] { +// CHECK:STDOUT: impl @impl.ecd: %C.ref.loc6_6 as %OrderedWith.type { +// CHECK:STDOUT: %Less.decl: %Less.type.e31 = fn_decl @Less.2 [concrete = constants.%Less.076] { // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] @@ -249,7 +253,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %LessOrEquivalent.decl: %LessOrEquivalent.type.478 = fn_decl @LessOrEquivalent.2 [concrete = constants.%LessOrEquivalent.010] { +// CHECK:STDOUT: %LessOrEquivalent.decl: %LessOrEquivalent.type.873 = fn_decl @LessOrEquivalent.2 [concrete = constants.%LessOrEquivalent.4d6] { // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] @@ -269,7 +273,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Greater.decl: %Greater.type.0a1 = fn_decl @Greater.2 [concrete = constants.%Greater.afe] { +// CHECK:STDOUT: %Greater.decl: %Greater.type.54b = fn_decl @Greater.2 [concrete = constants.%Greater.548] { // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] @@ -289,7 +293,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %GreaterOrEquivalent.decl: %GreaterOrEquivalent.type.caf = fn_decl @GreaterOrEquivalent.2 [concrete = constants.%GreaterOrEquivalent.03b] { +// CHECK:STDOUT: %GreaterOrEquivalent.decl: %GreaterOrEquivalent.type.311 = fn_decl @GreaterOrEquivalent.2 [concrete = constants.%GreaterOrEquivalent.1b2] { // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] @@ -316,7 +320,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: .LessOrEquivalent = %LessOrEquivalent.decl // CHECK:STDOUT: .Greater = %Greater.decl // CHECK:STDOUT: .GreaterOrEquivalent = %GreaterOrEquivalent.decl -// CHECK:STDOUT: witness = file.%Ordered.impl_witness +// CHECK:STDOUT: witness = file.%OrderedWith.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -340,7 +344,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.d60 = impl_witness_access constants.%Ordered.impl_witness, element0 [concrete = constants.%Less.738] +// CHECK:STDOUT: %impl.elem0: %.dc0 = impl_witness_access constants.%OrderedWith.impl_witness, element0 [concrete = constants.%Less.076] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %Less.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call @@ -352,7 +356,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.6b1 = impl_witness_access constants.%Ordered.impl_witness, element1 [concrete = constants.%LessOrEquivalent.010] +// CHECK:STDOUT: %impl.elem1: %.d74 = impl_witness_access constants.%OrderedWith.impl_witness, element1 [concrete = constants.%LessOrEquivalent.4d6] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call @@ -364,7 +368,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem2: %.5ae = impl_witness_access constants.%Ordered.impl_witness, element2 [concrete = constants.%Greater.afe] +// CHECK:STDOUT: %impl.elem2: %.aa9 = impl_witness_access constants.%OrderedWith.impl_witness, element2 [concrete = constants.%Greater.548] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem2 // CHECK:STDOUT: %Greater.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call @@ -376,7 +380,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem3: %.0c4 = impl_witness_access constants.%Ordered.impl_witness, element3 [concrete = constants.%GreaterOrEquivalent.03b] +// CHECK:STDOUT: %impl.elem3: %.af7 = impl_witness_access constants.%OrderedWith.impl_witness, element3 [concrete = constants.%GreaterOrEquivalent.1b2] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem3 // CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call @@ -396,7 +400,8 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [concrete] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [concrete] -// CHECK:STDOUT: %Ordered.type: type = facet_type <@Ordered> [concrete] +// CHECK:STDOUT: %OrderedWith.type.270: type = generic_interface_type @OrderedWith [concrete] +// CHECK:STDOUT: %OrderedWith.generic: %OrderedWith.type.270 = struct_value () [concrete] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [concrete] // CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [concrete] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [concrete] @@ -408,12 +413,12 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool -// CHECK:STDOUT: .Ordered = %Core.Ordered +// CHECK:STDOUT: .OrderedWith = %Core.OrderedWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.Ordered: type = import_ref Core//prelude/operators/comparison, Ordered, loaded [concrete = constants.%Ordered.type] +// CHECK:STDOUT: %Core.OrderedWith: %OrderedWith.type.270 = import_ref Core//prelude/operators/comparison, OrderedWith, loaded [concrete = constants.%OrderedWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index 589429993fba..8956c9d6b89c 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -17,205 +17,59 @@ package User; class C {}; -impl C as Core.RightShift { +impl C as Core.RightShiftWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.RightShiftAssign { +impl C as Core.RightShiftAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a >> b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a >>= b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- right_shift.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %RightShift.type: type = facet_type <@RightShift> [concrete] -// CHECK:STDOUT: %Op.type.4f4: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %RightShift.impl_witness: = impl_witness file.%RightShift.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.092: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.79a: %Op.type.092 = struct_value () [concrete] -// CHECK:STDOUT: %RightShift.facet: %RightShift.type = facet_value %C, (%RightShift.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %RightShiftAssign.type: type = facet_type <@RightShiftAssign> [concrete] -// CHECK:STDOUT: %Op.type.6f6: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %RightShiftAssign.impl_witness: = impl_witness file.%RightShiftAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %RightShiftWith.type.bd6: type = facet_type <@RightShiftWith, @RightShiftWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.19b: type = fn_type @Op.1, @RightShiftWith(%C) [concrete] +// CHECK:STDOUT: %RightShiftWith.impl_witness: = impl_witness file.%RightShiftWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.873: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.909: %Op.type.873 = struct_value () [concrete] +// CHECK:STDOUT: %RightShiftWith.facet.fb0: %RightShiftWith.type.bd6 = facet_value %C, (%RightShiftWith.impl_witness) [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.type.cd0: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.ae9: type = fn_type @Op.7, @RightShiftAssignWith(%C) [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.impl_witness: = impl_witness file.%RightShiftAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.aab: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.7b2: %Op.type.aab = struct_value () [concrete] -// CHECK:STDOUT: %RightShiftAssign.facet: %RightShiftAssign.type = facet_value %C, (%RightShiftAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.17b: type = fn_type_with_self_type %Op.type.4f4, %RightShift.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.285: type = fn_type_with_self_type %Op.type.6f6, %RightShiftAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.e0c: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.6a2: %Op.type.e0c = struct_value () [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.cd0 = facet_value %C, (%RightShiftAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.982: type = fn_type_with_self_type %Op.type.19b, %RightShiftWith.facet.fb0 [concrete] +// CHECK:STDOUT: %.d41: type = fn_type_with_self_type %Op.type.ae9, %RightShiftAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .RightShift = %Core.RightShift -// CHECK:STDOUT: .RightShiftAssign = %Core.RightShiftAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.RightShift: type = import_ref Core//prelude/operators/bitwise, RightShift, loaded [concrete = constants.%RightShift.type] -// CHECK:STDOUT: %Core.RightShiftAssign: type = import_ref Core//prelude/operators/bitwise, RightShiftAssign, loaded [concrete = constants.%RightShiftAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.3c1 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %RightShift.ref: type = name_ref RightShift, imports.%Core.RightShift [concrete = constants.%RightShift.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %RightShift.impl_witness_table = impl_witness_table (@impl.3c1.%Op.decl), @impl.3c1 [concrete] -// CHECK:STDOUT: %RightShift.impl_witness: = impl_witness %RightShift.impl_witness_table [concrete = constants.%RightShift.impl_witness] -// CHECK:STDOUT: impl_decl @impl.4f0 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %RightShiftAssign.ref: type = name_ref RightShiftAssign, imports.%Core.RightShiftAssign [concrete = constants.%RightShiftAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %RightShiftAssign.impl_witness_table = impl_witness_table (@impl.4f0.%Op.decl), @impl.4f0 [concrete] -// CHECK:STDOUT: %RightShiftAssign.impl_witness: = impl_witness %RightShiftAssign.impl_witness_table [concrete = constants.%RightShiftAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.3c1: %C.ref as %RightShift.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.092 = fn_decl @Op.2 [concrete = constants.%Op.79a] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%RightShift.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.4f0: %C.ref as %RightShiftAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.aab = fn_decl @Op.4 [concrete = constants.%Op.7b2] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%RightShiftAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.17b = impl_witness_access constants.%RightShift.impl_witness, element0 [concrete = constants.%Op.79a] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.982 = impl_witness_access constants.%RightShiftWith.impl_witness, element1 [concrete = constants.%Op.909] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +77,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.285 = impl_witness_access constants.%RightShiftAssign.impl_witness, element0 [concrete = constants.%Op.7b2] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.d41 = impl_witness_access constants.%RightShiftAssignWith.impl_witness, element0 [concrete = constants.%Op.6a2] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index 60ff1c3e9efb..9e299f16d6b5 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -17,205 +17,59 @@ package User; class C {}; -impl C as Core.Sub { +impl C as Core.SubWith(C) where .Result = C { fn Op[self: C](other: C) -> C { return {}; } } -impl C as Core.SubAssign { +impl C as Core.SubAssignWith(C) { fn Op[addr self: C*](other: C) {} } fn TestOp(a: C, b: C) -> C { + //@dump-sem-ir-begin return a - b; + //@dump-sem-ir-end } fn TestAssign(a: C*, b: C) { + //@dump-sem-ir-begin *a -= b; + //@dump-sem-ir-end } // CHECK:STDOUT: --- sub.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %Sub.type: type = facet_type <@Sub> [concrete] -// CHECK:STDOUT: %Op.type.111: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Sub.impl_witness: = impl_witness file.%Sub.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %Op.type.c74: type = fn_type @Op.2 [concrete] -// CHECK:STDOUT: %Op.151: %Op.type.c74 = struct_value () [concrete] -// CHECK:STDOUT: %Sub.facet: %Sub.type = facet_value %C, (%Sub.impl_witness) [concrete] -// CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %SubAssign.type: type = facet_type <@SubAssign> [concrete] -// CHECK:STDOUT: %Op.type.f0d: type = fn_type @Op.3 [concrete] -// CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] -// CHECK:STDOUT: %SubAssign.impl_witness: = impl_witness file.%SubAssign.impl_witness_table [concrete] +// CHECK:STDOUT: %SubWith.type.d29: type = facet_type <@SubWith, @SubWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.fc0: type = fn_type @Op.1, @SubWith(%C) [concrete] +// CHECK:STDOUT: %SubWith.impl_witness: = impl_witness file.%SubWith.impl_witness_table [concrete] +// CHECK:STDOUT: %Op.type.3fa: type = fn_type @Op.6 [concrete] +// CHECK:STDOUT: %Op.5e4: %Op.type.3fa = struct_value () [concrete] +// CHECK:STDOUT: %SubWith.facet.0b6: %SubWith.type.d29 = facet_value %C, (%SubWith.impl_witness) [concrete] +// CHECK:STDOUT: %SubAssignWith.type.df6: type = facet_type <@SubAssignWith, @SubAssignWith(%C)> [concrete] +// CHECK:STDOUT: %Op.type.ffe: type = fn_type @Op.7, @SubAssignWith(%C) [concrete] +// CHECK:STDOUT: %SubAssignWith.impl_witness: = impl_witness file.%SubAssignWith.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete] -// CHECK:STDOUT: %Op.type.966: type = fn_type @Op.4 [concrete] -// CHECK:STDOUT: %Op.a55: %Op.type.966 = struct_value () [concrete] -// CHECK:STDOUT: %SubAssign.facet: %SubAssign.type = facet_value %C, (%SubAssign.impl_witness) [concrete] -// CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [concrete] -// CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.ee4: type = fn_type_with_self_type %Op.type.111, %Sub.facet [concrete] -// CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [concrete] -// CHECK:STDOUT: %TestAssign: %TestAssign.type = struct_value () [concrete] -// CHECK:STDOUT: %.dac: type = fn_type_with_self_type %Op.type.f0d, %SubAssign.facet [concrete] +// CHECK:STDOUT: %Op.type.26d: type = fn_type @Op.8 [concrete] +// CHECK:STDOUT: %Op.f7d: %Op.type.26d = struct_value () [concrete] +// CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.df6 = facet_value %C, (%SubAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %.71c: type = fn_type_with_self_type %Op.type.fc0, %SubWith.facet.0b6 [concrete] +// CHECK:STDOUT: %.647: type = fn_type_with_self_type %Op.type.ffe, %SubAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Sub = %Core.Sub -// CHECK:STDOUT: .SubAssign = %Core.SubAssign -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Sub: type = import_ref Core//prelude/operators/arithmetic, Sub, loaded [concrete = constants.%Sub.type] -// CHECK:STDOUT: %Core.SubAssign: type = import_ref Core//prelude/operators/arithmetic, SubAssign, loaded [concrete = constants.%SubAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .TestOp = %TestOp.decl -// CHECK:STDOUT: .TestAssign = %TestAssign.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.3f9 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Sub.ref: type = name_ref Sub, imports.%Core.Sub [concrete = constants.%Sub.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Sub.impl_witness_table = impl_witness_table (@impl.3f9.%Op.decl), @impl.3f9 [concrete] -// CHECK:STDOUT: %Sub.impl_witness: = impl_witness %Sub.impl_witness_table [concrete = constants.%Sub.impl_witness] -// CHECK:STDOUT: impl_decl @impl.588 [concrete] {} { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %SubAssign.ref: type = name_ref SubAssign, imports.%Core.SubAssign [concrete = constants.%SubAssign.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %SubAssign.impl_witness_table = impl_witness_table (@impl.588.%Op.decl), @impl.588 [concrete] -// CHECK:STDOUT: %SubAssign.impl_witness: = impl_witness %SubAssign.impl_witness_table [concrete = constants.%SubAssign.impl_witness] -// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { -// CHECK:STDOUT: %a.patt: %pattern_type.c48 = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.c48 = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc29_26: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc29_14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %a: %C = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc29_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [concrete = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %pattern_type.44a = binding_pattern a [concrete] -// CHECK:STDOUT: %a.param_patt: %pattern_type.44a = value_param_pattern %a.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.c48 = binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: %pattern_type.c48 = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %a.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc33: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc33_18: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc33_18 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %a: %ptr.019 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc33_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %b: %C = bind_name b, %b.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.3f9: %C.ref as %Sub.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.c74 = fn_decl @Op.2 [concrete = constants.%Op.151] { -// CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc21_15: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %C = out_param call_param2 -// CHECK:STDOUT: %return: ref %C = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%Sub.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.588: %C.ref as %SubAssign.ref { -// CHECK:STDOUT: %Op.decl: %Op.type.966 = fn_decl @Op.4 [concrete = constants.%Op.a55] { -// CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %.loc26_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete] -// CHECK:STDOUT: %other.patt: %pattern_type.c48 = binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: %pattern_type.c48 = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0 -// CHECK:STDOUT: %.loc26_21: type = splice_block %ptr [concrete = constants.%ptr.019] { -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc26_20 [concrete = constants.%ptr.019] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc26_31: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %other: %C = bind_name other, %other.param -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .C = -// CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = file.%SubAssign.impl_witness -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @C { -// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2(%self.param: %C, %other.param: %C) -> %return.param: %C { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_13.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_14: init %C = converted %.loc22_13.1, %.loc22_13.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc22_14 to %return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.4(%self.param: %ptr.019, %other.param: %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp(%a.param: %C, %b.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.ee4 = impl_witness_access constants.%Sub.impl_witness, element0 [concrete = constants.%Op.151] -// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 -// CHECK:STDOUT: %.loc29: ref %C = splice_block %return {} +// CHECK:STDOUT: %impl.elem1: %.71c = impl_witness_access constants.%SubWith.impl_witness, element1 [concrete = constants.%Op.5e4] +// CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 +// CHECK:STDOUT: // CHECK:STDOUT: %Op.call: init %C = call %bound_method(%a.ref, %b.ref) to %.loc29 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } @@ -223,12 +77,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: fn @TestAssign(%a.param: %ptr.019, %b.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %ptr.019 = name_ref a, %a -// CHECK:STDOUT: %.loc34: ref %C = deref %a.ref +// CHECK:STDOUT: %.loc37: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.dac = impl_witness_access constants.%SubAssign.impl_witness, element0 [concrete = constants.%Op.a55] -// CHECK:STDOUT: %bound_method: = bound_method %.loc34, %impl.elem0 -// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc34 +// CHECK:STDOUT: %impl.elem0: %.647 = impl_witness_access constants.%SubAssignWith.impl_witness, element0 [concrete = constants.%Op.f7d] +// CHECK:STDOUT: %bound_method: = bound_method %.loc37, %impl.elem0 +// CHECK:STDOUT: %addr: %ptr.019 = addr_of %.loc37 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %bound_method(%addr, %b.ref) -// CHECK:STDOUT: return +// CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/unary_op.carbon.tmpl b/toolchain/check/testdata/operators/overloaded/unary_op.carbon.tmpl index f7752c89c93a..b34b5f6d13de 100644 --- a/toolchain/check/testdata/operators/overloaded/unary_op.carbon.tmpl +++ b/toolchain/check/testdata/operators/overloaded/unary_op.carbon.tmpl @@ -13,12 +13,14 @@ package User; class C {}; -impl C as Core.INTERFACE { +impl C as Core.INTERFACE where .Result = C { fn Op[self: C]() -> C { return {}; } } fn TestOp(a: C) -> C { + //@dump-sem-ir-begin return OPa; + //@dump-sem-ir-end } diff --git a/toolchain/check/testdata/operators/overloaded/unary_stmt.carbon.tmpl b/toolchain/check/testdata/operators/overloaded/unary_stmt.carbon.tmpl index bbc204bc380c..360411f6024c 100644 --- a/toolchain/check/testdata/operators/overloaded/unary_stmt.carbon.tmpl +++ b/toolchain/check/testdata/operators/overloaded/unary_stmt.carbon.tmpl @@ -19,5 +19,7 @@ impl C as Core.INTERFACE { fn TestOp() { var c: C = {}; + //@dump-sem-ir-begin OPc; + //@dump-sem-ir-end } diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 8fa7844b5b77..6c6a9541bdf3 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -58,15 +58,15 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -118,7 +118,7 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc4_1.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] @@ -144,20 +144,20 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Main.type: type = fn_type @Main [concrete] // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] @@ -206,7 +206,7 @@ fn Main() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] @@ -238,7 +238,7 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc4_1.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon index 1d9275899efd..3abb43229142 100644 --- a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon @@ -39,15 +39,15 @@ var b: i32 = a; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -88,7 +88,7 @@ var b: i32 = a; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc4_1.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/packages/raw_core.carbon b/toolchain/check/testdata/packages/raw_core.carbon index 49010714906f..363c62a56e44 100644 --- a/toolchain/check/testdata/packages/raw_core.carbon +++ b/toolchain/check/testdata/packages/raw_core.carbon @@ -208,15 +208,15 @@ var c: r#Core = {.n = 0 as Core.Int(32)}; // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.5, @impl.686(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.062: type = fn_type @Convert.6, @impl.686(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.527: %Convert.type.062 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.6b4: = impl_witness imports.%As.impl_witness_table.eb4, @impl.686(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.6, @impl.686(%int_32) [concrete] // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, (%As.impl_witness.6b4) [concrete] // CHECK:STDOUT: %.982: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.197 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.5(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.197, @Convert.6(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %.96d: ref %i32 = class_element_access file.%c.var, element0 [concrete] @@ -277,7 +277,7 @@ var c: r#Core = {.n = 0 as Core.Int(32)}; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %impl.elem0: %.982 = impl_witness_access constants.%As.impl_witness.6b4, element0 [concrete = constants.%Convert.197] // CHECK:STDOUT: %bound_method.loc6_25.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.6(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_25.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc6_25.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index 28fce0010e72..aef33d0f96c0 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -32,15 +32,15 @@ fn F() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] @@ -86,7 +86,7 @@ fn F() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_3.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_3: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index bd8fb1a052d8..728bbbf0d421 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -43,15 +43,15 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -103,7 +103,7 @@ fn F() { // CHECK:STDOUT: %.loc15_46.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc15, %int_2.loc15) // CHECK:STDOUT: %impl.elem0.loc15_46.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_46.1: = bound_method %int_1.loc15, %impl.elem0.loc15_46.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc15_46.1: = specific_function %impl.elem0.loc15_46.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_46.1: = specific_function %impl.elem0.loc15_46.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_46.2: = bound_method %int_1.loc15, %specific_fn.loc15_46.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc15_46.1: init %i32 = call %bound_method.loc15_46.2(%int_1.loc15) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_46.2: init %i32 = converted %int_1.loc15, %int.convert_checked.loc15_46.1 [concrete = constants.%int_1.5d2] @@ -111,7 +111,7 @@ fn F() { // CHECK:STDOUT: %.loc15_46.4: init %i32 = initialize_from %.loc15_46.2 to %.loc15_46.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc15_46.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_46.3: = bound_method %int_2.loc15, %impl.elem0.loc15_46.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc15_46.2: = specific_function %impl.elem0.loc15_46.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_46.2: = specific_function %impl.elem0.loc15_46.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_46.4: = bound_method %int_2.loc15, %specific_fn.loc15_46.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc15_46.2: init %i32 = call %bound_method.loc15_46.4(%int_2.loc15) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc15_46.5: init %i32 = converted %int_2.loc15, %int.convert_checked.loc15_46.2 [concrete = constants.%int_2.ef8] @@ -185,7 +185,7 @@ fn F() { // CHECK:STDOUT: %.loc21_28.1: %tuple.type.f94 = tuple_literal (%int_1.loc21, %int_2.loc21) // CHECK:STDOUT: %impl.elem0.loc21_28.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_28.1: = bound_method %int_1.loc21, %impl.elem0.loc21_28.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc21_28.1: = specific_function %impl.elem0.loc21_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc21_28.1: = specific_function %impl.elem0.loc21_28.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_28.2: = bound_method %int_1.loc21, %specific_fn.loc21_28.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc21_28.1: init %i32 = call %bound_method.loc21_28.2(%int_1.loc21) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc21_28.2: init %i32 = converted %int_1.loc21, %int.convert_checked.loc21_28.1 [concrete = constants.%int_1.5d2] @@ -193,7 +193,7 @@ fn F() { // CHECK:STDOUT: %.loc21_28.3: init %i32 = initialize_from %.loc21_28.2 to %tuple.elem0.loc21 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc21_28.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_28.3: = bound_method %int_2.loc21, %impl.elem0.loc21_28.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc21_28.2: = specific_function %impl.elem0.loc21_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc21_28.2: = specific_function %impl.elem0.loc21_28.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_28.4: = bound_method %int_2.loc21, %specific_fn.loc21_28.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc21_28.2: init %i32 = call %bound_method.loc21_28.4(%int_2.loc21) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc21_28.4: init %i32 = converted %int_2.loc21, %int.convert_checked.loc21_28.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 82bf38334ab2..381826bddcfa 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -34,15 +34,15 @@ fn F() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] @@ -89,7 +89,7 @@ fn F() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_3.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_3: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index 99415eb1e0a7..d197818680d1 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -38,15 +38,15 @@ var a: i32* = a_ref; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] @@ -102,7 +102,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc4_1.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index b32662e2bbda..fd4250b751d5 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -42,15 +42,15 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -101,7 +101,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_11.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_11.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_11.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index b7d4ba7e3789..bc9fc7a9a538 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -52,18 +52,18 @@ fn G() -> C { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [concrete] // CHECK:STDOUT: %struct_type.a.b.501: type = struct_type {.a: %i32, .b: %i32} [concrete] @@ -150,7 +150,7 @@ fn G() -> C { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_12.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_12: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] @@ -175,7 +175,7 @@ fn G() -> C { // CHECK:STDOUT: %.loc28_38.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %impl.elem0.loc28_38.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc28_38.1: = bound_method %int_1, %impl.elem0.loc28_38.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc28_38.1: = specific_function %impl.elem0.loc28_38.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc28_38.1: = specific_function %impl.elem0.loc28_38.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc28_38.2: = bound_method %int_1, %specific_fn.loc28_38.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc28_38.1: init %i32 = call %bound_method.loc28_38.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc28_38.2: init %i32 = converted %int_1, %int.convert_checked.loc28_38.1 [concrete = constants.%int_1.5d2] @@ -183,7 +183,7 @@ fn G() -> C { // CHECK:STDOUT: %.loc28_38.4: init %i32 = initialize_from %.loc28_38.2 to %.loc28_38.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc28_38.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc28_38.3: = bound_method %int_2, %impl.elem0.loc28_38.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc28_38.2: = specific_function %impl.elem0.loc28_38.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc28_38.2: = specific_function %impl.elem0.loc28_38.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc28_38.4: = bound_method %int_2, %specific_fn.loc28_38.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc28_38.2: init %i32 = call %bound_method.loc28_38.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc28_38.5: init %i32 = converted %int_2, %int.convert_checked.loc28_38.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index e88dd3186f02..e24a4a981645 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -60,18 +60,18 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] @@ -133,7 +133,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int_0.loc16: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_14.1: = bound_method %int_0.loc16, %impl.elem0.loc16 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_14.2: = bound_method %int_0.loc16, %specific_fn.loc16 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %bound_method.loc16_14.2(%int_0.loc16) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc16_14: init %i32 = converted %int_0.loc16, %int.convert_checked.loc16 [concrete = constants.%int_0.6a9] @@ -151,7 +151,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc24: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc24_14.1: = bound_method %int_1, %impl.elem0.loc24 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_14.2: = bound_method %int_1, %specific_fn.loc24 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %bound_method.loc24_14.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc24_14: init %i32 = converted %int_1, %int.convert_checked.loc24 [concrete = constants.%int_1.5d2] @@ -167,7 +167,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int_0.loc26: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_11.1: = bound_method %int_0.loc26, %impl.elem0.loc26 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_11.2: = bound_method %int_0.loc26, %specific_fn.loc26 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %bound_method.loc26_11.2(%int_0.loc26) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc26_11.1: %i32 = value_of_initializer %int.convert_checked.loc26 [concrete = constants.%int_0.6a9] @@ -189,7 +189,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int_0.loc31: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc31: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc31_14.1: = bound_method %int_0.loc31, %impl.elem0.loc31 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc31_14.2: = bound_method %int_0.loc31, %specific_fn.loc31 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %bound_method.loc31_14.2(%int_0.loc31) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc31_14: init %i32 = converted %int_0.loc31, %int.convert_checked.loc31 [concrete = constants.%int_0.6a9] @@ -211,7 +211,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc40: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc40_16.1: = bound_method %int_1, %impl.elem0.loc40 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc40: = specific_function %impl.elem0.loc40, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc40: = specific_function %impl.elem0.loc40, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc40_16.2: = bound_method %int_1, %specific_fn.loc40 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc40: init %i32 = call %bound_method.loc40_16.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc40_16: init %i32 = converted %int_1, %int.convert_checked.loc40 [concrete = constants.%int_1.5d2] @@ -230,7 +230,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int_0.loc43: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc43: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc43_11.1: = bound_method %int_0.loc43, %impl.elem0.loc43 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc43: = specific_function %impl.elem0.loc43, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc43: = specific_function %impl.elem0.loc43, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc43_11.2: = bound_method %int_0.loc43, %specific_fn.loc43 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc43: init %i32 = call %bound_method.loc43_11.2(%int_0.loc43) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc43_11.1: %i32 = value_of_initializer %int.convert_checked.loc43 [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index d3f6fefc98ec..20fcc98f1805 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -48,16 +48,16 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -141,7 +141,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc20_43.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %impl.elem0.loc20_43.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_43.1: = bound_method %int_1, %impl.elem0.loc20_43.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc20_43.1: = specific_function %impl.elem0.loc20_43.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc20_43.1: = specific_function %impl.elem0.loc20_43.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_43.2: = bound_method %int_1, %specific_fn.loc20_43.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc20_43.1: init %i32 = call %bound_method.loc20_43.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_43.2: init %i32 = converted %int_1, %int.convert_checked.loc20_43.1 [concrete = constants.%int_1.5d2] @@ -149,7 +149,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc20_43.4: init %i32 = initialize_from %.loc20_43.2 to %.loc20_43.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc20_43.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc20_43.3: = bound_method %int_2, %impl.elem0.loc20_43.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc20_43.2: = specific_function %impl.elem0.loc20_43.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc20_43.2: = specific_function %impl.elem0.loc20_43.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_43.4: = bound_method %int_2, %specific_fn.loc20_43.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc20_43.2: init %i32 = call %bound_method.loc20_43.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc20_43.5: init %i32 = converted %int_2, %int.convert_checked.loc20_43.2 [concrete = constants.%int_2.ef8] @@ -173,7 +173,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc25_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc25_12.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc25_12: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 3c89901e5a15..ae019e2fa81c 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -47,19 +47,19 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] @@ -134,7 +134,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %int_0.loc16: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_14.1: = bound_method %int_0.loc16, %impl.elem0.loc16 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_14.2: = bound_method %int_0.loc16, %specific_fn.loc16 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %bound_method.loc16_14.2(%int_0.loc16) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc16_14: init %i32 = converted %int_0.loc16, %int.convert_checked.loc16 [concrete = constants.%int_0.6a9] @@ -159,7 +159,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc19_14.1: = bound_method %int_1, %impl.elem0.loc19 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_14.2: = bound_method %int_1, %specific_fn.loc19 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %bound_method.loc19_14.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc19_14: init %i32 = converted %int_1, %int.convert_checked.loc19 [concrete = constants.%int_1.5d2] @@ -175,7 +175,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %int_0.loc21: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc21: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc21_11.1: = bound_method %int_0.loc21, %impl.elem0.loc21 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_11.2: = bound_method %int_0.loc21, %specific_fn.loc21 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %bound_method.loc21_11.2(%int_0.loc21) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc21_11.1: %i32 = value_of_initializer %int.convert_checked.loc21 [concrete = constants.%int_0.6a9] @@ -197,7 +197,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0.loc26: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc26_14.1: = bound_method %int_0, %impl.elem0.loc26 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_14.2: = bound_method %int_0, %specific_fn.loc26 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %bound_method.loc26_14.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc26_14: init %i32 = converted %int_0, %int.convert_checked.loc26 [concrete = constants.%int_0.6a9] @@ -219,7 +219,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc29: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc29_12.1: = bound_method %int_1, %impl.elem0.loc29 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_12.2: = bound_method %int_1, %specific_fn.loc29 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %bound_method.loc29_12.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc29_12: init %i32 = converted %int_1, %int.convert_checked.loc29 [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index 6c619f5922e5..5cfcb5b8c07b 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -33,15 +33,15 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1ba, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %struct: %struct_type.a.ba9 = struct_value (%int_3.822) [concrete] @@ -84,7 +84,7 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: %.loc15_17.1: %struct_type.a.a6c = struct_literal (%int_3) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_17.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_17.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_17.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc15_17.2: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_3.822] diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index f5505ab7eef2..400fec86f734 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -36,15 +36,15 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.75f: = bound_method %int_15.447, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.984: = bound_method %int_15.447, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_15.7f7: %i32 = int_value 15 [concrete] // CHECK:STDOUT: %Convert.bound.76a: = bound_method %int_35.c79, %Convert.956 [concrete] @@ -94,7 +94,7 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %.loc16_17.1: %tuple.type.f94 = tuple_literal (%int_15, %int_35) // CHECK:STDOUT: %impl.elem0.loc16_17.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_17.1: = bound_method %int_15, %impl.elem0.loc16_17.1 [concrete = constants.%Convert.bound.75f] -// CHECK:STDOUT: %specific_fn.loc16_17.1: = specific_function %impl.elem0.loc16_17.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc16_17.1: = specific_function %impl.elem0.loc16_17.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_17.2: = bound_method %int_15, %specific_fn.loc16_17.1 [concrete = constants.%bound_method.984] // CHECK:STDOUT: %int.convert_checked.loc16_17.1: init %i32 = call %bound_method.loc16_17.2(%int_15) [concrete = constants.%int_15.7f7] // CHECK:STDOUT: %.loc16_17.2: init %i32 = converted %int_15, %int.convert_checked.loc16_17.1 [concrete = constants.%int_15.7f7] @@ -102,7 +102,7 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %.loc16_17.3: init %i32 = initialize_from %.loc16_17.2 to %tuple.elem0 [concrete = constants.%int_15.7f7] // CHECK:STDOUT: %impl.elem0.loc16_17.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc16_17.3: = bound_method %int_35, %impl.elem0.loc16_17.2 [concrete = constants.%Convert.bound.76a] -// CHECK:STDOUT: %specific_fn.loc16_17.2: = specific_function %impl.elem0.loc16_17.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc16_17.2: = specific_function %impl.elem0.loc16_17.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_17.4: = bound_method %int_35, %specific_fn.loc16_17.2 [concrete = constants.%bound_method.231] // CHECK:STDOUT: %int.convert_checked.loc16_17.2: init %i32 = call %bound_method.loc16_17.4(%int_35) [concrete = constants.%int_35.c78] // CHECK:STDOUT: %.loc16_17.4: init %i32 = converted %int_35, %int.convert_checked.loc16_17.2 [concrete = constants.%int_35.c78] diff --git a/toolchain/check/testdata/return/value.carbon b/toolchain/check/testdata/return/value.carbon index 35bf15b2828c..d8955de94ae8 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -31,15 +31,15 @@ fn Main() -> i32 { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -79,7 +79,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_11.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_11.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_11.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_11.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index c1ef802ffb8a..2e5e6083776b 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -34,16 +34,16 @@ var y: i32 = x.b; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4.0c1, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %struct: %struct_type.a.ba9 = struct_value (%int_4.940) [concrete] @@ -98,7 +98,7 @@ var y: i32 = x.b; // CHECK:STDOUT: %.loc14_27.1: %struct_type.a.a6c = struct_literal (%int_4) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_27.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_27.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_27.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc14_27.2: init %i32 = converted %int_4, %int.convert_checked [concrete = constants.%int_4.940] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index f8ac09295c56..310bab761dcf 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -71,15 +71,16 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %struct.92d: %struct_type.a.ba9 = struct_value (%int_0.6a9) [concrete] @@ -106,7 +107,6 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %C.775: type = class_type @C, @C(%S) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] @@ -195,14 +195,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc9_28.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %impl.elem0.loc9_28.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_28.1: = bound_method %int_1, %impl.elem0.loc9_28.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc9_28.1: = specific_function %impl.elem0.loc9_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc9_28.1: = specific_function %impl.elem0.loc9_28.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_28.2: = bound_method %int_1, %specific_fn.loc9_28.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc9_28.1: init %i32 = call %bound_method.loc9_28.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_28.2: %i32 = value_of_initializer %int.convert_checked.loc9_28.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_28.3: %i32 = converted %int_1, %.loc9_28.2 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc9_28.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc9_28.3: = bound_method %int_2, %impl.elem0.loc9_28.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc9_28.2: = specific_function %impl.elem0.loc9_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc9_28.2: = specific_function %impl.elem0.loc9_28.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_28.4: = bound_method %int_2, %specific_fn.loc9_28.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc9_28.2: init %i32 = call %bound_method.loc9_28.4(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_28.4: %i32 = value_of_initializer %int.convert_checked.loc9_28.2 [concrete = constants.%int_2.ef8] @@ -238,7 +238,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc4_31.1: %struct_type.a.a6c = struct_literal (%int_0.loc4) // CHECK:STDOUT: %impl.elem0.loc4: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc4_31.1: = bound_method %int_0.loc4, %impl.elem0.loc4 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_31.2: = bound_method %int_0.loc4, %specific_fn.loc4 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %bound_method.loc4_31.2(%int_0.loc4) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc4_31.2: init %i32 = converted %int_0.loc4, %int.convert_checked.loc4 [concrete = constants.%int_0.6a9] @@ -253,7 +253,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_38.1: %struct_type.a.d.b82 = struct_literal (%.loc6_29.1, %int_0.loc6_37) // CHECK:STDOUT: %impl.elem0.loc6_29: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_29.1: = bound_method %int_0.loc6_17, %impl.elem0.loc6_29 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc6_29: = specific_function %impl.elem0.loc6_29, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6_29: = specific_function %impl.elem0.loc6_29, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_29.2: = bound_method %int_0.loc6_17, %specific_fn.loc6_29 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc6_29: init %i32 = call %bound_method.loc6_29.2(%int_0.loc6_17) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_29.2: init %i32 = converted %int_0.loc6_17, %int.convert_checked.loc6_29 [concrete = constants.%int_0.6a9] @@ -262,7 +262,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_29.4: init %i32 = initialize_from %.loc6_29.2 to %.loc6_29.3 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %impl.elem0.loc6_28: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_28.1: = bound_method %int_0.loc6_26, %impl.elem0.loc6_28 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc6_28: = specific_function %impl.elem0.loc6_28, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6_28: = specific_function %impl.elem0.loc6_28, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_28.2: = bound_method %int_0.loc6_26, %specific_fn.loc6_28 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %bound_method.loc6_28.2(%int_0.loc6_26) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_28.2: init %i32 = converted %int_0.loc6_26, %int.convert_checked.loc6_28 [concrete = constants.%int_0.6a9] @@ -274,7 +274,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_38.3: init %struct_type.b.c.929 = converted %.loc6_29.1, %.loc6_29.8 [concrete = constants.%struct.381] // CHECK:STDOUT: %impl.elem0.loc6_38: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc6_38.1: = bound_method %int_0.loc6_37, %impl.elem0.loc6_38 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc6_38: = specific_function %impl.elem0.loc6_38, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6_38: = specific_function %impl.elem0.loc6_38, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_38.2: = bound_method %int_0.loc6_37, %specific_fn.loc6_38 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %bound_method.loc6_38.2(%int_0.loc6_37) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_38.4: init %i32 = converted %int_0.loc6_37, %int.convert_checked.loc6_38 [concrete = constants.%int_0.6a9] @@ -297,13 +297,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: --- implicit.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %ImplicitAs.type.595: type = generic_interface_type @ImplicitAs [concrete] +// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.595 = struct_value () [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.595: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.595 = struct_value () [concrete] -// CHECK:STDOUT: %Convert.type.9a6: type = fn_type @Convert.2, @impl.a8d(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.9a6: type = fn_type @Convert.3, @impl.a8d(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.458: %Convert.type.9a6 = struct_value () [symbolic] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [concrete] @@ -329,18 +330,17 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %struct_type.a.b.5ca: type = struct_type {.a: %i32, .b: %i32} [concrete] // CHECK:STDOUT: %S: %struct_type.a.b.5ca = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %ImplicitAs.type.b9e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.ea0: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.1ad, @impl.a8d(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.2, @impl.a8d(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.3, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.4cb: %Convert.type.e14 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.23e: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] +// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet.23e [concrete] // CHECK:STDOUT: %Convert.bound.dc5: = bound_method %int_1.5b8, %Convert.4cb [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c37: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.47b: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.30f: = bound_method %int_2.ecc, %Convert.4cb [concrete] @@ -364,7 +364,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Implicit.import_ref.773: @impl.a8d.%Convert.type (%Convert.type.9a6) = import_ref Implicit//default, inst117 [indirect], loaded [symbolic = @impl.a8d.%Convert (constants.%Convert.458)] +// CHECK:STDOUT: %Implicit.import_ref.773: @impl.a8d.%Convert.type (%Convert.type.9a6) = import_ref Implicit//default, inst154 [indirect], loaded [symbolic = @impl.a8d.%Convert (constants.%Convert.458)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (%Implicit.import_ref.773), @impl.a8d [concrete] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %a_ref.patt: %pattern_type.b54 = binding_pattern a_ref [concrete] @@ -374,8 +374,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %b_ref.var_patt: %pattern_type.020 = var_pattern %b_ref.patt [concrete] // CHECK:STDOUT: %b_ref.var: ref %struct_type.a.d.9db = var %b_ref.var_patt [concrete] // CHECK:STDOUT: %Implicit.import_ref.c81: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] -// CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst1424 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.8f24: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst6359 [no loc], unloaded // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.595 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -434,14 +434,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_25.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %impl.elem0.loc6_25.1: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc6_25.1: = bound_method %int_1, %impl.elem0.loc6_25.1 [concrete = constants.%Convert.bound.dc5] -// CHECK:STDOUT: %specific_fn.loc6_25.1: = specific_function %impl.elem0.loc6_25.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6_25.1: = specific_function %impl.elem0.loc6_25.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_25.2: = bound_method %int_1, %specific_fn.loc6_25.1 [concrete = constants.%bound_method.c37] // CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %bound_method.loc6_25.2(%int_1) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc6_25.2: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc6_25.3: %i32 = converted %int_1, %.loc6_25.2 [concrete = constants.%int_1.47b] // CHECK:STDOUT: %impl.elem0.loc6_25.2: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc6_25.3: = bound_method %int_2, %impl.elem0.loc6_25.2 [concrete = constants.%Convert.bound.30f] -// CHECK:STDOUT: %specific_fn.loc6_25.2: = specific_function %impl.elem0.loc6_25.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc6_25.2: = specific_function %impl.elem0.loc6_25.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_25.4: = bound_method %int_2, %specific_fn.loc6_25.2 [concrete = constants.%bound_method.62b] // CHECK:STDOUT: %int.convert_checked.loc6_25.2: init %i32 = call %bound_method.loc6_25.4(%int_2) [concrete = constants.%int_2.d0d] // CHECK:STDOUT: %.loc6_25.4: %i32 = value_of_initializer %int.convert_checked.loc6_25.2 [concrete = constants.%int_2.d0d] @@ -459,7 +459,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: complete_type_witness = imports.%Implicit.import_ref.8f2 +// CHECK:STDOUT: complete_type_witness = imports.%Implicit.import_ref.8f24 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Implicit.import_ref.b8b @@ -519,15 +519,15 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: --- fail_bad_type.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [concrete] // CHECK:STDOUT: %S: %struct_type.a.b = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %struct_type.c.d: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -548,8 +548,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import_ref.c81: %struct_type.a.b = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] -// CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst1424 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.8f24: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst6359 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -584,7 +584,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: complete_type_witness = imports.%Implicit.import_ref.8f2 +// CHECK:STDOUT: complete_type_witness = imports.%Implicit.import_ref.8f24 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Implicit.import_ref.b8b @@ -615,17 +615,17 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: --- fail_bad_value.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.595: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.595 = struct_value () [concrete] -// CHECK:STDOUT: %Convert.type.9a6: type = fn_type @Convert.2, @impl.a8d(%To.c80) [symbolic] +// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.9a6: type = fn_type @Convert.3, @impl.a8d(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.458: %Convert.type.9a6 = struct_value () [symbolic] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %struct_type.a.b.5ca: type = struct_type {.a: %i32, .b: %i32} [concrete] // CHECK:STDOUT: %S: %struct_type.a.b.5ca = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] @@ -634,12 +634,12 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %ImplicitAs.type.b9e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.ea0: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.1ad, @impl.a8d(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.2, @impl.a8d(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.e14: type = fn_type @Convert.3, @impl.a8d(%int_32) [concrete] // CHECK:STDOUT: %Convert.4cb: %Convert.type.e14 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.23e: %ImplicitAs.type.b9e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] +// CHECK:STDOUT: %.940: type = fn_type_with_self_type %Convert.type.ea0, %ImplicitAs.facet.23e [concrete] // CHECK:STDOUT: %Convert.bound.a00: = bound_method %int_3.1ba, %Convert.4cb [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.4cb, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.fc5: = bound_method %int_3.1ba, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.d47: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %Convert.bound.694: = bound_method %int_4.0c1, %Convert.4cb [concrete] @@ -651,8 +651,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_2: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: %int_1: %i32 = int_value 1 [concrete] -// CHECK:STDOUT: %struct.cd9: %struct_type.a.b.5ca = struct_value (%int_1, %int_2) [concrete] +// CHECK:STDOUT: %int_1.47b: %i32 = int_value 1 [concrete] +// CHECK:STDOUT: %struct.cd9: %struct_type.a.b.5ca = struct_value (%int_1.47b, %int_2) [concrete] // CHECK:STDOUT: %C.a8a: type = class_type @C, @C(%struct.cd9) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -666,11 +666,11 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Implicit.import_ref.773: @impl.a8d.%Convert.type (%Convert.type.9a6) = import_ref Implicit//default, inst117 [indirect], loaded [symbolic = @impl.a8d.%Convert (constants.%Convert.458)] +// CHECK:STDOUT: %Implicit.import_ref.773: @impl.a8d.%Convert.type (%Convert.type.9a6) = import_ref Implicit//default, inst154 [indirect], loaded [symbolic = @impl.a8d.%Convert (constants.%Convert.458)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (%Implicit.import_ref.773), @impl.a8d [concrete] // CHECK:STDOUT: %Implicit.import_ref.c81: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] -// CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst1424 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.8f24: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst6359 [no loc], unloaded // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.595 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -698,14 +698,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc10_29.1: %struct_type.a.b.cfd = struct_literal (%int_3, %int_4) // CHECK:STDOUT: %impl.elem0.loc10_29.1: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc10_29.1: = bound_method %int_3, %impl.elem0.loc10_29.1 [concrete = constants.%Convert.bound.a00] -// CHECK:STDOUT: %specific_fn.loc10_29.1: = specific_function %impl.elem0.loc10_29.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_29.1: = specific_function %impl.elem0.loc10_29.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_29.2: = bound_method %int_3, %specific_fn.loc10_29.1 [concrete = constants.%bound_method.fc5] // CHECK:STDOUT: %int.convert_checked.loc10_29.1: init %i32 = call %bound_method.loc10_29.2(%int_3) [concrete = constants.%int_3.d47] // CHECK:STDOUT: %.loc10_29.2: %i32 = value_of_initializer %int.convert_checked.loc10_29.1 [concrete = constants.%int_3.d47] // CHECK:STDOUT: %.loc10_29.3: %i32 = converted %int_3, %.loc10_29.2 [concrete = constants.%int_3.d47] // CHECK:STDOUT: %impl.elem0.loc10_29.2: %.940 = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Convert.4cb] // CHECK:STDOUT: %bound_method.loc10_29.3: = bound_method %int_4, %impl.elem0.loc10_29.2 [concrete = constants.%Convert.bound.694] -// CHECK:STDOUT: %specific_fn.loc10_29.2: = specific_function %impl.elem0.loc10_29.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc10_29.2: = specific_function %impl.elem0.loc10_29.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_29.4: = bound_method %int_4, %specific_fn.loc10_29.2 [concrete = constants.%bound_method.b6e] // CHECK:STDOUT: %int.convert_checked.loc10_29.2: init %i32 = call %bound_method.loc10_29.4(%int_4) [concrete = constants.%int_4.ea3] // CHECK:STDOUT: %.loc10_29.4: %i32 = value_of_initializer %int.convert_checked.loc10_29.2 [concrete = constants.%int_4.ea3] @@ -723,7 +723,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: complete_type_witness = imports.%Implicit.import_ref.8f2 +// CHECK:STDOUT: complete_type_witness = imports.%Implicit.import_ref.8f24 // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Implicit.import_ref.b8b diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index fe5f44e68f28..3af510d3b9e4 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -37,16 +37,16 @@ var z: i32 = y; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %struct: %struct_type.a.b.ddf = struct_value (%float, %int_1.5d2) [concrete] @@ -121,7 +121,7 @@ var z: i32 = y; // CHECK:STDOUT: %.loc14_46.3: init f64 = initialize_from %float to %.loc14_46.2 [concrete = constants.%float] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_46.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_46.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_46.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_46.4: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index e3e3504c446e..c1b97b377cf5 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -31,15 +31,15 @@ var y: {.a: i32} = x; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4.0c1, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_4.0c1, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %struct: %struct_type.a.ba9 = struct_value (%int_4.940) [concrete] @@ -95,7 +95,7 @@ var y: {.a: i32} = x; // CHECK:STDOUT: %.loc14_27.1: %struct_type.a.a6c = struct_literal (%int_4) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_27.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_27.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_27.2(%int_4) [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc14_27.2: init %i32 = converted %int_4, %int.convert_checked [concrete = constants.%int_4.940] diff --git a/toolchain/check/testdata/struct/partially_const.carbon b/toolchain/check/testdata/struct/partially_const.carbon index 020ddac491b6..71c929ab095a 100644 --- a/toolchain/check/testdata/struct/partially_const.carbon +++ b/toolchain/check/testdata/struct/partially_const.carbon @@ -34,15 +34,15 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -98,7 +98,7 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %.loc15_33.1: %struct_type.a.b.c.1ee = struct_literal (%int_0.loc15_16, %n.ref, %int_0.loc15_32) // CHECK:STDOUT: %impl.elem0.loc15_33.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_33.1: = bound_method %int_0.loc15_16, %impl.elem0.loc15_33.1 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc15_33.1: = specific_function %impl.elem0.loc15_33.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_33.1: = specific_function %impl.elem0.loc15_33.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_33.2: = bound_method %int_0.loc15_16, %specific_fn.loc15_33.1 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc15_33.1: init %i32 = call %bound_method.loc15_33.2(%int_0.loc15_16) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_33.2: init %i32 = converted %int_0.loc15_16, %int.convert_checked.loc15_33.1 [concrete = constants.%int_0.6a9] @@ -108,7 +108,7 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %.loc15_33.6: init %i32 = initialize_from %n.ref to %.loc15_33.5 // CHECK:STDOUT: %impl.elem0.loc15_33.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_33.3: = bound_method %int_0.loc15_32, %impl.elem0.loc15_33.2 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc15_33.2: = specific_function %impl.elem0.loc15_33.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc15_33.2: = specific_function %impl.elem0.loc15_33.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_33.4: = bound_method %int_0.loc15_32, %specific_fn.loc15_33.2 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc15_33.2: init %i32 = call %bound_method.loc15_33.4(%int_0.loc15_32) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc15_33.7: init %i32 = converted %int_0.loc15_32, %int.convert_checked.loc15_33.2 [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index 5028c0224aa6..2aa6e60033b7 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -35,15 +35,15 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %.dd9: ref %tuple.type.a1c = struct_access file.%x.var, element1 [concrete] @@ -117,7 +117,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc14_50.1: %struct_type.a.b.057 = struct_literal (%int_1, %.loc14_49.1) // CHECK:STDOUT: %impl.elem0.loc14_50: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_50.1: = bound_method %int_1, %impl.elem0.loc14_50 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc14_50: = specific_function %impl.elem0.loc14_50, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_50: = specific_function %impl.elem0.loc14_50, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_50.2: = bound_method %int_1, %specific_fn.loc14_50 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc14_50: init %i32 = call %bound_method.loc14_50.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_50.2: init %i32 = converted %int_1, %int.convert_checked.loc14_50 [concrete = constants.%int_1.5d2] @@ -125,7 +125,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc14_50.4: init %i32 = initialize_from %.loc14_50.2 to %.loc14_50.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc14_49: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_49.1: = bound_method %int_2, %impl.elem0.loc14_49 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc14_49: = specific_function %impl.elem0.loc14_49, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_49: = specific_function %impl.elem0.loc14_49, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_49.2: = bound_method %int_2, %specific_fn.loc14_49 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc14_49: init %i32 = call %bound_method.loc14_49.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc14_49.2: init %i32 = converted %int_2, %int.convert_checked.loc14_49 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index 0da17ac58cbf..fb6e90064f24 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -34,15 +34,15 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -89,14 +89,14 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: } // CHECK:STDOUT: %impl.elem0.loc14_44.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_44.1: = bound_method @__global_init.%int_1.loc14, %impl.elem0.loc14_44.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc14_44.1: = specific_function %impl.elem0.loc14_44.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_44.1: = specific_function %impl.elem0.loc14_44.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_44.2: = bound_method @__global_init.%int_1.loc14, %specific_fn.loc14_44.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc14_44.1: init %i32 = call %bound_method.loc14_44.2(@__global_init.%int_1.loc14) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_44.1: %i32 = value_of_initializer %int.convert_checked.loc14_44.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_44.2: %i32 = converted @__global_init.%int_1.loc14, %.loc14_44.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc14_44.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc14_44.3: = bound_method @__global_init.%int_2.loc14, %impl.elem0.loc14_44.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc14_44.2: = specific_function %impl.elem0.loc14_44.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc14_44.2: = specific_function %impl.elem0.loc14_44.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_44.4: = bound_method @__global_init.%int_2.loc14, %specific_fn.loc14_44.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc14_44.2: init %i32 = call %bound_method.loc14_44.4(@__global_init.%int_2.loc14) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc14_44.3: %i32 = value_of_initializer %int.convert_checked.loc14_44.2 [concrete = constants.%int_2.ef8] @@ -154,7 +154,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc17_44.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc17, %int_2.loc17) // CHECK:STDOUT: %impl.elem0.loc17_44.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_44.1: = bound_method %int_1.loc17, %impl.elem0.loc17_44.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17_44.1: = specific_function %impl.elem0.loc17_44.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_44.1: = specific_function %impl.elem0.loc17_44.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_44.2: = bound_method %int_1.loc17, %specific_fn.loc17_44.1 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc17_44.1: init %i32 = call %bound_method.loc17_44.2(%int_1.loc17) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_44.2: init %i32 = converted %int_1.loc17, %int.convert_checked.loc17_44.1 [concrete = constants.%int_1.5d2] @@ -162,7 +162,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc17_44.4: init %i32 = initialize_from %.loc17_44.2 to %.loc17_44.3 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc17_44.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc17_44.3: = bound_method %int_2.loc17, %impl.elem0.loc17_44.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc17_44.2: = specific_function %impl.elem0.loc17_44.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc17_44.2: = specific_function %impl.elem0.loc17_44.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_44.4: = bound_method %int_2.loc17, %specific_fn.loc17_44.2 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc17_44.2: init %i32 = call %bound_method.loc17_44.4(%int_2.loc17) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc17_44.5: init %i32 = converted %int_2.loc17, %int.convert_checked.loc17_44.2 [concrete = constants.%int_2.ef8] diff --git a/toolchain/check/testdata/where_expr/dot_self_index.carbon b/toolchain/check/testdata/where_expr/dot_self_index.carbon index e7b17b787605..d92e6b3757a2 100644 --- a/toolchain/check/testdata/where_expr/dot_self_index.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_index.carbon @@ -36,19 +36,19 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %Self.8c5170.1: %Empty.type.3e5fde.1 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Empty.assoc_type.3cf698.1: type = assoc_entity_type @Empty, @Empty(%W) [symbolic] // CHECK:STDOUT: %assoc0.3715ce.1: %Empty.assoc_type.3cf698.1 = assoc_entity element0, @Empty.%A [symbolic] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %Empty.type.3e5fde.2: type = facet_type <@Empty, @Empty(%T)> [symbolic] +// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %Empty.type.3e5fde.2: type = facet_type <@Empty, @Empty(%T.8b3)> [symbolic] // CHECK:STDOUT: %.Self.c95: %Empty.type.3e5fde.2 = bind_symbolic_name .Self [symbolic] // CHECK:STDOUT: %Self.8c5170.2: %Empty.type.3e5fde.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Empty.assoc_type.3cf698.2: type = assoc_entity_type @Empty, @Empty(%T) [symbolic] +// CHECK:STDOUT: %Empty.assoc_type.3cf698.2: type = assoc_entity_type @Empty, @Empty(%T.8b3) [symbolic] // CHECK:STDOUT: %assoc0.3715ce.2: %Empty.assoc_type.3cf698.2 = assoc_entity element0, @Empty.%A [symbolic] // CHECK:STDOUT: %require_complete.22f: = require_complete_type %Empty.type.3e5fde.2 [symbolic] // CHECK:STDOUT: %.Self.as_type.a75: type = facet_access_type %.Self.c95 [symbolic] -// CHECK:STDOUT: %Empty.lookup_impl_witness.b1d: = lookup_impl_witness %.Self.c95, @Empty, @Empty(%T) [symbolic] +// CHECK:STDOUT: %Empty.lookup_impl_witness.b1d: = lookup_impl_witness %.Self.c95, @Empty, @Empty(%T.8b3) [symbolic] // CHECK:STDOUT: %Empty.facet.e74: %Empty.type.3e5fde.2 = facet_value %.Self.as_type.a75, (%Empty.lookup_impl_witness.b1d) [symbolic] // CHECK:STDOUT: %impl.elem0.c6e: type = impl_witness_access %Empty.lookup_impl_witness.b1d, element0 [symbolic] -// CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] -// CHECK:STDOUT: %Empty_where.type.b73: type = facet_type <@Empty, @Empty(%T) where %impl.elem0.c6e = %ptr.79f> [symbolic] +// CHECK:STDOUT: %ptr.79f: type = ptr_type %T.8b3 [symbolic] +// CHECK:STDOUT: %Empty_where.type.b73: type = facet_type <@Empty, @Empty(%T.8b3) where %impl.elem0.c6e = %ptr.79f> [symbolic] // CHECK:STDOUT: %pattern_type.668: type = pattern_type %Empty_where.type.b73 [symbolic] // CHECK:STDOUT: %V: type = bind_symbolic_name V, 1 [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] @@ -109,20 +109,20 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %U.param_patt: @H.%pattern_type (%pattern_type.668) = value_param_pattern %U.patt, call_param0 [concrete] // CHECK:STDOUT: %V.patt: %pattern_type.98f = symbolic_binding_pattern V, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc21_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc21_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %U.param: @H.%Empty_where.type (%Empty_where.type.b73) = value_param call_param0 // CHECK:STDOUT: %.loc21_28.1: type = splice_block %.loc21_28.2 [symbolic = %Empty_where.type (constants.%Empty_where.type.b73)] { // CHECK:STDOUT: %Empty.ref: %Empty.type.d5a = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.generic] -// CHECK:STDOUT: %T.ref.loc21_25: type = name_ref T, %T.loc21_6.1 [symbolic = %T.loc21_6.2 (constants.%T)] -// CHECK:STDOUT: %Empty.type.loc21_26.1: type = facet_type <@Empty, @Empty(constants.%T)> [symbolic = %Empty.type.loc21_26.2 (constants.%Empty.type.3e5fde.2)] +// CHECK:STDOUT: %T.ref.loc21_25: type = name_ref T, %T.loc21_6.1 [symbolic = %T.loc21_6.2 (constants.%T.8b3)] +// CHECK:STDOUT: %Empty.type.loc21_26.1: type = facet_type <@Empty, @Empty(constants.%T.8b3)> [symbolic = %Empty.type.loc21_26.2 (constants.%Empty.type.3e5fde.2)] // CHECK:STDOUT: %.Self.1: @H.%Empty.type.loc21_26.2 (%Empty.type.3e5fde.2) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.c95)] // CHECK:STDOUT: %.Self.ref: @H.%Empty.type.loc21_26.2 (%Empty.type.3e5fde.2) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.c95)] -// CHECK:STDOUT: %.loc21_34.1: @H.%Empty.assoc_type (%Empty.assoc_type.3cf698.2) = specific_constant @A.%assoc0, @Empty(constants.%T) [symbolic = %assoc0 (constants.%assoc0.3715ce.2)] +// CHECK:STDOUT: %.loc21_34.1: @H.%Empty.assoc_type (%Empty.assoc_type.3cf698.2) = specific_constant @A.%assoc0, @Empty(constants.%T.8b3) [symbolic = %assoc0 (constants.%assoc0.3715ce.2)] // CHECK:STDOUT: %A.ref: @H.%Empty.assoc_type (%Empty.assoc_type.3cf698.2) = name_ref A, %.loc21_34.1 [symbolic = %assoc0 (constants.%assoc0.3715ce.2)] // CHECK:STDOUT: %.Self.as_type.loc21_34.1: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc21_34.2 (constants.%.Self.as_type.a75)] // CHECK:STDOUT: %.loc21_34.2: type = converted %.Self.ref, %.Self.as_type.loc21_34.1 [symbolic = %.Self.as_type.loc21_34.2 (constants.%.Self.as_type.a75)] // CHECK:STDOUT: %impl.elem0.loc21_34.1: type = impl_witness_access constants.%Empty.lookup_impl_witness.b1d, element0 [symbolic = %impl.elem0.loc21_34.2 (constants.%impl.elem0.c6e)] -// CHECK:STDOUT: %T.ref.loc21_39: type = name_ref T, %T.loc21_6.1 [symbolic = %T.loc21_6.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc21_39: type = name_ref T, %T.loc21_6.1 [symbolic = %T.loc21_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %ptr.loc21_40.1: type = ptr_type %T.ref.loc21_39 [symbolic = %ptr.loc21_40.2 (constants.%ptr.79f)] // CHECK:STDOUT: %.loc21_28.2: type = where_expr %.Self.1 [symbolic = %Empty_where.type (constants.%Empty_where.type.b73)] { // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc21_34.1, %ptr.loc21_40.1 @@ -186,7 +186,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @H(%T.loc21_6.1: type, %V.loc21_43.1: type) { -// CHECK:STDOUT: %T.loc21_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc21_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.2 (constants.%T.8b3)] // CHECK:STDOUT: %Empty.type.loc21_26.2: type = facet_type <@Empty, @Empty(%T.loc21_6.2)> [symbolic = %Empty.type.loc21_26.2 (constants.%Empty.type.3e5fde.2)] // CHECK:STDOUT: %.Self.2: @H.%Empty.type.loc21_26.2 (%Empty.type.3e5fde.2) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.c95)] // CHECK:STDOUT: %require_complete.loc21_34: = require_complete_type %Empty.type.loc21_26.2 [symbolic = %require_complete.loc21_34 (constants.%require_complete.22f)] @@ -229,8 +229,8 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%W, constants.%Self.8c5170.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Empty(constants.%T) { -// CHECK:STDOUT: %W.loc14_17.2 => constants.%T +// CHECK:STDOUT: specific @Empty(constants.%T.8b3) { +// CHECK:STDOUT: %W.loc14_17.2 => constants.%T.8b3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Empty.type => constants.%Empty.type.3e5fde.2 @@ -239,10 +239,10 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %assoc0 => constants.%assoc0.3715ce.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%T, constants.%Empty.facet.e74) {} +// CHECK:STDOUT: specific @A(constants.%T.8b3, constants.%Empty.facet.e74) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @H(constants.%T, constants.%V) { -// CHECK:STDOUT: %T.loc21_6.2 => constants.%T +// CHECK:STDOUT: specific @H(constants.%T.8b3, constants.%V) { +// CHECK:STDOUT: %T.loc21_6.2 => constants.%T.8b3 // CHECK:STDOUT: %Empty.type.loc21_26.2 => constants.%Empty.type.3e5fde.2 // CHECK:STDOUT: %.Self.2 => constants.%.Self.c95 // CHECK:STDOUT: %require_complete.loc21_34 => constants.%require_complete.22f diff --git a/toolchain/check/testdata/where_expr/equal_rewrite.carbon b/toolchain/check/testdata/where_expr/equal_rewrite.carbon index d3b353f68b0c..ac241bdf3797 100644 --- a/toolchain/check/testdata/where_expr/equal_rewrite.carbon +++ b/toolchain/check/testdata/where_expr/equal_rewrite.carbon @@ -1140,7 +1140,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %N.lookup_impl_witness: = lookup_impl_witness %.Self.9aa, @N [symbolic_self] // CHECK:STDOUT: %impl.elem0.abf: type = impl_witness_access %N.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %N_where.type: type = facet_type <@N where %impl.elem0.abf = %empty_struct_type> [concrete] -// CHECK:STDOUT: %T: %N_where.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.dcb: %N_where.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] // CHECK:STDOUT: %NestedRewrite.type: type = fn_type @NestedRewrite [concrete] @@ -1175,7 +1175,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Main.import_ref.169 = import_ref Main//equal_constraint, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.56b = import_ref Main//equal_constraint, loc5_8, unloaded // CHECK:STDOUT: %Main.P = import_ref Main//equal_constraint, P, unloaded -// CHECK:STDOUT: %Main.import_ref.0bb: %N_where.type = import_ref Main//equal_constraint, loc8_10, loaded [symbolic = @Equal.1.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.0bb: %N_where.type = import_ref Main//equal_constraint, loc8_10, loaded [symbolic = @Equal.1.%T (constants.%T.dcb)] // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: %Main.import_ref.b61 = import_ref Main//nested_rewrites, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.38f = import_ref Main//nested_rewrites, loc5_8, unloaded @@ -1226,7 +1226,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Equal.1(imports.%Main.import_ref.0bb: %N_where.type) [from "equal_constraint.carbon"] { -// CHECK:STDOUT: %T: %N_where.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: %N_where.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.dcb)] // CHECK:STDOUT: // CHECK:STDOUT: fn; // CHECK:STDOUT: } @@ -1237,8 +1237,8 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Equal.1(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Equal.1(constants.%T.dcb) { +// CHECK:STDOUT: %T => constants.%T.dcb // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @NestedRewrite(constants.%D) { diff --git a/toolchain/lower/testdata/builtins/overloaded_operator.carbon b/toolchain/lower/testdata/builtins/overloaded_operator.carbon index effca71ed97a..951091204c37 100644 --- a/toolchain/lower/testdata/builtins/overloaded_operator.carbon +++ b/toolchain/lower/testdata/builtins/overloaded_operator.carbon @@ -8,12 +8,6 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/builtins/overloaded_operator.carbon -// TODO: Move this into prelude.carbon when possible. For now, impl lookup only -// looks in the current file. -impl i32 as Core.Add { - fn Op[self: i32](other: i32) -> i32 = "int.sadd"; -} - fn AddThreeIntegers(a: i32, b: i32, c: i32) -> i32 { return a + b + c; } @@ -23,9 +17,9 @@ fn AddThreeIntegers(a: i32, b: i32, c: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CAddThreeIntegers.Main(i32 %a, i32 %b, i32 %c) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %int.sadd.loc18_12 = add i32 %a, %b, !dbg !7 -// CHECK:STDOUT: %int.sadd.loc18_16 = add i32 %int.sadd.loc18_12, %c, !dbg !7 -// CHECK:STDOUT: ret i32 %int.sadd.loc18_16, !dbg !8 +// CHECK:STDOUT: %int.sadd.loc12_12 = add i32 %a, %b, !dbg !7 +// CHECK:STDOUT: %int.sadd.loc12_16 = add i32 %int.sadd.loc12_12, %c, !dbg !7 +// CHECK:STDOUT: ret i32 %int.sadd.loc12_16, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.module.flags = !{!0, !1} @@ -35,8 +29,8 @@ fn AddThreeIntegers(a: i32, b: i32, c: i32) -> i32 { // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !3 = !DIFile(filename: "overloaded_operator.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "AddThreeIntegers", linkageName: "_CAddThreeIntegers.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "AddThreeIntegers", linkageName: "_CAddThreeIntegers.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{} -// CHECK:STDOUT: !7 = !DILocation(line: 18, column: 10, scope: !4) -// CHECK:STDOUT: !8 = !DILocation(line: 18, column: 3, scope: !4) +// CHECK:STDOUT: !7 = !DILocation(line: 12, column: 10, scope: !4) +// CHECK:STDOUT: !8 = !DILocation(line: 12, column: 3, scope: !4) diff --git a/toolchain/lower/testdata/operators/overloaded.carbon b/toolchain/lower/testdata/operators/overloaded.carbon index 0b248bc6e658..ed886bd105cf 100644 --- a/toolchain/lower/testdata/operators/overloaded.carbon +++ b/toolchain/lower/testdata/operators/overloaded.carbon @@ -12,12 +12,12 @@ class Number { var is_positive: bool; } -impl Number as Core.Negate { +impl Number as Core.Negate where .Result = Number { fn Op[self: Number]() -> Number { return {.is_positive = not self.is_positive}; } } -impl Number as Core.Mul { +impl Number as Core.MulWith(Number) where .Result = Number { fn Op[self: Number](other: Number) -> Number { return {.is_positive = (self.is_positive and other.is_positive) or (not self.is_positive and not other.is_positive)}; @@ -41,7 +41,7 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: define void @"_COp.Number.Main:Mul.Core"(ptr sret({ i1 }) %return, ptr %self, ptr %other) !dbg !11 { +// CHECK:STDOUT: define void @"_COp.Number.Main:MulWith.Core"(ptr sret({ i1 }) %return, ptr %self, ptr %other) !dbg !11 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc22_33.1.is_positive = getelementptr inbounds nuw { i1 }, ptr %self, i32 0, i32 0, !dbg !12 // CHECK:STDOUT: %.loc22_33.2 = load i1, ptr %.loc22_33.1.is_positive, align 1, !dbg !12 @@ -84,7 +84,7 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc28_10.1.temp = alloca { i1 }, align 8, !dbg !22 // CHECK:STDOUT: call void @"_COp.Number.Main:Negate.Core"(ptr %.loc28_10.1.temp, ptr %a), !dbg !22 -// CHECK:STDOUT: call void @"_COp.Number.Main:Mul.Core"(ptr %return, ptr %.loc28_10.1.temp, ptr %b), !dbg !22 +// CHECK:STDOUT: call void @"_COp.Number.Main:MulWith.Core"(ptr %return, ptr %.loc28_10.1.temp, ptr %b), !dbg !22 // CHECK:STDOUT: ret void, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -102,7 +102,7 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: !8 = !DILocation(line: 17, column: 28, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 17, column: 12, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 17, column: 5, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Number.Main:Mul.Core", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Number.Main:MulWith.Core", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !12 = !DILocation(line: 22, column: 29, scope: !11) // CHECK:STDOUT: !13 = !DILocation(line: 22, column: 50, scope: !11) // CHECK:STDOUT: !14 = !DILocation(line: 22, column: 28, scope: !11) diff --git a/toolchain/testing/testdata/min_prelude/facet_types.carbon b/toolchain/testing/testdata/min_prelude/facet_types.carbon index 294a41a0fa23..424690a5ad15 100644 --- a/toolchain/testing/testdata/min_prelude/facet_types.carbon +++ b/toolchain/testing/testdata/min_prelude/facet_types.carbon @@ -13,10 +13,10 @@ package Core library "prelude"; export import library "prelude/parts/as"; -interface BitAnd { - fn Op[self: Self](other: Self) -> Self; +interface BitAndWith(Other:! type) { + fn Op[self: Self](other: Other) -> Self; } -impl type as BitAnd { +impl type as BitAndWith(type) { fn Op[self: Self](other: Self) -> Self = "type.and"; }