mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 10:44:41 +01:00
Name empty tuples distinctly in SemIR. (#4503)
Building on #4502, give empty tuple values a distinct name, and also explicitly name tuple types (previously values but not types were named).
This commit is contained in:
@@ -19,12 +19,12 @@ fn Run() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = ptr_type String [template]
|
||||
// CHECK:STDOUT: %.3: String = string_literal "hello" [template]
|
||||
// CHECK:STDOUT: %.1: type = ptr_type String [template]
|
||||
// CHECK:STDOUT: %.2: String = string_literal "hello" [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -52,7 +52,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_32, %.loc15_10.1 [template = i32]
|
||||
// CHECK:STDOUT: %x.var: ref i32 = var x
|
||||
// CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %.loc15_16: String = string_literal "hello" [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc15_16: String = string_literal "hello" [template = constants.%.2]
|
||||
// CHECK:STDOUT: assign %x.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -68,7 +68,7 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Run0.type: type = fn_type @Run0 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Run0: %Run0.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
@@ -78,8 +78,8 @@ fn Main() {
|
||||
// CHECK:STDOUT: %Run2: %Run2.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -151,17 +151,17 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Run0.ref.loc23: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0]
|
||||
// CHECK:STDOUT: %.loc23: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc23: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %Run0.ref.loc31: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0]
|
||||
// CHECK:STDOUT: %.loc31_8: i32 = int_value 0 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc31_11: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc31_8: i32 = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc31_11: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %Run1.ref.loc40: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1]
|
||||
// CHECK:STDOUT: %Run1.ref.loc48: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1]
|
||||
// CHECK:STDOUT: %.loc48_8: i32 = int_value 0 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc48_11: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc48_8: i32 = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc48_11: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %Run2.ref.loc57: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2]
|
||||
// CHECK:STDOUT: %Run2.ref.loc64: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2]
|
||||
// CHECK:STDOUT: %.loc64: i32 = int_value 0 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc64: i32 = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+14
-14
@@ -27,13 +27,13 @@ fn F() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: f64 = float_literal 1 [template]
|
||||
// CHECK:STDOUT: %.1: f64 = float_literal 1 [template]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
|
||||
// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
||||
@@ -43,14 +43,14 @@ fn F() {
|
||||
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
||||
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
||||
// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.6 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template]
|
||||
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
|
||||
// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template]
|
||||
// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
|
||||
// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [template]
|
||||
// CHECK:STDOUT: %.6: %.2 = assoc_entity element0, imports.%import_ref.7 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -63,7 +63,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs]
|
||||
// CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+55, unloaded
|
||||
// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)]
|
||||
// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.2) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.6)]
|
||||
// CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+70, unloaded
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+70, unloaded
|
||||
// CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+70, unloaded
|
||||
@@ -98,8 +98,8 @@ fn F() {
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
||||
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)]
|
||||
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)]
|
||||
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)]
|
||||
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.3)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -119,9 +119,9 @@ fn F() {
|
||||
// CHECK:STDOUT: fn @F() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G]
|
||||
// CHECK:STDOUT: %.loc23_5.1: f64 = float_literal 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc23_5.1: f64 = float_literal 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc23_5.2: i32 = converted %.loc23_5.1, <error> [template = <error>]
|
||||
// CHECK:STDOUT: %G.call: init %.1 = call %G.ref(<error>)
|
||||
// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(<error>)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -163,7 +163,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %Self => constants.%Self.2
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.5
|
||||
// CHECK:STDOUT: %.2 => constants.%.6
|
||||
// CHECK:STDOUT: %.1 => constants.%.4
|
||||
// CHECK:STDOUT: %.2 => constants.%.5
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -25,11 +25,11 @@ fn Run() {
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template]
|
||||
// CHECK:STDOUT: %Float.type: type = fn_type @Float [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Float: %Float.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
|
||||
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: f64 = float_literal 1 [template]
|
||||
// CHECK:STDOUT: %.2: f64 = float_literal 1 [template]
|
||||
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
|
||||
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
@@ -43,14 +43,14 @@ fn Run() {
|
||||
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
||||
// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
|
||||
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template]
|
||||
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template]
|
||||
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
|
||||
// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.7 [template]
|
||||
// CHECK:STDOUT: %.8: %.4 = assoc_entity element0, imports.%import_ref.8 [symbolic]
|
||||
// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
|
||||
// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.7 [template]
|
||||
// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.8 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -65,7 +65,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.3: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs]
|
||||
// CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+55, unloaded
|
||||
// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.4) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.8)]
|
||||
// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)]
|
||||
// CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+70, unloaded
|
||||
// CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+70, unloaded
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref Core//prelude/operators/as, inst+70, unloaded
|
||||
@@ -101,8 +101,8 @@ fn Run() {
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
|
||||
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)]
|
||||
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.4) = assoc_entity element0, imports.%import_ref.7 [symbolic = %.2 (constants.%.5)]
|
||||
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)]
|
||||
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.7 [symbolic = %.2 (constants.%.4)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -116,7 +116,7 @@ fn Run() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Foo() -> f64 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_26: f64 = float_literal 1 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc11_26: f64 = float_literal 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: return %.loc11_26
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -176,7 +176,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: %Self => constants.%Self.2
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.2
|
||||
// CHECK:STDOUT: %.1 => constants.%.6
|
||||
// CHECK:STDOUT: %.2 => constants.%.7
|
||||
// CHECK:STDOUT: %.1 => constants.%.5
|
||||
// CHECK:STDOUT: %.2 => constants.%.6
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+3
-3
@@ -20,13 +20,13 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template]
|
||||
// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -81,7 +81,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: %b.var: ref i32 = var b
|
||||
// CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
|
||||
// CHECK:STDOUT: %.loc16_21: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc16_21: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %Echo.call: init i32 = call %Echo.ref(%.loc16_21)
|
||||
// CHECK:STDOUT: assign %b.var, %Echo.call
|
||||
// CHECK:STDOUT: return
|
||||
|
||||
+19
-19
@@ -20,18 +20,18 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
|
||||
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
|
||||
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template]
|
||||
// CHECK:STDOUT: %.5: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.6: i32 = int_value 6 [template]
|
||||
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
|
||||
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template]
|
||||
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.1) [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 0 [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_value 6 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -80,24 +80,24 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_15.1: %.2 = tuple_literal (%int.make_type_32)
|
||||
// CHECK:STDOUT: %.loc14_15.1: %tuple.type.1 = tuple_literal (%int.make_type_32)
|
||||
// CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_32 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_32, %.loc14_15.2 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_15.4: type = converted %.loc14_15.1, constants.%.3 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %x.var: ref %.3 = var x
|
||||
// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %.loc14_20: i32 = int_value 1 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc14_22.1: %.3 = tuple_literal (%.loc14_20)
|
||||
// CHECK:STDOUT: %.loc14_22.2: init %.3 = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc14_23: init %.3 = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc14_15.4: type = converted %.loc14_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
|
||||
// CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x
|
||||
// CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var
|
||||
// CHECK:STDOUT: %.loc14_20: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc14_22.1: %tuple.type.2 = tuple_literal (%.loc14_20)
|
||||
// CHECK:STDOUT: %.loc14_22.2: init %tuple.type.2 = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc14_23: init %tuple.type.2 = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple]
|
||||
// CHECK:STDOUT: assign %x.var, %.loc14_23
|
||||
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
|
||||
// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, %x
|
||||
// CHECK:STDOUT: %.loc16_9: i32 = int_value 0 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %x.ref: ref %tuple.type.2 = name_ref x, %x
|
||||
// CHECK:STDOUT: %.loc16_9: i32 = int_value 0 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc16_8.1: ref i32 = tuple_access %x.ref, element0
|
||||
// CHECK:STDOUT: %.loc16_12: i32 = int_value 6 [template = constants.%.6]
|
||||
// CHECK:STDOUT: %.loc16_12: i32 = int_value 6 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc16_8.2: i32 = bind_value %.loc16_8.1
|
||||
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc16_8.2, %.loc16_12)
|
||||
// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc16_8.2, %.loc16_12)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+17
-17
@@ -19,10 +19,10 @@ fn Main() {
|
||||
// CHECK:STDOUT: --- alias.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -34,35 +34,35 @@ fn Main() {
|
||||
// CHECK:STDOUT: .Main = %Main.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {
|
||||
// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_12.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param
|
||||
// CHECK:STDOUT: %.loc11_12.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0
|
||||
// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [template = constants.%A]
|
||||
// CHECK:STDOUT: %B: %A.type = bind_alias B, %A.decl [template = constants.%A]
|
||||
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A() -> %.1 {
|
||||
// CHECK:STDOUT: fn @A() -> %empty_tuple.type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc11_24: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc11_25: %.1 = converted %.loc11_24, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc11_24: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc11_25: %empty_tuple.type = converted %.loc11_24, %empty_tuple [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return %.loc11_25
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc16_11.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc16_11.2: type = converted %.loc16_11.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %b.var: ref %.1 = var b
|
||||
// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %.loc16_11.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc16_11.2: type = converted %.loc16_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b
|
||||
// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %B.ref: %A.type = name_ref B, file.%B [template = constants.%A]
|
||||
// CHECK:STDOUT: %A.call: init %.1 = call %B.ref()
|
||||
// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %B.ref()
|
||||
// CHECK:STDOUT: assign %b.var, %A.call
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -21,7 +21,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
|
||||
@@ -19,12 +19,12 @@ fn Main() {
|
||||
// CHECK:STDOUT: --- empty_tuple.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template]
|
||||
// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -33,36 +33,36 @@ fn Main() {
|
||||
// CHECK:STDOUT: .Main = %Main.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] {
|
||||
// CHECK:STDOUT: %a.patt: %.1 = binding_pattern a
|
||||
// CHECK:STDOUT: %a.param_patt: %.1 = value_param_pattern %a.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %.1 = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %.1 = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: %a.patt: %empty_tuple.type = binding_pattern a
|
||||
// CHECK:STDOUT: %a.param_patt: %empty_tuple.type = value_param_pattern %a.patt, runtime_param0
|
||||
// CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_13.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc11_20.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %a.param: %.1 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %a: %.1 = bind_name a, %a.param
|
||||
// CHECK:STDOUT: %return.param: ref %.1 = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %.1 = return_slot %return.param
|
||||
// CHECK:STDOUT: %.loc11_13.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc11_20.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %a.param: %empty_tuple.type = value_param runtime_param0
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = bind_name a, %a.param
|
||||
// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1
|
||||
// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Echo(%a.param_patt: %.1) -> %.1 {
|
||||
// CHECK:STDOUT: fn @Echo(%a.param_patt: %empty_tuple.type) -> %empty_tuple.type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %.1 = name_ref a, %a
|
||||
// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, %a
|
||||
// CHECK:STDOUT: return %a.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
|
||||
// CHECK:STDOUT: %.loc16_9.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc16_9.2: %.1 = converted %.loc16_9.1, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %Echo.call: init %.1 = call %Echo.ref(%.loc16_9.2)
|
||||
// CHECK:STDOUT: %.loc16_9.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc16_9.2: %empty_tuple.type = converted %.loc16_9.1, %empty_tuple [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %Echo.call: init %empty_tuple.type = call %Echo.ref(%.loc16_9.2)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+13
-13
@@ -20,12 +20,12 @@ fn Run() {
|
||||
// CHECK:STDOUT: --- fail_explicit_self_param.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
|
||||
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -34,26 +34,26 @@ fn Run() {
|
||||
// CHECK:STDOUT: .Run = %Run.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %self.patt: %.1 = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: %.1 = value_param_pattern %self.patt, runtime_param0
|
||||
// CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, runtime_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc14_13.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_13.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %self.param: %.1 = value_param runtime_param0
|
||||
// CHECK:STDOUT: %self: %.1 = bind_name self, %self.param
|
||||
// CHECK:STDOUT: %.loc14_13.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param runtime_param0
|
||||
// CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%self.param_patt: %.1);
|
||||
// CHECK:STDOUT: fn @F(%self.param_patt: %empty_tuple.type);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Run() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %.loc17_6.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc17_6.2: %.1 = converted %.loc17_6.1, %tuple [template = constants.%tuple]
|
||||
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref(%.loc17_6.2)
|
||||
// CHECK:STDOUT: %.loc17_6.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc17_6.2: %empty_tuple.type = converted %.loc17_6.1, %empty_tuple [template = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc17_6.2)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: --- fail_runtime_implicit_param.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
|
||||
@@ -33,8 +33,8 @@ fn Run() {
|
||||
// CHECK:STDOUT: .Run = %Run.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {
|
||||
// CHECK:STDOUT: %.loc14_10.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc14_10.2: type = converted %.loc14_10.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc14_10.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc14_10.2: type = converted %.loc14_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
@@ -44,7 +44,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: fn @Run() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref()
|
||||
// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -18,7 +18,7 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
@@ -41,7 +41,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
|
||||
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref()
|
||||
// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -19,7 +19,7 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %MakeImplicitEmptyTuple.type: type = fn_type @MakeImplicitEmptyTuple [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %MakeImplicitEmptyTuple: %MakeImplicitEmptyTuple.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
@@ -41,12 +41,12 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc15_11.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %b.var: ref %.1 = var b
|
||||
// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %.loc15_11.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b
|
||||
// CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var
|
||||
// CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: %MakeImplicitEmptyTuple.type = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%MakeImplicitEmptyTuple]
|
||||
// CHECK:STDOUT: %MakeImplicitEmptyTuple.call: init %.1 = call %MakeImplicitEmptyTuple.ref()
|
||||
// CHECK:STDOUT: %MakeImplicitEmptyTuple.call: init %empty_tuple.type = call %MakeImplicitEmptyTuple.ref()
|
||||
// CHECK:STDOUT: assign %b.var, %MakeImplicitEmptyTuple.call
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -18,13 +18,13 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
|
||||
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -66,8 +66,8 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
|
||||
// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14)
|
||||
// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -19,13 +19,13 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
|
||||
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -67,11 +67,11 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
|
||||
// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14)
|
||||
// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14)
|
||||
// CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
|
||||
// CHECK:STDOUT: %.loc15: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15)
|
||||
// CHECK:STDOUT: %.loc15: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -18,14 +18,14 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
|
||||
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -74,9 +74,9 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
|
||||
// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14_7, %.loc14_10)
|
||||
// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14_7, %.loc14_10)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -19,14 +19,14 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
|
||||
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
|
||||
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
|
||||
// CHECK:STDOUT: %.2: i32 = int_value 2 [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -75,13 +75,13 @@ fn Main() {
|
||||
// CHECK:STDOUT: fn @Main() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
|
||||
// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14_7, %.loc14_10)
|
||||
// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7, %.loc14_10)
|
||||
// CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
|
||||
// CHECK:STDOUT: %.loc15_7: i32 = int_value 1 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %.loc15_10: i32 = int_value 2 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15_7, %.loc15_10)
|
||||
// CHECK:STDOUT: %.loc15_7: i32 = int_value 1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %.loc15_10: i32 = int_value 2 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15_7, %.loc15_10)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user