mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Make SemIR::TypeType be an empty FacetType instruction (#7813)
The type `type` is now a `FacetType` inst with no constraints. This brings the model implemented in the toolchain into better alignment with the language design. The `SemIR::TypeType` struct remains as a scope for holding the `TypeInstId`, `ConstantId`, and `TypeId` constants, but is not an `InstKind` anymore. The `TypeType` inst looks a lot like singletons, but there are many `FacetType` insts so it doesn't quite fit that model. So we put it alongside singletons with a fixed inst id but refer to it as a more general "builtin" inst that is not a singleton. `Namespace::PackageInstId` is similar, and we group it with `TypeType` conceptually as another builtin instruction with a fixed id. No conversion is needed anymore to use a `type` as a facet, since types also have a `FacetType` type. This simplifies and removes a number of helpers and branches throughout the code. The `TypeType` inst is now part of the constant store, so we end up printing it in the constants block in every test. But it's also named `type` rather than `%type` to preserve the majority of existing formatting behaviour, though this does look different from other constants. Assisted-by: Opus 5 was used to generate a first draft and validate the refactoring. Though nearly everything non-trivial the tool wrote has been modified or rewritten.
This commit is contained in:
@@ -18,6 +18,7 @@ var y: {} = x;
|
||||
// CHECK:STDOUT: --- empty.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_struct_type [concrete]
|
||||
|
||||
@@ -22,6 +22,7 @@ fn F() { a.b; }
|
||||
// CHECK:STDOUT: --- fail_access_into_invalid.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -21,6 +21,7 @@ var x: {.a: i32} = {};
|
||||
// CHECK:STDOUT: --- fail_assign_empty.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
@@ -21,6 +21,7 @@ var x: {.a: {}} = {.b = {}};
|
||||
// CHECK:STDOUT: --- fail_assign_nested.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %struct_type.a.225: type = struct_type {.a: %empty_struct_type} [concrete]
|
||||
|
||||
@@ -21,6 +21,7 @@ var x: {} = {.a = 1};
|
||||
// CHECK:STDOUT: --- fail_assign_to_empty.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_struct_type [concrete]
|
||||
|
||||
@@ -60,6 +60,7 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4};
|
||||
// CHECK:STDOUT: --- fail_duplicate_name.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
@@ -34,6 +34,7 @@ var y: {.b: i32} = x;
|
||||
// CHECK:STDOUT: --- fail_field_name_mismatch.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
@@ -21,6 +21,7 @@ var x: {.a: i32} = {.b = 1.0};
|
||||
// CHECK:STDOUT: --- fail_field_type_mismatch.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
@@ -22,6 +22,7 @@ var y: i32 = x.b;
|
||||
// CHECK:STDOUT: --- fail_member_access_type.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
|
||||
// CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
|
||||
// CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
|
||||
|
||||
@@ -23,6 +23,7 @@ fn A() {
|
||||
// CHECK:STDOUT: --- fail_member_of_function.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [concrete]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -28,6 +28,7 @@ var p: Incomplete* = &s.a;
|
||||
// CHECK:STDOUT: --- fail_nested_incomplete.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [concrete]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %Incomplete} [concrete]
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [concrete]
|
||||
|
||||
@@ -22,6 +22,7 @@ var y: i32 = x.b;
|
||||
// CHECK:STDOUT: --- fail_non_member_access.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
@@ -21,6 +21,7 @@ var x: {.a: i32, .b: i32} = {.a = 1};
|
||||
// CHECK:STDOUT: --- fail_too_few_values.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
@@ -24,6 +24,7 @@ var x: {.a: i32} = {.a: i32};
|
||||
// CHECK:STDOUT: --- fail_type_assign.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
@@ -24,6 +24,7 @@ var x: {.a = 1};
|
||||
// CHECK:STDOUT: --- fail_value_as_type.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [concrete]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%int_1) [concrete]
|
||||
|
||||
+5
-3
@@ -82,6 +82,7 @@ fn F() -> {.x: i32} {
|
||||
// CHECK:STDOUT: --- implicit.impl.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
||||
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
|
||||
@@ -105,8 +106,8 @@ fn F() -> {.x: i32} {
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type.381: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete]
|
||||
// CHECK:STDOUT: %.737: type = fn_type_with_self_type %Copy.WithSelf.Op.type.381, %Copy.facet [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.4f6, @Int.as.Copy.impl.Op(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %tuple.type.85c: type = tuple_type (type) [concrete]
|
||||
// CHECK:STDOUT: %tuple.19c: %tuple.type.85c = tuple_value (%i32) [concrete]
|
||||
// CHECK:STDOUT: %tuple.type.135: type = tuple_type (type) [concrete]
|
||||
// CHECK:STDOUT: %tuple.e3d: %tuple.type.135 = tuple_value (%i32) [concrete]
|
||||
// CHECK:STDOUT: %tuple.type.a8a: type = tuple_type (%i32) [concrete]
|
||||
// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.a8a} [concrete]
|
||||
// CHECK:STDOUT: %struct_type.a.d.01c: type = struct_type {.a: %struct_type.b.c, .d: %i32} [concrete]
|
||||
@@ -182,7 +183,7 @@ fn F() -> {.x: i32} {
|
||||
// CHECK:STDOUT: %.loc6_43: type = splice_block %struct_type.a.d [concrete = constants.%struct_type.a.d.01c] {
|
||||
// CHECK:STDOUT: %i32.loc6_18: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc6_28: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc6_32.1: %tuple.type.85c = tuple_literal (%i32.loc6_28) [concrete = constants.%tuple.19c]
|
||||
// CHECK:STDOUT: %.loc6_32.1: %tuple.type.135 = tuple_literal (%i32.loc6_28) [concrete = constants.%tuple.e3d]
|
||||
// CHECK:STDOUT: %.loc6_32.2: type = converted %.loc6_32.1, constants.%tuple.type.a8a [concrete = constants.%tuple.type.a8a]
|
||||
// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.a8a} [concrete = constants.%struct_type.b.c]
|
||||
// CHECK:STDOUT: %i32.loc6_40: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
@@ -285,6 +286,7 @@ fn F() -> {.x: i32} {
|
||||
// CHECK:STDOUT: --- import_symbolic_decl.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
||||
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
|
||||
@@ -21,6 +21,7 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: --- literal_member_access.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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]
|
||||
|
||||
@@ -19,6 +19,7 @@ var z: i32 = y;
|
||||
// CHECK:STDOUT: --- member_access.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
|
||||
// CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
|
||||
// CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
|
||||
|
||||
@@ -21,13 +21,14 @@ fn G() {
|
||||
// CHECK:STDOUT: --- nested_struct_in_place.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %tuple.type.ff9: type = tuple_type (type, type, type) [concrete]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.ff9 = tuple_value (%i32, %i32, %i32) [concrete]
|
||||
// CHECK:STDOUT: %tuple.type.531: type = tuple_type (type, type, type) [concrete]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.531 = tuple_value (%i32, %i32, %i32) [concrete]
|
||||
// CHECK:STDOUT: %tuple.type.555: type = tuple_type (%i32, %i32, %i32) [concrete]
|
||||
// CHECK:STDOUT: %.718: Core.Form = init_form %tuple.type.555 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.777: type = pattern_type %tuple.type.555 [concrete]
|
||||
@@ -72,7 +73,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %i32.loc15_12: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc15_17: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc15_22: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_25.1: %tuple.type.ff9 = tuple_literal (%i32.loc15_12, %i32.loc15_17, %i32.loc15_22) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc15_25.1: %tuple.type.531 = tuple_literal (%i32.loc15_12, %i32.loc15_17, %i32.loc15_22) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc15_25.2: type = converted %.loc15_25.1, constants.%tuple.type.555 [concrete = constants.%tuple.type.555]
|
||||
// CHECK:STDOUT: %.loc15_25.3: Core.Form = init_form %.loc15_25.2 [concrete = constants.%.718]
|
||||
// CHECK:STDOUT: %return.param: ref %tuple.type.555 = out_param call_param0
|
||||
@@ -100,12 +101,12 @@ fn G() {
|
||||
// CHECK:STDOUT: %i32.loc18_23: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc18_28: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc18_33: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_36.1: %tuple.type.ff9 = tuple_literal (%i32.loc18_23, %i32.loc18_28, %i32.loc18_33) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc18_36.1: %tuple.type.531 = tuple_literal (%i32.loc18_23, %i32.loc18_28, %i32.loc18_33) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc18_36.2: type = converted %.loc18_36.1, constants.%tuple.type.555 [concrete = constants.%tuple.type.555]
|
||||
// CHECK:STDOUT: %i32.loc18_44: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc18_49: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc18_54: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc18_57.1: %tuple.type.ff9 = tuple_literal (%i32.loc18_44, %i32.loc18_49, %i32.loc18_54) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc18_57.1: %tuple.type.531 = tuple_literal (%i32.loc18_44, %i32.loc18_49, %i32.loc18_54) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc18_57.2: type = converted %.loc18_57.1, constants.%tuple.type.555 [concrete = constants.%tuple.type.555]
|
||||
// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %tuple.type.555, .b: %tuple.type.555} [concrete = constants.%struct_type.a.b.2a0]
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -18,6 +18,7 @@ var y: {.a: i32} = x;
|
||||
// CHECK:STDOUT: --- one_entry.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
@@ -19,6 +19,7 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} {
|
||||
// CHECK:STDOUT: --- partially_const.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
@@ -24,6 +24,7 @@ fn F() -> {.a: i32, .b: f64} {
|
||||
// CHECK:STDOUT: --- reorder_fields.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
+5
-4
@@ -18,13 +18,14 @@ var y: {.a: i32, .b: (i32,)} = x;
|
||||
// CHECK:STDOUT: --- tuple_as_element.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %tuple.type.85c: type = tuple_type (type) [concrete]
|
||||
// CHECK:STDOUT: %tuple.19c: %tuple.type.85c = tuple_value (%i32) [concrete]
|
||||
// CHECK:STDOUT: %tuple.type.135: type = tuple_type (type) [concrete]
|
||||
// CHECK:STDOUT: %tuple.e3d: %tuple.type.135 = tuple_value (%i32) [concrete]
|
||||
// CHECK:STDOUT: %tuple.type.a8a: type = tuple_type (%i32) [concrete]
|
||||
// CHECK:STDOUT: %struct_type.a.b.388: type = struct_type {.a: %i32, .b: %tuple.type.a8a} [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.227: type = pattern_type %struct_type.a.b.388 [concrete]
|
||||
@@ -104,7 +105,7 @@ var y: {.a: i32, .b: (i32,)} = x;
|
||||
// CHECK:STDOUT: %.loc15_28: type = splice_block %struct_type.a.b.loc15 [concrete = constants.%struct_type.a.b.388] {
|
||||
// CHECK:STDOUT: %i32.loc15_13: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc15_23: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc15_27.1: %tuple.type.85c = tuple_literal (%i32.loc15_23) [concrete = constants.%tuple.19c]
|
||||
// CHECK:STDOUT: %.loc15_27.1: %tuple.type.135 = tuple_literal (%i32.loc15_23) [concrete = constants.%tuple.e3d]
|
||||
// CHECK:STDOUT: %.loc15_27.2: type = converted %.loc15_27.1, constants.%tuple.type.a8a [concrete = constants.%tuple.type.a8a]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: %tuple.type.a8a} [concrete = constants.%struct_type.a.b.388]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -117,7 +118,7 @@ var y: {.a: i32, .b: (i32,)} = x;
|
||||
// CHECK:STDOUT: %.loc16_28: type = splice_block %struct_type.a.b.loc16 [concrete = constants.%struct_type.a.b.388] {
|
||||
// CHECK:STDOUT: %i32.loc16_13: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc16_23: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc16_27.1: %tuple.type.85c = tuple_literal (%i32.loc16_23) [concrete = constants.%tuple.19c]
|
||||
// CHECK:STDOUT: %.loc16_27.1: %tuple.type.135 = tuple_literal (%i32.loc16_23) [concrete = constants.%tuple.e3d]
|
||||
// CHECK:STDOUT: %.loc16_27.2: type = converted %.loc16_27.1, constants.%tuple.type.a8a [concrete = constants.%tuple.type.a8a]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc16: type = struct_type {.a: %i32, .b: %tuple.type.a8a} [concrete = constants.%struct_type.a.b.388]
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -21,6 +21,7 @@ var y: {.a: i32, .b: i32} = x;
|
||||
// CHECK:STDOUT: --- two_entries.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_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: %Int.generic: %Int.type = struct_value () [concrete]
|
||||
|
||||
Reference in New Issue
Block a user