From 7d0f7b5e8f8db41ad758f6dff6078f0a9153dbaf Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 12 Sep 2023 14:48:15 -0700 Subject: [PATCH] Rename {Tuple,Struct}Value -> {Tuple,Struct}Literal. (#3213) This better reflects the purpose of these semantics nodes, and prepares for adding TupleValue and TupleInit nodes to represent forming values and initializers from literals. --- toolchain/check/context.cpp | 16 ++++++++-------- toolchain/check/handle_paren.cpp | 2 +- toolchain/check/handle_struct.cpp | 2 +- .../testdata/array/assign_return_value.carbon | 2 +- .../check/testdata/array/assign_var.carbon | 4 ++-- toolchain/check/testdata/array/base.carbon | 18 +++++++++--------- .../testdata/array/fail_out_of_bound.carbon | 2 +- .../testdata/array/fail_type_mismatch.carbon | 2 +- .../check/testdata/array/nine_elements.carbon | 2 +- .../testdata/basics/numeric_literals.carbon | 4 ++-- .../testdata/basics/raw_and_textual_ir.carbon | 6 +++--- toolchain/check/testdata/basics/raw_ir.carbon | 4 ++-- .../check/testdata/basics/textual_ir.carbon | 2 +- .../in_place_tuple_initialization.carbon | 2 +- .../testdata/function/call/empty_struct.carbon | 2 +- .../testdata/function/call/empty_tuple.carbon | 2 +- .../function/call/return_implicit.carbon | 2 +- .../testdata/index/array_element_access.carbon | 2 +- .../index/fail_array_large_index.carbon | 2 +- .../index/fail_array_non_int_indexing.carbon | 2 +- .../fail_array_out_of_bound_access.carbon | 2 +- .../index/fail_non_deterministic_type.carbon | 4 ++-- .../index/fail_tuple_large_index.carbon | 6 +++--- .../index/fail_tuple_non_int_indexing.carbon | 4 ++-- .../fail_tuple_out_of_bound_access.carbon | 4 ++-- .../testdata/index/tuple_element_access.carbon | 6 +++--- .../index/tuple_return_value_access.carbon | 2 +- .../check/testdata/operators/assignment.carbon | 6 +++--- .../fail_assigment_to_non_assignable.carbon | 12 ++++++------ .../testdata/pointer/address_of_lvalue.carbon | 6 +++--- .../pointer/fail_address_of_value.carbon | 6 +++--- .../fail_dereference_not_pointer.carbon | 4 ++-- toolchain/check/testdata/return/struct.carbon | 2 +- toolchain/check/testdata/return/tuple.carbon | 2 +- toolchain/check/testdata/struct/empty.carbon | 6 +++--- .../testdata/struct/fail_assign_empty.carbon | 2 +- .../testdata/struct/fail_assign_nested.carbon | 6 +++--- .../struct/fail_assign_to_empty.carbon | 4 ++-- .../struct/fail_field_name_mismatch.carbon | 2 +- .../struct/fail_field_type_mismatch.carbon | 2 +- .../struct/fail_member_access_type.carbon | 2 +- .../struct/fail_non_member_access.carbon | 2 +- .../testdata/struct/fail_too_few_values.carbon | 2 +- .../testdata/struct/fail_value_as_type.carbon | 2 +- .../check/testdata/struct/member_access.carbon | 2 +- .../check/testdata/struct/one_entry.carbon | 2 +- .../testdata/struct/tuple_as_element.carbon | 8 ++++---- .../check/testdata/struct/two_entries.carbon | 2 +- toolchain/check/testdata/tuples/empty.carbon | 6 +++--- .../testdata/tuples/fail_assign_empty.carbon | 4 ++-- .../testdata/tuples/fail_assign_nested.carbon | 12 ++++++------ .../tuples/fail_assign_to_empty.carbon | 2 +- .../tuples/fail_element_type_mismatch.carbon | 4 ++-- .../tuples/fail_too_few_element.carbon | 4 ++-- .../testdata/tuples/fail_type_assign.carbon | 4 ++-- .../testdata/tuples/fail_value_as_type.carbon | 2 +- .../check/testdata/tuples/nested_tuple.carbon | 8 ++++---- .../check/testdata/tuples/one_element.carbon | 6 +++--- .../check/testdata/tuples/two_elements.carbon | 6 +++--- toolchain/lower/handle.cpp | 12 ++++++------ toolchain/sem_ir/file.cpp | 16 ++++++++-------- toolchain/sem_ir/node.h | 9 +++++---- toolchain/sem_ir/node_kind.def | 8 +++++--- 63 files changed, 148 insertions(+), 145 deletions(-) diff --git a/toolchain/check/context.cpp b/toolchain/check/context.cpp index e53a99e9900c..1d67455714d0 100644 --- a/toolchain/check/context.cpp +++ b/toolchain/check/context.cpp @@ -340,8 +340,8 @@ auto Context::FinalizeTemporary(SemIR::NodeId init_id, bool discarded) default: CARBON_FATAL() << "Initialization from unexpected node " << init; - case SemIR::NodeKind::StructValue: - case SemIR::NodeKind::TupleValue: + case SemIR::NodeKind::StructLiteral: + case SemIR::NodeKind::TupleLiteral: CARBON_FATAL() << init << " is not modeled as initializing yet"; case SemIR::NodeKind::StubReference: { @@ -393,8 +393,8 @@ auto Context::MarkInitializerFor(SemIR::NodeId init_id, SemIR::NodeId target_id) default: CARBON_FATAL() << "Initialization from unexpected node " << init; - case SemIR::NodeKind::StructValue: - case SemIR::NodeKind::TupleValue: + case SemIR::NodeKind::StructLiteral: + case SemIR::NodeKind::TupleLiteral: CARBON_FATAL() << init << " is not modeled as initializing yet"; case SemIR::NodeKind::StubReference: @@ -536,8 +536,8 @@ auto Context::ImplicitAs(Parse::Node parse_node, SemIR::NodeId value_id, } if (as_type_id == SemIR::TypeId::TypeType) { - if (value.kind() == SemIR::NodeKind::TupleValue) { - auto tuple_block_id = value.GetAsTupleValue(); + if (value.kind() == SemIR::NodeKind::TupleLiteral) { + auto tuple_block_id = value.GetAsTupleLiteral(); llvm::SmallVector type_ids; // If it is empty tuple type, we don't fetch anything. if (tuple_block_id != SemIR::NodeBlockId::Empty) { @@ -555,8 +555,8 @@ auto Context::ImplicitAs(Parse::Node parse_node, SemIR::NodeId value_id, return semantics_ir_->GetTypeAllowBuiltinTypes(tuple_type_id); } // When converting `{}` to a type, the result is `{} as Type`. - if (value.kind() == SemIR::NodeKind::StructValue && - value.GetAsStructValue() == SemIR::NodeBlockId::Empty) { + if (value.kind() == SemIR::NodeKind::StructLiteral && + value.GetAsStructLiteral() == SemIR::NodeBlockId::Empty) { return semantics_ir_->GetType(value_type_id); } } diff --git a/toolchain/check/handle_paren.cpp b/toolchain/check/handle_paren.cpp index 3be367913c0d..8ca4d403380e 100644 --- a/toolchain/check/handle_paren.cpp +++ b/toolchain/check/handle_paren.cpp @@ -66,7 +66,7 @@ auto HandleTupleLiteral(Context& context, Parse::Node parse_node) -> bool { auto type_id = context.CanonicalizeTupleType(parse_node, std::move(type_ids)); auto value_id = context.AddNode( - SemIR::Node::TupleValue::Make(parse_node, type_id, refs_id)); + SemIR::Node::TupleLiteral::Make(parse_node, type_id, refs_id)); context.node_stack().Push(parse_node, value_id); return true; } diff --git a/toolchain/check/handle_struct.cpp b/toolchain/check/handle_struct.cpp index bbe7bbc15cb2..17a6c1c3db1d 100644 --- a/toolchain/check/handle_struct.cpp +++ b/toolchain/check/handle_struct.cpp @@ -77,7 +77,7 @@ auto HandleStructLiteral(Context& context, Parse::Node parse_node) -> bool { auto type_id = context.CanonicalizeStructType(parse_node, type_block_id); auto value_id = context.AddNode( - SemIR::Node::StructValue::Make(parse_node, type_id, refs_id)); + SemIR::Node::StructLiteral::Make(parse_node, type_id, refs_id)); context.node_stack().Push(parse_node, value_id); return true; } diff --git a/toolchain/check/testdata/array/assign_return_value.carbon b/toolchain/check/testdata/array/assign_return_value.carbon index b3bf40a19865..f76c2d0ebb1a 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -19,7 +19,7 @@ fn Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_28.1: i32 = int_literal 0 // CHECK:STDOUT: %.loc7_28.2: i32 = stub_reference %.loc7_28.1 -// CHECK:STDOUT: %.loc7_30: (i32,) = tuple_value (%.loc7_28.2) +// CHECK:STDOUT: %.loc7_30: (i32,) = tuple_literal (%.loc7_28.2) // CHECK:STDOUT: return %.loc7_30 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/assign_var.carbon b/toolchain/check/testdata/array/assign_var.carbon index 8b0bbc491897..571dc8a37aab 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -12,7 +12,7 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %.loc7_14: type = stub_reference i32 // CHECK:STDOUT: %.loc7_19: type = stub_reference i32 // CHECK:STDOUT: %.loc7_22.1: type = tuple_type (type, type, type) -// CHECK:STDOUT: %.loc7_22.2: (type, type, type) = tuple_value (%.loc7_9, %.loc7_14, %.loc7_19) +// CHECK:STDOUT: %.loc7_22.2: (type, type, type) = tuple_literal (%.loc7_9, %.loc7_14, %.loc7_19) // CHECK:STDOUT: %.loc7_22.3: type = tuple_type (i32, i32, i32) // CHECK:STDOUT: %a: ref (i32, i32, i32) = var "a" // CHECK:STDOUT: %.loc7_27.1: i32 = int_literal 1 @@ -21,7 +21,7 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %.loc7_30.2: i32 = stub_reference %.loc7_30.1 // CHECK:STDOUT: %.loc7_33.1: i32 = int_literal 3 // CHECK:STDOUT: %.loc7_33.2: i32 = stub_reference %.loc7_33.1 -// CHECK:STDOUT: %.loc7_34: (i32, i32, i32) = tuple_value (%.loc7_27.2, %.loc7_30.2, %.loc7_33.2) +// CHECK:STDOUT: %.loc7_34: (i32, i32, i32) = tuple_literal (%.loc7_27.2, %.loc7_30.2, %.loc7_33.2) // CHECK:STDOUT: assign %a, %.loc7_34 // CHECK:STDOUT: %.loc8_14: i32 = int_literal 3 // CHECK:STDOUT: %.loc8_15: type = array_type %.loc8_14, i32 diff --git a/toolchain/check/testdata/array/base.carbon b/toolchain/check/testdata/array/base.carbon index 46287b5c13e0..b570b8315cee 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -15,7 +15,7 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %.loc7_20.1: i32 = int_literal 1 // CHECK:STDOUT: %.loc7_20.2: i32 = stub_reference %.loc7_20.1 // CHECK:STDOUT: %.loc7_22.1: type = tuple_type (i32) -// CHECK:STDOUT: %.loc7_22.2: (i32,) = tuple_value (%.loc7_20.2) +// CHECK:STDOUT: %.loc7_22.2: (i32,) = tuple_literal (%.loc7_20.2) // CHECK:STDOUT: %.loc7_22.3: [i32; 1] = array_value %.loc7_22.2 // CHECK:STDOUT: assign %a, %.loc7_22.3 // CHECK:STDOUT: %.loc8_14: i32 = int_literal 2 @@ -26,26 +26,26 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %.loc8_26.1: f64 = real_literal 22e-1 // CHECK:STDOUT: %.loc8_26.2: f64 = stub_reference %.loc8_26.1 // CHECK:STDOUT: %.loc8_30.1: type = tuple_type (f64, f64) -// CHECK:STDOUT: %.loc8_30.2: (f64, f64) = tuple_value (%.loc8_20.2, %.loc8_26.2) +// CHECK:STDOUT: %.loc8_30.2: (f64, f64) = tuple_literal (%.loc8_20.2, %.loc8_26.2) // CHECK:STDOUT: %.loc8_30.3: [f64; 2] = array_value %.loc8_30.2 // CHECK:STDOUT: assign %b, %.loc8_30.3 // CHECK:STDOUT: %.loc9_10.1: type = tuple_type () -// CHECK:STDOUT: %.loc9_10.2: () = tuple_value () +// CHECK:STDOUT: %.loc9_10.2: () = tuple_literal () // CHECK:STDOUT: %.loc9_13: i32 = int_literal 5 // CHECK:STDOUT: %.loc9_14: type = array_type %.loc9_13, () // CHECK:STDOUT: %c: ref [(); 5] = var "c" -// CHECK:STDOUT: %.loc9_20.1: () = tuple_value () +// CHECK:STDOUT: %.loc9_20.1: () = tuple_literal () // CHECK:STDOUT: %.loc9_20.2: () = stub_reference %.loc9_20.1 -// CHECK:STDOUT: %.loc9_24.1: () = tuple_value () +// CHECK:STDOUT: %.loc9_24.1: () = tuple_literal () // CHECK:STDOUT: %.loc9_24.2: () = stub_reference %.loc9_24.1 -// CHECK:STDOUT: %.loc9_28.1: () = tuple_value () +// CHECK:STDOUT: %.loc9_28.1: () = tuple_literal () // CHECK:STDOUT: %.loc9_28.2: () = stub_reference %.loc9_28.1 -// CHECK:STDOUT: %.loc9_32.1: () = tuple_value () +// CHECK:STDOUT: %.loc9_32.1: () = tuple_literal () // CHECK:STDOUT: %.loc9_32.2: () = stub_reference %.loc9_32.1 -// CHECK:STDOUT: %.loc9_36.1: () = tuple_value () +// CHECK:STDOUT: %.loc9_36.1: () = tuple_literal () // CHECK:STDOUT: %.loc9_36.2: () = stub_reference %.loc9_36.1 // CHECK:STDOUT: %.loc9_38.1: type = tuple_type ((), (), (), (), ()) -// CHECK:STDOUT: %.loc9_38.2: ((), (), (), (), ()) = tuple_value (%.loc9_20.2, %.loc9_24.2, %.loc9_28.2, %.loc9_32.2, %.loc9_36.2) +// CHECK:STDOUT: %.loc9_38.2: ((), (), (), (), ()) = tuple_literal (%.loc9_20.2, %.loc9_24.2, %.loc9_28.2, %.loc9_32.2, %.loc9_36.2) // CHECK:STDOUT: %.loc9_38.3: [(); 5] = array_value %.loc9_38.2 // CHECK:STDOUT: assign %c, %.loc9_38.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_out_of_bound.carbon b/toolchain/check/testdata/array/fail_out_of_bound.carbon index 37d57bbb4d47..ac16e39638c3 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound.carbon @@ -20,6 +20,6 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: %.loc10_26.1: i32 = int_literal 3 // CHECK:STDOUT: %.loc10_26.2: i32 = stub_reference %.loc10_26.1 // CHECK:STDOUT: %.loc10_27.1: type = tuple_type (i32, i32, i32) -// CHECK:STDOUT: %.loc10_27.2: (i32, i32, i32) = tuple_value (%.loc10_20.2, %.loc10_23.2, %.loc10_26.2) +// CHECK:STDOUT: %.loc10_27.2: (i32, i32, i32) = tuple_literal (%.loc10_20.2, %.loc10_23.2, %.loc10_26.2) // CHECK:STDOUT: assign %a, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index a6d6ceb0fa6a..8445d8dbabf6 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -18,6 +18,6 @@ var a: [i32; 2] = (1, 2.5); // CHECK:STDOUT: %.loc10_23.1: f64 = real_literal 25e-1 // CHECK:STDOUT: %.loc10_23.2: f64 = stub_reference %.loc10_23.1 // CHECK:STDOUT: %.loc10_26.1: type = tuple_type (i32, f64) -// CHECK:STDOUT: %.loc10_26.2: (i32, f64) = tuple_value (%.loc10_20.2, %.loc10_23.2) +// CHECK:STDOUT: %.loc10_26.2: (i32, f64) = tuple_literal (%.loc10_20.2, %.loc10_23.2) // CHECK:STDOUT: assign %a, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index 58b9aed3ebb0..e880ec547621 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -29,7 +29,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %.loc7_44.1: i32 = int_literal 9 // CHECK:STDOUT: %.loc7_44.2: i32 = stub_reference %.loc7_44.1 // CHECK:STDOUT: %.loc7_45.1: type = tuple_type (i32, i32, i32, i32, i32, i32, i32, i32, i32) -// CHECK:STDOUT: %.loc7_45.2: (i32, i32, i32, i32, i32, i32, i32, i32, i32) = tuple_value (%.loc7_20.2, %.loc7_23.2, %.loc7_26.2, %.loc7_29.2, %.loc7_32.2, %.loc7_35.2, %.loc7_38.2, %.loc7_41.2, %.loc7_44.2) +// CHECK:STDOUT: %.loc7_45.2: (i32, i32, i32, i32, i32, i32, i32, i32, i32) = tuple_literal (%.loc7_20.2, %.loc7_23.2, %.loc7_26.2, %.loc7_29.2, %.loc7_32.2, %.loc7_35.2, %.loc7_38.2, %.loc7_41.2, %.loc7_44.2) // CHECK:STDOUT: %.loc7_45.3: [i32; 9] = array_value %.loc7_45.2 // CHECK:STDOUT: assign %a, %.loc7_45.3 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index e5d15ce16086..b8a7f4c94a79 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -45,7 +45,7 @@ fn F() { // CHECK:STDOUT: %.loc15_5.1: i32 = int_literal 39999999999999999993 // CHECK:STDOUT: %.loc15_5.2: i32 = stub_reference %.loc15_5.1 // CHECK:STDOUT: %.loc16_3.1: type = tuple_type (i32, i32, i32, i32, i32) -// CHECK:STDOUT: %.loc16_3.2: (i32, i32, i32, i32, i32) = tuple_value (%.loc11_5.2, %.loc12_5.2, %.loc13_5.2, %.loc14_5.2, %.loc15_5.2) +// CHECK:STDOUT: %.loc16_3.2: (i32, i32, i32, i32, i32) = tuple_literal (%.loc11_5.2, %.loc12_5.2, %.loc13_5.2, %.loc14_5.2, %.loc15_5.2) // CHECK:STDOUT: %.loc16_3.3: [i32; 5] = array_value %.loc16_3.2 // CHECK:STDOUT: assign %ints, %.loc16_3.3 // CHECK:STDOUT: %.loc17_21: i32 = int_literal 7 @@ -66,7 +66,7 @@ fn F() { // CHECK:STDOUT: %.loc24_5.1: f64 = real_literal 399999999999999999930e39999999999999999992 // CHECK:STDOUT: %.loc24_5.2: f64 = stub_reference %.loc24_5.1 // CHECK:STDOUT: %.loc25_3.1: type = tuple_type (f64, f64, f64, f64, f64, f64, f64) -// CHECK:STDOUT: %.loc25_3.2: (f64, f64, f64, f64, f64, f64, f64) = tuple_value (%.loc18_5.2, %.loc19_5.2, %.loc20_5.2, %.loc21_5.2, %.loc22_5.2, %.loc23_5.2, %.loc24_5.2) +// CHECK:STDOUT: %.loc25_3.2: (f64, f64, f64, f64, f64, f64, f64) = tuple_literal (%.loc18_5.2, %.loc19_5.2, %.loc20_5.2, %.loc21_5.2, %.loc22_5.2, %.loc23_5.2, %.loc24_5.2) // CHECK:STDOUT: %.loc25_3.3: [f64; 7] = array_value %.loc25_3.2 // CHECK:STDOUT: assign %floats, %.loc25_3.3 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/basics/raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/raw_and_textual_ir.carbon index fd1d54e7d001..be25209f7a43 100644 --- a/toolchain/check/testdata/basics/raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/raw_and_textual_ir.carbon @@ -48,7 +48,7 @@ fn Foo(n: i32) -> (i32, f64) { // CHECK:STDOUT: {kind: StubReference, arg0: nodeIntegerType, type: typeTypeType}, // CHECK:STDOUT: {kind: StubReference, arg0: nodeFloatingPointType, type: typeTypeType}, // CHECK:STDOUT: {kind: TupleType, arg0: typeBlock0, type: typeTypeType}, -// CHECK:STDOUT: {kind: TupleValue, arg0: block3, type: type1}, +// CHECK:STDOUT: {kind: TupleLiteral, arg0: block3, type: type1}, // CHECK:STDOUT: {kind: TupleType, arg0: typeBlock1, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, arg0: str2, type: type3}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, @@ -57,7 +57,7 @@ fn Foo(n: i32) -> (i32, f64) { // CHECK:STDOUT: {kind: StubReference, arg0: node+9, type: type0}, // CHECK:STDOUT: {kind: RealLiteral, arg0: real0, type: type2}, // CHECK:STDOUT: {kind: StubReference, arg0: node+11, type: type2}, -// CHECK:STDOUT: {kind: TupleValue, arg0: block6, type: type3}, +// CHECK:STDOUT: {kind: TupleLiteral, arg0: block6, type: type3}, // CHECK:STDOUT: {kind: ReturnExpression, arg0: node+13}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ @@ -108,6 +108,6 @@ fn Foo(n: i32) -> (i32, f64) { // CHECK:STDOUT: %.loc12_13.2: i32 = stub_reference %.loc12_13.1 // CHECK:STDOUT: %.loc12_18.1: f64 = real_literal 34e-1 // CHECK:STDOUT: %.loc12_18.2: f64 = stub_reference %.loc12_18.1 -// CHECK:STDOUT: %.loc12_21: (i32, f64) = tuple_value (%.loc12_13.2, %.loc12_18.2) +// CHECK:STDOUT: %.loc12_21: (i32, f64) = tuple_literal (%.loc12_13.2, %.loc12_18.2) // CHECK:STDOUT: return %.loc12_21 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/raw_ir.carbon b/toolchain/check/testdata/basics/raw_ir.carbon index 0eb1d3b2695f..a0d2c6bb4436 100644 --- a/toolchain/check/testdata/basics/raw_ir.carbon +++ b/toolchain/check/testdata/basics/raw_ir.carbon @@ -48,7 +48,7 @@ fn Foo(n: i32) -> (i32, f64) { // CHECK:STDOUT: {kind: StubReference, arg0: nodeIntegerType, type: typeTypeType}, // CHECK:STDOUT: {kind: StubReference, arg0: nodeFloatingPointType, type: typeTypeType}, // CHECK:STDOUT: {kind: TupleType, arg0: typeBlock0, type: typeTypeType}, -// CHECK:STDOUT: {kind: TupleValue, arg0: block3, type: type1}, +// CHECK:STDOUT: {kind: TupleLiteral, arg0: block3, type: type1}, // CHECK:STDOUT: {kind: TupleType, arg0: typeBlock1, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, arg0: str2, type: type3}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, @@ -57,7 +57,7 @@ fn Foo(n: i32) -> (i32, f64) { // CHECK:STDOUT: {kind: StubReference, arg0: node+9, type: type0}, // CHECK:STDOUT: {kind: RealLiteral, arg0: real0, type: type2}, // CHECK:STDOUT: {kind: StubReference, arg0: node+11, type: type2}, -// CHECK:STDOUT: {kind: TupleValue, arg0: block6, type: type3}, +// CHECK:STDOUT: {kind: TupleLiteral, arg0: block6, type: type3}, // CHECK:STDOUT: {kind: ReturnExpression, arg0: node+13}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ diff --git a/toolchain/check/testdata/basics/textual_ir.carbon b/toolchain/check/testdata/basics/textual_ir.carbon index 57075678fc1a..3d935edf3687 100644 --- a/toolchain/check/testdata/basics/textual_ir.carbon +++ b/toolchain/check/testdata/basics/textual_ir.carbon @@ -23,6 +23,6 @@ fn Foo(n: i32) -> (i32, f64) { // CHECK:STDOUT: %.loc12_13.2: i32 = stub_reference %.loc12_13.1 // CHECK:STDOUT: %.loc12_18.1: f64 = real_literal 34e-1 // CHECK:STDOUT: %.loc12_18.2: f64 = stub_reference %.loc12_18.1 -// CHECK:STDOUT: %.loc12_21: (i32, f64) = tuple_value (%.loc12_13.2, %.loc12_18.2) +// CHECK:STDOUT: %.loc12_21: (i32, f64) = tuple_literal (%.loc12_13.2, %.loc12_18.2) // CHECK:STDOUT: return %.loc12_21 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/expression_category/in_place_tuple_initialization.carbon b/toolchain/check/testdata/expression_category/in_place_tuple_initialization.carbon index 6a5f2cc9a606..facb31b8f03d 100644 --- a/toolchain/check/testdata/expression_category/in_place_tuple_initialization.carbon +++ b/toolchain/check/testdata/expression_category/in_place_tuple_initialization.carbon @@ -28,7 +28,7 @@ fn H() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc10_11: type = stub_reference i32 // CHECK:STDOUT: %.loc10_16: type = stub_reference i32 -// CHECK:STDOUT: %.loc10_19: (type, type) = tuple_value (%.loc10_11, %.loc10_16) +// CHECK:STDOUT: %.loc10_19: (type, type) = tuple_literal (%.loc10_11, %.loc10_16) // CHECK:STDOUT: %v: ref (i32, i32) = var "v" // CHECK:STDOUT: no_op // CHECK:STDOUT: %.loc10_24: init (i32, i32) = call @F() to %v diff --git a/toolchain/check/testdata/function/call/empty_struct.carbon b/toolchain/check/testdata/function/call/empty_struct.carbon index 7d2cfe7e2890..04f6f43efbd1 100644 --- a/toolchain/check/testdata/function/call/empty_struct.carbon +++ b/toolchain/check/testdata/function/call/empty_struct.carbon @@ -24,7 +24,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_9.1: {} = struct_value () +// CHECK:STDOUT: %.loc12_9.1: {} = struct_literal () // CHECK:STDOUT: %.loc12_9.2: {} = stub_reference %.loc12_9.1 // CHECK:STDOUT: %.loc12_7: init {} = call @Echo(%.loc12_9.2) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/empty_tuple.carbon b/toolchain/check/testdata/function/call/empty_tuple.carbon index 3a4f81cc39ff..f1238c0ae3a0 100644 --- a/toolchain/check/testdata/function/call/empty_tuple.carbon +++ b/toolchain/check/testdata/function/call/empty_tuple.carbon @@ -24,7 +24,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_9.1: () = tuple_value () +// CHECK:STDOUT: %.loc12_9.1: () = tuple_literal () // CHECK:STDOUT: %.loc12_9.2: () = stub_reference %.loc12_9.1 // CHECK:STDOUT: %.loc12_7: init () = call @Echo(%.loc12_9.2) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/return_implicit.carbon b/toolchain/check/testdata/function/call/return_implicit.carbon index 3e2ba6710499..e4c109dd64b5 100644 --- a/toolchain/check/testdata/function/call/return_implicit.carbon +++ b/toolchain/check/testdata/function/call/return_implicit.carbon @@ -24,7 +24,7 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_11.1: type = tuple_type () -// CHECK:STDOUT: %.loc11_11.2: () = tuple_value () +// CHECK:STDOUT: %.loc11_11.2: () = tuple_literal () // CHECK:STDOUT: %b: ref () = var "b" // CHECK:STDOUT: %.loc11_37: init () = call @MakeImplicitEmptyTuple() // CHECK:STDOUT: assign %b, %.loc11_37 diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index 57b2fabe6e9a..72ad6fdbfcc9 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -18,7 +18,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc7_24.1: i32 = int_literal 24 // CHECK:STDOUT: %.loc7_24.2: i32 = stub_reference %.loc7_24.1 // CHECK:STDOUT: %.loc7_26.1: type = tuple_type (i32, i32) -// CHECK:STDOUT: %.loc7_26.2: (i32, i32) = tuple_value (%.loc7_20.2, %.loc7_24.2) +// CHECK:STDOUT: %.loc7_26.2: (i32, i32) = tuple_literal (%.loc7_20.2, %.loc7_24.2) // CHECK:STDOUT: %.loc7_26.3: [i32; 2] = array_value %.loc7_26.2 // CHECK:STDOUT: assign %a, %.loc7_26.3 // CHECK:STDOUT: %b: ref i32 = var "b" diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index 548dd7ca2a84..f25dfb899574 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -17,7 +17,7 @@ var b: i32 = a[0xFFFFFFFFFFFFFFFFF]; // CHECK:STDOUT: %.loc7_20.1: i32 = int_literal 12 // CHECK:STDOUT: %.loc7_20.2: i32 = stub_reference %.loc7_20.1 // CHECK:STDOUT: %.loc7_23.1: type = tuple_type (i32) -// CHECK:STDOUT: %.loc7_23.2: (i32,) = tuple_value (%.loc7_20.2) +// CHECK:STDOUT: %.loc7_23.2: (i32,) = tuple_literal (%.loc7_20.2) // CHECK:STDOUT: %.loc7_23.3: [i32; 1] = array_value %.loc7_23.2 // CHECK:STDOUT: assign %a, %.loc7_23.3 // CHECK:STDOUT: %b: ref i32 = var "b" diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index 6259cabd4c5f..7335de924650 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -17,7 +17,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %.loc7_20.1: i32 = int_literal 12 // CHECK:STDOUT: %.loc7_20.2: i32 = stub_reference %.loc7_20.1 // CHECK:STDOUT: %.loc7_23.1: type = tuple_type (i32) -// CHECK:STDOUT: %.loc7_23.2: (i32,) = tuple_value (%.loc7_20.2) +// CHECK:STDOUT: %.loc7_23.2: (i32,) = tuple_literal (%.loc7_20.2) // CHECK:STDOUT: %.loc7_23.3: [i32; 1] = array_value %.loc7_23.2 // CHECK:STDOUT: assign %a, %.loc7_23.3 // CHECK:STDOUT: %b: ref i32 = var "b" diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index 503c2a37faff..8f28c357ca5b 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -17,7 +17,7 @@ var b: i32 = a[2]; // CHECK:STDOUT: %.loc7_20.1: i32 = int_literal 12 // CHECK:STDOUT: %.loc7_20.2: i32 = stub_reference %.loc7_20.1 // CHECK:STDOUT: %.loc7_23.1: type = tuple_type (i32) -// CHECK:STDOUT: %.loc7_23.2: (i32,) = tuple_value (%.loc7_20.2) +// CHECK:STDOUT: %.loc7_23.2: (i32,) = tuple_literal (%.loc7_20.2) // CHECK:STDOUT: %.loc7_23.3: [i32; 1] = array_value %.loc7_23.2 // CHECK:STDOUT: assign %a, %.loc7_23.3 // CHECK:STDOUT: %b: ref i32 = var "b" diff --git a/toolchain/check/testdata/index/fail_non_deterministic_type.carbon b/toolchain/check/testdata/index/fail_non_deterministic_type.carbon index fa68395c472d..6126ae0af536 100644 --- a/toolchain/check/testdata/index/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/index/fail_non_deterministic_type.carbon @@ -15,14 +15,14 @@ var c: i32 = a[b]; // CHECK:STDOUT: %.loc7_9: type = stub_reference i32 // CHECK:STDOUT: %.loc7_14: type = stub_reference i32 // CHECK:STDOUT: %.loc7_17.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc7_17.2: (type, type) = tuple_value (%.loc7_9, %.loc7_14) +// CHECK:STDOUT: %.loc7_17.2: (type, type) = tuple_literal (%.loc7_9, %.loc7_14) // CHECK:STDOUT: %.loc7_17.3: type = tuple_type (i32, i32) // CHECK:STDOUT: %a: ref (i32, i32) = var "a" // CHECK:STDOUT: %.loc7_22.1: i32 = int_literal 2 // CHECK:STDOUT: %.loc7_22.2: i32 = stub_reference %.loc7_22.1 // CHECK:STDOUT: %.loc7_25.1: i32 = int_literal 3 // CHECK:STDOUT: %.loc7_25.2: i32 = stub_reference %.loc7_25.1 -// CHECK:STDOUT: %.loc7_26: (i32, i32) = tuple_value (%.loc7_22.2, %.loc7_25.2) +// CHECK:STDOUT: %.loc7_26: (i32, i32) = tuple_literal (%.loc7_22.2, %.loc7_25.2) // CHECK:STDOUT: assign %a, %.loc7_26 // CHECK:STDOUT: %b: ref i32 = var "b" // CHECK:STDOUT: %.loc8: i32 = int_literal 0 diff --git a/toolchain/check/testdata/index/fail_tuple_large_index.carbon b/toolchain/check/testdata/index/fail_tuple_large_index.carbon index 60709542a61f..f4e242854e9b 100644 --- a/toolchain/check/testdata/index/fail_tuple_large_index.carbon +++ b/toolchain/check/testdata/index/fail_tuple_large_index.carbon @@ -14,15 +14,15 @@ var c: i32 = b[0xFFFFFFFFFFFFFFFFF]; // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc7_9: type = stub_reference i32 // CHECK:STDOUT: %.loc7_13.1: type = tuple_type (type) -// CHECK:STDOUT: %.loc7_13.2: (type,) = tuple_value (%.loc7_9) +// CHECK:STDOUT: %.loc7_13.2: (type,) = tuple_literal (%.loc7_9) // CHECK:STDOUT: %.loc7_13.3: type = tuple_type (i32) // CHECK:STDOUT: %a: ref (i32,) = var "a" // CHECK:STDOUT: %.loc7_18.1: i32 = int_literal 12 // CHECK:STDOUT: %.loc7_18.2: i32 = stub_reference %.loc7_18.1 -// CHECK:STDOUT: %.loc7_21: (i32,) = tuple_value (%.loc7_18.2) +// CHECK:STDOUT: %.loc7_21: (i32,) = tuple_literal (%.loc7_18.2) // CHECK:STDOUT: assign %a, %.loc7_21 // CHECK:STDOUT: %.loc8_9: type = stub_reference i32 -// CHECK:STDOUT: %.loc8_13: (type,) = tuple_value (%.loc8_9) +// CHECK:STDOUT: %.loc8_13: (type,) = tuple_literal (%.loc8_9) // CHECK:STDOUT: %b: ref (i32,) = var "b" // CHECK:STDOUT: %.loc7_5: (i32,) = bind_value %a // CHECK:STDOUT: assign %b, %.loc7_5 diff --git a/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon index 4b6340950806..0fae846b90a6 100644 --- a/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon @@ -14,14 +14,14 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %.loc7_9: type = stub_reference i32 // CHECK:STDOUT: %.loc7_14: type = stub_reference i32 // CHECK:STDOUT: %.loc7_17.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc7_17.2: (type, type) = tuple_value (%.loc7_9, %.loc7_14) +// CHECK:STDOUT: %.loc7_17.2: (type, type) = tuple_literal (%.loc7_9, %.loc7_14) // CHECK:STDOUT: %.loc7_17.3: type = tuple_type (i32, i32) // CHECK:STDOUT: %a: ref (i32, i32) = var "a" // CHECK:STDOUT: %.loc7_22.1: i32 = int_literal 12 // CHECK:STDOUT: %.loc7_22.2: i32 = stub_reference %.loc7_22.1 // CHECK:STDOUT: %.loc7_26.1: i32 = int_literal 6 // CHECK:STDOUT: %.loc7_26.2: i32 = stub_reference %.loc7_26.1 -// CHECK:STDOUT: %.loc7_27: (i32, i32) = tuple_value (%.loc7_22.2, %.loc7_26.2) +// CHECK:STDOUT: %.loc7_27: (i32, i32) = tuple_literal (%.loc7_22.2, %.loc7_26.2) // CHECK:STDOUT: assign %a, %.loc7_27 // CHECK:STDOUT: %b: ref i32 = var "b" // CHECK:STDOUT: %.loc11_16: f64 = real_literal 26e-1 diff --git a/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon index 1d3466b36410..947bf0acd0b7 100644 --- a/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon @@ -14,14 +14,14 @@ var b: i32 = a[2]; // CHECK:STDOUT: %.loc7_9: type = stub_reference i32 // CHECK:STDOUT: %.loc7_14: type = stub_reference i32 // CHECK:STDOUT: %.loc7_17.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc7_17.2: (type, type) = tuple_value (%.loc7_9, %.loc7_14) +// CHECK:STDOUT: %.loc7_17.2: (type, type) = tuple_literal (%.loc7_9, %.loc7_14) // CHECK:STDOUT: %.loc7_17.3: type = tuple_type (i32, i32) // CHECK:STDOUT: %a: ref (i32, i32) = var "a" // CHECK:STDOUT: %.loc7_22.1: i32 = int_literal 12 // CHECK:STDOUT: %.loc7_22.2: i32 = stub_reference %.loc7_22.1 // CHECK:STDOUT: %.loc7_26.1: i32 = int_literal 6 // CHECK:STDOUT: %.loc7_26.2: i32 = stub_reference %.loc7_26.1 -// CHECK:STDOUT: %.loc7_27: (i32, i32) = tuple_value (%.loc7_22.2, %.loc7_26.2) +// CHECK:STDOUT: %.loc7_27: (i32, i32) = tuple_literal (%.loc7_22.2, %.loc7_26.2) // CHECK:STDOUT: assign %a, %.loc7_27 // CHECK:STDOUT: %b: ref i32 = var "b" // CHECK:STDOUT: %.loc11_16: i32 = int_literal 2 diff --git a/toolchain/check/testdata/index/tuple_element_access.carbon b/toolchain/check/testdata/index/tuple_element_access.carbon index 0ebe21211138..4092a80d5d3e 100644 --- a/toolchain/check/testdata/index/tuple_element_access.carbon +++ b/toolchain/check/testdata/index/tuple_element_access.carbon @@ -11,15 +11,15 @@ var c: i32 = b[0]; // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc7_9: type = stub_reference i32 // CHECK:STDOUT: %.loc7_13.1: type = tuple_type (type) -// CHECK:STDOUT: %.loc7_13.2: (type,) = tuple_value (%.loc7_9) +// CHECK:STDOUT: %.loc7_13.2: (type,) = tuple_literal (%.loc7_9) // CHECK:STDOUT: %.loc7_13.3: type = tuple_type (i32) // CHECK:STDOUT: %a: ref (i32,) = var "a" // CHECK:STDOUT: %.loc7_18.1: i32 = int_literal 12 // CHECK:STDOUT: %.loc7_18.2: i32 = stub_reference %.loc7_18.1 -// CHECK:STDOUT: %.loc7_21: (i32,) = tuple_value (%.loc7_18.2) +// CHECK:STDOUT: %.loc7_21: (i32,) = tuple_literal (%.loc7_18.2) // CHECK:STDOUT: assign %a, %.loc7_21 // CHECK:STDOUT: %.loc8_9: type = stub_reference i32 -// CHECK:STDOUT: %.loc8_13: (type,) = tuple_value (%.loc8_9) +// CHECK:STDOUT: %.loc8_13: (type,) = tuple_literal (%.loc8_9) // CHECK:STDOUT: %b: ref (i32,) = var "b" // CHECK:STDOUT: %.loc7_5: (i32,) = bind_value %a // CHECK:STDOUT: assign %b, %.loc7_5 diff --git a/toolchain/check/testdata/index/tuple_return_value_access.carbon b/toolchain/check/testdata/index/tuple_return_value_access.carbon index 382fe5b85bbe..3f876e203774 100644 --- a/toolchain/check/testdata/index/tuple_return_value_access.carbon +++ b/toolchain/check/testdata/index/tuple_return_value_access.carbon @@ -19,7 +19,7 @@ fn Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_28.1: i32 = int_literal 0 // CHECK:STDOUT: %.loc7_28.2: i32 = stub_reference %.loc7_28.1 -// CHECK:STDOUT: %.loc7_30: (i32,) = tuple_value (%.loc7_28.2) +// CHECK:STDOUT: %.loc7_30: (i32,) = tuple_literal (%.loc7_28.2) // CHECK:STDOUT: return %.loc7_30 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/assignment.carbon b/toolchain/check/testdata/operators/assignment.carbon index eafc7cfcf179..e86ec4cf6463 100644 --- a/toolchain/check/testdata/operators/assignment.carbon +++ b/toolchain/check/testdata/operators/assignment.carbon @@ -36,14 +36,14 @@ fn Main() { // CHECK:STDOUT: %.loc11_11: type = stub_reference i32 // CHECK:STDOUT: %.loc11_16: type = stub_reference i32 // CHECK:STDOUT: %.loc11_19.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc11_19.2: (type, type) = tuple_value (%.loc11_11, %.loc11_16) +// CHECK:STDOUT: %.loc11_19.2: (type, type) = tuple_literal (%.loc11_11, %.loc11_16) // CHECK:STDOUT: %.loc11_19.3: type = tuple_type (i32, i32) // CHECK:STDOUT: %b: ref (i32, i32) = var "b" // CHECK:STDOUT: %.loc11_24.1: i32 = int_literal 1 // CHECK:STDOUT: %.loc11_24.2: i32 = stub_reference %.loc11_24.1 // CHECK:STDOUT: %.loc11_27.1: i32 = int_literal 2 // CHECK:STDOUT: %.loc11_27.2: i32 = stub_reference %.loc11_27.1 -// CHECK:STDOUT: %.loc11_28: (i32, i32) = tuple_value (%.loc11_24.2, %.loc11_27.2) +// CHECK:STDOUT: %.loc11_28: (i32, i32) = tuple_literal (%.loc11_24.2, %.loc11_27.2) // CHECK:STDOUT: assign %b, %.loc11_28 // CHECK:STDOUT: %.loc12_5: i32 = int_literal 0 // CHECK:STDOUT: %.loc12_6: ref i32 = tuple_index %b, %.loc12_5 @@ -59,7 +59,7 @@ fn Main() { // CHECK:STDOUT: %.loc15_35: i32 = stub_reference %.loc15_37 // CHECK:STDOUT: %.loc15_45: i32 = int_literal 2 // CHECK:STDOUT: %.loc15_43: i32 = stub_reference %.loc15_45 -// CHECK:STDOUT: %.loc15_46: {.a: i32, .b: i32} = struct_value (%.loc15_35, %.loc15_43) +// CHECK:STDOUT: %.loc15_46: {.a: i32, .b: i32} = struct_literal (%.loc15_35, %.loc15_43) // CHECK:STDOUT: assign %c, %.loc15_46 // CHECK:STDOUT: %.loc16_4: ref i32 = struct_access %c, member0 // CHECK:STDOUT: %.loc16_9: i32 = int_literal 3 diff --git a/toolchain/check/testdata/operators/fail_assigment_to_non_assignable.carbon b/toolchain/check/testdata/operators/fail_assigment_to_non_assignable.carbon index 5f5a4276d8e2..aa82bb64c87c 100644 --- a/toolchain/check/testdata/operators/fail_assigment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/fail_assigment_to_non_assignable.carbon @@ -65,12 +65,12 @@ fn Main() { // CHECK:STDOUT: %.loc21_7.1: i32 = int_literal 2 // CHECK:STDOUT: %.loc21_7.2: i32 = stub_reference %.loc21_7.1 // CHECK:STDOUT: %.loc21_8.1: type = tuple_type (i32, i32) -// CHECK:STDOUT: %.loc21_8.2: (i32, i32) = tuple_value (%.loc21_4.2, %.loc21_7.2) +// CHECK:STDOUT: %.loc21_8.2: (i32, i32) = tuple_literal (%.loc21_4.2, %.loc21_7.2) // CHECK:STDOUT: %.loc21_13.1: i32 = int_literal 3 // CHECK:STDOUT: %.loc21_13.2: i32 = stub_reference %.loc21_13.1 // CHECK:STDOUT: %.loc21_16.1: i32 = int_literal 4 // CHECK:STDOUT: %.loc21_16.2: i32 = stub_reference %.loc21_16.1 -// CHECK:STDOUT: %.loc21_17: (i32, i32) = tuple_value (%.loc21_13.2, %.loc21_16.2) +// CHECK:STDOUT: %.loc21_17: (i32, i32) = tuple_literal (%.loc21_13.2, %.loc21_16.2) // CHECK:STDOUT: assign %.loc21_8.2, %.loc21_17 // CHECK:STDOUT: %n: ref i32 = var "n" // CHECK:STDOUT: %.loc22_16: i32 = int_literal 0 @@ -79,12 +79,12 @@ fn Main() { // CHECK:STDOUT: %.loc26_4: i32 = stub_reference %.loc22_7.1 // CHECK:STDOUT: %.loc22_7.2: i32 = bind_value %n // CHECK:STDOUT: %.loc26_7: i32 = stub_reference %.loc22_7.2 -// CHECK:STDOUT: %.loc26_8: (i32, i32) = tuple_value (%.loc26_4, %.loc26_7) +// CHECK:STDOUT: %.loc26_8: (i32, i32) = tuple_literal (%.loc26_4, %.loc26_7) // CHECK:STDOUT: %.loc26_13.1: i32 = int_literal 1 // CHECK:STDOUT: %.loc26_13.2: i32 = stub_reference %.loc26_13.1 // CHECK:STDOUT: %.loc26_16.1: i32 = int_literal 2 // CHECK:STDOUT: %.loc26_16.2: i32 = stub_reference %.loc26_16.1 -// CHECK:STDOUT: %.loc26_17: (i32, i32) = tuple_value (%.loc26_13.2, %.loc26_16.2) +// CHECK:STDOUT: %.loc26_17: (i32, i32) = tuple_literal (%.loc26_13.2, %.loc26_16.2) // CHECK:STDOUT: assign %.loc26_8, %.loc26_17 // CHECK:STDOUT: %.loc30: type = ptr_type i32 // CHECK:STDOUT: assign i32, %.loc30 @@ -93,12 +93,12 @@ fn Main() { // CHECK:STDOUT: %.loc34_17: i32 = int_literal 2 // CHECK:STDOUT: %.loc34_15: i32 = stub_reference %.loc34_17 // CHECK:STDOUT: %.loc34_18.1: type = struct_type {.x: i32, .y: i32} -// CHECK:STDOUT: %.loc34_18.2: {.x: i32, .y: i32} = struct_value (%.loc34_7, %.loc34_15) +// CHECK:STDOUT: %.loc34_18.2: {.x: i32, .y: i32} = struct_literal (%.loc34_7, %.loc34_15) // CHECK:STDOUT: %.loc34_28: i32 = int_literal 3 // CHECK:STDOUT: %.loc34_26: i32 = stub_reference %.loc34_28 // CHECK:STDOUT: %.loc34_36: i32 = int_literal 4 // CHECK:STDOUT: %.loc34_34: i32 = stub_reference %.loc34_36 -// CHECK:STDOUT: %.loc34_37: {.x: i32, .y: i32} = struct_value (%.loc34_26, %.loc34_34) +// CHECK:STDOUT: %.loc34_37: {.x: i32, .y: i32} = struct_literal (%.loc34_26, %.loc34_34) // CHECK:STDOUT: assign %.loc34_18.2, %.loc34_37 // CHECK:STDOUT: %.loc38_7: bool = bool_literal true // CHECK:STDOUT: if %.loc38_7 br !if.expr.then.loc38 else br !if.expr.else.loc38 diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 2602fe12717f..0d552c7408e5 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -28,7 +28,7 @@ fn F() { // CHECK:STDOUT: %.loc8_35: i32 = stub_reference %.loc8_37 // CHECK:STDOUT: %.loc8_45: i32 = int_literal 2 // CHECK:STDOUT: %.loc8_43: i32 = stub_reference %.loc8_45 -// CHECK:STDOUT: %.loc8_46: {.a: i32, .b: i32} = struct_value (%.loc8_35, %.loc8_43) +// CHECK:STDOUT: %.loc8_46: {.a: i32, .b: i32} = struct_literal (%.loc8_35, %.loc8_43) // CHECK:STDOUT: assign %s, %.loc8_46 // CHECK:STDOUT: %.loc10_27: type = struct_type {.a: i32, .b: i32} // CHECK:STDOUT: %.loc10_28: type = ptr_type {.a: i32, .b: i32} @@ -48,14 +48,14 @@ fn F() { // CHECK:STDOUT: %.loc14_11: type = stub_reference i32 // CHECK:STDOUT: %.loc14_16: type = stub_reference i32 // CHECK:STDOUT: %.loc14_19.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc14_19.2: (type, type) = tuple_value (%.loc14_11, %.loc14_16) +// CHECK:STDOUT: %.loc14_19.2: (type, type) = tuple_literal (%.loc14_11, %.loc14_16) // CHECK:STDOUT: %.loc14_19.3: type = tuple_type (i32, i32) // CHECK:STDOUT: %t: ref (i32, i32) = var "t" // CHECK:STDOUT: %.loc14_24.1: i32 = int_literal 1 // CHECK:STDOUT: %.loc14_24.2: i32 = stub_reference %.loc14_24.1 // CHECK:STDOUT: %.loc14_27.1: i32 = int_literal 2 // CHECK:STDOUT: %.loc14_27.2: i32 = stub_reference %.loc14_27.1 -// CHECK:STDOUT: %.loc14_28: (i32, i32) = tuple_value (%.loc14_24.2, %.loc14_27.2) +// CHECK:STDOUT: %.loc14_28: (i32, i32) = tuple_literal (%.loc14_24.2, %.loc14_27.2) // CHECK:STDOUT: assign %t, %.loc14_28 // CHECK:STDOUT: %.loc15_14: type = ptr_type i32 // CHECK:STDOUT: %t0: ref i32* = var "t0" diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index e6f550adf73b..fa633789692d 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -116,12 +116,12 @@ fn AddressOfParameter(param: i32) { // CHECK:STDOUT: %.loc31_8.1: i32 = int_literal 2 // CHECK:STDOUT: %.loc31_8.2: i32 = stub_reference %.loc31_8.1 // CHECK:STDOUT: %.loc31_9.1: type = tuple_type (i32, i32) -// CHECK:STDOUT: %.loc31_9.2: (i32, i32) = tuple_value (%.loc31_5.2, %.loc31_8.2) +// CHECK:STDOUT: %.loc31_9.2: (i32, i32) = tuple_literal (%.loc31_5.2, %.loc31_8.2) // CHECK:STDOUT: %.loc31_3.1: type = ptr_type (i32, i32) // CHECK:STDOUT: %.loc31_3.2: (i32, i32)* = address_of %.loc31_9.2 // CHECK:STDOUT: %.loc35_10: i32 = int_literal 5 // CHECK:STDOUT: %.loc35_8: i32 = stub_reference %.loc35_10 -// CHECK:STDOUT: %.loc35_11: {.a: i32} = struct_value (%.loc35_8) +// CHECK:STDOUT: %.loc35_11: {.a: i32} = struct_literal (%.loc35_8) // CHECK:STDOUT: %.loc35_3.1: type = ptr_type {.a: i32} // CHECK:STDOUT: %.loc35_3.2: {.a: i32}* = address_of %.loc35_11 // CHECK:STDOUT: return @@ -167,7 +167,7 @@ fn AddressOfParameter(param: i32) { // CHECK:STDOUT: %.loc75_6.2: i32 = stub_reference %.loc75_6.1 // CHECK:STDOUT: %.loc75_9.1: i32 = int_literal 2 // CHECK:STDOUT: %.loc75_9.2: i32 = stub_reference %.loc75_9.1 -// CHECK:STDOUT: %.loc75_10: (i32, i32) = tuple_value (%.loc75_6.2, %.loc75_9.2) +// CHECK:STDOUT: %.loc75_10: (i32, i32) = tuple_literal (%.loc75_6.2, %.loc75_9.2) // CHECK:STDOUT: %.loc75_12: i32 = int_literal 0 // CHECK:STDOUT: %.loc75_13: i32 = tuple_index %.loc75_10, %.loc75_12 // CHECK:STDOUT: %.loc75_3: i32* = address_of %.loc75_13 diff --git a/toolchain/check/testdata/pointer/fail_dereference_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_dereference_not_pointer.carbon index a1f790c62874..c2395d0485c9 100644 --- a/toolchain/check/testdata/pointer/fail_dereference_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_dereference_not_pointer.carbon @@ -27,10 +27,10 @@ fn Deref(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11: ref = dereference %n // CHECK:STDOUT: %.loc15_5.1: type = tuple_type () -// CHECK:STDOUT: %.loc15_5.2: () = tuple_value () +// CHECK:STDOUT: %.loc15_5.2: () = tuple_literal () // CHECK:STDOUT: %.loc15_3: ref = dereference %.loc15_5.2 // CHECK:STDOUT: %.loc19_5.1: type = struct_type {} -// CHECK:STDOUT: %.loc19_5.2: {} = struct_value () +// CHECK:STDOUT: %.loc19_5.2: {} = struct_literal () // CHECK:STDOUT: %.loc19_3: ref = dereference %.loc19_5.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index 0eabc8837378..4f94bf75d907 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -16,6 +16,6 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc8_16: i32 = int_literal 3 // CHECK:STDOUT: %.loc8_14: i32 = stub_reference %.loc8_16 -// CHECK:STDOUT: %.loc8_17: {.a: i32} = struct_value (%.loc8_14) +// CHECK:STDOUT: %.loc8_17: {.a: i32} = struct_literal (%.loc8_14) // CHECK:STDOUT: return %.loc8_17 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index f531368e457d..4b31b7a1d0bf 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -19,6 +19,6 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %.loc9_11.2: i32 = stub_reference %.loc9_11.1 // CHECK:STDOUT: %.loc9_15.1: i32 = int_literal 35 // CHECK:STDOUT: %.loc9_15.2: i32 = stub_reference %.loc9_15.1 -// CHECK:STDOUT: %.loc9_17: (i32, i32) = tuple_value (%.loc9_11.2, %.loc9_15.2) +// CHECK:STDOUT: %.loc9_17: (i32, i32) = tuple_literal (%.loc9_11.2, %.loc9_15.2) // CHECK:STDOUT: return %.loc9_17 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/empty.carbon b/toolchain/check/testdata/struct/empty.carbon index 5f71a2860c0a..0998db47fba1 100644 --- a/toolchain/check/testdata/struct/empty.carbon +++ b/toolchain/check/testdata/struct/empty.carbon @@ -9,11 +9,11 @@ var y: {} = x; // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc7_9.1: type = struct_type {} -// CHECK:STDOUT: %.loc7_9.2: {} = struct_value () +// CHECK:STDOUT: %.loc7_9.2: {} = struct_literal () // CHECK:STDOUT: %x: ref {} = var "x" -// CHECK:STDOUT: %.loc7_14: {} = struct_value () +// CHECK:STDOUT: %.loc7_14: {} = struct_literal () // CHECK:STDOUT: assign %x, %.loc7_14 -// CHECK:STDOUT: %.loc8: {} = struct_value () +// CHECK:STDOUT: %.loc8: {} = struct_literal () // CHECK:STDOUT: %y: ref {} = var "y" // CHECK:STDOUT: %.loc7_5: {} = bind_value %x // CHECK:STDOUT: assign %y, %.loc7_5 diff --git a/toolchain/check/testdata/struct/fail_assign_empty.carbon b/toolchain/check/testdata/struct/fail_assign_empty.carbon index 0ccd6e73a7f7..ee2bdf623488 100644 --- a/toolchain/check/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_empty.carbon @@ -13,6 +13,6 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: %.loc10_16: type = struct_type {.a: i32} // CHECK:STDOUT: %x: ref {.a: i32} = var "x" // CHECK:STDOUT: %.loc10_21.1: type = struct_type {} -// CHECK:STDOUT: %.loc10_21.2: {} = struct_value () +// CHECK:STDOUT: %.loc10_21.2: {} = struct_literal () // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_assign_nested.carbon b/toolchain/check/testdata/struct/fail_assign_nested.carbon index 711e0b4143de..186eab6513df 100644 --- a/toolchain/check/testdata/struct/fail_assign_nested.carbon +++ b/toolchain/check/testdata/struct/fail_assign_nested.carbon @@ -11,12 +11,12 @@ var x: {.a: {}} = {.b = {}}; // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc10_14.1: type = struct_type {} -// CHECK:STDOUT: %.loc10_14.2: {} = struct_value () +// CHECK:STDOUT: %.loc10_14.2: {} = struct_literal () // CHECK:STDOUT: %.loc10_15: type = struct_type {.a: {}} // CHECK:STDOUT: %x: ref {.a: {}} = var "x" -// CHECK:STDOUT: %.loc10_26: {} = struct_value () +// CHECK:STDOUT: %.loc10_26: {} = struct_literal () // CHECK:STDOUT: %.loc10_23: {} = stub_reference %.loc10_26 // CHECK:STDOUT: %.loc10_27.1: type = struct_type {.b: {}} -// CHECK:STDOUT: %.loc10_27.2: {.b: {}} = struct_value (%.loc10_23) +// CHECK:STDOUT: %.loc10_27.2: {.b: {}} = struct_literal (%.loc10_23) // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon index e6fa7e258edd..7326b76003cb 100644 --- a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon @@ -11,11 +11,11 @@ var x: {} = {.a = 1}; // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc10_9.1: type = struct_type {} -// CHECK:STDOUT: %.loc10_9.2: {} = struct_value () +// CHECK:STDOUT: %.loc10_9.2: {} = struct_literal () // CHECK:STDOUT: %x: ref {} = var "x" // CHECK:STDOUT: %.loc10_19: i32 = int_literal 1 // CHECK:STDOUT: %.loc10_17: i32 = stub_reference %.loc10_19 // CHECK:STDOUT: %.loc10_20.1: type = struct_type {.a: i32} -// CHECK:STDOUT: %.loc10_20.2: {.a: i32} = struct_value (%.loc10_17) +// CHECK:STDOUT: %.loc10_20.2: {.a: i32} = struct_literal (%.loc10_17) // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon index 0d7c6de61ecc..c78b79eb0935 100644 --- a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon @@ -15,6 +15,6 @@ var x: {.a: i32} = {.b = 1}; // CHECK:STDOUT: %.loc10_26: i32 = int_literal 1 // CHECK:STDOUT: %.loc10_24: i32 = stub_reference %.loc10_26 // CHECK:STDOUT: %.loc10_27.1: type = struct_type {.b: i32} -// CHECK:STDOUT: %.loc10_27.2: {.b: i32} = struct_value (%.loc10_24) +// CHECK:STDOUT: %.loc10_27.2: {.b: i32} = struct_literal (%.loc10_24) // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon index 7d8d7d49382a..7e7d093081d4 100644 --- a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon @@ -15,6 +15,6 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: %.loc10_26: f64 = real_literal 10e-1 // CHECK:STDOUT: %.loc10_24: f64 = stub_reference %.loc10_26 // CHECK:STDOUT: %.loc10_29.1: type = struct_type {.b: f64} -// CHECK:STDOUT: %.loc10_29.2: {.b: f64} = struct_value (%.loc10_24) +// CHECK:STDOUT: %.loc10_29.2: {.b: f64} = struct_literal (%.loc10_24) // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_member_access_type.carbon b/toolchain/check/testdata/struct/fail_member_access_type.carbon index 987dfa66aa95..7cc129c0c5e0 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -15,7 +15,7 @@ var y: i32 = x.b; // CHECK:STDOUT: %x: ref {.a: f64} = var "x" // CHECK:STDOUT: %.loc7_26: f64 = real_literal 40e-1 // CHECK:STDOUT: %.loc7_24: f64 = stub_reference %.loc7_26 -// CHECK:STDOUT: %.loc7_29: {.a: f64} = struct_value (%.loc7_24) +// CHECK:STDOUT: %.loc7_29: {.a: f64} = struct_literal (%.loc7_24) // CHECK:STDOUT: assign %x, %.loc7_29 // CHECK:STDOUT: %y: ref i32 = var "y" // CHECK:STDOUT: assign %y, diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index 4cd02a344da3..186c89bee484 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -15,7 +15,7 @@ var y: i32 = x.b; // CHECK:STDOUT: %x: ref {.a: i32} = var "x" // CHECK:STDOUT: %.loc7_26: i32 = int_literal 4 // CHECK:STDOUT: %.loc7_24: i32 = stub_reference %.loc7_26 -// CHECK:STDOUT: %.loc7_27: {.a: i32} = struct_value (%.loc7_24) +// CHECK:STDOUT: %.loc7_27: {.a: i32} = struct_literal (%.loc7_24) // CHECK:STDOUT: assign %x, %.loc7_27 // CHECK:STDOUT: %y: ref i32 = var "y" // CHECK:STDOUT: assign %y, diff --git a/toolchain/check/testdata/struct/fail_too_few_values.carbon b/toolchain/check/testdata/struct/fail_too_few_values.carbon index 18e3220a6fa7..25cadf9d12db 100644 --- a/toolchain/check/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/check/testdata/struct/fail_too_few_values.carbon @@ -15,6 +15,6 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: %.loc10_35: i32 = int_literal 1 // CHECK:STDOUT: %.loc10_33: i32 = stub_reference %.loc10_35 // CHECK:STDOUT: %.loc10_36.1: type = struct_type {.a: i32} -// CHECK:STDOUT: %.loc10_36.2: {.a: i32} = struct_value (%.loc10_33) +// CHECK:STDOUT: %.loc10_36.2: {.a: i32} = struct_literal (%.loc10_33) // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_value_as_type.carbon b/toolchain/check/testdata/struct/fail_value_as_type.carbon index 1408ba806fee..2ce7016c6d7f 100644 --- a/toolchain/check/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/check/testdata/struct/fail_value_as_type.carbon @@ -13,6 +13,6 @@ var x: {.a = 1}; // CHECK:STDOUT: %.loc10_14: i32 = int_literal 1 // CHECK:STDOUT: %.loc10_12: i32 = stub_reference %.loc10_14 // CHECK:STDOUT: %.loc10_15.1: type = struct_type {.a: i32} -// CHECK:STDOUT: %.loc10_15.2: {.a: i32} = struct_value (%.loc10_12) +// CHECK:STDOUT: %.loc10_15.2: {.a: i32} = struct_literal (%.loc10_12) // CHECK:STDOUT: %x: ref = var "x" // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index 34bf1c39d2fd..369fa6511cdb 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -15,7 +15,7 @@ var z: i32 = y; // CHECK:STDOUT: %.loc7_33: f64 = stub_reference %.loc7_35 // CHECK:STDOUT: %.loc7_45: i32 = int_literal 1 // CHECK:STDOUT: %.loc7_43: i32 = stub_reference %.loc7_45 -// CHECK:STDOUT: %.loc7_46: {.a: f64, .b: i32} = struct_value (%.loc7_33, %.loc7_43) +// CHECK:STDOUT: %.loc7_46: {.a: f64, .b: i32} = struct_literal (%.loc7_33, %.loc7_43) // CHECK:STDOUT: assign %x, %.loc7_46 // CHECK:STDOUT: %y: ref i32 = var "y" // CHECK:STDOUT: %.loc8_15.1: ref i32 = struct_access %x, member1 diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index 0276775b5523..5788fa7c6683 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -12,7 +12,7 @@ var y: {.a: i32} = x; // CHECK:STDOUT: %x: ref {.a: i32} = var "x" // CHECK:STDOUT: %.loc7_26: i32 = int_literal 4 // CHECK:STDOUT: %.loc7_24: i32 = stub_reference %.loc7_26 -// CHECK:STDOUT: %.loc7_27: {.a: i32} = struct_value (%.loc7_24) +// CHECK:STDOUT: %.loc7_27: {.a: i32} = struct_literal (%.loc7_24) // CHECK:STDOUT: assign %x, %.loc7_27 // CHECK:STDOUT: %.loc8: type = struct_type {.a: i32} // CHECK:STDOUT: %y: ref {.a: i32} = var "y" diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index c62df0c7f878..a82c304db433 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -10,7 +10,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc7_23: type = stub_reference i32 // CHECK:STDOUT: %.loc7_27.1: type = tuple_type (type) -// CHECK:STDOUT: %.loc7_27.2: (type,) = tuple_value (%.loc7_23) +// CHECK:STDOUT: %.loc7_27.2: (type,) = tuple_literal (%.loc7_23) // CHECK:STDOUT: %.loc7_27.3: type = tuple_type (i32) // CHECK:STDOUT: %.loc7_28: type = struct_type {.a: i32, .b: (i32,)} // CHECK:STDOUT: %x: ref {.a: i32, .b: (i32,)} = var "x" @@ -18,12 +18,12 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc7_36: i32 = stub_reference %.loc7_38 // CHECK:STDOUT: %.loc7_47.1: i32 = int_literal 2 // CHECK:STDOUT: %.loc7_47.2: i32 = stub_reference %.loc7_47.1 -// CHECK:STDOUT: %.loc7_49: (i32,) = tuple_value (%.loc7_47.2) +// CHECK:STDOUT: %.loc7_49: (i32,) = tuple_literal (%.loc7_47.2) // CHECK:STDOUT: %.loc7_44: (i32,) = stub_reference %.loc7_49 -// CHECK:STDOUT: %.loc7_50: {.a: i32, .b: (i32,)} = struct_value (%.loc7_36, %.loc7_44) +// CHECK:STDOUT: %.loc7_50: {.a: i32, .b: (i32,)} = struct_literal (%.loc7_36, %.loc7_44) // CHECK:STDOUT: assign %x, %.loc7_50 // CHECK:STDOUT: %.loc8_23: type = stub_reference i32 -// CHECK:STDOUT: %.loc8_27: (type,) = tuple_value (%.loc8_23) +// CHECK:STDOUT: %.loc8_27: (type,) = tuple_literal (%.loc8_23) // CHECK:STDOUT: %.loc8_28: type = struct_type {.a: i32, .b: (i32,)} // CHECK:STDOUT: %y: ref {.a: i32, .b: (i32,)} = var "y" // CHECK:STDOUT: %.loc7_5: {.a: i32, .b: (i32,)} = bind_value %x diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index 95937f1aef9e..318d71840d9f 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -14,7 +14,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc7_33: i32 = stub_reference %.loc7_35 // CHECK:STDOUT: %.loc7_43: i32 = int_literal 2 // CHECK:STDOUT: %.loc7_41: i32 = stub_reference %.loc7_43 -// CHECK:STDOUT: %.loc7_44: {.a: i32, .b: i32} = struct_value (%.loc7_33, %.loc7_41) +// CHECK:STDOUT: %.loc7_44: {.a: i32, .b: i32} = struct_literal (%.loc7_33, %.loc7_41) // CHECK:STDOUT: assign %x, %.loc7_44 // CHECK:STDOUT: %.loc8: type = struct_type {.a: i32, .b: i32} // CHECK:STDOUT: %y: ref {.a: i32, .b: i32} = var "y" diff --git a/toolchain/check/testdata/tuples/empty.carbon b/toolchain/check/testdata/tuples/empty.carbon index ed6afdeb6a41..69a40b2c29a9 100644 --- a/toolchain/check/testdata/tuples/empty.carbon +++ b/toolchain/check/testdata/tuples/empty.carbon @@ -9,11 +9,11 @@ var y: () = x; // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc7_9.1: type = tuple_type () -// CHECK:STDOUT: %.loc7_9.2: () = tuple_value () +// CHECK:STDOUT: %.loc7_9.2: () = tuple_literal () // CHECK:STDOUT: %x: ref () = var "x" -// CHECK:STDOUT: %.loc7_14: () = tuple_value () +// CHECK:STDOUT: %.loc7_14: () = tuple_literal () // CHECK:STDOUT: assign %x, %.loc7_14 -// CHECK:STDOUT: %.loc8: () = tuple_value () +// CHECK:STDOUT: %.loc8: () = tuple_literal () // CHECK:STDOUT: %y: ref () = var "y" // CHECK:STDOUT: %.loc7_5: () = bind_value %x // CHECK:STDOUT: assign %y, %.loc7_5 diff --git a/toolchain/check/testdata/tuples/fail_assign_empty.carbon b/toolchain/check/testdata/tuples/fail_assign_empty.carbon index 9bbdc0456932..d554fc699226 100644 --- a/toolchain/check/testdata/tuples/fail_assign_empty.carbon +++ b/toolchain/check/testdata/tuples/fail_assign_empty.carbon @@ -12,10 +12,10 @@ var x: (i32,) = (); // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc10_9: type = stub_reference i32 // CHECK:STDOUT: %.loc10_13.1: type = tuple_type (type) -// CHECK:STDOUT: %.loc10_13.2: (type,) = tuple_value (%.loc10_9) +// CHECK:STDOUT: %.loc10_13.2: (type,) = tuple_literal (%.loc10_9) // CHECK:STDOUT: %.loc10_13.3: type = tuple_type (i32) // CHECK:STDOUT: %x: ref (i32,) = var "x" // CHECK:STDOUT: %.loc10_18.1: type = tuple_type () -// CHECK:STDOUT: %.loc10_18.2: () = tuple_value () +// CHECK:STDOUT: %.loc10_18.2: () = tuple_literal () // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/fail_assign_nested.carbon b/toolchain/check/testdata/tuples/fail_assign_nested.carbon index 85a455b4e93c..cb71dca2c802 100644 --- a/toolchain/check/testdata/tuples/fail_assign_nested.carbon +++ b/toolchain/check/testdata/tuples/fail_assign_nested.carbon @@ -13,14 +13,14 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: %.loc10_10: type = stub_reference i32 // CHECK:STDOUT: %.loc10_15: type = stub_reference i32 // CHECK:STDOUT: %.loc10_18.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc10_18.2: (type, type) = tuple_value (%.loc10_10, %.loc10_15) +// CHECK:STDOUT: %.loc10_18.2: (type, type) = tuple_literal (%.loc10_10, %.loc10_15) // CHECK:STDOUT: %.loc10_18.3: (type, type) = stub_reference %.loc10_18.2 // CHECK:STDOUT: %.loc10_22: type = stub_reference i32 // CHECK:STDOUT: %.loc10_27: type = stub_reference i32 -// CHECK:STDOUT: %.loc10_30.1: (type, type) = tuple_value (%.loc10_22, %.loc10_27) +// CHECK:STDOUT: %.loc10_30.1: (type, type) = tuple_literal (%.loc10_22, %.loc10_27) // CHECK:STDOUT: %.loc10_30.2: (type, type) = stub_reference %.loc10_30.1 // CHECK:STDOUT: %.loc10_31.1: type = tuple_type ((type, type), (type, type)) -// CHECK:STDOUT: %.loc10_31.2: ((type, type), (type, type)) = tuple_value (%.loc10_18.3, %.loc10_30.2) +// CHECK:STDOUT: %.loc10_31.2: ((type, type), (type, type)) = tuple_literal (%.loc10_18.3, %.loc10_30.2) // CHECK:STDOUT: %.loc10_18.4: type = tuple_type (i32, i32) // CHECK:STDOUT: %.loc10_31.3: type = tuple_type ((i32, i32), (i32, i32)) // CHECK:STDOUT: %x: ref ((i32, i32), (i32, i32)) = var "x" @@ -31,7 +31,7 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: %.loc10_43.1: i32 = int_literal 3 // CHECK:STDOUT: %.loc10_43.2: i32 = stub_reference %.loc10_43.1 // CHECK:STDOUT: %.loc10_44.1: type = tuple_type (i32, i32, i32) -// CHECK:STDOUT: %.loc10_44.2: (i32, i32, i32) = tuple_value (%.loc10_37.2, %.loc10_40.2, %.loc10_43.2) +// CHECK:STDOUT: %.loc10_44.2: (i32, i32, i32) = tuple_literal (%.loc10_37.2, %.loc10_40.2, %.loc10_43.2) // CHECK:STDOUT: %.loc10_44.3: (i32, i32, i32) = stub_reference %.loc10_44.2 // CHECK:STDOUT: %.loc10_48.1: i32 = int_literal 4 // CHECK:STDOUT: %.loc10_48.2: i32 = stub_reference %.loc10_48.1 @@ -39,9 +39,9 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: %.loc10_51.2: i32 = stub_reference %.loc10_51.1 // CHECK:STDOUT: %.loc10_54.1: i32 = int_literal 6 // CHECK:STDOUT: %.loc10_54.2: i32 = stub_reference %.loc10_54.1 -// CHECK:STDOUT: %.loc10_55.1: (i32, i32, i32) = tuple_value (%.loc10_48.2, %.loc10_51.2, %.loc10_54.2) +// CHECK:STDOUT: %.loc10_55.1: (i32, i32, i32) = tuple_literal (%.loc10_48.2, %.loc10_51.2, %.loc10_54.2) // CHECK:STDOUT: %.loc10_55.2: (i32, i32, i32) = stub_reference %.loc10_55.1 // CHECK:STDOUT: %.loc10_56.1: type = tuple_type ((i32, i32, i32), (i32, i32, i32)) -// CHECK:STDOUT: %.loc10_56.2: ((i32, i32, i32), (i32, i32, i32)) = tuple_value (%.loc10_44.3, %.loc10_55.2) +// CHECK:STDOUT: %.loc10_56.2: ((i32, i32, i32), (i32, i32, i32)) = tuple_literal (%.loc10_44.3, %.loc10_55.2) // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/fail_assign_to_empty.carbon b/toolchain/check/testdata/tuples/fail_assign_to_empty.carbon index 8e863a030a72..c51b3a7c7161 100644 --- a/toolchain/check/testdata/tuples/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/tuples/fail_assign_to_empty.carbon @@ -11,7 +11,7 @@ var x: () = (66); // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc10_9.1: type = tuple_type () -// CHECK:STDOUT: %.loc10_9.2: () = tuple_value () +// CHECK:STDOUT: %.loc10_9.2: () = tuple_literal () // CHECK:STDOUT: %x: ref () = var "x" // CHECK:STDOUT: %.loc10_14: i32 = int_literal 66 // CHECK:STDOUT: assign %x, diff --git a/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon index 866a631e23a9..93a02043f1aa 100644 --- a/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon @@ -13,7 +13,7 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %.loc10_9: type = stub_reference i32 // CHECK:STDOUT: %.loc10_14: type = stub_reference i32 // CHECK:STDOUT: %.loc10_17.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc10_17.2: (type, type) = tuple_value (%.loc10_9, %.loc10_14) +// CHECK:STDOUT: %.loc10_17.2: (type, type) = tuple_literal (%.loc10_9, %.loc10_14) // CHECK:STDOUT: %.loc10_17.3: type = tuple_type (i32, i32) // CHECK:STDOUT: %x: ref (i32, i32) = var "x" // CHECK:STDOUT: %.loc10_22.1: i32 = int_literal 2 @@ -21,6 +21,6 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %.loc10_25.1: f64 = real_literal 6589e-2 // CHECK:STDOUT: %.loc10_25.2: f64 = stub_reference %.loc10_25.1 // CHECK:STDOUT: %.loc10_30.1: type = tuple_type (i32, f64) -// CHECK:STDOUT: %.loc10_30.2: (i32, f64) = tuple_value (%.loc10_22.2, %.loc10_25.2) +// CHECK:STDOUT: %.loc10_30.2: (i32, f64) = tuple_literal (%.loc10_22.2, %.loc10_25.2) // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/fail_too_few_element.carbon b/toolchain/check/testdata/tuples/fail_too_few_element.carbon index 253a91f0c2d9..ff839816a193 100644 --- a/toolchain/check/testdata/tuples/fail_too_few_element.carbon +++ b/toolchain/check/testdata/tuples/fail_too_few_element.carbon @@ -13,12 +13,12 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: %.loc10_9: type = stub_reference i32 // CHECK:STDOUT: %.loc10_14: type = stub_reference i32 // CHECK:STDOUT: %.loc10_17.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc10_17.2: (type, type) = tuple_value (%.loc10_9, %.loc10_14) +// CHECK:STDOUT: %.loc10_17.2: (type, type) = tuple_literal (%.loc10_9, %.loc10_14) // CHECK:STDOUT: %.loc10_17.3: type = tuple_type (i32, i32) // CHECK:STDOUT: %x: ref (i32, i32) = var "x" // CHECK:STDOUT: %.loc10_22.1: i32 = int_literal 2 // CHECK:STDOUT: %.loc10_22.2: i32 = stub_reference %.loc10_22.1 // CHECK:STDOUT: %.loc10_25.1: type = tuple_type (i32) -// CHECK:STDOUT: %.loc10_25.2: (i32,) = tuple_value (%.loc10_22.2) +// CHECK:STDOUT: %.loc10_25.2: (i32,) = tuple_literal (%.loc10_22.2) // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/fail_type_assign.carbon b/toolchain/check/testdata/tuples/fail_type_assign.carbon index f7efb9e90223..483111c1c16a 100644 --- a/toolchain/check/testdata/tuples/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuples/fail_type_assign.carbon @@ -12,10 +12,10 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc10_9: type = stub_reference i32 // CHECK:STDOUT: %.loc10_14.1: type = tuple_type (type) -// CHECK:STDOUT: %.loc10_14.2: (type,) = tuple_value (%.loc10_9) +// CHECK:STDOUT: %.loc10_14.2: (type,) = tuple_literal (%.loc10_9) // CHECK:STDOUT: %.loc10_14.3: type = tuple_type (i32) // CHECK:STDOUT: %x: ref (i32,) = var "x" // CHECK:STDOUT: %.loc10_19: type = stub_reference i32 -// CHECK:STDOUT: %.loc10_24: (type,) = tuple_value (%.loc10_19) +// CHECK:STDOUT: %.loc10_24: (type,) = tuple_literal (%.loc10_19) // CHECK:STDOUT: assign %x, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/fail_value_as_type.carbon b/toolchain/check/testdata/tuples/fail_value_as_type.carbon index 0ac9288ef171..164240794b59 100644 --- a/toolchain/check/testdata/tuples/fail_value_as_type.carbon +++ b/toolchain/check/testdata/tuples/fail_value_as_type.carbon @@ -13,7 +13,7 @@ var x: (1, ); // CHECK:STDOUT: %.loc10_9.1: i32 = int_literal 1 // CHECK:STDOUT: %.loc10_9.2: i32 = stub_reference %.loc10_9.1 // CHECK:STDOUT: %.loc10_12.1: type = tuple_type (i32) -// CHECK:STDOUT: %.loc10_12.2: (i32,) = tuple_value (%.loc10_9.2) +// CHECK:STDOUT: %.loc10_12.2: (i32,) = tuple_literal (%.loc10_9.2) // CHECK:STDOUT: %.loc10_12.3: type = tuple_type () // CHECK:STDOUT: %x: ref (,) = var "x" // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/nested_tuple.carbon b/toolchain/check/testdata/tuples/nested_tuple.carbon index b87bd179e7b0..09d357d6cc0c 100644 --- a/toolchain/check/testdata/tuples/nested_tuple.carbon +++ b/toolchain/check/testdata/tuples/nested_tuple.carbon @@ -10,11 +10,11 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %.loc7_10: type = stub_reference i32 // CHECK:STDOUT: %.loc7_15: type = stub_reference i32 // CHECK:STDOUT: %.loc7_18.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc7_18.2: (type, type) = tuple_value (%.loc7_10, %.loc7_15) +// CHECK:STDOUT: %.loc7_18.2: (type, type) = tuple_literal (%.loc7_10, %.loc7_15) // CHECK:STDOUT: %.loc7_18.3: (type, type) = stub_reference %.loc7_18.2 // CHECK:STDOUT: %.loc7_21: type = stub_reference i32 // CHECK:STDOUT: %.loc7_24.1: type = tuple_type ((type, type), type) -// CHECK:STDOUT: %.loc7_24.2: ((type, type), type) = tuple_value (%.loc7_18.3, %.loc7_21) +// CHECK:STDOUT: %.loc7_24.2: ((type, type), type) = tuple_literal (%.loc7_18.3, %.loc7_21) // CHECK:STDOUT: %.loc7_18.4: type = tuple_type (i32, i32) // CHECK:STDOUT: %.loc7_24.3: type = tuple_type ((i32, i32), i32) // CHECK:STDOUT: %x: ref ((i32, i32), i32) = var "x" @@ -22,10 +22,10 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %.loc7_30.2: i32 = stub_reference %.loc7_30.1 // CHECK:STDOUT: %.loc7_34.1: i32 = int_literal 76 // CHECK:STDOUT: %.loc7_34.2: i32 = stub_reference %.loc7_34.1 -// CHECK:STDOUT: %.loc7_36.1: (i32, i32) = tuple_value (%.loc7_30.2, %.loc7_34.2) +// CHECK:STDOUT: %.loc7_36.1: (i32, i32) = tuple_literal (%.loc7_30.2, %.loc7_34.2) // CHECK:STDOUT: %.loc7_36.2: (i32, i32) = stub_reference %.loc7_36.1 // CHECK:STDOUT: %.loc7_39.1: i32 = int_literal 6 // CHECK:STDOUT: %.loc7_39.2: i32 = stub_reference %.loc7_39.1 -// CHECK:STDOUT: %.loc7_40: ((i32, i32), i32) = tuple_value (%.loc7_36.2, %.loc7_39.2) +// CHECK:STDOUT: %.loc7_40: ((i32, i32), i32) = tuple_literal (%.loc7_36.2, %.loc7_39.2) // CHECK:STDOUT: assign %x, %.loc7_40 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuples/one_element.carbon b/toolchain/check/testdata/tuples/one_element.carbon index 081fc9952c99..d026acf457ad 100644 --- a/toolchain/check/testdata/tuples/one_element.carbon +++ b/toolchain/check/testdata/tuples/one_element.carbon @@ -10,15 +10,15 @@ var y: (i32,) = x; // CHECK:STDOUT: package { // CHECK:STDOUT: %.loc7_9: type = stub_reference i32 // CHECK:STDOUT: %.loc7_13.1: type = tuple_type (type) -// CHECK:STDOUT: %.loc7_13.2: (type,) = tuple_value (%.loc7_9) +// CHECK:STDOUT: %.loc7_13.2: (type,) = tuple_literal (%.loc7_9) // CHECK:STDOUT: %.loc7_13.3: type = tuple_type (i32) // CHECK:STDOUT: %x: ref (i32,) = var "x" // CHECK:STDOUT: %.loc7_18.1: i32 = int_literal 4 // CHECK:STDOUT: %.loc7_18.2: i32 = stub_reference %.loc7_18.1 -// CHECK:STDOUT: %.loc7_20: (i32,) = tuple_value (%.loc7_18.2) +// CHECK:STDOUT: %.loc7_20: (i32,) = tuple_literal (%.loc7_18.2) // CHECK:STDOUT: assign %x, %.loc7_20 // CHECK:STDOUT: %.loc8_9: type = stub_reference i32 -// CHECK:STDOUT: %.loc8_13: (type,) = tuple_value (%.loc8_9) +// CHECK:STDOUT: %.loc8_13: (type,) = tuple_literal (%.loc8_9) // CHECK:STDOUT: %y: ref (i32,) = var "y" // CHECK:STDOUT: %.loc7_5: (i32,) = bind_value %x // CHECK:STDOUT: assign %y, %.loc7_5 diff --git a/toolchain/check/testdata/tuples/two_elements.carbon b/toolchain/check/testdata/tuples/two_elements.carbon index 737edd56e508..1001324e9689 100644 --- a/toolchain/check/testdata/tuples/two_elements.carbon +++ b/toolchain/check/testdata/tuples/two_elements.carbon @@ -11,18 +11,18 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc7_9: type = stub_reference i32 // CHECK:STDOUT: %.loc7_14: type = stub_reference i32 // CHECK:STDOUT: %.loc7_17.1: type = tuple_type (type, type) -// CHECK:STDOUT: %.loc7_17.2: (type, type) = tuple_value (%.loc7_9, %.loc7_14) +// CHECK:STDOUT: %.loc7_17.2: (type, type) = tuple_literal (%.loc7_9, %.loc7_14) // CHECK:STDOUT: %.loc7_17.3: type = tuple_type (i32, i32) // CHECK:STDOUT: %x: ref (i32, i32) = var "x" // CHECK:STDOUT: %.loc7_22.1: i32 = int_literal 4 // CHECK:STDOUT: %.loc7_22.2: i32 = stub_reference %.loc7_22.1 // CHECK:STDOUT: %.loc7_25.1: i32 = int_literal 102 // CHECK:STDOUT: %.loc7_25.2: i32 = stub_reference %.loc7_25.1 -// CHECK:STDOUT: %.loc7_28: (i32, i32) = tuple_value (%.loc7_22.2, %.loc7_25.2) +// CHECK:STDOUT: %.loc7_28: (i32, i32) = tuple_literal (%.loc7_22.2, %.loc7_25.2) // CHECK:STDOUT: assign %x, %.loc7_28 // CHECK:STDOUT: %.loc8_9: type = stub_reference i32 // CHECK:STDOUT: %.loc8_14: type = stub_reference i32 -// CHECK:STDOUT: %.loc8_17: (type, type) = tuple_value (%.loc8_9, %.loc8_14) +// CHECK:STDOUT: %.loc8_17: (type, type) = tuple_literal (%.loc8_9, %.loc8_14) // CHECK:STDOUT: %y: ref (i32, i32) = var "y" // CHECK:STDOUT: %.loc7_5: (i32, i32) = bind_value %x // CHECK:STDOUT: assign %y, %.loc7_5 diff --git a/toolchain/lower/handle.cpp b/toolchain/lower/handle.cpp index 3f66e081bc12..c6140c2031ec 100644 --- a/toolchain/lower/handle.cpp +++ b/toolchain/lower/handle.cpp @@ -323,13 +323,13 @@ auto HandleTupleIndex(FunctionContext& context, SemIR::NodeId node_id, llvm_type, tuple_value, index, "tuple.index")); } -auto HandleTupleValue(FunctionContext& context, SemIR::NodeId node_id, - SemIR::Node node) -> void { +auto HandleTupleLiteral(FunctionContext& context, SemIR::NodeId node_id, + SemIR::Node node) -> void { auto* llvm_type = context.GetType(node.type_id()); auto* alloca = context.builder().CreateAlloca(llvm_type, /*ArraySize=*/nullptr, "tuple"); context.SetLocal(node_id, alloca); - auto refs = context.semantics_ir().GetNodeBlock(node.GetAsTupleValue()); + auto refs = context.semantics_ir().GetNodeBlock(node.GetAsTupleLiteral()); for (auto [i, ref] : llvm::enumerate(refs)) { auto* gep = context.builder().CreateStructGEP(llvm_type, alloca, i); context.builder().CreateStore(context.GetLocal(ref), gep); @@ -342,14 +342,14 @@ auto HandleStructTypeField(FunctionContext& /*context*/, // No action to take. } -auto HandleStructValue(FunctionContext& context, SemIR::NodeId node_id, - SemIR::Node node) -> void { +auto HandleStructLiteral(FunctionContext& context, SemIR::NodeId node_id, + SemIR::Node node) -> void { auto* llvm_type = context.GetType(node.type_id()); auto* alloca = context.builder().CreateAlloca( llvm_type, /*ArraySize=*/nullptr, "struct"); context.SetLocal(node_id, alloca); - auto refs = context.semantics_ir().GetNodeBlock(node.GetAsStructValue()); + auto refs = context.semantics_ir().GetNodeBlock(node.GetAsStructLiteral()); // Get type information for member names. auto type_refs = context.semantics_ir().GetNodeBlock( context.semantics_ir() diff --git a/toolchain/sem_ir/file.cpp b/toolchain/sem_ir/file.cpp index 9b7b74a1a400..a7b6c955b9f5 100644 --- a/toolchain/sem_ir/file.cpp +++ b/toolchain/sem_ir/file.cpp @@ -201,12 +201,12 @@ static auto GetTypePrecedence(NodeKind kind) -> int { case NodeKind::StringLiteral: case NodeKind::StructAccess: case NodeKind::StructTypeField: - case NodeKind::StructValue: + case NodeKind::StructLiteral: case NodeKind::StubReference: case NodeKind::Temporary: case NodeKind::TemporaryStorage: case NodeKind::TupleIndex: - case NodeKind::TupleValue: + case NodeKind::TupleLiteral: case NodeKind::UnaryOperatorNot: case NodeKind::VarStorage: CARBON_FATAL() << "GetTypePrecedence for non-type node kind " << kind; @@ -362,12 +362,12 @@ auto File::StringifyType(TypeId type_id, bool in_type_context) const case NodeKind::ReturnExpression: case NodeKind::StringLiteral: case NodeKind::StructAccess: - case NodeKind::StructValue: + case NodeKind::StructLiteral: case NodeKind::StubReference: case NodeKind::Temporary: case NodeKind::TemporaryStorage: case NodeKind::TupleIndex: - case NodeKind::TupleValue: + case NodeKind::TupleLiteral: case NodeKind::UnaryOperatorNot: case NodeKind::VarStorage: // We don't need to handle stringification for nodes that don't show up @@ -464,8 +464,8 @@ auto GetExpressionCategory(const File& file, NodeId node_id) } case NodeKind::ArrayValue: - case NodeKind::StructValue: - case NodeKind::TupleValue: + case NodeKind::StructLiteral: + case NodeKind::TupleLiteral: // TODO: Eventually these will depend on the context in which the value // is used, and could be either Value or Initializing. We may want // different node kinds for a struct/tuple initializer versus a @@ -520,11 +520,11 @@ auto GetValueRepresentation(const File& file, TypeId type_id) case NodeKind::StringLiteral: case NodeKind::StructAccess: case NodeKind::StructTypeField: - case NodeKind::StructValue: + case NodeKind::StructLiteral: case NodeKind::Temporary: case NodeKind::TemporaryStorage: case NodeKind::TupleIndex: - case NodeKind::TupleValue: + case NodeKind::TupleLiteral: case NodeKind::UnaryOperatorNot: case NodeKind::VarStorage: CARBON_FATAL() << "Type refers to non-type node " << node; diff --git a/toolchain/sem_ir/node.h b/toolchain/sem_ir/node.h index 836d67822623..a783c867b22f 100644 --- a/toolchain/sem_ir/node.h +++ b/toolchain/sem_ir/node.h @@ -394,14 +394,15 @@ class Node : public Printable { using StructAccess = Factory; + using StructLiteral = + Factory; + using StructType = Factory; using StructTypeField = FactoryNoType; - using StructValue = Factory; - using StubReference = Factory; using Temporary = @@ -412,9 +413,9 @@ class Node : public Printable { using TupleIndex = Factory; - using TupleType = Factory; + using TupleLiteral = Factory; - using TupleValue = Factory; + using TupleType = Factory; using UnaryOperatorNot = Factory; diff --git a/toolchain/sem_ir/node_kind.def b/toolchain/sem_ir/node_kind.def index a411e584daad..e6665ecd7491 100644 --- a/toolchain/sem_ir/node_kind.def +++ b/toolchain/sem_ir/node_kind.def @@ -53,7 +53,8 @@ CARBON_SEMANTICS_NODE_KIND_IMPL(Assign, "assign", None, NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(BinaryOperatorAdd, "add", Typed, NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(BindValue, "bind_value", Typed, NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(BlockArg, "block_arg", Typed, NotTerminator) -CARBON_SEMANTICS_NODE_KIND_IMPL(BoolLiteral, "bool_literal", Typed, NotTerminator) +CARBON_SEMANTICS_NODE_KIND_IMPL(BoolLiteral, "bool_literal", Typed, + NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(Branch, "br", None, Terminator) CARBON_SEMANTICS_NODE_KIND_IMPL(BranchIf, "br", None, TerminatorSequence) CARBON_SEMANTICS_NODE_KIND_IMPL(BranchWithArg, "br", None, Terminator) @@ -81,7 +82,7 @@ CARBON_SEMANTICS_NODE_KIND_IMPL(StructAccess, "struct_access", Typed, CARBON_SEMANTICS_NODE_KIND_IMPL(StructType, "struct_type", Typed, NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(StructTypeField, "struct_type_field", None, NotTerminator) -CARBON_SEMANTICS_NODE_KIND_IMPL(StructValue, "struct_value", Typed, +CARBON_SEMANTICS_NODE_KIND_IMPL(StructLiteral, "struct_literal", Typed, NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(StubReference, "stub_reference", Typed, NotTerminator) @@ -90,7 +91,8 @@ CARBON_SEMANTICS_NODE_KIND_IMPL(TemporaryStorage, "temporary_storage", Typed, NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(TupleIndex, "tuple_index", Typed, NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(TupleType, "tuple_type", Typed, NotTerminator) -CARBON_SEMANTICS_NODE_KIND_IMPL(TupleValue, "tuple_value", Typed, NotTerminator) +CARBON_SEMANTICS_NODE_KIND_IMPL(TupleLiteral, "tuple_literal", Typed, + NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(UnaryOperatorNot, "not", Typed, NotTerminator) CARBON_SEMANTICS_NODE_KIND_IMPL(VarStorage, "var", Typed, NotTerminator)