mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rebuild the type of a bind_symbolic_name when building an eval block (#5174)
When transforming instructions with symbolic constant values into the eval block, we previously special-cased `bind_symbolic_name` (and `symbolic_binding_pattern`) because they are places where symbolicness is introduced, rather than propagated from operands, and just copied them into the eval block. However, `bind_symbolic_name` can be dependent on other symbolic constants, because it can have a type that is dependent. In this case, the copy in the eval block would not have its type properly adjusted to refer to the type within the eval block. Fix this by performing substitution into `bind_symbolic_name` rather than copying it directly, and instead, detect cases where substitution determined that the instruction was unchanged despite having a symbolic constant value, and force it to be rebuilt in that case. I've not found any way that the previous behavior actually caused problems, or affected the observable behavior of the toolchain. The type of these instructions in the eval block doesn't make much difference to anything because they get immediately replaced by their corresponding argument values when we run the eval block. But this came up and caused some test output churn when I was making a different change, and it seems like a fix to our representation even if it's not changing behavior, so I'm splitting it out so it can be handled separately.
This commit is contained in:
+20
-14
@@ -90,6 +90,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: %Op.4e3: %Op.type.c2a = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32.builtin, (%impl_witness.8b6) [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]
|
||||
// CHECK:STDOUT: %Convert.713: %Convert.type.c0d = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %As.assoc_type.567: type = assoc_entity_type %As.type.a09 [concrete]
|
||||
@@ -99,6 +100,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: %Convert.33c: %Convert.type.fc9 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %As.facet: %As.type.a09 = facet_value Core.IntLiteral, (%impl_witness.213) [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.11a: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete]
|
||||
// CHECK:STDOUT: %Self.e0a: %ImplicitAs.type.11a = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.752: type = fn_type @Convert.2, @ImplicitAs(%i32.builtin) [concrete]
|
||||
// CHECK:STDOUT: %Convert.fcc: %Convert.type.752 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.dd3: type = assoc_entity_type %ImplicitAs.type.11a [concrete]
|
||||
@@ -108,6 +110,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: %Convert.40d: %Convert.type.c2a = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet.224: %ImplicitAs.type.11a = facet_value Core.IntLiteral, (%impl_witness.48c) [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.9fc: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
|
||||
// CHECK:STDOUT: %Self.37e: %ImplicitAs.type.9fc = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.60e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete]
|
||||
// CHECK:STDOUT: %Convert.c73: %Convert.type.60e = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.81c: type = assoc_entity_type %ImplicitAs.type.9fc [concrete]
|
||||
@@ -254,7 +257,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T.loc11_14.2)> [symbolic = %As.type (constants.%As.type.8ba)]
|
||||
// CHECK:STDOUT: %Self.2: %As.type.8ba = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
|
||||
// CHECK:STDOUT: %Self.2: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%T.loc11_14.2) [symbolic = %Convert.type (constants.%Convert.type.ad1)]
|
||||
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.ad1) = struct_value () [symbolic = %Convert (constants.%Convert.0ed)]
|
||||
// CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.8ba) [symbolic = %As.assoc_type (constants.%As.assoc_type.600)]
|
||||
@@ -296,7 +299,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc15_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
|
||||
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
|
||||
// CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%T.loc15_22.2) [symbolic = %Convert.type (constants.%Convert.type.4cf)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.4cf) = struct_value () [symbolic = %Convert (constants.%Convert.147)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.94e)]
|
||||
@@ -441,7 +444,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: generic fn @Convert.1(@As.%T.loc11_14.1: type, @As.%Self.1: @As.%As.type (%As.type.8ba)) {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.8ba)]
|
||||
// CHECK:STDOUT: %Self: %As.type.8ba = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.b4e)]
|
||||
// CHECK:STDOUT: %Self: @Convert.1.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.b4e)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc12_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.7f0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.7f0)]() -> @Convert.1.%T (%T);
|
||||
@@ -450,7 +453,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: generic fn @Convert.2(@ImplicitAs.%T.loc15_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) {
|
||||
// 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.07f)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.0f3)]
|
||||
// CHECK:STDOUT: %Self: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.0f3)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc16_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.419)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.419)]() -> @Convert.2.%T (%T);
|
||||
@@ -512,7 +515,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %As.type => constants.%As.type.a09
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.b4e
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.2fa
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.c0d
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.713
|
||||
// CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.567
|
||||
@@ -532,7 +535,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.11a
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.0f3
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.e0a
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.752
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.fcc
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.dd3
|
||||
@@ -552,7 +555,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fc
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.0f3
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.37e
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.60e
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.c73
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.81c
|
||||
@@ -584,6 +587,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: %As.assoc_type.a44: type = assoc_entity_type %As.type.eed [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.ea3: %As.assoc_type.a44 = assoc_entity element0, imports.%Core.import_ref.708 [symbolic]
|
||||
// CHECK:STDOUT: %As.type.a6d: type = facet_type <@As, @As(%i32.builtin)> [concrete]
|
||||
// CHECK:STDOUT: %Self.c25: %As.type.a6d = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.378: type = fn_type @Convert.1, @As(%i32.builtin) [concrete]
|
||||
// CHECK:STDOUT: %Convert.e51: %Convert.type.378 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %As.assoc_type.e21: type = assoc_entity_type %As.type.a6d [concrete]
|
||||
@@ -599,11 +603,13 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: %Self.as_type.40a: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %Self.d28: %ImplicitAs.type.61e = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.059: type = fn_type @Convert.2, @ImplicitAs(%i32.builtin) [concrete]
|
||||
// CHECK:STDOUT: %Convert.4d7: %Convert.type.059 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.740: type = assoc_entity_type %ImplicitAs.type.61e [concrete]
|
||||
// CHECK:STDOUT: %assoc0.a81: %ImplicitAs.assoc_type.740 = assoc_entity element0, imports.%Core.import_ref.1c752f.1 [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
|
||||
// CHECK:STDOUT: %Self.9ac: %ImplicitAs.type.2fd = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete]
|
||||
// CHECK:STDOUT: %Convert.0e2: %Convert.type.71e = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.29f: type = assoc_entity_type %ImplicitAs.type.2fd [concrete]
|
||||
@@ -753,7 +759,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.eed)]
|
||||
// CHECK:STDOUT: %Self: %As.type.eed = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.65a)]
|
||||
// CHECK:STDOUT: %Self: @As.%As.type (%As.type.eed) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.65a)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%T) [symbolic = %Convert.type (constants.%Convert.type.843)]
|
||||
// CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.843) = struct_value () [symbolic = %Convert (constants.%Convert.95f)]
|
||||
// CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.eed) [symbolic = %As.assoc_type (constants.%As.assoc_type.a44)]
|
||||
@@ -780,7 +786,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
@@ -819,7 +825,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: generic fn @Convert.1(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.996: @As.%As.type (%As.type.eed)) [from "core.carbon"] {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.eed)]
|
||||
// CHECK:STDOUT: %Self: %As.type.eed = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.65a)]
|
||||
// CHECK:STDOUT: %Self: @Convert.1.%As.type (%As.type.eed) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.65a)]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.04d)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.04d)]() -> @Convert.1.%T (%T);
|
||||
@@ -828,7 +834,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// 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: %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: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Self: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.40a)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%Self.as_type (%Self.as_type.40a)]() -> @Convert.2.%T (%T);
|
||||
@@ -922,7 +928,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %As.type => constants.%As.type.a6d
|
||||
// CHECK:STDOUT: %Self => constants.%Self.65a
|
||||
// CHECK:STDOUT: %Self => constants.%Self.c25
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.378
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.e51
|
||||
// CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.e21
|
||||
@@ -940,7 +946,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.61e
|
||||
// CHECK:STDOUT: %Self => constants.%Self.519
|
||||
// CHECK:STDOUT: %Self => constants.%Self.d28
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.059
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.4d7
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.740
|
||||
@@ -964,7 +970,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2fd
|
||||
// CHECK:STDOUT: %Self => constants.%Self.519
|
||||
// CHECK:STDOUT: %Self => constants.%Self.9ac
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.71e
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.0e2
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.29f
|
||||
|
||||
+10
-8
@@ -43,7 +43,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %Generic.generic: %Generic.type.c21 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Generic.type.91ccba.1: type = facet_type <@Generic, @Generic(%Scalar)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.dee: %Generic.type.91ccba.1 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Self.dee8d8.1: %Generic.type.91ccba.1 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %F.type.f439a9.1: type = fn_type @F.1, @Generic(%Scalar) [symbolic]
|
||||
// CHECK:STDOUT: %F.8a2d67.1: %F.type.f439a9.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Generic.assoc_type.de973d.1: type = assoc_entity_type %Generic.type.91ccba.1 [symbolic]
|
||||
@@ -53,6 +53,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
|
||||
// CHECK:STDOUT: %ImplsGeneric: type = class_type @ImplsGeneric [concrete]
|
||||
// CHECK:STDOUT: %Generic.type.769: type = facet_type <@Generic, @Generic(%GenericParam)> [concrete]
|
||||
// CHECK:STDOUT: %Self.f84: %Generic.type.769 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %F.type.4cf: type = fn_type @F.1, @Generic(%GenericParam) [concrete]
|
||||
// CHECK:STDOUT: %F.118: %F.type.4cf = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Generic.assoc_type.9f1: type = assoc_entity_type %Generic.type.769 [concrete]
|
||||
@@ -78,6 +79,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %U.patt: %Generic.type.91ccba.2 = symbolic_binding_pattern U, 1 [symbolic]
|
||||
// CHECK:STDOUT: %CallGenericMethod.type: type = fn_type @CallGenericMethod [concrete]
|
||||
// CHECK:STDOUT: %CallGenericMethod: %CallGenericMethod.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.dee8d8.2: %Generic.type.91ccba.2 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %F.type.f439a9.2: type = fn_type @F.1, @Generic(%T) [symbolic]
|
||||
// CHECK:STDOUT: %F.8a2d67.2: %F.type.f439a9.2 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Generic.assoc_type.de973d.2: type = assoc_entity_type %Generic.type.91ccba.2 [symbolic]
|
||||
@@ -155,14 +157,14 @@ fn G() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc11_19.2)> [symbolic = %Generic.type (constants.%Generic.type.91ccba.1)]
|
||||
// CHECK:STDOUT: %Self.2: %Generic.type.91ccba.1 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.dee)]
|
||||
// CHECK:STDOUT: %Self.2: @Generic.%Generic.type (%Generic.type.91ccba.1) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.dee8d8.1)]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F.1, @Generic(%Scalar.loc11_19.2) [symbolic = %F.type (constants.%F.type.f439a9.1)]
|
||||
// CHECK:STDOUT: %F: @Generic.%F.type (%F.type.f439a9.1) = struct_value () [symbolic = %F (constants.%F.8a2d67.1)]
|
||||
// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic.%Generic.type (%Generic.type.91ccba.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.de973d.1)]
|
||||
// CHECK:STDOUT: %assoc0.loc12_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.de973d.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc12_9.2 (constants.%assoc0.29ce53.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.1: @Generic.%Generic.type (%Generic.type.91ccba.1) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.dee)]
|
||||
// CHECK:STDOUT: %Self.1: @Generic.%Generic.type (%Generic.type.91ccba.1) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.dee8d8.1)]
|
||||
// CHECK:STDOUT: %F.decl: @Generic.%F.type (%F.type.f439a9.1) = fn_decl @F.1 [symbolic = @Generic.%F (constants.%F.8a2d67.1)] {} {}
|
||||
// CHECK:STDOUT: %assoc0.loc12_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.de973d.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc12_9.2 (constants.%assoc0.29ce53.1)]
|
||||
// CHECK:STDOUT:
|
||||
@@ -235,8 +237,8 @@ fn G() {
|
||||
// CHECK:STDOUT: %T.loc29_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc29_22.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.patt.loc29_22.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc29_22.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %Generic.type.loc29_45.2: type = facet_type <@Generic, @Generic(%T.loc29_22.2)> [symbolic = %Generic.type.loc29_45.2 (constants.%Generic.type.91ccba.2)]
|
||||
// CHECK:STDOUT: %U.loc29_32.2: %Generic.type.91ccba.2 = bind_symbolic_name U, 1 [symbolic = %U.loc29_32.2 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.patt.loc29_32.2: %Generic.type.91ccba.2 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc29_32.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %U.loc29_32.2: @CallGenericMethod.%Generic.type.loc29_45.2 (%Generic.type.91ccba.2) = bind_symbolic_name U, 1 [symbolic = %U.loc29_32.2 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.patt.loc29_32.2: @CallGenericMethod.%Generic.type.loc29_45.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc29_32.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type @CallGenericMethod.%Generic.type.loc29_45.2 (%Generic.type.91ccba.2) [symbolic = %require_complete (constants.%require_complete)]
|
||||
@@ -282,7 +284,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %Scalar.patt.loc11_19.2 => constants.%Scalar
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee) {}
|
||||
// CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee8d8.1) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Generic(%Scalar.loc11_19.2) {}
|
||||
// CHECK:STDOUT:
|
||||
@@ -292,7 +294,7 @@ fn G() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Generic.type => constants.%Generic.type.769
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.dee
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.f84
|
||||
// CHECK:STDOUT: %F.type => constants.%F.type.4cf
|
||||
// CHECK:STDOUT: %F => constants.%F.118
|
||||
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.9f1
|
||||
@@ -311,7 +313,7 @@ fn G() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Generic.type => constants.%Generic.type.91ccba.2
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.dee
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.dee8d8.2
|
||||
// CHECK:STDOUT: %F.type => constants.%F.type.f439a9.2
|
||||
// CHECK:STDOUT: %F => constants.%F.8a2d67.2
|
||||
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.de973d.2
|
||||
|
||||
Reference in New Issue
Block a user