From d17188208ce7bd459a93f7113ebdec0d9620b878 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 24 Jun 2025 08:43:08 -0400 Subject: [PATCH] Apply min-preludes to more tests (part 7) (#5704) This drops file_test runtime from about 3s to 2.5s on my machine, which is now ~30% faster than before #5653 slowed things down by adding a lot of stuff to the production prelude. --------- Co-authored-by: Jon Ross-Perkins --- .../function/builtin/adapted_type.carbon | 3 +- .../builtin/call_from_operator.carbon | 3 +- .../testdata/function/builtin/import.carbon | 3 +- .../check/testdata/function/call/alias.carbon | 2 +- .../function/call/empty_struct.carbon | 19 +- .../testdata/function/call/empty_tuple.carbon | 19 +- .../call/fail_explicit_self_param.carbon | 15 +- .../function/call/fail_param_count.carbon | 41 +- .../function/call/fail_param_type.carbon | 9 +- .../call/fail_return_type_mismatch.carbon | 15 +- .../call/fail_runtime_implicit_param.carbon | 3 +- .../check/testdata/function/call/i32.carbon | 45 +- .../function/call/more_param_ir.carbon | 75 +-- .../testdata/function/call/params_one.carbon | 35 +- .../function/call/params_one_comma.carbon | 43 +- .../testdata/function/call/params_two.carbon | 61 +-- .../function/call/params_two_comma.carbon | 71 +-- .../testdata/function/call/params_zero.carbon | 3 +- .../call/prefer_unqualified_lookup.carbon | 21 +- .../function/call/return_implicit.carbon | 2 +- .../function/declaration/export_name.carbon | 3 +- .../function/declaration/extern.carbon | 3 +- .../declaration/extern_library.carbon | 3 +- .../extern_library_for_default.carbon | 3 +- .../extern_library_from_default.carbon | 3 +- .../fail_import_incomplete_return.carbon | 2 +- .../declaration/fail_modifiers.carbon | 3 +- .../declaration/fail_param_in_type.carbon | 15 +- .../declaration/fail_param_redecl.carbon | 33 +- .../fail_pattern_in_signature.carbon | 11 +- .../function/declaration/fail_redecl.carbon | 61 +-- .../declaration/fail_todo_no_params.carbon | 3 +- .../declaration/implicit_import.carbon | 3 +- .../no_definition_in_impl_file.carbon | 3 +- .../declaration/param_same_name.carbon | 7 +- .../function/declaration/simple.carbon | 3 +- .../function/definition/basics.carbon | 3 +- .../function/definition/extern.carbon | 3 +- .../function/definition/extern_library.carbon | 3 +- .../fail_decl_param_mismatch.carbon | 85 ++-- .../definition/fail_local_decl.carbon | 2 +- .../function/definition/fail_redef.carbon | 9 +- .../function/definition/forward_decl.carbon | 9 +- .../definition/implicit_import.carbon | 3 +- .../function/definition/import.carbon | 27 +- .../function/definition/import_access.carbon | 100 +--- .../testdata/function/definition/order.carbon | 3 +- .../function/definition/params_one.carbon | 5 +- .../definition/params_one_comma.carbon | 5 +- .../function/definition/params_two.carbon | 15 +- .../definition/params_two_comma.carbon | 15 +- .../function/definition/params_zero.carbon | 3 +- .../definition/syntactic_merge.carbon | 3 +- .../function/generic/forward_decl.carbon | 4 +- .../testdata/generic/call_basic_depth.carbon | 233 +++++----- .../testdata/generic/complete_type.carbon | 28 +- .../testdata/generic/dependent_param.carbon | 81 ++-- .../testdata/generic/forward_decl.carbon | 2 + toolchain/check/testdata/generic/local.carbon | 45 +- .../generic/template/member_access.carbon | 37 +- .../generic/template_dependence.carbon | 19 +- toolchain/check/testdata/if/basics.carbon | 1 + toolchain/check/testdata/if_expr/basic.carbon | 105 ++--- .../if_expr/constant_condition.carbon | 269 +++++------ .../testdata/if_expr/control_flow.carbon | 73 +-- .../if_expr/fail_not_in_function.carbon | 1 + .../if_expr/fail_partial_constant.carbon | 7 +- .../check/testdata/if_expr/nested.carbon | 157 +++---- .../check/testdata/if_expr/struct.carbon | 123 ++--- .../testdata/impl/assoc_const_self.carbon | 85 ++-- toolchain/check/testdata/impl/basic.carbon | 3 +- toolchain/check/testdata/impl/compound.carbon | 3 +- .../check/testdata/impl/declaration.carbon | 17 +- toolchain/check/testdata/impl/empty.carbon | 3 +- .../check/testdata/impl/error_recovery.carbon | 3 +- .../check/testdata/impl/extend_impl.carbon | 22 +- .../testdata/impl/extend_impl_generic.carbon | 53 +-- .../check/testdata/impl/fail_alias.carbon | 3 +- .../testdata/impl/fail_call_invalid.carbon | 43 +- .../impl/fail_extend_impl_forall.carbon | 66 ++- .../impl/fail_extend_impl_scope.carbon | 2 +- .../impl/fail_extend_impl_type_as.carbon | 3 +- .../impl/fail_extend_non_interface.carbon | 3 +- ..._extend_partially_defined_interface.carbon | 12 +- .../fail_extend_undefined_interface.carbon | 18 +- .../testdata/impl/fail_impl_as_scope.carbon | 2 +- .../impl/fail_impl_bad_assoc_const.carbon | 9 +- .../impl/fail_impl_bad_assoc_fn.carbon | 433 +++++++++--------- .../impl/fail_impl_bad_interface.carbon | 17 +- .../testdata/impl/fail_impl_bad_type.carbon | 2 +- .../testdata/impl/fail_redefinition.carbon | 3 +- .../impl/fail_self_type_mismatch.carbon | 129 +++--- .../impl/fail_undefined_interface.carbon | 3 +- .../check/testdata/impl/forward_decls.carbon | 2 +- .../impl/generic_redeclaration.carbon | 2 +- toolchain/check/testdata/impl/impl_as.carbon | 10 +- .../check/testdata/impl/impl_forall.carbon | 26 +- .../testdata/impl/import_builtin_call.carbon | 3 +- .../testdata/impl/import_compound.carbon | 359 +++------------ .../testdata/impl/import_extend_impl.carbon | 3 +- .../check/testdata/impl/import_generic.carbon | 3 +- .../impl/import_interface_assoc_const.carbon | 3 +- .../check/testdata/impl/import_self.carbon | 2 +- .../check/testdata/impl/import_thunk.carbon | 3 +- .../testdata/impl/import_use_generic.carbon | 3 +- .../check/testdata/impl/interface_args.carbon | 2 +- .../check/testdata/impl/lookup/alias.carbon | 22 +- .../impl/lookup/canonical_query_self.carbon | 2 +- .../lookup/fail_alias_impl_not_found.carbon | 18 +- .../lookup/fail_todo_undefined_impl.carbon | 10 +- .../check/testdata/impl/lookup/generic.carbon | 55 +-- .../testdata/impl/lookup/impl_forall.carbon | 2 +- .../check/testdata/impl/lookup/import.carbon | 2 +- .../impl/lookup/instance_method.carbon | 37 +- ...g_generic_inside_rewrite_constraint.carbon | 2 +- .../impl/lookup/overlap_with_non_types.carbon | 2 + ...pecialization_with_symbolic_rewrite.carbon | 2 +- .../testdata/impl/lookup/specific_args.carbon | 3 +- .../testdata/impl/multiple_extend.carbon | 46 +- .../impl/no_definition_in_impl_file.carbon | 3 +- .../check/testdata/impl/redeclaration.carbon | 23 +- .../check/testdata/impl/self_in_class.carbon | 29 +- .../testdata/impl/self_in_signature.carbon | 193 ++++---- .../impl/todo_impl_with_unrelated_fn.carbon | 3 +- .../index/array_element_access.carbon | 139 +++--- .../index/fail_array_non_int_indexing.carbon | 63 +-- .../fail_array_out_of_bound_access.carbon | 77 ++-- .../testdata/index/fail_expr_category.carbon | 203 ++++---- .../testdata/index/fail_name_not_found.carbon | 5 +- .../index/fail_negative_indexing.carbon | 119 ++--- .../index/array_element_access.carbon | 84 ++-- .../lower/testdata/let/copy_value_rep.carbon | 30 +- 132 files changed, 2110 insertions(+), 2547 deletions(-) diff --git a/toolchain/check/testdata/function/builtin/adapted_type.carbon b/toolchain/check/testdata/function/builtin/adapted_type.carbon index 69cfc6bd8f65..b6365e3e9fd7 100644 --- a/toolchain/check/testdata/function/builtin/adapted_type.carbon +++ b/toolchain/check/testdata/function/builtin/adapted_type.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/builtin/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/call_from_operator.carbon index b28393251d2f..9321f2688ce2 100644 --- a/toolchain/check/testdata/function/builtin/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/call_from_operator.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/builtin/import.carbon b/toolchain/check/testdata/function/builtin/import.carbon index c2afad7f5315..82998264d1db 100644 --- a/toolchain/check/testdata/function/builtin/import.carbon +++ b/toolchain/check/testdata/function/builtin/import.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/call/alias.carbon b/toolchain/check/testdata/function/call/alias.carbon index 4c78dc298462..0a00fd2d41e6 100644 --- a/toolchain/check/testdata/function/call/alias.carbon +++ b/toolchain/check/testdata/function/call/alias.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/call/empty_struct.carbon b/toolchain/check/testdata/function/call/empty_struct.carbon index f42ebb2a5711..7bbad25d51ed 100644 --- a/toolchain/check/testdata/function/call/empty_struct.carbon +++ b/toolchain/check/testdata/function/call/empty_struct.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -42,12 +43,12 @@ fn Main() { // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_20.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc14_20.2: type = converted %.loc14_20.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc15_20.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc15_20.2: type = converted %.loc15_20.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %a.param: %empty_struct_type = value_param call_param0 -// CHECK:STDOUT: %.loc14_13.1: type = splice_block %.loc14_13.3 [concrete = constants.%empty_struct_type] { -// CHECK:STDOUT: %.loc14_13.2: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc14_13.3: type = converted %.loc14_13.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc15_13.1: type = splice_block %.loc15_13.3 [concrete = constants.%empty_struct_type] { +// CHECK:STDOUT: %.loc15_13.2: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc15_13.3: type = converted %.loc15_13.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %empty_struct_type = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param1 @@ -65,10 +66,10 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [concrete = constants.%Echo] -// CHECK:STDOUT: %.loc19_9.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc20_9.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc19_9.2: %empty_struct_type = converted %.loc19_9.1, %empty_struct [concrete = constants.%empty_struct] -// CHECK:STDOUT: %Echo.call: init %empty_struct_type = call %Echo.ref(%.loc19_9.2) +// CHECK:STDOUT: %.loc20_9.2: %empty_struct_type = converted %.loc20_9.1, %empty_struct [concrete = constants.%empty_struct] +// CHECK:STDOUT: %Echo.call: init %empty_struct_type = call %Echo.ref(%.loc20_9.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/empty_tuple.carbon b/toolchain/check/testdata/function/call/empty_tuple.carbon index a6d5d340e692..240ea4e9f6be 100644 --- a/toolchain/check/testdata/function/call/empty_tuple.carbon +++ b/toolchain/check/testdata/function/call/empty_tuple.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -42,12 +43,12 @@ fn Main() { // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_20.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_20.2: type = converted %.loc14_20.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_20.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_20.2: type = converted %.loc15_20.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %a.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc14_13.1: type = splice_block %.loc14_13.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc14_13.2: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_13.3: type = converted %.loc14_13.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc15_13.1: type = splice_block %.loc15_13.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc15_13.2: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_13.3: type = converted %.loc15_13.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %empty_tuple.type = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param1 @@ -65,10 +66,10 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [concrete = constants.%Echo] -// CHECK:STDOUT: %.loc19_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc20_9.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc19_9.2: %empty_tuple.type = converted %.loc19_9.1, %empty_tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %Echo.call: init %empty_tuple.type = call %Echo.ref(%.loc19_9.2) +// CHECK:STDOUT: %.loc20_9.2: %empty_tuple.type = converted %.loc20_9.1, %empty_tuple [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %Echo.call: init %empty_tuple.type = call %Echo.ref(%.loc20_9.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/fail_explicit_self_param.carbon b/toolchain/check/testdata/function/call/fail_explicit_self_param.carbon index 4e50e36de944..b72de8a82d5f 100644 --- a/toolchain/check/testdata/function/call/fail_explicit_self_param.carbon +++ b/toolchain/check/testdata/function/call/fail_explicit_self_param.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -43,9 +44,9 @@ fn Run() { // CHECK:STDOUT: %self.param_patt: %pattern_type = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc18_13.1: type = splice_block %.loc18_13.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc18_13.2: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc18_13.3: type = converted %.loc18_13.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc19_13.1: type = splice_block %.loc19_13.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc19_13.2: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_13.3: type = converted %.loc19_13.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param // CHECK:STDOUT: } @@ -57,10 +58,10 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %.loc21_6.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc22_6.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc21_6.2: %empty_tuple.type = converted %.loc21_6.1, %empty_tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc21_6.2) +// CHECK:STDOUT: %.loc22_6.2: %empty_tuple.type = converted %.loc22_6.1, %empty_tuple [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc22_6.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index 68969f19ec43..616f6093ceed 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -94,7 +95,7 @@ fn Main() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -112,7 +113,7 @@ fn Main() { // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc15: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc16: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } @@ -125,15 +126,15 @@ fn Main() { // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc16_12: type = splice_block %i32.loc16_12 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc16_12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc17_12: type = splice_block %i32.loc17_12 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc17_12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc17_12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc16_20: type = splice_block %i32.loc16_20 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc16_20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc17_20: type = splice_block %i32.loc17_20 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc17_20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc17_20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } @@ -157,18 +158,18 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Run0.ref.loc26: %Run0.type = name_ref Run0, file.%Run0.decl [concrete = constants.%Run0] -// CHECK:STDOUT: %int_1.loc26: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %Run0.ref.loc34: %Run0.type = name_ref Run0, file.%Run0.decl [concrete = constants.%Run0] -// CHECK:STDOUT: %int_0.loc34: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %int_1.loc34: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %Run1.ref.loc43: %Run1.type = name_ref Run1, file.%Run1.decl [concrete = constants.%Run1] -// CHECK:STDOUT: %Run1.ref.loc51: %Run1.type = name_ref Run1, file.%Run1.decl [concrete = constants.%Run1] -// CHECK:STDOUT: %int_0.loc51: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %int_1.loc51: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %Run2.ref.loc60: %Run2.type = name_ref Run2, file.%Run2.decl [concrete = constants.%Run2] -// CHECK:STDOUT: %Run2.ref.loc68: %Run2.type = name_ref Run2, file.%Run2.decl [concrete = constants.%Run2] -// CHECK:STDOUT: %int_0.loc68: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] +// CHECK:STDOUT: %Run0.ref.loc27: %Run0.type = name_ref Run0, file.%Run0.decl [concrete = constants.%Run0] +// CHECK:STDOUT: %int_1.loc27: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] +// CHECK:STDOUT: %Run0.ref.loc35: %Run0.type = name_ref Run0, file.%Run0.decl [concrete = constants.%Run0] +// CHECK:STDOUT: %int_0.loc35: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] +// CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] +// CHECK:STDOUT: %Run1.ref.loc44: %Run1.type = name_ref Run1, file.%Run1.decl [concrete = constants.%Run1] +// CHECK:STDOUT: %Run1.ref.loc52: %Run1.type = name_ref Run1, file.%Run1.decl [concrete = constants.%Run1] +// CHECK:STDOUT: %int_0.loc52: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] +// CHECK:STDOUT: %int_1.loc52: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] +// CHECK:STDOUT: %Run2.ref.loc61: %Run2.type = name_ref Run2, file.%Run2.decl [concrete = constants.%Run2] +// CHECK:STDOUT: %Run2.ref.loc69: %Run2.type = name_ref Run2, file.%Run2.decl [concrete = constants.%Run2] +// CHECK:STDOUT: %int_0.loc69: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/fail_param_type.carbon b/toolchain/check/testdata/function/call/fail_param_type.carbon index fa5710867df7..0a88c6c22bdc 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -52,8 +53,8 @@ fn F() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -68,7 +69,7 @@ fn F() { // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc15: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } @@ -86,7 +87,7 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %float: f64 = float_literal 1 [concrete = constants.%float] -// CHECK:STDOUT: %.loc27: %i32 = converted %float, [concrete = ] +// CHECK:STDOUT: %.loc28: %i32 = converted %float, [concrete = ] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index 3b58375a8281..730c386d3965 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -53,9 +54,9 @@ fn Run() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types, Float, loaded [concrete = constants.%Float] -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/parts/float, Float, loaded [concrete = constants.%Float] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -71,8 +72,8 @@ fn Run() { // CHECK:STDOUT: } { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [concrete = f64] -// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %float.make_type [concrete = f64] -// CHECK:STDOUT: %.loc14_13.2: type = converted %float.make_type, %.loc14_13.1 [concrete = f64] +// CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %float.make_type [concrete = f64] +// CHECK:STDOUT: %.loc15_13.2: type = converted %float.make_type, %.loc15_13.1 [concrete = f64] // CHECK:STDOUT: %return.param: ref f64 = out_param call_param0 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } @@ -94,9 +95,9 @@ fn Run() { // CHECK:STDOUT: %x.var: ref %i32 = var %x.var_patt // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %Foo.call: init f64 = call %Foo.ref() -// CHECK:STDOUT: %.loc24_3: %i32 = converted %Foo.call, [concrete = ] +// CHECK:STDOUT: %.loc25_3: %i32 = converted %Foo.call, [concrete = ] // CHECK:STDOUT: assign %x.var, -// CHECK:STDOUT: %.loc24_10: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc25_10: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/fail_runtime_implicit_param.carbon b/toolchain/check/testdata/function/call/fail_runtime_implicit_param.carbon index 556ef1fc42b3..068052ff1817 100644 --- a/toolchain/check/testdata/function/call/fail_runtime_implicit_param.carbon +++ b/toolchain/check/testdata/function/call/fail_runtime_implicit_param.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index ec12f7552d49..03f8f6efb5bb 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -36,16 +37,16 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -57,9 +58,9 @@ fn Main() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -76,12 +77,12 @@ fn Main() { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc14_20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14: type = splice_block %i32.loc14_12 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15: type = splice_block %i32.loc15_12 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 @@ -106,15 +107,15 @@ fn Main() { // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [concrete = constants.%Echo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc19_21.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc19_21.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc19_21.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc19_21.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc19_21.2: %i32 = converted %int_1, %.loc19_21.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %Echo.call: init %i32 = call %Echo.ref(%.loc19_21.2) +// CHECK:STDOUT: %bound_method.loc20_21.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc20_21.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc20_21.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc20_21.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc20_21.2: %i32 = converted %int_1, %.loc20_21.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %Echo.call: init %i32 = call %Echo.ref(%.loc20_21.2) // CHECK:STDOUT: assign %b.var, %Echo.call -// CHECK:STDOUT: %.loc19_10: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc20_10: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index ee7dc671c6fc..211ad5cf5073 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -41,16 +42,16 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %tuple: %tuple.type.a1c = tuple_value (%int_1.5d2) [concrete] @@ -68,9 +69,9 @@ fn Main() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -88,15 +89,15 @@ fn Main() { // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14_11: type = splice_block %i32.loc14_11 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_11: type = splice_block %i32.loc15_11 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc14_19: type = splice_block %i32.loc14_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_19: type = splice_block %i32.loc15_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } @@ -116,21 +117,21 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %tuple.type.a1c = var %x.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %.loc17_22.1: %tuple.type.985 = tuple_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_22.1: = bound_method %int_1, %impl.elem0.loc17 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_22.2: = bound_method %int_1, %specific_fn.loc17 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_22.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_22.2: init %i32 = converted %int_1, %int.convert_checked.loc17 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_22.3: init %tuple.type.a1c = tuple_init (%.loc17_22.2) to %x.var [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc17_3: init %tuple.type.a1c = converted %.loc17_22.1, %.loc17_22.3 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %x.var, %.loc17_3 -// CHECK:STDOUT: %.loc17_15.1: type = splice_block %.loc17_15.3 [concrete = constants.%tuple.type.a1c] { +// CHECK:STDOUT: %.loc18_22.1: %tuple.type.985 = tuple_literal (%int_1) +// CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc18_22.1: = bound_method %int_1, %impl.elem0.loc18 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_22.2: = bound_method %int_1, %specific_fn.loc18 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %bound_method.loc18_22.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc18_22.2: init %i32 = converted %int_1, %int.convert_checked.loc18 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc18_22.3: init %tuple.type.a1c = tuple_init (%.loc18_22.2) to %x.var [concrete = constants.%tuple] +// CHECK:STDOUT: %.loc18_3: init %tuple.type.a1c = converted %.loc18_22.1, %.loc18_22.3 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %x.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_15.1: type = splice_block %.loc18_15.3 [concrete = constants.%tuple.type.a1c] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc17_15.2: %tuple.type.85c = tuple_literal (%i32) -// CHECK:STDOUT: %.loc17_15.3: type = converted %.loc17_15.2, constants.%tuple.type.a1c [concrete = constants.%tuple.type.a1c] +// CHECK:STDOUT: %.loc18_15.2: %tuple.type.85c = tuple_literal (%i32) +// CHECK:STDOUT: %.loc18_15.3: type = converted %.loc18_15.2, constants.%tuple.type.a1c [concrete = constants.%tuple.type.a1c] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %tuple.type.a1c = bind_name x, %x.var // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] @@ -138,15 +139,15 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %x.ref, element0 // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] -// CHECK:STDOUT: %.loc19_8: %i32 = bind_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc19_12.1: = bound_method %int_6, %impl.elem0.loc19 [concrete = constants.%Convert.bound.ce9] -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc19_12.2: = bound_method %int_6, %specific_fn.loc19 [concrete = constants.%bound_method.efa] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %bound_method.loc19_12.2(%int_6) [concrete = constants.%int_6.e56] -// CHECK:STDOUT: %.loc19_12.1: %i32 = value_of_initializer %int.convert_checked.loc19 [concrete = constants.%int_6.e56] -// CHECK:STDOUT: %.loc19_12.2: %i32 = converted %int_6, %.loc19_12.1 [concrete = constants.%int_6.e56] -// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc19_8, %.loc19_12.2) +// CHECK:STDOUT: %.loc20_8: %i32 = bind_value %tuple.elem0 +// CHECK:STDOUT: %impl.elem0.loc20: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc20_12.1: = bound_method %int_6, %impl.elem0.loc20 [concrete = constants.%Convert.bound.ce9] +// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc20_12.2: = bound_method %int_6, %specific_fn.loc20 [concrete = constants.%bound_method.efa] +// CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %bound_method.loc20_12.2(%int_6) [concrete = constants.%int_6.e56] +// CHECK:STDOUT: %.loc20_12.1: %i32 = value_of_initializer %int.convert_checked.loc20 [concrete = constants.%int_6.e56] +// CHECK:STDOUT: %.loc20_12.2: %i32 = converted %int_6, %.loc20_12.1 [concrete = constants.%int_6.e56] +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc20_8, %.loc20_12.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index 35430ae08f73..f4e74eb4bd4e 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -35,16 +36,16 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -56,9 +57,9 @@ fn Main() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -74,7 +75,7 @@ fn Main() { // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc15: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } @@ -93,13 +94,13 @@ fn Main() { // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc17_7.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_7.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_7.2: %i32 = converted %int_1, %.loc17_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc17_7.2) +// CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc18_7.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc18_7.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc18_7.2: %i32 = converted %int_1, %.loc18_7.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc18_7.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index f80160a73b56..525a404ef6c3 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -36,16 +37,16 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: } @@ -57,9 +58,9 @@ fn Main() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -75,7 +76,7 @@ fn Main() { // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc15: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } @@ -91,26 +92,26 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref.loc17: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] -// CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %int_1.loc17, %impl.elem0.loc17 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %int_1.loc17, %specific_fn.loc17 [concrete = constants.%bound_method] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_7.2(%int_1.loc17) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_7.1: %i32 = value_of_initializer %int.convert_checked.loc17 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_7.2: %i32 = converted %int_1.loc17, %.loc17_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %Foo.call.loc17: init %empty_tuple.type = call %Foo.ref.loc17(%.loc17_7.2) // CHECK:STDOUT: %Foo.ref.loc18: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1.loc18, %impl.elem0.loc18 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1.loc18, %specific_fn.loc18 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %bound_method.loc18_7.2(%int_1.loc18) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.1: %i32 = value_of_initializer %int.convert_checked.loc18 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.2: %i32 = converted %int_1.loc18, %.loc18_7.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %Foo.call.loc18: init %empty_tuple.type = call %Foo.ref.loc18(%.loc18_7.2) +// CHECK:STDOUT: %Foo.ref.loc19: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] +// CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc19_7.1: = bound_method %int_1.loc19, %impl.elem0.loc19 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc19_7.2: = bound_method %int_1.loc19, %specific_fn.loc19 [concrete = constants.%bound_method] +// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %bound_method.loc19_7.2(%int_1.loc19) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc19_7.1: %i32 = value_of_initializer %int.convert_checked.loc19 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc19_7.2: %i32 = converted %int_1.loc19, %.loc19_7.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %Foo.call.loc19: init %empty_tuple.type = call %Foo.ref.loc19(%.loc19_7.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index a9d527123e32..67612578c315 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -36,16 +37,16 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -60,9 +61,9 @@ fn Main() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,15 +81,15 @@ fn Main() { // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14_11: type = splice_block %i32.loc14_11 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_11: type = splice_block %i32.loc15_11 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc14_19: type = splice_block %i32.loc14_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_19: type = splice_block %i32.loc15_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } @@ -105,21 +106,21 @@ fn Main() { // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc17_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %int_1, %impl.elem0.loc17_7 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17_7: = specific_function %impl.elem0.loc17_7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %int_1, %specific_fn.loc17_7 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc17_7: init %i32 = call %bound_method.loc17_7.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_7.1: %i32 = value_of_initializer %int.convert_checked.loc17_7 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_7.2: %i32 = converted %int_1, %.loc17_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc17_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_10.1: = bound_method %int_2, %impl.elem0.loc17_10 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc17_10: = specific_function %impl.elem0.loc17_10, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %int_2, %specific_fn.loc17_10 [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked.loc17_10: init %i32 = call %bound_method.loc17_10.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_10.1: %i32 = value_of_initializer %int.convert_checked.loc17_10 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_10.2: %i32 = converted %int_2, %.loc17_10.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc17_7.2, %.loc17_10.2) +// CHECK:STDOUT: %impl.elem0.loc18_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1, %impl.elem0.loc18_7 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc18_7: = specific_function %impl.elem0.loc18_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1, %specific_fn.loc18_7 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc18_7: init %i32 = call %bound_method.loc18_7.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc18_7.1: %i32 = value_of_initializer %int.convert_checked.loc18_7 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc18_7.2: %i32 = converted %int_1, %.loc18_7.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %impl.elem0.loc18_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc18_10.1: = bound_method %int_2, %impl.elem0.loc18_10 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc18_10: = specific_function %impl.elem0.loc18_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_10.2: = bound_method %int_2, %specific_fn.loc18_10 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked.loc18_10: init %i32 = call %bound_method.loc18_10.2(%int_2) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc18_10.1: %i32 = value_of_initializer %int.convert_checked.loc18_10 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc18_10.2: %i32 = converted %int_2, %.loc18_10.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc18_7.2, %.loc18_10.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index 60af7d9d6487..4943ff27ac16 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -37,16 +38,16 @@ fn Main() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -61,9 +62,9 @@ fn Main() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -81,15 +82,15 @@ fn Main() { // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14_11: type = splice_block %i32.loc14_11 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_11: type = splice_block %i32.loc15_11 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc14_19: type = splice_block %i32.loc14_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_19: type = splice_block %i32.loc15_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } @@ -103,42 +104,42 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Foo.ref.loc17: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] -// CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %int_2.loc17: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc17_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_7.1: = bound_method %int_1.loc17, %impl.elem0.loc17_7 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17_7: = specific_function %impl.elem0.loc17_7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_7.2: = bound_method %int_1.loc17, %specific_fn.loc17_7 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc17_7: init %i32 = call %bound_method.loc17_7.2(%int_1.loc17) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_7.1: %i32 = value_of_initializer %int.convert_checked.loc17_7 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_7.2: %i32 = converted %int_1.loc17, %.loc17_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc17_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_10.1: = bound_method %int_2.loc17, %impl.elem0.loc17_10 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc17_10: = specific_function %impl.elem0.loc17_10, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %int_2.loc17, %specific_fn.loc17_10 [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked.loc17_10: init %i32 = call %bound_method.loc17_10.2(%int_2.loc17) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_10.1: %i32 = value_of_initializer %int.convert_checked.loc17_10 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_10.2: %i32 = converted %int_2.loc17, %.loc17_10.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %Foo.call.loc17: init %empty_tuple.type = call %Foo.ref.loc17(%.loc17_7.2, %.loc17_10.2) // CHECK:STDOUT: %Foo.ref.loc18: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0.loc18_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1.loc18, %impl.elem0.loc18_7 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc18_7: = specific_function %impl.elem0.loc18_7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18_7: = specific_function %impl.elem0.loc18_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1.loc18, %specific_fn.loc18_7 [concrete = constants.%bound_method.9a1] // CHECK:STDOUT: %int.convert_checked.loc18_7: init %i32 = call %bound_method.loc18_7.2(%int_1.loc18) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.1: %i32 = value_of_initializer %int.convert_checked.loc18_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.2: %i32 = converted %int_1.loc18, %.loc18_7.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %impl.elem0.loc18_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc18_10.1: = bound_method %int_2.loc18, %impl.elem0.loc18_10 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc18_10: = specific_function %impl.elem0.loc18_10, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc18_10: = specific_function %impl.elem0.loc18_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_10.2: = bound_method %int_2.loc18, %specific_fn.loc18_10 [concrete = constants.%bound_method.b92] // CHECK:STDOUT: %int.convert_checked.loc18_10: init %i32 = call %bound_method.loc18_10.2(%int_2.loc18) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc18_10.1: %i32 = value_of_initializer %int.convert_checked.loc18_10 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc18_10.2: %i32 = converted %int_2.loc18, %.loc18_10.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %Foo.call.loc18: init %empty_tuple.type = call %Foo.ref.loc18(%.loc18_7.2, %.loc18_10.2) +// CHECK:STDOUT: %Foo.ref.loc19: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] +// CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] +// CHECK:STDOUT: %int_2.loc19: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] +// CHECK:STDOUT: %impl.elem0.loc19_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc19_7.1: = bound_method %int_1.loc19, %impl.elem0.loc19_7 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc19_7: = specific_function %impl.elem0.loc19_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc19_7.2: = bound_method %int_1.loc19, %specific_fn.loc19_7 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc19_7: init %i32 = call %bound_method.loc19_7.2(%int_1.loc19) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc19_7.1: %i32 = value_of_initializer %int.convert_checked.loc19_7 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc19_7.2: %i32 = converted %int_1.loc19, %.loc19_7.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %impl.elem0.loc19_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc19_10.1: = bound_method %int_2.loc19, %impl.elem0.loc19_10 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc19_10: = specific_function %impl.elem0.loc19_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc19_10.2: = bound_method %int_2.loc19, %specific_fn.loc19_10 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked.loc19_10: init %i32 = call %bound_method.loc19_10.2(%int_2.loc19) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc19_10.1: %i32 = value_of_initializer %int.convert_checked.loc19_10 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc19_10.2: %i32 = converted %int_2.loc19, %.loc19_10.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %Foo.call.loc19: init %empty_tuple.type = call %Foo.ref.loc19(%.loc19_7.2, %.loc19_10.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/params_zero.carbon b/toolchain/check/testdata/function/call/params_zero.carbon index b015d82e7624..0431ccb0cba3 100644 --- a/toolchain/check/testdata/function/call/params_zero.carbon +++ b/toolchain/check/testdata/function/call/params_zero.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index 4b389f5a820a..c8bf6adf16bb 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -51,16 +52,16 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.3fa, @F(%F.8b3) [symbolic] @@ -73,9 +74,9 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -166,7 +167,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_29.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_29.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc8_29.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc8_29.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] diff --git a/toolchain/check/testdata/function/call/return_implicit.carbon b/toolchain/check/testdata/function/call/return_implicit.carbon index e197bc93a67f..486c9bf95a0b 100644 --- a/toolchain/check/testdata/function/call/return_implicit.carbon +++ b/toolchain/check/testdata/function/call/return_implicit.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/export_name.carbon b/toolchain/check/testdata/function/declaration/export_name.carbon index 189f34c25427..98da9e7f45f5 100644 --- a/toolchain/check/testdata/function/declaration/export_name.carbon +++ b/toolchain/check/testdata/function/declaration/export_name.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/extern.carbon b/toolchain/check/testdata/function/declaration/extern.carbon index 0a59ba2735c0..c9c933966959 100644 --- a/toolchain/check/testdata/function/declaration/extern.carbon +++ b/toolchain/check/testdata/function/declaration/extern.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/extern_library.carbon b/toolchain/check/testdata/function/declaration/extern_library.carbon index 3bdd562d23ce..8dd5b411cfeb 100644 --- a/toolchain/check/testdata/function/declaration/extern_library.carbon +++ b/toolchain/check/testdata/function/declaration/extern_library.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/extern_library_for_default.carbon b/toolchain/check/testdata/function/declaration/extern_library_for_default.carbon index cda7a5d9c236..b996c69c64ed 100644 --- a/toolchain/check/testdata/function/declaration/extern_library_for_default.carbon +++ b/toolchain/check/testdata/function/declaration/extern_library_for_default.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/extern_library_from_default.carbon b/toolchain/check/testdata/function/declaration/extern_library_from_default.carbon index f3fb3a0cf980..ae911fec943c 100644 --- a/toolchain/check/testdata/function/declaration/extern_library_from_default.carbon +++ b/toolchain/check/testdata/function/declaration/extern_library_from_default.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon b/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon index c39606ccb1b7..fdabb8eca207 100644 --- a/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon +++ b/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/fail_modifiers.carbon b/toolchain/check/testdata/function/declaration/fail_modifiers.carbon index dbc85282c269..9d791592e4b8 100644 --- a/toolchain/check/testdata/function/declaration/fail_modifiers.carbon +++ b/toolchain/check/testdata/function/declaration/fail_modifiers.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon index ba3773487edc..f75b21eb0fea 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -35,7 +36,7 @@ fn F(n: i32, a: array(i32, n)*); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,15 +52,15 @@ fn F(n: i32, a: array(i32, n)*); // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %n.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc18_9: type = splice_block %i32.loc18_9 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc18_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc19_9: type = splice_block %i32.loc19_9 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %a.param: = value_param call_param1 -// CHECK:STDOUT: %.loc18_30: type = splice_block %ptr [concrete = ] { -// CHECK:STDOUT: %int_32.loc18_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc19_30: type = splice_block %ptr [concrete = ] { +// CHECK:STDOUT: %int_32.loc19_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %ptr: type = ptr_type [concrete = ] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon index e8cce947721c..28d37e52590f 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -38,7 +39,7 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -48,25 +49,25 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %n.patt.loc21_6: %pattern_type.7ce = binding_pattern n [concrete] -// CHECK:STDOUT: %n.param_patt.loc21_7: %pattern_type.7ce = value_param_pattern %n.patt.loc21_6, call_param0 [concrete] -// CHECK:STDOUT: %n.patt.loc21_14: %pattern_type.7ce = binding_pattern n [concrete] -// CHECK:STDOUT: %n.param_patt.loc21_15: %pattern_type.7ce = value_param_pattern %n.patt.loc21_14, call_param1 [concrete] +// CHECK:STDOUT: %n.patt.loc22_6: %pattern_type.7ce = binding_pattern n [concrete] +// CHECK:STDOUT: %n.param_patt.loc22_7: %pattern_type.7ce = value_param_pattern %n.patt.loc22_6, call_param0 [concrete] +// CHECK:STDOUT: %n.patt.loc22_14: %pattern_type.7ce = binding_pattern n [concrete] +// CHECK:STDOUT: %n.param_patt.loc22_15: %pattern_type.7ce = value_param_pattern %n.patt.loc22_14, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %n.param.loc21_7: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc21_9: type = splice_block %i32.loc21_9 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc21_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %n.param.loc22_7: %i32 = value_param call_param0 +// CHECK:STDOUT: %.loc22_9: type = splice_block %i32.loc22_9 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc22_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc22_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %n.loc21_6: %i32 = bind_name n, %n.param.loc21_7 -// CHECK:STDOUT: %n.param.loc21_15: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc21_17: type = splice_block %i32.loc21_17 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc21_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %n.loc22_6: %i32 = bind_name n, %n.param.loc22_7 +// CHECK:STDOUT: %n.param.loc22_15: %i32 = value_param call_param1 +// CHECK:STDOUT: %.loc22_17: type = splice_block %i32.loc22_17 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc22_17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc22_17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %n.loc21_14: %i32 = bind_name n, %n.param.loc21_15 +// CHECK:STDOUT: %n.loc22_14: %i32 = bind_name n, %n.param.loc22_15 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n.param.loc21_7: %i32, %n.param.loc21_15: %i32); +// CHECK:STDOUT: fn @F(%n.param.loc22_7: %i32, %n.param.loc22_15: %i32); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/fail_pattern_in_signature.carbon b/toolchain/check/testdata/function/declaration/fail_pattern_in_signature.carbon index 5a39dc46ec78..cacb75c7b89a 100644 --- a/toolchain/check/testdata/function/declaration/fail_pattern_in_signature.carbon +++ b/toolchain/check/testdata/function/declaration/fail_pattern_in_signature.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -37,14 +38,14 @@ fn F((a: {}, b: {}), c: {}); // CHECK:STDOUT: %a.param_patt: %pattern_type.a96 = value_param_pattern %a.patt, call_param [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.a96 = binding_pattern b [concrete] // CHECK:STDOUT: %b.param_patt: %pattern_type.a96 = value_param_pattern %b.patt, call_param [concrete] -// CHECK:STDOUT: %.loc18_19: %pattern_type.de4 = tuple_pattern (%a.param_patt, %b.param_patt) [concrete] +// CHECK:STDOUT: %.loc19_19: %pattern_type.de4 = tuple_pattern (%a.param_patt, %b.param_patt) [concrete] // CHECK:STDOUT: %c.patt: %pattern_type.a96 = binding_pattern c [concrete] // CHECK:STDOUT: %c.param_patt: %pattern_type.a96 = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %c.param: %empty_struct_type = value_param call_param0 -// CHECK:STDOUT: %.loc18_26.1: type = splice_block %.loc18_26.3 [concrete = constants.%empty_struct_type] { -// CHECK:STDOUT: %.loc18_26.2: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc18_26.3: type = converted %.loc18_26.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc19_26.1: type = splice_block %.loc19_26.3 [concrete = constants.%empty_struct_type] { +// CHECK:STDOUT: %.loc19_26.2: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc19_26.3: type = converted %.loc19_26.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: } // CHECK:STDOUT: %c: %empty_struct_type = bind_name c, %c.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/fail_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_redecl.carbon index eb765877fbd9..8336b11b7810 100644 --- a/toolchain/check/testdata/function/declaration/fail_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_redecl.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -84,57 +85,57 @@ fn E() {} // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .A = %A.decl.loc14 -// CHECK:STDOUT: .B = %B.decl.loc24 -// CHECK:STDOUT: .C = %C.decl.loc34 -// CHECK:STDOUT: .D = %D.decl.loc44 -// CHECK:STDOUT: .E = %E.decl.loc54 +// CHECK:STDOUT: .A = %A.decl.loc15 +// CHECK:STDOUT: .B = %B.decl.loc25 +// CHECK:STDOUT: .C = %C.decl.loc35 +// CHECK:STDOUT: .D = %D.decl.loc45 +// CHECK:STDOUT: .E = %E.decl.loc55 // CHECK:STDOUT: } -// CHECK:STDOUT: %A.decl.loc14: %A.type = fn_decl @A [concrete = constants.%A] {} {} -// CHECK:STDOUT: %A.decl.loc22: %A.type = fn_decl @A [concrete = constants.%A] {} {} -// CHECK:STDOUT: %B.decl.loc24: %B.type = fn_decl @B [concrete = constants.%B] { +// CHECK:STDOUT: %A.decl.loc15: %A.type = fn_decl @A [concrete = constants.%A] {} {} +// CHECK:STDOUT: %A.decl.loc23: %A.type = fn_decl @A [concrete = constants.%A] {} {} +// CHECK:STDOUT: %B.decl.loc25: %B.type = fn_decl @B [concrete = constants.%B] { // CHECK:STDOUT: %x.patt: %pattern_type = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %x.param.loc24: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc24_10.1: type = splice_block %.loc24_10.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc24_10.2: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc24_10.3: type = converted %.loc24_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param.loc25: %empty_tuple.type = value_param call_param0 +// CHECK:STDOUT: %.loc25_10.1: type = splice_block %.loc25_10.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc25_10.2: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc25_10.3: type = converted %.loc25_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %x.loc24: %empty_tuple.type = bind_name x, %x.param.loc24 +// CHECK:STDOUT: %x.loc25: %empty_tuple.type = bind_name x, %x.param.loc25 // CHECK:STDOUT: } -// CHECK:STDOUT: %B.decl.loc32: %B.type = fn_decl @B [concrete = constants.%B] { +// CHECK:STDOUT: %B.decl.loc33: %B.type = fn_decl @B [concrete = constants.%B] { // CHECK:STDOUT: %x.patt: %pattern_type = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %x.param.loc32: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc32_10.1: type = splice_block %.loc32_10.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc32_10.2: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc32_10.3: type = converted %.loc32_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %x.param.loc33: %empty_tuple.type = value_param call_param0 +// CHECK:STDOUT: %.loc33_10.1: type = splice_block %.loc33_10.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc33_10.2: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc33_10.3: type = converted %.loc33_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %x.loc32: %empty_tuple.type = bind_name x, %x.param.loc32 +// CHECK:STDOUT: %x.loc33: %empty_tuple.type = bind_name x, %x.param.loc33 // CHECK:STDOUT: } -// CHECK:STDOUT: %C.decl.loc34: %C.type.de0bfe.1 = fn_decl @C.1 [concrete = constants.%C.1b0370.1] {} {} -// CHECK:STDOUT: %C.decl.loc42: %C.type.de0bfe.2 = fn_decl @C.2 [concrete = constants.%C.1b0370.2] { +// CHECK:STDOUT: %C.decl.loc35: %C.type.de0bfe.1 = fn_decl @C.1 [concrete = constants.%C.1b0370.1] {} {} +// CHECK:STDOUT: %C.decl.loc43: %C.type.de0bfe.2 = fn_decl @C.2 [concrete = constants.%C.1b0370.2] { // CHECK:STDOUT: %x.patt: %pattern_type = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc42_10.1: type = splice_block %.loc42_10.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc42_10.2: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc42_10.3: type = converted %.loc42_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc43_10.1: type = splice_block %.loc43_10.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc43_10.2: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc43_10.3: type = converted %.loc43_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %D.decl.loc44: %D.type = fn_decl @D [concrete = constants.%D] {} {} -// CHECK:STDOUT: %D.decl.loc52: %D.type = fn_decl @D [concrete = constants.%D] {} {} -// CHECK:STDOUT: %E.decl.loc54: %E.type.851869.1 = fn_decl @E.1 [concrete = constants.%E.237d29.1] {} {} -// CHECK:STDOUT: %E.decl.loc62: %E.type.851869.2 = fn_decl @E.2 [concrete = constants.%E.237d29.2] {} {} +// CHECK:STDOUT: %D.decl.loc45: %D.type = fn_decl @D [concrete = constants.%D] {} {} +// CHECK:STDOUT: %D.decl.loc53: %D.type = fn_decl @D [concrete = constants.%D] {} {} +// CHECK:STDOUT: %E.decl.loc55: %E.type.851869.1 = fn_decl @E.1 [concrete = constants.%E.237d29.1] {} {} +// CHECK:STDOUT: %E.decl.loc63: %E.type.851869.2 = fn_decl @E.2 [concrete = constants.%E.237d29.2] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @B(%x.param.loc24: %empty_tuple.type); +// CHECK:STDOUT: fn @B(%x.param.loc25: %empty_tuple.type); // CHECK:STDOUT: // CHECK:STDOUT: fn @C.1(); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/fail_todo_no_params.carbon b/toolchain/check/testdata/function/declaration/fail_todo_no_params.carbon index 8c4e8cdb3a8b..7dac758639b0 100644 --- a/toolchain/check/testdata/function/declaration/fail_todo_no_params.carbon +++ b/toolchain/check/testdata/function/declaration/fail_todo_no_params.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/implicit_import.carbon b/toolchain/check/testdata/function/declaration/implicit_import.carbon index 21022cf25094..f61030919a55 100644 --- a/toolchain/check/testdata/function/declaration/implicit_import.carbon +++ b/toolchain/check/testdata/function/declaration/implicit_import.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/no_definition_in_impl_file.carbon b/toolchain/check/testdata/function/declaration/no_definition_in_impl_file.carbon index 8be262780c05..4eb2714faf5b 100644 --- a/toolchain/check/testdata/function/declaration/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/function/declaration/no_definition_in_impl_file.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/declaration/param_same_name.carbon b/toolchain/check/testdata/function/declaration/param_same_name.carbon index 22972c3abb38..7b74ad701b60 100644 --- a/toolchain/check/testdata/function/declaration/param_same_name.carbon +++ b/toolchain/check/testdata/function/declaration/param_same_name.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -35,7 +36,7 @@ fn G(a: i32); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,7 +51,7 @@ fn G(a: i32); // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc15: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } @@ -61,7 +62,7 @@ fn G(a: i32); // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc16: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc17: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/simple.carbon b/toolchain/check/testdata/function/declaration/simple.carbon index 06d3d9e34a84..f26d5ae06474 100644 --- a/toolchain/check/testdata/function/declaration/simple.carbon +++ b/toolchain/check/testdata/function/declaration/simple.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/definition/basics.carbon b/toolchain/check/testdata/function/definition/basics.carbon index dde1e82a8247..7aa3ce31849c 100644 --- a/toolchain/check/testdata/function/definition/basics.carbon +++ b/toolchain/check/testdata/function/definition/basics.carbon @@ -3,8 +3,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/definition/extern.carbon b/toolchain/check/testdata/function/definition/extern.carbon index 0fbc53409bda..4df48bd7384a 100644 --- a/toolchain/check/testdata/function/definition/extern.carbon +++ b/toolchain/check/testdata/function/definition/extern.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/definition/extern_library.carbon b/toolchain/check/testdata/function/definition/extern_library.carbon index 6b96a175538d..6d1516acd165 100644 --- a/toolchain/check/testdata/function/definition/extern_library.carbon +++ b/toolchain/check/testdata/function/definition/extern_library.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/definition/fail_decl_param_mismatch.carbon b/toolchain/check/testdata/function/definition/fail_decl_param_mismatch.carbon index 5aa52c17259a..d22d728c0140 100644 --- a/toolchain/check/testdata/function/definition/fail_decl_param_mismatch.carbon +++ b/toolchain/check/testdata/function/definition/fail_decl_param_mismatch.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -105,90 +106,90 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .F = %F.decl.loc14 -// CHECK:STDOUT: .G = %G.decl.loc24 -// CHECK:STDOUT: .H = %H.decl.loc34 -// CHECK:STDOUT: .I = %I.decl.loc41 -// CHECK:STDOUT: .J = %J.decl.loc51 -// CHECK:STDOUT: .K = %K.decl.loc61 +// CHECK:STDOUT: .F = %F.decl.loc15 +// CHECK:STDOUT: .G = %G.decl.loc25 +// CHECK:STDOUT: .H = %H.decl.loc35 +// CHECK:STDOUT: .I = %I.decl.loc42 +// CHECK:STDOUT: .J = %J.decl.loc52 +// CHECK:STDOUT: .K = %K.decl.loc62 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc14: %F.type.b25846.1 = fn_decl @F.1 [concrete = constants.%F.c41931.1] {} {} -// CHECK:STDOUT: %F.decl.loc22: %F.type.b25846.2 = fn_decl @F.2 [concrete = constants.%F.c41931.2] { +// CHECK:STDOUT: %F.decl.loc15: %F.type.b25846.1 = fn_decl @F.1 [concrete = constants.%F.c41931.1] {} {} +// CHECK:STDOUT: %F.decl.loc23: %F.type.b25846.2 = fn_decl @F.2 [concrete = constants.%F.c41931.2] { // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.cb1 = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc22_10.1: type = splice_block %.loc22_10.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc22_10.2: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc22_10.3: type = converted %.loc22_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc23_10.1: type = splice_block %.loc23_10.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc23_10.2: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc23_10.3: type = converted %.loc23_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl.loc24: %G.type.9f9306.1 = fn_decl @G.1 [concrete = constants.%G.57b67a.1] { +// CHECK:STDOUT: %G.decl.loc25: %G.type.9f9306.1 = fn_decl @G.1 [concrete = constants.%G.57b67a.1] { // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.cb1 = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc24_10.1: type = splice_block %.loc24_10.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc24_10.2: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc24_10.3: type = converted %.loc24_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc25_10.1: type = splice_block %.loc25_10.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc25_10.2: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc25_10.3: type = converted %.loc25_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl.loc32: %G.type.9f9306.2 = fn_decl @G.2 [concrete = constants.%G.57b67a.2] {} {} -// CHECK:STDOUT: %H.decl.loc34: %H.type.6826c6.1 = fn_decl @H.1 [concrete = constants.%H.8a6545.1] { +// CHECK:STDOUT: %G.decl.loc33: %G.type.9f9306.2 = fn_decl @G.2 [concrete = constants.%G.57b67a.2] {} {} +// CHECK:STDOUT: %H.decl.loc35: %H.type.6826c6.1 = fn_decl @H.1 [concrete = constants.%H.8a6545.1] { // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.cb1 = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc34_10.1: type = splice_block %.loc34_10.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc34_10.2: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc34_10.3: type = converted %.loc34_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc35_10.1: type = splice_block %.loc35_10.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc35_10.2: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc35_10.3: type = converted %.loc35_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %H.decl.loc39: %H.type.6826c6.2 = fn_decl @H.2 [concrete = constants.%H.8a6545.2] { +// CHECK:STDOUT: %H.decl.loc40: %H.type.6826c6.2 = fn_decl @H.2 [concrete = constants.%H.8a6545.2] { // CHECK:STDOUT: %x.patt: = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: = value_param call_param0 // CHECK:STDOUT: %x: = bind_name x, %x.param [concrete = ] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl.loc41: %I.type.af49c4.1 = fn_decl @I.1 [concrete = constants.%I.58e4ec.1] {} {} -// CHECK:STDOUT: %I.decl.loc49: %I.type.af49c4.2 = fn_decl @I.2 [concrete = constants.%I.58e4ec.2] { +// CHECK:STDOUT: %I.decl.loc42: %I.type.af49c4.1 = fn_decl @I.1 [concrete = constants.%I.58e4ec.1] {} {} +// CHECK:STDOUT: %I.decl.loc50: %I.type.af49c4.2 = fn_decl @I.2 [concrete = constants.%I.58e4ec.2] { // CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc49_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc49_12.2: type = converted %.loc49_12.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc50_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc50_12.2: type = converted %.loc50_12.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %J.decl.loc51: %J.type.8e2c84.1 = fn_decl @J.1 [concrete = constants.%J.3662e8.1] { +// CHECK:STDOUT: %J.decl.loc52: %J.type.8e2c84.1 = fn_decl @J.1 [concrete = constants.%J.3662e8.1] { // CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc51_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc51_12.2: type = converted %.loc51_12.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc52_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc52_12.2: type = converted %.loc52_12.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %J.decl.loc59: %J.type.8e2c84.2 = fn_decl @J.2 [concrete = constants.%J.3662e8.2] {} {} -// CHECK:STDOUT: %K.decl.loc61: %K.type.6cc1c5.1 = fn_decl @K.1 [concrete = constants.%K.460d95.1] { +// CHECK:STDOUT: %J.decl.loc60: %J.type.8e2c84.2 = fn_decl @J.2 [concrete = constants.%J.3662e8.2] {} {} +// CHECK:STDOUT: %K.decl.loc62: %K.type.6cc1c5.1 = fn_decl @K.1 [concrete = constants.%K.460d95.1] { // CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc61_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc61_12.2: type = converted %.loc61_12.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc62_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc62_12.2: type = converted %.loc62_12.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %K.decl.loc69: %K.type.6cc1c5.2 = fn_decl @K.2 [concrete = constants.%K.460d95.2] { +// CHECK:STDOUT: %K.decl.loc70: %K.type.6cc1c5.2 = fn_decl @K.2 [concrete = constants.%K.460d95.2] { // CHECK:STDOUT: %return.patt: %pattern_type.a96 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.a96 = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc69_12.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc69_12.2: type = converted %.loc69_12.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc70_12.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc70_12.2: type = converted %.loc70_12.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } @@ -219,10 +220,10 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: // CHECK:STDOUT: fn @I.2() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc49_24: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc50_24: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc49_25: %empty_tuple.type = converted %.loc49_24, %empty_tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: return %.loc49_25 +// CHECK:STDOUT: %.loc50_25: %empty_tuple.type = converted %.loc50_24, %empty_tuple [concrete = constants.%empty_tuple] +// CHECK:STDOUT: return %.loc50_25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @J.1() -> %empty_tuple.type; @@ -236,9 +237,9 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: // CHECK:STDOUT: fn @K.2() -> %empty_struct_type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc69_24: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc70_24: %empty_struct_type = struct_literal () // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc69_25: %empty_struct_type = converted %.loc69_24, %empty_struct [concrete = constants.%empty_struct] -// CHECK:STDOUT: return %.loc69_25 +// CHECK:STDOUT: %.loc70_25: %empty_struct_type = converted %.loc70_24, %empty_struct [concrete = constants.%empty_struct] +// CHECK:STDOUT: return %.loc70_25 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/fail_local_decl.carbon b/toolchain/check/testdata/function/definition/fail_local_decl.carbon index 2229263d0fe8..4c2f41301762 100644 --- a/toolchain/check/testdata/function/definition/fail_local_decl.carbon +++ b/toolchain/check/testdata/function/definition/fail_local_decl.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/definition/fail_redef.carbon b/toolchain/check/testdata/function/definition/fail_redef.carbon index 900832ec08f8..a4e7a5a9b55a 100644 --- a/toolchain/check/testdata/function/definition/fail_redef.carbon +++ b/toolchain/check/testdata/function/definition/fail_redef.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -32,10 +33,10 @@ fn F() {} // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .F = %F.decl.loc14 +// CHECK:STDOUT: .F = %F.decl.loc15 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc14: %F.type.b25846.1 = fn_decl @F.1 [concrete = constants.%F.c41931.1] {} {} -// CHECK:STDOUT: %F.decl.loc22: %F.type.b25846.2 = fn_decl @F.2 [concrete = constants.%F.c41931.2] {} {} +// CHECK:STDOUT: %F.decl.loc15: %F.type.b25846.1 = fn_decl @F.1 [concrete = constants.%F.c41931.1] {} {} +// CHECK:STDOUT: %F.decl.loc23: %F.type.b25846.2 = fn_decl @F.2 [concrete = constants.%F.c41931.2] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1() { diff --git a/toolchain/check/testdata/function/definition/forward_decl.carbon b/toolchain/check/testdata/function/definition/forward_decl.carbon index 3ac680f6be3c..c5221fc056c3 100644 --- a/toolchain/check/testdata/function/definition/forward_decl.carbon +++ b/toolchain/check/testdata/function/definition/forward_decl.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -24,10 +25,10 @@ fn Foo() {} // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Foo = %Foo.decl.loc14 +// CHECK:STDOUT: .Foo = %Foo.decl.loc15 // CHECK:STDOUT: } -// CHECK:STDOUT: %Foo.decl.loc14: %Foo.type = fn_decl @Foo [concrete = constants.%Foo] {} {} -// CHECK:STDOUT: %Foo.decl.loc16: %Foo.type = fn_decl @Foo [concrete = constants.%Foo] {} {} +// CHECK:STDOUT: %Foo.decl.loc15: %Foo.type = fn_decl @Foo [concrete = constants.%Foo] {} {} +// CHECK:STDOUT: %Foo.decl.loc17: %Foo.type = fn_decl @Foo [concrete = constants.%Foo] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() { diff --git a/toolchain/check/testdata/function/definition/implicit_import.carbon b/toolchain/check/testdata/function/definition/implicit_import.carbon index 66d083b2a74b..18c8e1701f82 100644 --- a/toolchain/check/testdata/function/definition/implicit_import.carbon +++ b/toolchain/check/testdata/function/definition/implicit_import.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index 596116db595c..389eaa183050 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -143,7 +144,7 @@ fn D() {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -264,16 +265,16 @@ fn D() {} // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [concrete] @@ -296,9 +297,9 @@ fn D() {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -363,7 +364,7 @@ fn D() {} // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc7_16.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_16.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %bound_method.loc7_16.2(%int_1.loc7) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc7_16.1: %i32 = value_of_initializer %int.convert_checked.loc7 [concrete = constants.%int_1.5d2] @@ -375,7 +376,7 @@ fn D() {} // CHECK:STDOUT: %.loc8_25.1: %tuple.type.985 = tuple_literal (%int_1.loc8) // CHECK:STDOUT: %impl.elem0.loc8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_25.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %bound_method.loc8_25.2(%int_1.loc8) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_25.2: %i32 = value_of_initializer %int.convert_checked.loc8 [concrete = constants.%int_1.5d2] @@ -411,7 +412,7 @@ fn D() {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/function/definition/import_access.carbon b/toolchain/check/testdata/function/definition/import_access.carbon index 52d7a2a05daa..c6b0a86bdd9e 100644 --- a/toolchain/check/testdata/function/definition/import_access.carbon +++ b/toolchain/check/testdata/function/definition/import_access.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -146,19 +147,10 @@ private fn Redecl() {} // CHECK:STDOUT: %Def: %Def.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .Def [private] = %Def.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Def.decl: %Def.type = fn_decl @Def [concrete = constants.%Def] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -174,19 +166,10 @@ private fn Redecl() {} // CHECK:STDOUT: %ForwardWithDef: %ForwardWithDef.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .ForwardWithDef [private] = %ForwardWithDef.decl.loc4 // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ForwardWithDef.decl.loc4: %ForwardWithDef.type = fn_decl @ForwardWithDef [concrete = constants.%ForwardWithDef] {} {} // CHECK:STDOUT: %ForwardWithDef.decl.loc6: %ForwardWithDef.type = fn_decl @ForwardWithDef [concrete = constants.%ForwardWithDef] {} {} // CHECK:STDOUT: } @@ -203,19 +186,10 @@ private fn Redecl() {} // CHECK:STDOUT: %Forward: %Forward.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .Forward [private] = %Forward.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Forward.decl: %Forward.type = fn_decl @Forward [concrete = constants.%Forward] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -232,21 +206,15 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Test.Def: %Def.type = import_ref Test//def, Def, loaded [concrete = constants.%Def] -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Def [private] = imports.%Test.Def -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type = binding_pattern f [concrete] // CHECK:STDOUT: %f.var_patt: %pattern_type = var_pattern %f.patt [concrete] @@ -276,20 +244,11 @@ private fn Redecl() {} // CHECK:STDOUT: %pattern_type: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .f = %f // CHECK:STDOUT: .Def = // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type = binding_pattern f [concrete] @@ -318,10 +277,6 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace file.%Test.import, [concrete] { // CHECK:STDOUT: .Def = // CHECK:STDOUT: import Test//def @@ -330,11 +285,9 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .Test = imports.%Test // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type = binding_pattern f [concrete] @@ -367,21 +320,15 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Test.ForwardWithDef: %ForwardWithDef.type = import_ref Test//forward_with_def, ForwardWithDef, loaded [concrete = constants.%ForwardWithDef] -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .ForwardWithDef [private] = imports.%Test.ForwardWithDef -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type = binding_pattern f [concrete] // CHECK:STDOUT: %f.var_patt: %pattern_type = var_pattern %f.patt [concrete] @@ -411,20 +358,11 @@ private fn Redecl() {} // CHECK:STDOUT: %pattern_type: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .f = %f // CHECK:STDOUT: .ForwardWithDef = // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type = binding_pattern f [concrete] @@ -453,10 +391,6 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace file.%Test.import, [concrete] { // CHECK:STDOUT: .ForwardWithDef = // CHECK:STDOUT: import Test//forward_with_def @@ -465,11 +399,9 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .Test = imports.%Test // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type = binding_pattern f [concrete] @@ -502,21 +434,15 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Test.Forward: %Forward.type = import_ref Test//forward, Forward, loaded [concrete = constants.%Forward] -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Forward [private] = %Forward.decl -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type = binding_pattern f [concrete] // CHECK:STDOUT: %f.var_patt: %pattern_type = var_pattern %f.patt [concrete] @@ -550,20 +476,11 @@ private fn Redecl() {} // CHECK:STDOUT: %pattern_type: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .f = %f // CHECK:STDOUT: .Forward = // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type = binding_pattern f [concrete] @@ -592,10 +509,6 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } // CHECK:STDOUT: %Test: = namespace file.%Test.import, [concrete] { // CHECK:STDOUT: .Forward = // CHECK:STDOUT: import Test//forward @@ -604,11 +517,9 @@ private fn Redecl() {} // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .Test = imports.%Test // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type = binding_pattern f [concrete] @@ -637,19 +548,10 @@ private fn Redecl() {} // CHECK:STDOUT: %Redecl: %Redecl.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .Redecl [private] = %Redecl.decl.loc4 // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Redecl.decl.loc4: %Redecl.type = fn_decl @Redecl [concrete = constants.%Redecl] {} {} // CHECK:STDOUT: %Redecl.decl.loc6: %Redecl.type = fn_decl @Redecl [concrete = constants.%Redecl] {} {} // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/order.carbon b/toolchain/check/testdata/function/definition/order.carbon index 4d249f324954..d5a79aca8ca5 100644 --- a/toolchain/check/testdata/function/definition/order.carbon +++ b/toolchain/check/testdata/function/definition/order.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/definition/params_one.carbon b/toolchain/check/testdata/function/definition/params_one.carbon index 4bd117698db3..d9269a4ab1e6 100644 --- a/toolchain/check/testdata/function/definition/params_one.carbon +++ b/toolchain/check/testdata/function/definition/params_one.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -31,7 +32,7 @@ fn Foo(a: i32) {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -45,7 +46,7 @@ fn Foo(a: i32) {} // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc15: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_one_comma.carbon b/toolchain/check/testdata/function/definition/params_one_comma.carbon index cde318623302..d9b07abc4e34 100644 --- a/toolchain/check/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_one_comma.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -31,7 +32,7 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -45,7 +46,7 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc15: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_two.carbon b/toolchain/check/testdata/function/definition/params_two.carbon index 17a4e34d8a41..4b80b4d904bf 100644 --- a/toolchain/check/testdata/function/definition/params_two.carbon +++ b/toolchain/check/testdata/function/definition/params_two.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -31,7 +32,7 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -47,15 +48,15 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14_11: type = splice_block %i32.loc14_11 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_11: type = splice_block %i32.loc15_11 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc14_19: type = splice_block %i32.loc14_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_19: type = splice_block %i32.loc15_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_two_comma.carbon b/toolchain/check/testdata/function/definition/params_two_comma.carbon index 4118c75e762b..048f4462aa89 100644 --- a/toolchain/check/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_two_comma.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -31,7 +32,7 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -47,15 +48,15 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %a.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc14_11: type = splice_block %i32.loc14_11 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_11: type = splice_block %i32.loc15_11 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc14_19: type = splice_block %i32.loc14_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_19: type = splice_block %i32.loc15_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_zero.carbon b/toolchain/check/testdata/function/definition/params_zero.carbon index fd10d2bf759d..09f4ff8a8ca5 100644 --- a/toolchain/check/testdata/function/definition/params_zero.carbon +++ b/toolchain/check/testdata/function/definition/params_zero.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/definition/syntactic_merge.carbon b/toolchain/check/testdata/function/definition/syntactic_merge.carbon index 162972150260..43d263df6e97 100644 --- a/toolchain/check/testdata/function/definition/syntactic_merge.carbon +++ b/toolchain/check/testdata/function/definition/syntactic_merge.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/function/generic/forward_decl.carbon b/toolchain/check/testdata/function/generic/forward_decl.carbon index 56a93269d134..5090712724f1 100644 --- a/toolchain/check/testdata/function/generic/forward_decl.carbon +++ b/toolchain/check/testdata/function/generic/forward_decl.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/generic/call_basic_depth.carbon b/toolchain/check/testdata/generic/call_basic_depth.carbon index c2780ac5a423..6962377190ba 100644 --- a/toolchain/check/testdata/generic/call_basic_depth.carbon +++ b/toolchain/check/testdata/generic/call_basic_depth.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -47,26 +48,26 @@ fn M() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Cfn.type: type = fn_type @Cfn [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Cfn: %Cfn.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] -// CHECK:STDOUT: %F.specific_fn.ef1: = specific_function %F, @F(%T.8b3) [symbolic] +// CHECK:STDOUT: %F.specific_fn.ef1: = specific_function %F, @F(%T) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %H.specific_fn.1ed: = specific_function %H, @H(%T.8b3) [symbolic] -// CHECK:STDOUT: %Cfn.specific_fn.53f: = specific_function %Cfn, @Cfn(%T.8b3) [symbolic] +// CHECK:STDOUT: %H.specific_fn.1ed: = specific_function %H, @H(%T) [symbolic] +// CHECK:STDOUT: %Cfn.specific_fn.53f: = specific_function %Cfn, @Cfn(%T) [symbolic] // CHECK:STDOUT: %M.type: type = fn_type @M [concrete] -// CHECK:STDOUT: %M.e98: %M.type = struct_value () [concrete] +// CHECK:STDOUT: %M: %M.type = struct_value () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -79,16 +80,16 @@ fn M() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %F.specific_fn.501: = specific_function %F, @F(%i32) [concrete] @@ -104,9 +105,9 @@ fn M() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -126,10 +127,10 @@ fn M() { // CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @F.%pattern_type (%pattern_type.7dcd0a.1) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc19_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %x.param: @F.%T.loc19_6.2 (%T.8b3) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %x: @F.%T.loc19_6.2 (%T.8b3) = bind_name x, %x.param +// CHECK:STDOUT: %T.loc20_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_6.2 (constants.%T)] +// CHECK:STDOUT: %x.param: @F.%T.loc20_6.2 (%T) = value_param call_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_6.1 [symbolic = %T.loc20_6.2 (constants.%T)] +// CHECK:STDOUT: %x: @F.%T.loc20_6.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -138,13 +139,13 @@ fn M() { // CHECK:STDOUT: %return.patt: @H.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @H.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc22_25: type = name_ref T, %T.loc22_6.1 [symbolic = %T.loc22_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %T.loc22_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %x.param: @H.%T.loc22_6.2 (%T.8b3) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc22_19: type = name_ref T, %T.loc22_6.1 [symbolic = %T.loc22_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %x: @H.%T.loc22_6.2 (%T.8b3) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @H.%T.loc22_6.2 (%T.8b3) = out_param call_param1 -// CHECK:STDOUT: %return: ref @H.%T.loc22_6.2 (%T.8b3) = return_slot %return.param +// CHECK:STDOUT: %T.ref.loc23_25: type = name_ref T, %T.loc23_6.1 [symbolic = %T.loc23_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc23_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_6.2 (constants.%T)] +// CHECK:STDOUT: %x.param: @H.%T.loc23_6.2 (%T) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc23_19: type = name_ref T, %T.loc23_6.1 [symbolic = %T.loc23_6.2 (constants.%T)] +// CHECK:STDOUT: %x: @H.%T.loc23_6.2 (%T) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @H.%T.loc23_6.2 (%T) = out_param call_param1 +// CHECK:STDOUT: %return: ref @H.%T.loc23_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -153,15 +154,15 @@ fn M() { // CHECK:STDOUT: %return.patt: @G.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @G.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc28_25: type = name_ref T, %T.loc28_6.1 [symbolic = %T.loc28_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %T.loc28_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %x.param: @G.%T.loc28_6.2 (%T.8b3) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc28_19: type = name_ref T, %T.loc28_6.1 [symbolic = %T.loc28_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %x: @G.%T.loc28_6.2 (%T.8b3) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @G.%T.loc28_6.2 (%T.8b3) = out_param call_param1 -// CHECK:STDOUT: %return: ref @G.%T.loc28_6.2 (%T.8b3) = return_slot %return.param +// CHECK:STDOUT: %T.ref.loc29_25: type = name_ref T, %T.loc29_6.1 [symbolic = %T.loc29_6.2 (constants.%T)] +// CHECK:STDOUT: %T.loc29_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc29_6.2 (constants.%T)] +// CHECK:STDOUT: %x.param: @G.%T.loc29_6.2 (%T) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc29_19: type = name_ref T, %T.loc29_6.1 [symbolic = %T.loc29_6.2 (constants.%T)] +// CHECK:STDOUT: %x: @G.%T.loc29_6.2 (%T) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @G.%T.loc29_6.2 (%T) = out_param call_param1 +// CHECK:STDOUT: %return: ref @G.%T.loc29_6.2 (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %M.decl: %M.type = fn_decl @M [concrete = constants.%M.e98] {} {} +// CHECK:STDOUT: %M.decl: %M.type = fn_decl @M [concrete = constants.%M] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -175,10 +176,10 @@ fn M() { // CHECK:STDOUT: %self.param: %C = value_param call_param0 // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param -// CHECK:STDOUT: %T.loc15_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T.8b3)] -// CHECK:STDOUT: %x.param: @Cfn.%T.loc15_22.1 (%T.8b3) = value_param call_param1 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_22.2 [symbolic = %T.loc15_22.1 (constants.%T.8b3)] -// CHECK:STDOUT: %x: @Cfn.%T.loc15_22.1 (%T.8b3) = bind_name x, %x.param +// CHECK:STDOUT: %T.loc16_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc16_22.1 (constants.%T)] +// CHECK:STDOUT: %x.param: @Cfn.%T.loc16_22.1 (%T) = value_param call_param1 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc16_22.2 [symbolic = %T.loc16_22.1 (constants.%T)] +// CHECK:STDOUT: %x: @Cfn.%T.loc16_22.1 (%T) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -189,71 +190,71 @@ fn M() { // CHECK:STDOUT: .Cfn = %Cfn.decl // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Cfn(%T.loc15_22.2: type) { -// CHECK:STDOUT: %T.loc15_22.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T.8b3)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc15_22.1 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] +// CHECK:STDOUT: generic fn @Cfn(%T.loc16_22.2: type) { +// CHECK:STDOUT: %T.loc16_22.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc16_22.1 (constants.%T)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc16_22.1 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc15_22.1 [symbolic = %require_complete (constants.%require_complete.4ae)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc16_22.1 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: %C, %x.param: @Cfn.%T.loc15_22.1 (%T.8b3)) { +// CHECK:STDOUT: fn(%self.param: %C, %x.param: @Cfn.%T.loc16_22.1 (%T)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc19_6.1: type) { -// CHECK:STDOUT: %T.loc19_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc19_6.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] +// CHECK:STDOUT: generic fn @F(%T.loc20_6.1: type) { +// CHECK:STDOUT: %T.loc20_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_6.2 (constants.%T)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc20_6.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc19_6.2 [symbolic = %require_complete (constants.%require_complete.4ae)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc20_6.2 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%T.loc19_6.2 (%T.8b3)) { +// CHECK:STDOUT: fn(%x.param: @F.%T.loc20_6.2 (%T)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @H(%T.loc22_6.1: type) { -// CHECK:STDOUT: %T.loc22_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc22_6.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] +// CHECK:STDOUT: generic fn @H(%T.loc23_6.1: type) { +// CHECK:STDOUT: %T.loc23_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_6.2 (constants.%T)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc23_6.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc22_6.2 [symbolic = %require_complete (constants.%require_complete.4ae)] -// CHECK:STDOUT: %F.specific_fn.loc24_3.2: = specific_function constants.%F, @F(%T.loc22_6.2) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.ef1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc23_6.2 [symbolic = %require_complete (constants.%require_complete.4ae)] +// CHECK:STDOUT: %F.specific_fn.loc25_3.2: = specific_function constants.%F, @F(%T.loc23_6.2) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.ef1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @H.%T.loc22_6.2 (%T.8b3)) -> @H.%T.loc22_6.2 (%T.8b3) { +// CHECK:STDOUT: fn(%x.param: @H.%T.loc23_6.2 (%T)) -> @H.%T.loc23_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %x.ref.loc24: @H.%T.loc22_6.2 (%T.8b3) = name_ref x, %x -// CHECK:STDOUT: %F.specific_fn.loc24_3.1: = specific_function %F.ref, @F(constants.%T.8b3) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.ef1)] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc24_3.1(%x.ref.loc24) -// CHECK:STDOUT: %x.ref.loc25: @H.%T.loc22_6.2 (%T.8b3) = name_ref x, %x -// CHECK:STDOUT: return %x.ref.loc25 +// CHECK:STDOUT: %x.ref.loc25: @H.%T.loc23_6.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %F.specific_fn.loc25_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.ef1)] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc25_3.1(%x.ref.loc25) +// CHECK:STDOUT: %x.ref.loc26: @H.%T.loc23_6.2 (%T) = name_ref x, %x +// CHECK:STDOUT: return %x.ref.loc26 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc28_6.1: type) { -// CHECK:STDOUT: %T.loc28_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_6.2 (constants.%T.8b3)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc28_6.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] +// CHECK:STDOUT: generic fn @G(%T.loc29_6.1: type) { +// CHECK:STDOUT: %T.loc29_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc29_6.2 (constants.%T)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc29_6.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc28_6.2 [symbolic = %require_complete (constants.%require_complete.4ae)] -// CHECK:STDOUT: %H.specific_fn.loc29_3.2: = specific_function constants.%H, @H(%T.loc28_6.2) [symbolic = %H.specific_fn.loc29_3.2 (constants.%H.specific_fn.1ed)] -// CHECK:STDOUT: %F.specific_fn.loc30_3.2: = specific_function constants.%F, @F(%T.loc28_6.2) [symbolic = %F.specific_fn.loc30_3.2 (constants.%F.specific_fn.ef1)] -// CHECK:STDOUT: %Cfn.specific_fn.loc33_4.2: = specific_function constants.%Cfn, @Cfn(%T.loc28_6.2) [symbolic = %Cfn.specific_fn.loc33_4.2 (constants.%Cfn.specific_fn.53f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc29_6.2 [symbolic = %require_complete (constants.%require_complete.4ae)] +// CHECK:STDOUT: %H.specific_fn.loc30_3.2: = specific_function constants.%H, @H(%T.loc29_6.2) [symbolic = %H.specific_fn.loc30_3.2 (constants.%H.specific_fn.1ed)] +// CHECK:STDOUT: %F.specific_fn.loc31_3.2: = specific_function constants.%F, @F(%T.loc29_6.2) [symbolic = %F.specific_fn.loc31_3.2 (constants.%F.specific_fn.ef1)] +// CHECK:STDOUT: %Cfn.specific_fn.loc34_4.2: = specific_function constants.%Cfn, @Cfn(%T.loc29_6.2) [symbolic = %Cfn.specific_fn.loc34_4.2 (constants.%Cfn.specific_fn.53f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @G.%T.loc28_6.2 (%T.8b3)) -> @G.%T.loc28_6.2 (%T.8b3) { +// CHECK:STDOUT: fn(%x.param: @G.%T.loc29_6.2 (%T)) -> @G.%T.loc29_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [concrete = constants.%H] -// CHECK:STDOUT: %x.ref.loc29: @G.%T.loc28_6.2 (%T.8b3) = name_ref x, %x -// CHECK:STDOUT: %H.specific_fn.loc29_3.1: = specific_function %H.ref, @H(constants.%T.8b3) [symbolic = %H.specific_fn.loc29_3.2 (constants.%H.specific_fn.1ed)] -// CHECK:STDOUT: %H.call: init @G.%T.loc28_6.2 (%T.8b3) = call %H.specific_fn.loc29_3.1(%x.ref.loc29) +// CHECK:STDOUT: %x.ref.loc30: @G.%T.loc29_6.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %H.specific_fn.loc30_3.1: = specific_function %H.ref, @H(constants.%T) [symbolic = %H.specific_fn.loc30_3.2 (constants.%H.specific_fn.1ed)] +// CHECK:STDOUT: %H.call: init @G.%T.loc29_6.2 (%T) = call %H.specific_fn.loc30_3.1(%x.ref.loc30) // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %x.ref.loc30: @G.%T.loc28_6.2 (%T.8b3) = name_ref x, %x -// CHECK:STDOUT: %F.specific_fn.loc30_3.1: = specific_function %F.ref, @F(constants.%T.8b3) [symbolic = %F.specific_fn.loc30_3.2 (constants.%F.specific_fn.ef1)] -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc30_3.1(%x.ref.loc30) +// CHECK:STDOUT: %x.ref.loc31: @G.%T.loc29_6.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %F.specific_fn.loc31_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc31_3.2 (constants.%F.specific_fn.ef1)] +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc31_3.1(%x.ref.loc31) // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %pattern_type.c48 = binding_pattern c [concrete] // CHECK:STDOUT: %c.var_patt: %pattern_type.c48 = var_pattern %c.patt [concrete] @@ -264,13 +265,13 @@ fn M() { // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %Cfn.ref: %Cfn.type = name_ref Cfn, @C.%Cfn.decl [concrete = constants.%Cfn] // CHECK:STDOUT: %Cfn.bound: = bound_method %c.ref, %Cfn.ref -// CHECK:STDOUT: %x.ref.loc33: @G.%T.loc28_6.2 (%T.8b3) = name_ref x, %x -// CHECK:STDOUT: %Cfn.specific_fn.loc33_4.1: = specific_function %Cfn.ref, @Cfn(constants.%T.8b3) [symbolic = %Cfn.specific_fn.loc33_4.2 (constants.%Cfn.specific_fn.53f)] -// CHECK:STDOUT: %bound_method: = bound_method %c.ref, %Cfn.specific_fn.loc33_4.1 -// CHECK:STDOUT: %.loc33: %C = bind_value %c.ref -// CHECK:STDOUT: %Cfn.call: init %empty_tuple.type = call %bound_method(%.loc33, %x.ref.loc33) -// CHECK:STDOUT: %x.ref.loc34: @G.%T.loc28_6.2 (%T.8b3) = name_ref x, %x -// CHECK:STDOUT: return %x.ref.loc34 +// CHECK:STDOUT: %x.ref.loc34: @G.%T.loc29_6.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %Cfn.specific_fn.loc34_4.1: = specific_function %Cfn.ref, @Cfn(constants.%T) [symbolic = %Cfn.specific_fn.loc34_4.2 (constants.%Cfn.specific_fn.53f)] +// CHECK:STDOUT: %bound_method: = bound_method %c.ref, %Cfn.specific_fn.loc34_4.1 +// CHECK:STDOUT: %.loc34: %C = bind_value %c.ref +// CHECK:STDOUT: %Cfn.call: init %empty_tuple.type = call %bound_method(%.loc34, %x.ref.loc34) +// CHECK:STDOUT: %x.ref.loc35: @G.%T.loc29_6.2 (%T) = name_ref x, %x +// CHECK:STDOUT: return %x.ref.loc35 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -283,15 +284,15 @@ fn M() { // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc38_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc38_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc38_3.2(%int_0) [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc38_3: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: assign %n.var, %.loc38_3 -// CHECK:STDOUT: %.loc38_10: type = splice_block %i32.loc38 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc38: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc38: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %bound_method.loc39_3.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc39_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc39_3.2(%int_0) [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc39_3: init %i32 = converted %int_0, %int.convert_checked [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: assign %n.var, %.loc39_3 +// CHECK:STDOUT: %.loc39_10: type = splice_block %i32.loc39 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc39: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc39: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // CHECK:STDOUT: name_binding_decl { @@ -299,58 +300,58 @@ fn M() { // CHECK:STDOUT: %m.var_patt: %pattern_type.7ce = var_pattern %m.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %m.var: ref %i32 = var %m.var_patt -// CHECK:STDOUT: %.loc39: type = splice_block %i32.loc39 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc39: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc39: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc40: type = splice_block %i32.loc40 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %m: ref %i32 = bind_name m, %m.var // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %n.ref.loc41: ref %i32 = name_ref n, %n +// CHECK:STDOUT: %n.ref.loc42: ref %i32 = name_ref n, %n // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%i32) [concrete = constants.%F.specific_fn.501] -// CHECK:STDOUT: %.loc41: %i32 = bind_value %n.ref.loc41 -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc41) +// CHECK:STDOUT: %.loc42: %i32 = bind_value %n.ref.loc42 +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc42) // CHECK:STDOUT: %m.ref: ref %i32 = name_ref m, %m // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] -// CHECK:STDOUT: %n.ref.loc42: ref %i32 = name_ref n, %n +// CHECK:STDOUT: %n.ref.loc43: ref %i32 = name_ref n, %n // CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%i32) [concrete = constants.%G.specific_fn] -// CHECK:STDOUT: %.loc42: %i32 = bind_value %n.ref.loc42 -// CHECK:STDOUT: %G.call: init %i32 = call %G.specific_fn(%.loc42) +// CHECK:STDOUT: %.loc43: %i32 = bind_value %n.ref.loc43 +// CHECK:STDOUT: %G.call: init %i32 = call %G.specific_fn(%.loc43) // CHECK:STDOUT: assign %m.ref, %G.call // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Cfn(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc15_22.1 => constants.%T.8b3 +// CHECK:STDOUT: specific @Cfn(constants.%T) { +// CHECK:STDOUT: %T.loc16_22.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc19_6.2 => constants.%T.8b3 +// CHECK:STDOUT: specific @F(constants.%T) { +// CHECK:STDOUT: %T.loc20_6.2 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @H(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc22_6.2 => constants.%T.8b3 +// CHECK:STDOUT: specific @H(constants.%T) { +// CHECK:STDOUT: %T.loc23_6.2 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.4ae -// CHECK:STDOUT: %F.specific_fn.loc24_3.2 => constants.%F.specific_fn.ef1 +// CHECK:STDOUT: %F.specific_fn.loc25_3.2 => constants.%F.specific_fn.ef1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc28_6.2 => constants.%T.8b3 +// CHECK:STDOUT: specific @G(constants.%T) { +// CHECK:STDOUT: %T.loc29_6.2 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%i32) { -// CHECK:STDOUT: %T.loc19_6.2 => constants.%i32 +// CHECK:STDOUT: %T.loc20_6.2 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -358,27 +359,27 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%i32) { -// CHECK:STDOUT: %T.loc28_6.2 => constants.%i32 +// CHECK:STDOUT: %T.loc29_6.2 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a -// CHECK:STDOUT: %H.specific_fn.loc29_3.2 => constants.%H.specific_fn.aac -// CHECK:STDOUT: %F.specific_fn.loc30_3.2 => constants.%F.specific_fn.501 -// CHECK:STDOUT: %Cfn.specific_fn.loc33_4.2 => constants.%Cfn.specific_fn.7b2 +// CHECK:STDOUT: %H.specific_fn.loc30_3.2 => constants.%H.specific_fn.aac +// CHECK:STDOUT: %F.specific_fn.loc31_3.2 => constants.%F.specific_fn.501 +// CHECK:STDOUT: %Cfn.specific_fn.loc34_4.2 => constants.%Cfn.specific_fn.7b2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @H(constants.%i32) { -// CHECK:STDOUT: %T.loc22_6.2 => constants.%i32 +// CHECK:STDOUT: %T.loc23_6.2 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a -// CHECK:STDOUT: %F.specific_fn.loc24_3.2 => constants.%F.specific_fn.501 +// CHECK:STDOUT: %F.specific_fn.loc25_3.2 => constants.%F.specific_fn.501 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Cfn(constants.%i32) { -// CHECK:STDOUT: %T.loc15_22.1 => constants.%i32 +// CHECK:STDOUT: %T.loc16_22.1 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/generic/complete_type.carbon b/toolchain/check/testdata/generic/complete_type.carbon index 7b7f73bfeb58..4d90ca1705d1 100644 --- a/toolchain/check/testdata/generic/complete_type.carbon +++ b/toolchain/check/testdata/generic/complete_type.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -103,21 +104,12 @@ fn G() { F(B); } // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .B = %B.decl.loc4 // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %B.decl.loc4: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %A.decl: %A.type = class_decl @A [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -211,21 +203,12 @@ fn G() { F(B); } // CHECK:STDOUT: %pattern_type.049: type = pattern_type %B [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .B = %B.decl.loc4 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %B.decl.loc4: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -303,21 +286,12 @@ fn G() { F(B); } // CHECK:STDOUT: %pattern_type.049: type = pattern_type %B [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] diff --git a/toolchain/check/testdata/generic/dependent_param.carbon b/toolchain/check/testdata/generic/dependent_param.carbon index 5ffaaf569c09..f9b2c4e1eb3e 100644 --- a/toolchain/check/testdata/generic/dependent_param.carbon +++ b/toolchain/check/testdata/generic/dependent_param.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -26,21 +27,21 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: --- nested_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [concrete] // CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [concrete] -// CHECK:STDOUT: %Outer.9d6: type = class_type @Outer, @Outer(%T.8b3) [symbolic] -// CHECK:STDOUT: %U.f22: %T.8b3 = bind_symbolic_name U, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] -// CHECK:STDOUT: %Inner.type.eae: type = generic_class_type @Inner, @Outer(%T.8b3) [symbolic] +// CHECK:STDOUT: %Outer.9d6: type = class_type @Outer, @Outer(%T) [symbolic] +// CHECK:STDOUT: %U: %T = bind_symbolic_name U, 1 [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %Inner.type.eae: type = generic_class_type @Inner, @Outer(%T) [symbolic] // CHECK:STDOUT: %Inner.generic.137: %Inner.type.eae = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.879: type = class_type @Inner, @Inner(%T.8b3, %U.f22) [symbolic] -// CHECK:STDOUT: %Get.type.889: type = fn_type @Get, @Inner(%T.8b3, %U.f22) [symbolic] +// CHECK:STDOUT: %Inner.879: type = class_type @Inner, @Inner(%T, %U) [symbolic] +// CHECK:STDOUT: %Get.type.889: type = fn_type @Get, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %Get.118: %Get.type.889 = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -56,16 +57,16 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42.20e, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.c68: %i32 = int_value 42 [concrete] // CHECK:STDOUT: %Inner.025: type = class_type @Inner, @Inner(%i32, %int_42.c68) [concrete] @@ -81,9 +82,9 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -97,7 +98,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n [concrete] @@ -112,7 +113,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Outer(%T.loc4_13.1: type) { -// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc4_13.2) [symbolic = %Inner.type (constants.%Inner.type.eae)] @@ -122,8 +123,8 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.eae) = class_decl @Inner [symbolic = @Outer.%Inner.generic (constants.%Inner.generic.137)] { // CHECK:STDOUT: %U.patt: @Inner.%pattern_type (%pattern_type.7dcd0a.1) = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T.8b3)] -// CHECK:STDOUT: %U.loc5_15.1: @Inner.%T (%T.8b3) = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.2 (constants.%U.f22)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %U.loc5_15.1: @Inner.%T (%T) = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -136,9 +137,9 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_13.1: type, %U.loc5_15.1: @Inner.%T (%T.8b3)) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] -// CHECK:STDOUT: %U.loc5_15.2: @Inner.%T (%T.8b3) = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.2 (constants.%U.f22)] +// CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_13.1: type, %U.loc5_15.1: @Inner.%T (%T)) { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %U.loc5_15.2: @Inner.%T (%T) = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.2 (constants.%U)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -150,9 +151,9 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %return.patt: @Get.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Get.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T.8b3)] -// CHECK:STDOUT: %return.param: ref @Get.%T (%T.8b3) = out_param call_param0 -// CHECK:STDOUT: %return: ref @Get.%T (%T.8b3) = return_slot %return.param +// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %return.param: ref @Get.%T (%T) = out_param call_param0 +// CHECK:STDOUT: %return: ref @Get.%T (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -166,17 +167,17 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Get(@Outer.%T.loc4_13.1: type, @Inner.%U.loc5_15.1: @Inner.%T (%T.8b3)) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] +// CHECK:STDOUT: generic fn @Get(@Outer.%T.loc4_13.1: type, @Inner.%U.loc5_15.1: @Inner.%T (%T)) { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.4ae)] -// CHECK:STDOUT: %U: @Get.%T (%T.8b3) = bind_symbolic_name U, 1 [symbolic = %U (constants.%U.f22)] +// CHECK:STDOUT: %U: @Get.%T (%T) = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @Get.%T (%T.8b3) { +// CHECK:STDOUT: fn() -> @Get.%T (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %U.ref: @Get.%T (%T.8b3) = name_ref U, @Inner.%U.loc5_15.1 [symbolic = %U (constants.%U.f22)] +// CHECK:STDOUT: %U.ref: @Get.%T (%T) = name_ref U, @Inner.%U.loc5_15.1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: return %U.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -192,7 +193,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_33.1: = bound_method constants.%int_42.20e, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_33.2: = bound_method constants.%int_42.20e, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc10_33.2(constants.%int_42.20e) [concrete = constants.%int_42.c68] // CHECK:STDOUT: %.loc10_33.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_42.c68] @@ -206,17 +207,17 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc4_13.2 => constants.%T.8b3 +// CHECK:STDOUT: specific @Outer(constants.%T) { +// CHECK:STDOUT: %T.loc4_13.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type => constants.%Inner.type.eae // CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.137 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(constants.%T.8b3, constants.%U.f22) { -// CHECK:STDOUT: %T => constants.%T.8b3 -// CHECK:STDOUT: %U.loc5_15.2 => constants.%U.f22 +// CHECK:STDOUT: specific @Inner(constants.%T, constants.%U) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %U.loc5_15.2 => constants.%U // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -224,8 +225,8 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Get => constants.%Get.118 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Get(constants.%T.8b3, constants.%U.f22) { -// CHECK:STDOUT: %T => constants.%T.8b3 +// CHECK:STDOUT: specific @Get(constants.%T, constants.%U) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/forward_decl.carbon b/toolchain/check/testdata/generic/forward_decl.carbon index 222d0baa3106..08bcae7c458f 100644 --- a/toolchain/check/testdata/generic/forward_decl.carbon +++ b/toolchain/check/testdata/generic/forward_decl.carbon @@ -2,6 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon +// // AUTOUPDATE // TIP: To test this file alone, run: // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/generic/forward_decl.carbon diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index 8235940db9e4..1dd6e977bb4f 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -51,14 +52,14 @@ class C(C:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.f06: type = class_type @C, @C(%T.8b3) [symbolic] -// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T.8b3 [symbolic] -// CHECK:STDOUT: %C.elem.cca: type = unbound_element_type %C.f06, %T.8b3 [symbolic] -// CHECK:STDOUT: %struct_type.x.2ac: type = struct_type {.x: %T.8b3} [symbolic] +// CHECK:STDOUT: %C.f06: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %C.elem.cca: type = unbound_element_type %C.f06, %T [symbolic] +// CHECK:STDOUT: %struct_type.x.2ac: type = struct_type {.x: %T} [symbolic] // CHECK:STDOUT: %complete_type.4339: = complete_type_witness %struct_type.x.2ac [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -77,16 +78,16 @@ class C(C:! type) { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %C.val: %C.d45 = struct_value (%int_1.5d2) [concrete] @@ -99,9 +100,9 @@ class C(C:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -115,19 +116,19 @@ class C(C:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc5_11.1: type) { -// CHECK:STDOUT: %T.loc5_11.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_11.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc5_11.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_11.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc5_11.2 [symbolic = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc5_11.2) [symbolic = %C (constants.%C.f06)] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %T.loc5_11.2 [symbolic = %C.elem (constants.%C.elem.cca)] -// CHECK:STDOUT: %struct_type.x.loc7_3.2: type = struct_type {.x: @C.%T.loc5_11.2 (%T.8b3)} [symbolic = %struct_type.x.loc7_3.2 (constants.%struct_type.x.2ac)] +// CHECK:STDOUT: %struct_type.x.loc7_3.2: type = struct_type {.x: @C.%T.loc5_11.2 (%T)} [symbolic = %struct_type.x.loc7_3.2 (constants.%struct_type.x.2ac)] // CHECK:STDOUT: %complete_type.loc7_3.2: = complete_type_witness %struct_type.x.loc7_3.2 [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.4339)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_11.1 [symbolic = %T.loc5_11.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_11.1 [symbolic = %T.loc5_11.2 (constants.%T)] // CHECK:STDOUT: %.loc6: @C.%C.elem (%C.elem.cca) = field_decl x, element0 [concrete] -// CHECK:STDOUT: %struct_type.x.loc7_3.1: type = struct_type {.x: %T.8b3} [symbolic = %struct_type.x.loc7_3.2 (constants.%struct_type.x.2ac)] +// CHECK:STDOUT: %struct_type.x.loc7_3.1: type = struct_type {.x: %T} [symbolic = %struct_type.x.loc7_3.2 (constants.%struct_type.x.2ac)] // CHECK:STDOUT: %complete_type.loc7_3.1: = complete_type_witness %struct_type.x.loc7_3.1 [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.4339)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc7_3.1 // CHECK:STDOUT: @@ -143,7 +144,7 @@ class C(C:! type) { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc5_11.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_11.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc5_11.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_11.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: %pattern_type.7db = binding_pattern v [concrete] @@ -154,7 +155,7 @@ class C(C:! type) { // CHECK:STDOUT: %.loc8_26.1: %struct_type.x.c96 = struct_literal (%int_1) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc8_26.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_26.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc8_26.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_26.2: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] @@ -173,8 +174,8 @@ class C(C:! type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc5_11.2 => constants.%T.8b3 +// CHECK:STDOUT: specific @C(constants.%T) { +// CHECK:STDOUT: %T.loc5_11.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { diff --git a/toolchain/check/testdata/generic/template/member_access.carbon b/toolchain/check/testdata/generic/template/member_access.carbon index 2351cb30ad07..b19e074b3fd1 100644 --- a/toolchain/check/testdata/generic/template/member_access.carbon +++ b/toolchain/check/testdata/generic/template/member_access.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -139,7 +140,7 @@ fn Test(e: E) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -312,7 +313,7 @@ fn Test(e: E) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -414,9 +415,9 @@ fn Test(e: E) { // CHECK:STDOUT: --- fail_member_wrong_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T.8b3d5d.1: type = bind_symbolic_name T, 0, template [template] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3d5d.1 [template] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -424,7 +425,7 @@ fn Test(e: E) { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.c41: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.4aeca8.1: = require_complete_type %T.8b3d5d.1 [template] +// CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [template] // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %F.a8a: type = class_type @F.2 [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -462,8 +463,8 @@ fn Test(e: E) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -483,10 +484,10 @@ fn Test(e: E) { // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] -// CHECK:STDOUT: %x.param: @F.1.%T.loc4_15.2 (%T.8b3d5d.1) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] -// CHECK:STDOUT: %x: @F.1.%T.loc4_15.2 (%T.8b3d5d.1) = bind_name x, %x.param +// CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] +// CHECK:STDOUT: %x.param: @F.1.%T.loc4_15.2 (%T) = value_param call_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T)] +// CHECK:STDOUT: %x: @F.1.%T.loc4_15.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -525,20 +526,20 @@ fn Test(e: E) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(%T.loc4_15.1: type) { -// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_15.2 [template = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4aeca8.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_15.2 [template = %require_complete (constants.%require_complete.4ae)] // CHECK:STDOUT: %.loc11_11.3: = refine_type_action %x.ref, %T.loc4_15.2 [template] // CHECK:STDOUT: %.loc11_11.4: = access_member_action %.loc11_11.1, n [template] // CHECK:STDOUT: %.loc11_11.5: type = type_of_inst %.loc11_11.4 [template] // CHECK:STDOUT: %.loc11_13.2: = convert_to_value_action %.loc11_11.2, constants.%i32 [template] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.1.%T.loc4_15.2 (%T.8b3d5d.1)) -> %i32 { +// CHECK:STDOUT: fn(%x.param: @F.1.%T.loc4_15.2 (%T)) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @F.1.%T.loc4_15.2 (%T.8b3d5d.1) = name_ref x, %x -// CHECK:STDOUT: %.loc11_11.1: @F.1.%T.loc4_15.2 (%T.8b3d5d.1) = splice_inst %.loc11_11.3 +// CHECK:STDOUT: %x.ref: @F.1.%T.loc4_15.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %.loc11_11.1: @F.1.%T.loc4_15.2 (%T) = splice_inst %.loc11_11.3 // CHECK:STDOUT: %.loc11_11.2: @F.1.%.loc11_11.5 (@F.1.%.loc11_11.5) = splice_inst %.loc11_11.4 // CHECK:STDOUT: %.loc11_13.1: %i32 = splice_inst %.loc11_13.2 // CHECK:STDOUT: return %.loc11_13.1 @@ -554,8 +555,8 @@ fn Test(e: E) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T.8b3d5d.1) { -// CHECK:STDOUT: %T.loc4_15.2 => constants.%T.8b3d5d.1 +// CHECK:STDOUT: specific @F.1(constants.%T) { +// CHECK:STDOUT: %T.loc4_15.2 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/template_dependence.carbon b/toolchain/check/testdata/generic/template_dependence.carbon index 1a6ca7627ac0..2bd98bf6cb13 100644 --- a/toolchain/check/testdata/generic/template_dependence.carbon +++ b/toolchain/check/testdata/generic/template_dependence.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -42,19 +43,10 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %require_complete.132: = require_complete_type %ptr.a13 [template] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0, template [concrete] // CHECK:STDOUT: %x.patt: @F.%pattern_type.loc4_25 (%pattern_type.12d) = binding_pattern x [concrete] @@ -120,19 +112,10 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%T, %U) [template] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0, template [concrete] // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete] diff --git a/toolchain/check/testdata/if/basics.carbon b/toolchain/check/testdata/if/basics.carbon index d7accb829e09..c34b2ace7bc5 100644 --- a/toolchain/check/testdata/if/basics.carbon +++ b/toolchain/check/testdata/if/basics.carbon @@ -1,6 +1,7 @@ // Part of the Carbon Language project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/bool.carbon // // AUTOUPDATE diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 1465d0534048..d509b77028a6 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -38,16 +39,16 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.6a9) [concrete] @@ -61,10 +62,10 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -84,25 +85,25 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param3 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc14_34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc14_9.1: type = splice_block %.loc14_9.3 [concrete = bool] { +// CHECK:STDOUT: %.loc15_9.1: type = splice_block %.loc15_9.3 [concrete = bool] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc14_9.2: type = value_of_initializer %bool.make_type [concrete = bool] -// CHECK:STDOUT: %.loc14_9.3: type = converted %bool.make_type, %.loc14_9.2 [concrete = bool] +// CHECK:STDOUT: %.loc15_9.2: type = value_of_initializer %bool.make_type [concrete = bool] +// CHECK:STDOUT: %.loc15_9.3: type = converted %bool.make_type, %.loc15_9.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %n.param: %i32 = value_param call_param1 -// CHECK:STDOUT: %.loc14_18: type = splice_block %i32.loc14_18 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_18: type = splice_block %i32.loc15_18 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %m.param: %i32 = value_param call_param2 -// CHECK:STDOUT: %.loc14_26: type = splice_block %i32.loc14_26 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc14_26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_26: type = splice_block %i32.loc15_26 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc15_26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %m: %i32 = bind_name m, %m.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param3 @@ -117,50 +118,50 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %x.var_patt: %pattern_type.a98 = var_pattern %x.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %array_type = var %x.var_patt -// CHECK:STDOUT: %int_0.loc15_27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc15_29.1: %tuple.type = tuple_literal (%int_0.loc15_27) +// CHECK:STDOUT: %int_0.loc16_27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %.loc16_29.1: %tuple.type = tuple_literal (%int_0.loc16_27) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_29.1: = bound_method %int_0.loc15_27, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_29.2: = bound_method %int_0.loc15_27, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_29.2(%int_0.loc15_27) [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc15_29.2: init %i32 = converted %int_0.loc15_27, %int.convert_checked [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %int_0.loc15_29: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc15_29.3: ref %i32 = array_index %x.var, %int_0.loc15_29 -// CHECK:STDOUT: %.loc15_29.4: init %i32 = initialize_from %.loc15_29.2 to %.loc15_29.3 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc15_29.5: init %array_type = array_init (%.loc15_29.4) to %x.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc15_3: init %array_type = converted %.loc15_29.1, %.loc15_29.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %x.var, %.loc15_3 -// CHECK:STDOUT: %.loc15_22: type = splice_block %array_type [concrete = constants.%array_type] { -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %bound_method.loc16_29.1: = bound_method %int_0.loc16_27, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_29.2: = bound_method %int_0.loc16_27, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_29.2(%int_0.loc16_27) [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc16_29.2: init %i32 = converted %int_0.loc16_27, %int.convert_checked [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %int_0.loc16_29: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %.loc16_29.3: ref %i32 = array_index %x.var, %int_0.loc16_29 +// CHECK:STDOUT: %.loc16_29.4: init %i32 = initialize_from %.loc16_29.2 to %.loc16_29.3 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc16_29.5: init %array_type = array_init (%.loc16_29.4) to %x.var [concrete = constants.%array] +// CHECK:STDOUT: %.loc16_3: init %array_type = converted %.loc16_29.1, %.loc16_29.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %x.var, %.loc16_3 +// CHECK:STDOUT: %.loc16_22: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc15 [concrete = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc16 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref %array_type = bind_name x, %x.var // CHECK:STDOUT: %b.ref: bool = name_ref b, %b // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %x.ref.loc16_20: ref %array_type = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc17_20: ref %array_type = name_ref x, %x // CHECK:STDOUT: %m.ref: %i32 = name_ref m, %m -// CHECK:STDOUT: %int_32.loc16_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc16_23.1: ref %i32 = array_index %x.ref.loc16_20, %m.ref -// CHECK:STDOUT: %.loc16_23.2: %i32 = bind_value %.loc16_23.1 -// CHECK:STDOUT: br !if.expr.result(%.loc16_23.2) +// CHECK:STDOUT: %int_32.loc17_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc17_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc17_23.1: ref %i32 = array_index %x.ref.loc17_20, %m.ref +// CHECK:STDOUT: %.loc17_23.2: %i32 = bind_value %.loc17_23.1 +// CHECK:STDOUT: br !if.expr.result(%.loc17_23.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %x.ref.loc16_30: ref %array_type = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc17_30: ref %array_type = name_ref x, %x // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %int_32.loc16_33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc16_33.1: ref %i32 = array_index %x.ref.loc16_30, %n.ref -// CHECK:STDOUT: %.loc16_33.2: %i32 = bind_value %.loc16_33.1 -// CHECK:STDOUT: br !if.expr.result(%.loc16_33.2) +// CHECK:STDOUT: %int_32.loc17_33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc17_33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc17_33.1: ref %i32 = array_index %x.ref.loc17_30, %n.ref +// CHECK:STDOUT: %.loc17_33.2: %i32 = bind_value %.loc17_33.1 +// CHECK:STDOUT: br !if.expr.result(%.loc17_33.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc16_10: %i32 = block_arg !if.expr.result -// CHECK:STDOUT: return %.loc16_10 +// CHECK:STDOUT: %.loc17_10: %i32 = block_arg !if.expr.result +// CHECK:STDOUT: return %.loc17_10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index c9df28a5b115..4942c8b6958c 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -50,16 +51,16 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] @@ -76,8 +77,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [concrete] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [concrete] -// CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] -// CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete] +// CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr [concrete] // CHECK:STDOUT: %PartiallyConstant.type: type = fn_type @PartiallyConstant [concrete] // CHECK:STDOUT: %PartiallyConstant: %PartiallyConstant.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -89,9 +90,9 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -146,8 +147,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -157,8 +158,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc31: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %t.param: type = value_param call_param0 // CHECK:STDOUT: %t: type = bind_name t, %t.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 @@ -170,26 +171,26 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc14_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_25.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc14_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc14_25.2: %i32 = converted %int_1, %.loc14_25.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: return %.loc14_25.2 +// CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc15_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_25.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc15_25.2: %i32 = converted %int_1, %.loc15_25.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: return %.loc15_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_25.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc15_25.2: %i32 = converted %int_2, %.loc15_25.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: return %.loc15_25.2 +// CHECK:STDOUT: %bound_method.loc16_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_25.2(%int_2) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc16_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc16_25.2: %i32 = converted %int_2, %.loc16_25.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: return %.loc16_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { @@ -200,20 +201,20 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %A.call: init %i32 = call %A.ref() -// CHECK:STDOUT: %.loc18_25.1: %i32 = value_of_initializer %A.call -// CHECK:STDOUT: %.loc18_25.2: %i32 = converted %A.call, %.loc18_25.1 -// CHECK:STDOUT: br !if.expr.result(%.loc18_25.2) +// CHECK:STDOUT: %.loc19_25.1: %i32 = value_of_initializer %A.call +// CHECK:STDOUT: %.loc19_25.2: %i32 = converted %A.call, %.loc19_25.1 +// CHECK:STDOUT: br !if.expr.result(%.loc19_25.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %B.call: init %i32 = call %B.ref() -// CHECK:STDOUT: %.loc18_27.1: %i32 = value_of_initializer %B.call -// CHECK:STDOUT: %.loc18_27.2: %i32 = converted %B.call, %.loc18_27.1 -// CHECK:STDOUT: br !if.expr.result(%.loc18_27.2) +// CHECK:STDOUT: %.loc19_27.1: %i32 = value_of_initializer %B.call +// CHECK:STDOUT: %.loc19_27.2: %i32 = converted %B.call, %.loc19_27.1 +// CHECK:STDOUT: br !if.expr.result(%.loc19_27.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc18_10: %i32 = block_arg !if.expr.result -// CHECK:STDOUT: return %.loc18_10 +// CHECK:STDOUT: %.loc19_10: %i32 = block_arg !if.expr.result +// CHECK:STDOUT: return %.loc19_10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { @@ -224,20 +225,20 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %A.call: init %i32 = call %A.ref() -// CHECK:STDOUT: %.loc22_26.1: %i32 = value_of_initializer %A.call -// CHECK:STDOUT: %.loc22_26.2: %i32 = converted %A.call, %.loc22_26.1 -// CHECK:STDOUT: br !if.expr.result(%.loc22_26.2) +// CHECK:STDOUT: %.loc23_26.1: %i32 = value_of_initializer %A.call +// CHECK:STDOUT: %.loc23_26.2: %i32 = converted %A.call, %.loc23_26.1 +// CHECK:STDOUT: br !if.expr.result(%.loc23_26.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %B.call: init %i32 = call %B.ref() -// CHECK:STDOUT: %.loc22_28.1: %i32 = value_of_initializer %B.call -// CHECK:STDOUT: %.loc22_28.2: %i32 = converted %B.call, %.loc22_28.1 -// CHECK:STDOUT: br !if.expr.result(%.loc22_28.2) +// CHECK:STDOUT: %.loc23_28.1: %i32 = value_of_initializer %B.call +// CHECK:STDOUT: %.loc23_28.2: %i32 = converted %B.call, %.loc23_28.1 +// CHECK:STDOUT: br !if.expr.result(%.loc23_28.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc22_10: %i32 = block_arg !if.expr.result -// CHECK:STDOUT: return %.loc22_10 +// CHECK:STDOUT: %.loc23_10: %i32 = block_arg !if.expr.result +// CHECK:STDOUT: return %.loc23_10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() -> %i32 { @@ -249,71 +250,71 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc26_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc26_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc26_3.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc26_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: assign %v.var, %.loc26_3 -// CHECK:STDOUT: br !.loc26_13 +// CHECK:STDOUT: %bound_method.loc27_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc27_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc27_3.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc27_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: assign %v.var, %.loc27_3 +// CHECK:STDOUT: br !.loc27_13 // CHECK:STDOUT: -// CHECK:STDOUT: !.loc26_13: +// CHECK:STDOUT: !.loc27_13: // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: if %true br !if.expr.then.loc26 else br !if.expr.else.loc26 +// CHECK:STDOUT: if %true br !if.expr.then.loc27 else br !if.expr.else.loc27 // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc26: -// CHECK:STDOUT: %int_32.loc26_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc26_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc26(%i32.loc26_23) +// CHECK:STDOUT: !if.expr.then.loc27: +// CHECK:STDOUT: %int_32.loc27_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc27_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc27(%i32.loc27_23) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc26: -// CHECK:STDOUT: %int_32.loc26_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc26_32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %ptr.loc26: type = ptr_type %i32.loc26_32 [concrete = constants.%ptr.235] -// CHECK:STDOUT: br !if.expr.result.loc26(%ptr.loc26) +// CHECK:STDOUT: !if.expr.else.loc27: +// CHECK:STDOUT: %int_32.loc27_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc27_32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %ptr.loc27: type = ptr_type %i32.loc27_32 [concrete = constants.%ptr] +// CHECK:STDOUT: br !if.expr.result.loc27(%ptr.loc27) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc26: -// CHECK:STDOUT: %.loc26_10: type = block_arg !if.expr.result.loc26 [concrete = constants.%i32] -// CHECK:STDOUT: br !.loc26_7 +// CHECK:STDOUT: !if.expr.result.loc27: +// CHECK:STDOUT: %.loc27_10: type = block_arg !if.expr.result.loc27 [concrete = constants.%i32] +// CHECK:STDOUT: br !.loc27_7 // CHECK:STDOUT: -// CHECK:STDOUT: !.loc26_7: +// CHECK:STDOUT: !.loc27_7: // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt: %pattern_type.fe8 = binding_pattern w [concrete] // CHECK:STDOUT: %w.var_patt: %pattern_type.fe8 = var_pattern %w.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %w.var: ref %ptr.235 = var %w.var_patt +// CHECK:STDOUT: %w.var: ref %ptr = var %w.var_patt // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v -// CHECK:STDOUT: %addr: %ptr.235 = addr_of %v.ref +// CHECK:STDOUT: %addr: %ptr = addr_of %v.ref // CHECK:STDOUT: assign %w.var, %addr -// CHECK:STDOUT: br !.loc27_13 +// CHECK:STDOUT: br !.loc28_13 // CHECK:STDOUT: -// CHECK:STDOUT: !.loc27_13: +// CHECK:STDOUT: !.loc28_13: // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] -// CHECK:STDOUT: if %false br !if.expr.then.loc27 else br !if.expr.else.loc27 +// CHECK:STDOUT: if %false br !if.expr.then.loc28 else br !if.expr.else.loc28 // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc27: -// CHECK:STDOUT: %int_32.loc27_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc27_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc27(%i32.loc27_24) +// CHECK:STDOUT: !if.expr.then.loc28: +// CHECK:STDOUT: %int_32.loc28_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc28_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc28(%i32.loc28_24) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc27: -// CHECK:STDOUT: %int_32.loc27_33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc27_33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %ptr.loc27: type = ptr_type %i32.loc27_33 [concrete = constants.%ptr.235] -// CHECK:STDOUT: br !if.expr.result.loc27(%ptr.loc27) +// CHECK:STDOUT: !if.expr.else.loc28: +// CHECK:STDOUT: %int_32.loc28_33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc28_33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %ptr.loc28: type = ptr_type %i32.loc28_33 [concrete = constants.%ptr] +// CHECK:STDOUT: br !if.expr.result.loc28(%ptr.loc28) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc27: -// CHECK:STDOUT: %.loc27: type = block_arg !if.expr.result.loc27 [concrete = constants.%ptr.235] -// CHECK:STDOUT: br !.loc27_7 +// CHECK:STDOUT: !if.expr.result.loc28: +// CHECK:STDOUT: %.loc28: type = block_arg !if.expr.result.loc28 [concrete = constants.%ptr] +// CHECK:STDOUT: br !.loc28_7 // CHECK:STDOUT: -// CHECK:STDOUT: !.loc27_7: -// CHECK:STDOUT: %w: ref %ptr.235 = bind_name w, %w.var -// CHECK:STDOUT: %w.ref: ref %ptr.235 = name_ref w, %w -// CHECK:STDOUT: %.loc28_11: %ptr.235 = bind_value %w.ref -// CHECK:STDOUT: %.loc28_10.1: ref %i32 = deref %.loc28_11 -// CHECK:STDOUT: %.loc28_10.2: %i32 = bind_value %.loc28_10.1 -// CHECK:STDOUT: return %.loc28_10.2 +// CHECK:STDOUT: !.loc28_7: +// CHECK:STDOUT: %w: ref %ptr = bind_name w, %w.var +// CHECK:STDOUT: %w.ref: ref %ptr = name_ref w, %w +// CHECK:STDOUT: %.loc29_11: %ptr = bind_value %w.ref +// CHECK:STDOUT: %.loc29_10.1: ref %i32 = deref %.loc29_11 +// CHECK:STDOUT: %.loc29_10.2: %i32 = bind_value %.loc29_10.1 +// CHECK:STDOUT: return %.loc29_10.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @PartiallyConstant(%t.param: type) -> %i32 { @@ -325,67 +326,67 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc32_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc32_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc32_3.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc32_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: assign %v.var, %.loc32_3 -// CHECK:STDOUT: br !.loc32_13 +// CHECK:STDOUT: %bound_method.loc33_3.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc33_3.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc33_3.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc33_3: init %i32 = converted %int_1, %int.convert_checked [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: assign %v.var, %.loc33_3 +// CHECK:STDOUT: br !.loc33_13 // CHECK:STDOUT: -// CHECK:STDOUT: !.loc32_13: +// CHECK:STDOUT: !.loc33_13: // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: if %true br !if.expr.then.loc32 else br !if.expr.else.loc32 +// CHECK:STDOUT: if %true br !if.expr.then.loc33 else br !if.expr.else.loc33 // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc32: -// CHECK:STDOUT: %int_32.loc32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc32(%i32.loc32) +// CHECK:STDOUT: !if.expr.then.loc33: +// CHECK:STDOUT: %int_32.loc33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc33(%i32.loc33) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc32: -// CHECK:STDOUT: %t.ref.loc32: type = name_ref t, %t -// CHECK:STDOUT: br !if.expr.result.loc32(%t.ref.loc32) +// CHECK:STDOUT: !if.expr.else.loc33: +// CHECK:STDOUT: %t.ref.loc33: type = name_ref t, %t +// CHECK:STDOUT: br !if.expr.result.loc33(%t.ref.loc33) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc32: -// CHECK:STDOUT: %.loc32_10: type = block_arg !if.expr.result.loc32 [concrete = constants.%i32] -// CHECK:STDOUT: br !.loc32_7 +// CHECK:STDOUT: !if.expr.result.loc33: +// CHECK:STDOUT: %.loc33_10: type = block_arg !if.expr.result.loc33 [concrete = constants.%i32] +// CHECK:STDOUT: br !.loc33_7 // CHECK:STDOUT: -// CHECK:STDOUT: !.loc32_7: +// CHECK:STDOUT: !.loc33_7: // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt: %pattern_type.fe8 = binding_pattern w [concrete] // CHECK:STDOUT: %w.var_patt: %pattern_type.fe8 = var_pattern %w.patt [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %w.var: ref %ptr.235 = var %w.var_patt +// CHECK:STDOUT: %w.var: ref %ptr = var %w.var_patt // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v -// CHECK:STDOUT: %addr: %ptr.235 = addr_of %v.ref +// CHECK:STDOUT: %addr: %ptr = addr_of %v.ref // CHECK:STDOUT: assign %w.var, %addr -// CHECK:STDOUT: br !.loc33_13 +// CHECK:STDOUT: br !.loc34_13 // CHECK:STDOUT: -// CHECK:STDOUT: !.loc33_13: +// CHECK:STDOUT: !.loc34_13: // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] -// CHECK:STDOUT: if %false br !if.expr.then.loc33 else br !if.expr.else.loc33 +// CHECK:STDOUT: if %false br !if.expr.then.loc34 else br !if.expr.else.loc34 // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc33: -// CHECK:STDOUT: %t.ref.loc33: type = name_ref t, %t -// CHECK:STDOUT: br !if.expr.result.loc33(%t.ref.loc33) +// CHECK:STDOUT: !if.expr.then.loc34: +// CHECK:STDOUT: %t.ref.loc34: type = name_ref t, %t +// CHECK:STDOUT: br !if.expr.result.loc34(%t.ref.loc34) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc33: -// CHECK:STDOUT: %int_32.loc33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %ptr: type = ptr_type %i32.loc33 [concrete = constants.%ptr.235] -// CHECK:STDOUT: br !if.expr.result.loc33(%ptr) +// CHECK:STDOUT: !if.expr.else.loc34: +// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %ptr: type = ptr_type %i32.loc34 [concrete = constants.%ptr] +// CHECK:STDOUT: br !if.expr.result.loc34(%ptr) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc33: -// CHECK:STDOUT: %.loc33: type = block_arg !if.expr.result.loc33 [concrete = constants.%ptr.235] -// CHECK:STDOUT: br !.loc33_7 +// CHECK:STDOUT: !if.expr.result.loc34: +// CHECK:STDOUT: %.loc34: type = block_arg !if.expr.result.loc34 [concrete = constants.%ptr] +// CHECK:STDOUT: br !.loc34_7 // CHECK:STDOUT: -// CHECK:STDOUT: !.loc33_7: -// CHECK:STDOUT: %w: ref %ptr.235 = bind_name w, %w.var -// CHECK:STDOUT: %w.ref: ref %ptr.235 = name_ref w, %w -// CHECK:STDOUT: %.loc34_11: %ptr.235 = bind_value %w.ref -// CHECK:STDOUT: %.loc34_10.1: ref %i32 = deref %.loc34_11 -// CHECK:STDOUT: %.loc34_10.2: %i32 = bind_value %.loc34_10.1 -// CHECK:STDOUT: return %.loc34_10.2 +// CHECK:STDOUT: !.loc34_7: +// CHECK:STDOUT: %w: ref %ptr = bind_name w, %w.var +// CHECK:STDOUT: %w.ref: ref %ptr = name_ref w, %w +// CHECK:STDOUT: %.loc35_11: %ptr = bind_value %w.ref +// CHECK:STDOUT: %.loc35_10.1: ref %i32 = deref %.loc35_11 +// CHECK:STDOUT: %.loc35_10.2: %i32 = bind_value %.loc35_10.1 +// CHECK:STDOUT: return %.loc35_10.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index 875ff64740d8..3d216e0c864b 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -33,17 +34,16 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] @@ -54,6 +54,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] +// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -66,11 +67,11 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] +// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -108,10 +109,10 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc17_9.1: type = splice_block %.loc17_9.3 [concrete = bool] { +// CHECK:STDOUT: %.loc18_9.1: type = splice_block %.loc18_9.3 [concrete = bool] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc17_9.2: type = value_of_initializer %bool.make_type [concrete = bool] -// CHECK:STDOUT: %.loc17_9.3: type = converted %bool.make_type, %.loc17_9.2 [concrete = bool] +// CHECK:STDOUT: %.loc18_9.2: type = value_of_initializer %bool.make_type [concrete = bool] +// CHECK:STDOUT: %.loc18_9.3: type = converted %bool.make_type, %.loc18_9.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 @@ -123,26 +124,26 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc14_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_25.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc14_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc14_25.2: %i32 = converted %int_1, %.loc14_25.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: return %.loc14_25.2 +// CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc15_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_25.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc15_25.2: %i32 = converted %int_1, %.loc15_25.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: return %.loc15_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_25.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc15_25.2: %i32 = converted %int_2, %.loc15_25.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: return %.loc15_25.2 +// CHECK:STDOUT: %bound_method.loc16_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc16_25.2(%int_2) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc16_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc16_25.2: %i32 = converted %int_2, %.loc16_25.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: return %.loc16_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param: bool) -> %i32 { @@ -153,19 +154,19 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %A.call: init %i32 = call %A.ref() -// CHECK:STDOUT: %.loc18_22.1: %i32 = value_of_initializer %A.call -// CHECK:STDOUT: %.loc18_22.2: %i32 = converted %A.call, %.loc18_22.1 -// CHECK:STDOUT: br !if.expr.result(%.loc18_22.2) +// CHECK:STDOUT: %.loc19_22.1: %i32 = value_of_initializer %A.call +// CHECK:STDOUT: %.loc19_22.2: %i32 = converted %A.call, %.loc19_22.1 +// CHECK:STDOUT: br !if.expr.result(%.loc19_22.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %B.call: init %i32 = call %B.ref() -// CHECK:STDOUT: %.loc18_24.1: %i32 = value_of_initializer %B.call -// CHECK:STDOUT: %.loc18_24.2: %i32 = converted %B.call, %.loc18_24.1 -// CHECK:STDOUT: br !if.expr.result(%.loc18_24.2) +// CHECK:STDOUT: %.loc19_24.1: %i32 = value_of_initializer %B.call +// CHECK:STDOUT: %.loc19_24.2: %i32 = converted %B.call, %.loc19_24.1 +// CHECK:STDOUT: br !if.expr.result(%.loc19_24.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc18_10: %i32 = block_arg !if.expr.result -// CHECK:STDOUT: return %.loc18_10 +// CHECK:STDOUT: %.loc19_10: %i32 = block_arg !if.expr.result +// CHECK:STDOUT: return %.loc19_10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index eedf2a176ebb..1bb8e93026ab 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index 77d9dd86814a..469a34b3302e 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -65,8 +66,8 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -144,7 +145,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index 4c6ef2194b92..4a34526b04dd 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -33,16 +34,16 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -67,10 +68,10 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -90,27 +91,27 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param3 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %a.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc14_9.1: type = splice_block %.loc14_9.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc14_9: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc14_9.2: type = value_of_initializer %bool.make_type.loc14_9 [concrete = bool] -// CHECK:STDOUT: %.loc14_9.3: type = converted %bool.make_type.loc14_9, %.loc14_9.2 [concrete = bool] +// CHECK:STDOUT: %.loc15_9.1: type = splice_block %.loc15_9.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc15_9: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc15_9.2: type = value_of_initializer %bool.make_type.loc15_9 [concrete = bool] +// CHECK:STDOUT: %.loc15_9.3: type = converted %bool.make_type.loc15_9, %.loc15_9.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %a: bool = bind_name a, %a.param // CHECK:STDOUT: %b.param: bool = value_param call_param1 -// CHECK:STDOUT: %.loc14_18.1: type = splice_block %.loc14_18.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc14_18: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc14_18.2: type = value_of_initializer %bool.make_type.loc14_18 [concrete = bool] -// CHECK:STDOUT: %.loc14_18.3: type = converted %bool.make_type.loc14_18, %.loc14_18.2 [concrete = bool] +// CHECK:STDOUT: %.loc15_18.1: type = splice_block %.loc15_18.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc15_18: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc15_18.2: type = value_of_initializer %bool.make_type.loc15_18 [concrete = bool] +// CHECK:STDOUT: %.loc15_18.3: type = converted %bool.make_type.loc15_18, %.loc15_18.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %c.param: bool = value_param call_param2 -// CHECK:STDOUT: %.loc14_27.1: type = splice_block %.loc14_27.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc14_27: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc14_27.2: type = value_of_initializer %bool.make_type.loc14_27 [concrete = bool] -// CHECK:STDOUT: %.loc14_27.3: type = converted %bool.make_type.loc14_27, %.loc14_27.2 [concrete = bool] +// CHECK:STDOUT: %.loc15_27.1: type = splice_block %.loc15_27.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc15_27: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc15_27.2: type = value_of_initializer %bool.make_type.loc15_27 [concrete = bool] +// CHECK:STDOUT: %.loc15_27.3: type = converted %bool.make_type.loc15_27, %.loc15_27.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %c: bool = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param3 @@ -121,74 +122,74 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: fn @F(%a.param: bool, %b.param: bool, %c.param: bool) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: bool = name_ref a, %a -// CHECK:STDOUT: if %a.ref br !if.expr.then.loc15_10 else br !if.expr.else.loc15_10 +// CHECK:STDOUT: if %a.ref br !if.expr.then.loc16_10 else br !if.expr.else.loc16_10 // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc15_10: +// CHECK:STDOUT: !if.expr.then.loc16_10: // CHECK:STDOUT: %b.ref: bool = name_ref b, %b -// CHECK:STDOUT: if %b.ref br !if.expr.then.loc15_20 else br !if.expr.else.loc15_20 +// CHECK:STDOUT: if %b.ref br !if.expr.then.loc16_20 else br !if.expr.else.loc16_20 // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc15_20: +// CHECK:STDOUT: !if.expr.then.loc16_20: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %int_32.loc15_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc15_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_1, %impl.elem0.loc15_25 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc15_25: = specific_function %impl.elem0.loc15_25, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_25.2: = bound_method %int_1, %specific_fn.loc15_25 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc15_25: init %i32 = call %bound_method.loc15_25.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked.loc15_25 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc15_25.2: %i32 = converted %int_1, %.loc15_25.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: br !if.expr.result.loc15_20(%.loc15_25.2) +// CHECK:STDOUT: %int_32.loc16_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc16_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_25.1: = bound_method %int_1, %impl.elem0.loc16_25 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc16_25: = specific_function %impl.elem0.loc16_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_25.2: = bound_method %int_1, %specific_fn.loc16_25 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc16_25: init %i32 = call %bound_method.loc16_25.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc16_25.1: %i32 = value_of_initializer %int.convert_checked.loc16_25 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc16_25.2: %i32 = converted %int_1, %.loc16_25.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: br !if.expr.result.loc16_20(%.loc16_25.2) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc15_20: +// CHECK:STDOUT: !if.expr.else.loc16_20: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc15_32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_32.1: = bound_method %int_2, %impl.elem0.loc15_32 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc15_32: = specific_function %impl.elem0.loc15_32, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_32.2: = bound_method %int_2, %specific_fn.loc15_32 [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked.loc15_32: init %i32 = call %bound_method.loc15_32.2(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc15_32.1: %i32 = value_of_initializer %int.convert_checked.loc15_32 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc15_32.2: %i32 = converted %int_2, %.loc15_32.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: br !if.expr.result.loc15_20(%.loc15_32.2) +// CHECK:STDOUT: %impl.elem0.loc16_32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_32.1: = bound_method %int_2, %impl.elem0.loc16_32 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc16_32: = specific_function %impl.elem0.loc16_32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_32.2: = bound_method %int_2, %specific_fn.loc16_32 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked.loc16_32: init %i32 = call %bound_method.loc16_32.2(%int_2) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc16_32.1: %i32 = value_of_initializer %int.convert_checked.loc16_32 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc16_32.2: %i32 = converted %int_2, %.loc16_32.1 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: br !if.expr.result.loc16_20(%.loc16_32.2) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc15_20: -// CHECK:STDOUT: %.loc15_20: %i32 = block_arg !if.expr.result.loc15_20 -// CHECK:STDOUT: br !if.expr.result.loc15_10(%.loc15_20) +// CHECK:STDOUT: !if.expr.result.loc16_20: +// CHECK:STDOUT: %.loc16_20: %i32 = block_arg !if.expr.result.loc16_20 +// CHECK:STDOUT: br !if.expr.result.loc16_10(%.loc16_20) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc15_10: +// CHECK:STDOUT: !if.expr.else.loc16_10: // CHECK:STDOUT: %c.ref: bool = name_ref c, %c -// CHECK:STDOUT: if %c.ref br !if.expr.then.loc15_44 else br !if.expr.else.loc15_44 +// CHECK:STDOUT: if %c.ref br !if.expr.then.loc16_44 else br !if.expr.else.loc16_44 // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc15_44: +// CHECK:STDOUT: !if.expr.then.loc16_44: // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %int_32.loc15_49: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc15_49: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_49.1: = bound_method %int_3, %impl.elem0.loc15_49 [concrete = constants.%Convert.bound.b30] -// CHECK:STDOUT: %specific_fn.loc15_49: = specific_function %impl.elem0.loc15_49, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_49.2: = bound_method %int_3, %specific_fn.loc15_49 [concrete = constants.%bound_method.047] -// CHECK:STDOUT: %int.convert_checked.loc15_49: init %i32 = call %bound_method.loc15_49.2(%int_3) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %.loc15_49.1: %i32 = value_of_initializer %int.convert_checked.loc15_49 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %.loc15_49.2: %i32 = converted %int_3, %.loc15_49.1 [concrete = constants.%int_3.822] -// CHECK:STDOUT: br !if.expr.result.loc15_44(%.loc15_49.2) +// CHECK:STDOUT: %int_32.loc16_49: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc16_49: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_49.1: = bound_method %int_3, %impl.elem0.loc16_49 [concrete = constants.%Convert.bound.b30] +// CHECK:STDOUT: %specific_fn.loc16_49: = specific_function %impl.elem0.loc16_49, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_49.2: = bound_method %int_3, %specific_fn.loc16_49 [concrete = constants.%bound_method.047] +// CHECK:STDOUT: %int.convert_checked.loc16_49: init %i32 = call %bound_method.loc16_49.2(%int_3) [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc16_49.1: %i32 = value_of_initializer %int.convert_checked.loc16_49 [concrete = constants.%int_3.822] +// CHECK:STDOUT: %.loc16_49.2: %i32 = converted %int_3, %.loc16_49.1 [concrete = constants.%int_3.822] +// CHECK:STDOUT: br !if.expr.result.loc16_44(%.loc16_49.2) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc15_44: +// CHECK:STDOUT: !if.expr.else.loc16_44: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc15_56: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_56.1: = bound_method %int_4, %impl.elem0.loc15_56 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc15_56: = specific_function %impl.elem0.loc15_56, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_56.2: = bound_method %int_4, %specific_fn.loc15_56 [concrete = constants.%bound_method.1da] -// CHECK:STDOUT: %int.convert_checked.loc15_56: init %i32 = call %bound_method.loc15_56.2(%int_4) [concrete = constants.%int_4.940] -// CHECK:STDOUT: %.loc15_56.1: %i32 = value_of_initializer %int.convert_checked.loc15_56 [concrete = constants.%int_4.940] -// CHECK:STDOUT: %.loc15_56.2: %i32 = converted %int_4, %.loc15_56.1 [concrete = constants.%int_4.940] -// CHECK:STDOUT: br !if.expr.result.loc15_44(%.loc15_56.2) +// CHECK:STDOUT: %impl.elem0.loc16_56: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc16_56.1: = bound_method %int_4, %impl.elem0.loc16_56 [concrete = constants.%Convert.bound.ac3] +// CHECK:STDOUT: %specific_fn.loc16_56: = specific_function %impl.elem0.loc16_56, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_56.2: = bound_method %int_4, %specific_fn.loc16_56 [concrete = constants.%bound_method.1da] +// CHECK:STDOUT: %int.convert_checked.loc16_56: init %i32 = call %bound_method.loc16_56.2(%int_4) [concrete = constants.%int_4.940] +// CHECK:STDOUT: %.loc16_56.1: %i32 = value_of_initializer %int.convert_checked.loc16_56 [concrete = constants.%int_4.940] +// CHECK:STDOUT: %.loc16_56.2: %i32 = converted %int_4, %.loc16_56.1 [concrete = constants.%int_4.940] +// CHECK:STDOUT: br !if.expr.result.loc16_44(%.loc16_56.2) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc15_44: -// CHECK:STDOUT: %.loc15_44: %i32 = block_arg !if.expr.result.loc15_44 -// CHECK:STDOUT: br !if.expr.result.loc15_10(%.loc15_44) +// CHECK:STDOUT: !if.expr.result.loc16_44: +// CHECK:STDOUT: %.loc16_44: %i32 = block_arg !if.expr.result.loc16_44 +// CHECK:STDOUT: br !if.expr.result.loc16_10(%.loc16_44) // CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc15_10: -// CHECK:STDOUT: %.loc15_10: %i32 = block_arg !if.expr.result.loc15_10 -// CHECK:STDOUT: return %.loc15_10 +// CHECK:STDOUT: !if.expr.result.loc16_10: +// CHECK:STDOUT: %.loc16_10: %i32 = block_arg !if.expr.result.loc16_10 +// CHECK:STDOUT: return %.loc16_10 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index 6e0fe68cfae7..4c7c7fa10eb4 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -42,16 +43,16 @@ fn F(cond: bool) { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.ab5: = bound_method %int_1.5b8, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9a1: = bound_method %int_1.5b8, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef9: = bound_method %int_2.ecc, %Convert.956 [concrete] @@ -68,10 +69,10 @@ fn F(cond: bool) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -87,11 +88,11 @@ fn F(cond: bool) { // CHECK:STDOUT: %s.param_patt: %pattern_type.851 = value_param_pattern %s.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %s.param: %struct_type.a.b.501 = value_param call_param0 -// CHECK:STDOUT: %.loc14: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.501] { -// CHECK:STDOUT: %int_32.loc14_14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.501] { +// CHECK:STDOUT: %int_32.loc15_14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc15_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [concrete = constants.%struct_type.a.b.501] // CHECK:STDOUT: } // CHECK:STDOUT: %s: %struct_type.a.b.501 = bind_name s, %s.param @@ -101,10 +102,10 @@ fn F(cond: bool) { // CHECK:STDOUT: %cond.param_patt: %pattern_type.831 = value_param_pattern %cond.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %cond.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc16_12.1: type = splice_block %.loc16_12.3 [concrete = bool] { +// CHECK:STDOUT: %.loc17_12.1: type = splice_block %.loc17_12.3 [concrete = bool] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc16_12.2: type = value_of_initializer %bool.make_type [concrete = bool] -// CHECK:STDOUT: %.loc16_12.3: type = converted %bool.make_type, %.loc16_12.2 [concrete = bool] +// CHECK:STDOUT: %.loc17_12.2: type = value_of_initializer %bool.make_type [concrete = bool] +// CHECK:STDOUT: %.loc17_12.3: type = converted %bool.make_type, %.loc17_12.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %cond: bool = bind_name cond, %cond.param // CHECK:STDOUT: } @@ -121,31 +122,31 @@ fn F(cond: bool) { // CHECK:STDOUT: %a.var: ref %struct_type.a.b.501 = var %a.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %.loc17_46.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc17_46.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_46.1: = bound_method %int_1, %impl.elem0.loc17_46.1 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc17_46.1: = specific_function %impl.elem0.loc17_46.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_46.2: = bound_method %int_1, %specific_fn.loc17_46.1 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc17_46.1: init %i32 = call %bound_method.loc17_46.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_46.2: init %i32 = converted %int_1, %int.convert_checked.loc17_46.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc17_46.3: ref %i32 = struct_access %a.var, element0 -// CHECK:STDOUT: %.loc17_46.4: init %i32 = initialize_from %.loc17_46.2 to %.loc17_46.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc17_46.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc17_46.3: = bound_method %int_2, %impl.elem0.loc17_46.2 [concrete = constants.%Convert.bound.ef9] -// CHECK:STDOUT: %specific_fn.loc17_46.2: = specific_function %impl.elem0.loc17_46.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc17_46.4: = bound_method %int_2, %specific_fn.loc17_46.2 [concrete = constants.%bound_method.b92] -// CHECK:STDOUT: %int.convert_checked.loc17_46.2: init %i32 = call %bound_method.loc17_46.4(%int_2) [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_46.5: init %i32 = converted %int_2, %int.convert_checked.loc17_46.2 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_46.6: ref %i32 = struct_access %a.var, element1 -// CHECK:STDOUT: %.loc17_46.7: init %i32 = initialize_from %.loc17_46.5 to %.loc17_46.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc17_46.8: init %struct_type.a.b.501 = struct_init (%.loc17_46.4, %.loc17_46.7) to %a.var [concrete = constants.%struct] -// CHECK:STDOUT: %.loc17_3: init %struct_type.a.b.501 = converted %.loc17_46.1, %.loc17_46.8 [concrete = constants.%struct] -// CHECK:STDOUT: assign %a.var, %.loc17_3 -// CHECK:STDOUT: %.loc17_27: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.501] { -// CHECK:STDOUT: %int_32.loc17_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc17_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc18_46.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) +// CHECK:STDOUT: %impl.elem0.loc18_46.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc18_46.1: = bound_method %int_1, %impl.elem0.loc18_46.1 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc18_46.1: = specific_function %impl.elem0.loc18_46.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_46.2: = bound_method %int_1, %specific_fn.loc18_46.1 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc18_46.1: init %i32 = call %bound_method.loc18_46.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc18_46.2: init %i32 = converted %int_1, %int.convert_checked.loc18_46.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc18_46.3: ref %i32 = struct_access %a.var, element0 +// CHECK:STDOUT: %.loc18_46.4: init %i32 = initialize_from %.loc18_46.2 to %.loc18_46.3 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %impl.elem0.loc18_46.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc18_46.3: = bound_method %int_2, %impl.elem0.loc18_46.2 [concrete = constants.%Convert.bound.ef9] +// CHECK:STDOUT: %specific_fn.loc18_46.2: = specific_function %impl.elem0.loc18_46.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc18_46.4: = bound_method %int_2, %specific_fn.loc18_46.2 [concrete = constants.%bound_method.b92] +// CHECK:STDOUT: %int.convert_checked.loc18_46.2: init %i32 = call %bound_method.loc18_46.4(%int_2) [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc18_46.5: init %i32 = converted %int_2, %int.convert_checked.loc18_46.2 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc18_46.6: ref %i32 = struct_access %a.var, element1 +// CHECK:STDOUT: %.loc18_46.7: init %i32 = initialize_from %.loc18_46.5 to %.loc18_46.6 [concrete = constants.%int_2.ef8] +// CHECK:STDOUT: %.loc18_46.8: init %struct_type.a.b.501 = struct_init (%.loc18_46.4, %.loc18_46.7) to %a.var [concrete = constants.%struct] +// CHECK:STDOUT: %.loc18_3: init %struct_type.a.b.501 = converted %.loc18_46.1, %.loc18_46.8 [concrete = constants.%struct] +// CHECK:STDOUT: assign %a.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_27: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.501] { +// CHECK:STDOUT: %int_32.loc18_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc18_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [concrete = constants.%struct_type.a.b.501] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %struct_type.a.b.501 = bind_name a, %a.var @@ -154,28 +155,28 @@ fn F(cond: bool) { // CHECK:STDOUT: if %cond.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %a.ref.loc18_18: ref %struct_type.a.b.501 = name_ref a, %a -// CHECK:STDOUT: %.loc18_18.1: ref %i32 = struct_access %a.ref.loc18_18, element0 -// CHECK:STDOUT: %.loc18_18.2: %i32 = bind_value %.loc18_18.1 -// CHECK:STDOUT: %.loc18_18.3: ref %i32 = struct_access %a.ref.loc18_18, element1 -// CHECK:STDOUT: %.loc18_18.4: %i32 = bind_value %.loc18_18.3 -// CHECK:STDOUT: %struct.loc18_18: %struct_type.a.b.501 = struct_value (%.loc18_18.2, %.loc18_18.4) -// CHECK:STDOUT: %.loc18_18.5: %struct_type.a.b.501 = converted %a.ref.loc18_18, %struct.loc18_18 -// CHECK:STDOUT: br !if.expr.result(%.loc18_18.5) +// CHECK:STDOUT: %a.ref.loc19_18: ref %struct_type.a.b.501 = name_ref a, %a +// CHECK:STDOUT: %.loc19_18.1: ref %i32 = struct_access %a.ref.loc19_18, element0 +// CHECK:STDOUT: %.loc19_18.2: %i32 = bind_value %.loc19_18.1 +// CHECK:STDOUT: %.loc19_18.3: ref %i32 = struct_access %a.ref.loc19_18, element1 +// CHECK:STDOUT: %.loc19_18.4: %i32 = bind_value %.loc19_18.3 +// CHECK:STDOUT: %struct.loc19_18: %struct_type.a.b.501 = struct_value (%.loc19_18.2, %.loc19_18.4) +// CHECK:STDOUT: %.loc19_18.5: %struct_type.a.b.501 = converted %a.ref.loc19_18, %struct.loc19_18 +// CHECK:STDOUT: br !if.expr.result(%.loc19_18.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %a.ref.loc18_25: ref %struct_type.a.b.501 = name_ref a, %a -// CHECK:STDOUT: %.loc18_25.1: ref %i32 = struct_access %a.ref.loc18_25, element0 -// CHECK:STDOUT: %.loc18_25.2: %i32 = bind_value %.loc18_25.1 -// CHECK:STDOUT: %.loc18_25.3: ref %i32 = struct_access %a.ref.loc18_25, element1 -// CHECK:STDOUT: %.loc18_25.4: %i32 = bind_value %.loc18_25.3 -// CHECK:STDOUT: %struct.loc18_25: %struct_type.a.b.501 = struct_value (%.loc18_25.2, %.loc18_25.4) -// CHECK:STDOUT: %.loc18_20: %struct_type.a.b.501 = converted %a.ref.loc18_25, %struct.loc18_25 -// CHECK:STDOUT: br !if.expr.result(%.loc18_20) +// CHECK:STDOUT: %a.ref.loc19_25: ref %struct_type.a.b.501 = name_ref a, %a +// CHECK:STDOUT: %.loc19_25.1: ref %i32 = struct_access %a.ref.loc19_25, element0 +// CHECK:STDOUT: %.loc19_25.2: %i32 = bind_value %.loc19_25.1 +// CHECK:STDOUT: %.loc19_25.3: ref %i32 = struct_access %a.ref.loc19_25, element1 +// CHECK:STDOUT: %.loc19_25.4: %i32 = bind_value %.loc19_25.3 +// CHECK:STDOUT: %struct.loc19_25: %struct_type.a.b.501 = struct_value (%.loc19_25.2, %.loc19_25.4) +// CHECK:STDOUT: %.loc19_20: %struct_type.a.b.501 = converted %a.ref.loc19_25, %struct.loc19_25 +// CHECK:STDOUT: br !if.expr.result(%.loc19_20) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc18_5: %struct_type.a.b.501 = block_arg !if.expr.result -// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%.loc18_5) +// CHECK:STDOUT: %.loc19_5: %struct_type.a.b.501 = block_arg !if.expr.result +// CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%.loc19_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index abaf056b6898..b9a758243daf 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -103,18 +104,18 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.8268 [symbolic] +// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic] // CHECK:STDOUT: %require_complete.9b1: = require_complete_type %Self.as_type.b70 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0.45f: %I.assoc_type = assoc_entity element0, @I.%V [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type.541: type = facet_access_type %.Self.258 [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.258 [symbolic_self] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.258, @I [symbolic_self] -// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type.541, (%I.lookup_impl_witness) [symbolic_self] -// CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type.541 [symbolic_self] -// CHECK:STDOUT: %impl.elem0.d8c: %.Self.as_type.541 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] +// CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type [symbolic_self] +// CHECK:STDOUT: %impl.elem0.d8c: %.Self.as_type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I_where.type.6ef: type = facet_type <@I where %impl.elem0.d8c = %empty_struct> [concrete] // CHECK:STDOUT: %I.impl_witness.3d1: = impl_witness file.%I.impl_witness_table.loc8 [concrete] @@ -134,16 +135,16 @@ fn CallF() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: } @@ -155,9 +156,9 @@ fn CallF() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -175,9 +176,9 @@ fn CallF() { // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.45f] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.541] -// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.541] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type.541 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.d8c] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.d8c] // CHECK:STDOUT: %.loc8_26.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_26.2: %empty_struct_type = converted %.loc8_26.1, %empty_struct [concrete = constants.%empty_struct] @@ -195,9 +196,9 @@ fn CallF() { // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.45f] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.541] -// CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.541] -// CHECK:STDOUT: %impl.elem0: %.Self.as_type.541 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.d8c] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.d8c] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc10_15: type = where_expr %.Self [concrete = constants.%I_where.type.3d4] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 @@ -207,7 +208,7 @@ fn CallF() { // CHECK:STDOUT: %I.impl_witness.loc10: = impl_witness %I.impl_witness_table.loc10 [concrete = constants.%I.impl_witness.5ef] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc10_15.1: = bound_method constants.%int_0.5c6, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_15.2: = bound_method constants.%int_0.5c6, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc10_15.2(constants.%int_0.5c6) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc10_15.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9] @@ -216,7 +217,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] // CHECK:STDOUT: %V: @V.%Self.as_type (%Self.as_type.b70) = assoc_const_decl @V [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.45f] // CHECK:STDOUT: } @@ -228,7 +229,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.8268)] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.b70)] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.as_type [symbolic = %require_complete (constants.%require_complete.9b1)] // CHECK:STDOUT: @@ -245,15 +246,15 @@ fn CallF() { // CHECK:STDOUT: witness = file.%I.impl_witness.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%Self.8268) { -// CHECK:STDOUT: %Self => constants.%Self.8268 +// CHECK:STDOUT: specific @V(constants.%Self.826) { +// CHECK:STDOUT: %Self => constants.%Self.826 // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.b70 // CHECK:STDOUT: %require_complete => constants.%require_complete.9b1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @V(constants.%I.facet.74c) { // CHECK:STDOUT: %Self => constants.%I.facet.74c -// CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type.541 +// CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c // CHECK:STDOUT: } // CHECK:STDOUT: @@ -300,7 +301,7 @@ fn CallF() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -310,7 +311,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: impl_decl @impl.f49 [concrete] {} { +// CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %.loc15_7.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] @@ -325,7 +326,7 @@ fn CallF() { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0 // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.f49 [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %.loc15: %empty_struct_type = converted constants.%int_0, [concrete = ] // CHECK:STDOUT: %impl_witness_assoc_constant: = impl_witness_assoc_constant [concrete = ] @@ -351,7 +352,7 @@ fn CallF() { // CHECK:STDOUT: assoc_const V:! @V.%Self.as_type (%Self.as_type.b70); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.f49: %.loc15_7.2 as %.loc15_14 { +// CHECK:STDOUT: impl @impl: %.loc15_7.2 as %.loc15_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } @@ -391,12 +392,12 @@ fn CallF() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.15e: type = facet_type <@ImplicitAs, @ImplicitAs(%C)> [concrete] // CHECK:STDOUT: %Convert.type.56d: type = fn_type @Convert.1, @ImplicitAs(%C) [concrete] -// CHECK:STDOUT: %ImplicitAs.impl_witness.ace: = impl_witness file.%ImplicitAs.impl_witness_table [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness file.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %Convert.type.721: type = fn_type @Convert.2 [concrete] // CHECK:STDOUT: %Convert.155: %Convert.type.721 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.15e = facet_value %empty_tuple.type, (%ImplicitAs.impl_witness.ace) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.15e = facet_value %empty_tuple.type, (%ImplicitAs.impl_witness) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] @@ -418,7 +419,7 @@ fn CallF() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -439,7 +440,7 @@ fn CallF() { // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%C)> [concrete = constants.%ImplicitAs.type.15e] // CHECK:STDOUT: } // CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (@impl.e86.%Convert.decl), @impl.e86 [concrete] -// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness.ace] +// CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness] // CHECK:STDOUT: impl_decl @impl.cbe [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] @@ -458,7 +459,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl.cbe [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] -// CHECK:STDOUT: %impl.elem0: %.5c3 = impl_witness_access constants.%ImplicitAs.impl_witness.ace, element0 [concrete = constants.%Convert.155] +// CHECK:STDOUT: %impl.elem0: %.5c3 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Convert.155] // CHECK:STDOUT: %bound_method: = bound_method constants.%empty_tuple, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %.loc18_13.1: ref %C = temporary_storage // CHECK:STDOUT: %Convert.call: init %C = call %bound_method(constants.%empty_tuple) to %.loc18_13.1 @@ -576,7 +577,7 @@ fn CallF() { // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] // CHECK:STDOUT: %.d3d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] -// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.7 [concrete] +// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.99f: %Op.type.18a = struct_value () [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %int_1, %Op.99f [concrete] // CHECK:STDOUT: %int_-1: Core.IntLiteral = int_value -1 [concrete] @@ -597,10 +598,10 @@ fn CallF() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] -// CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.abd = import_ref Core//prelude/operators/arithmetic, loc111_50, unloaded -// CHECK:STDOUT: %Core.import_ref.5e6: %Op.type.18a = import_ref Core//prelude/operators/arithmetic, loc112_31, loaded [concrete = constants.%Op.99f] +// CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] +// CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type] +// CHECK:STDOUT: %Core.import_ref.abd = import_ref Core//prelude/parts/int_literal, loc13_50, unloaded +// CHECK:STDOUT: %Core.import_ref.5e6: %Op.type.18a = import_ref Core//prelude/parts/int_literal, loc14_31, loaded [concrete = constants.%Op.99f] // CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.abd, %Core.import_ref.5e6), @impl.0ef [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -753,7 +754,7 @@ fn CallF() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/basic.carbon b/toolchain/check/testdata/impl/basic.carbon index c297205e6714..1422db9a943e 100644 --- a/toolchain/check/testdata/impl/basic.carbon +++ b/toolchain/check/testdata/impl/basic.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index b36d07f859a3..7eb53b8436ae 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index 4d74b52fd003..57cb813cdffa 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -35,7 +36,7 @@ impl i32 as I {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,16 +47,16 @@ impl i32 as I {} // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %I.ref.loc16: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %I.ref.loc17: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: impl_decl @impl [concrete] {} { -// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %I.ref.loc18: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %I.ref.loc19: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -67,7 +68,7 @@ impl i32 as I {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %i32.loc16 as %I.ref.loc16 { +// CHECK:STDOUT: impl @impl: %i32.loc17 as %I.ref.loc17 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index 84830c07e9c9..ac77104570d0 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -35,7 +36,7 @@ impl i32 as Empty { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/error_recovery.carbon b/toolchain/check/testdata/impl/error_recovery.carbon index 69bb68829381..d3b12c7d895a 100644 --- a/toolchain/check/testdata/impl/error_recovery.carbon +++ b/toolchain/check/testdata/impl/error_recovery.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index 133801833a99..54fb1683d875 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -49,21 +50,12 @@ fn G(c: C) { // CHECK:STDOUT: %.a44: type = fn_type_with_self_type %F.type.b7b, %HasF.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { @@ -71,7 +63,7 @@ fn G(c: C) { // CHECK:STDOUT: %c.param_patt: %pattern_type = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %c.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc25: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -124,14 +116,14 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%c.param: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc25: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %F.ref.loc25: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc25: %.a44 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.ad8] -// CHECK:STDOUT: %F.call.loc25: init %empty_tuple.type = call %impl.elem0.loc25() -// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %C.ref.loc26: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %F.ref.loc26: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc26: %.a44 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.ad8] // CHECK:STDOUT: %F.call.loc26: init %empty_tuple.type = call %impl.elem0.loc26() +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %F.ref.loc27: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc27: %.a44 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.ad8] +// CHECK:STDOUT: %F.call.loc27: init %empty_tuple.type = call %impl.elem0.loc27() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index 75abbd7b6c0b..5103b549b4ac 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -53,16 +54,16 @@ class X(U:! type) { // CHECK:STDOUT: --- extend_impl_generic_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %HasF.type.fe3: type = generic_interface_type @HasF [concrete] // CHECK:STDOUT: %HasF.generic: %HasF.type.fe3 = struct_value () [concrete] -// CHECK:STDOUT: %HasF.type.901: type = facet_type <@HasF, @HasF(%T.8b3)> [symbolic] +// CHECK:STDOUT: %HasF.type.901: type = facet_type <@HasF, @HasF(%T)> [symbolic] // CHECK:STDOUT: %Self.322: %HasF.type.901 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] -// CHECK:STDOUT: %F.type.46c: type = fn_type @F.1, @HasF(%T.8b3) [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %F.type.46c: type = fn_type @F.1, @HasF(%T) [symbolic] // CHECK:STDOUT: %F.823: %F.type.46c = struct_value () [symbolic] -// CHECK:STDOUT: %HasF.assoc_type.dd8: type = assoc_entity_type @HasF, @HasF(%T.8b3) [symbolic] +// CHECK:STDOUT: %HasF.assoc_type.dd8: type = assoc_entity_type @HasF, @HasF(%T) [symbolic] // CHECK:STDOUT: %assoc0.d31: %HasF.assoc_type.dd8 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %Param: type = class_type @Param [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -92,17 +93,17 @@ class X(U:! type) { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2.ecc, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2.ecc, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %Param.val: %Param = struct_value (%int_2.ef8) [concrete] @@ -119,9 +120,9 @@ class X(U:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -137,7 +138,7 @@ class X(U:! type) { // CHECK:STDOUT: %HasF.decl: %HasF.type.fe3 = interface_decl @HasF [concrete = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Param.decl: type = class_decl @Param [concrete = constants.%Param] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -152,7 +153,7 @@ class X(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @HasF(%T.loc4_16.1: type) { -// CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T.8b3)] +// CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.2)> [symbolic = %HasF.type (constants.%HasF.type.901)] @@ -168,9 +169,9 @@ class X(U:! type) { // CHECK:STDOUT: %return.patt: @F.1.%pattern_type (%pattern_type.7dcd0a.1) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @HasF.%T.loc4_16.1 [symbolic = %T (constants.%T.8b3)] -// CHECK:STDOUT: %return.param: ref @F.1.%T (%T.8b3) = out_param call_param0 -// CHECK:STDOUT: %return: ref @F.1.%T (%T.8b3) = return_slot %return.param +// CHECK:STDOUT: %T.ref: type = name_ref T, @HasF.%T.loc4_16.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %return.param: ref @F.1.%T (%T) = out_param call_param0 +// CHECK:STDOUT: %return: ref @F.1.%T (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0.loc5_14.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.dd8) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.d31)] // CHECK:STDOUT: @@ -234,10 +235,10 @@ class X(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%T.loc4_16.1: type, @HasF.%Self.1: @HasF.%HasF.type (%HasF.type.901)) { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @F.1.%T (%T.8b3); +// CHECK:STDOUT: fn() -> @F.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %return.param: %Param { @@ -246,7 +247,7 @@ class X(U:! type) { // CHECK:STDOUT: %.loc15_21.1: %struct_type.x.c96 = struct_literal (%int_2) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] // CHECK:STDOUT: %bound_method.loc15_21.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_21.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_21.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc15_21.2: init %i32 = converted %int_2, %int.convert_checked [concrete = constants.%int_2.ef8] @@ -301,12 +302,12 @@ class X(U:! type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF(constants.%T.8b3) { -// CHECK:STDOUT: %T.loc4_16.2 => constants.%T.8b3 +// CHECK:STDOUT: specific @HasF(constants.%T) { +// CHECK:STDOUT: %T.loc4_16.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T.8b3, constants.%Self.322) { -// CHECK:STDOUT: %T => constants.%T.8b3 +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.322) { +// CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_alias.carbon b/toolchain/check/testdata/impl/fail_alias.carbon index de9057d858d4..7321e10db6ea 100644 --- a/toolchain/check/testdata/impl/fail_alias.carbon +++ b/toolchain/check/testdata/impl/fail_alias.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index 5ed5ad133f74..ca9c78cd0e74 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -61,7 +62,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -78,14 +79,14 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (@impl.006.%G.decl.loc23_27.2), @impl.006 [concrete] +// CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (@impl.006.%G.decl.loc24_27.2), @impl.006 [concrete] // CHECK:STDOUT: %Simple.impl_witness: = impl_witness %Simple.impl_witness_table [concrete = constants.%Simple.impl_witness] // CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [concrete = constants.%InstanceCall] { // CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %n.param: %i32 = value_param call_param0 -// CHECK:STDOUT: %.loc26: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc27: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } @@ -99,13 +100,13 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %self.patt: @G.1.%pattern_type (%pattern_type.f88) = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @G.1.%pattern_type (%pattern_type.f88) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc15_14.1 (%Self.as_type.716) = value_param call_param0 -// CHECK:STDOUT: %.loc15_14.1: type = splice_block %.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.716)] { +// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc16_14.1 (%Self.as_type.716) = value_param call_param0 +// CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.716)] { // CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self.3c9)] -// CHECK:STDOUT: %Self.as_type.loc15_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.716)] -// CHECK:STDOUT: %.loc15_14.2: type = converted %Self.ref, %Self.as_type.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.716)] +// CHECK:STDOUT: %Self.as_type.loc16_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.716)] +// CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref, %Self.as_type.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.716)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc15_14.1 (%Self.as_type.716) = bind_name self, %self.param +// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc16_14.1 (%Self.as_type.716) = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, %G.decl [concrete = constants.%assoc0.db2] // CHECK:STDOUT: @@ -116,7 +117,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.006: %i32 as %Simple.ref { -// CHECK:STDOUT: %G.decl.loc23_27.1: %G.type.c9825d.1 = fn_decl @G.2 [concrete = constants.%G.e73e91.1] { +// CHECK:STDOUT: %G.decl.loc24_27.1: %G.type.c9825d.1 = fn_decl @G.2 [concrete = constants.%G.e73e91.1] { // CHECK:STDOUT: %self.patt: = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { @@ -124,7 +125,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %Undeclared.ref: = name_ref Undeclared, [concrete = ] // CHECK:STDOUT: %self: = bind_name self, %self.param [concrete = ] // CHECK:STDOUT: } -// CHECK:STDOUT: %G.decl.loc23_27.2: %G.type.c9825d.2 = fn_decl @G.3 [concrete = constants.%G.e73e91.2] { +// CHECK:STDOUT: %G.decl.loc24_27.2: %G.type.c9825d.2 = fn_decl @G.3 [concrete = constants.%G.e73e91.2] { // CHECK:STDOUT: %self.patt: %pattern_type.7ce = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.7ce = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { @@ -134,23 +135,23 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Undeclared = -// CHECK:STDOUT: .G = %G.decl.loc23_27.1 +// CHECK:STDOUT: .G = %G.decl.loc24_27.1 // CHECK:STDOUT: witness = file.%Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3c9)] -// CHECK:STDOUT: %Self.as_type.loc15_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.716)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc15_14.1 [symbolic = %pattern_type (constants.%pattern_type.f88)] +// CHECK:STDOUT: %Self.as_type.loc16_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.716)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_14.1 [symbolic = %pattern_type (constants.%pattern_type.f88)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @G.1.%Self.as_type.loc15_14.1 (%Self.as_type.716)); +// CHECK:STDOUT: fn(%self.param: @G.1.%Self.as_type.loc16_14.1 (%Self.as_type.716)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G.2(%self.param: ); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G.3(%self.param: %i32) [thunk @impl.006.%G.decl.loc23_27.1] { +// CHECK:STDOUT: fn @G.3(%self.param: %i32) [thunk @impl.006.%G.decl.loc24_27.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %G.ref: %G.type.c9825d.1 = name_ref G, @impl.006.%G.decl.loc23_27.1 [concrete = constants.%G.e73e91.1] +// CHECK:STDOUT: %G.ref: %G.type.c9825d.1 = name_ref G, @impl.006.%G.decl.loc24_27.1 [concrete = constants.%G.e73e91.1] // CHECK:STDOUT: %self.ref: %i32 = name_ref self, %self.param // CHECK:STDOUT: %G.bound: = bound_method %self.ref, %G.ref // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.bound() @@ -161,24 +162,24 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] -// CHECK:STDOUT: %G.ref.loc27_12: %Simple.assoc_type = name_ref G, @Simple.%assoc0 [concrete = constants.%assoc0.db2] +// CHECK:STDOUT: %G.ref.loc28_12: %Simple.assoc_type = name_ref G, @Simple.%assoc0 [concrete = constants.%assoc0.db2] // CHECK:STDOUT: %impl.elem0: %.8e6 = impl_witness_access constants.%Simple.impl_witness, element0 [concrete = constants.%G.e73e91.2] // CHECK:STDOUT: %bound_method: = bound_method %n.ref, %impl.elem0 -// CHECK:STDOUT: %G.ref.loc27_16: %G.type.c9825d.1 = name_ref G, @impl.006.%G.decl.loc23_27.1 [concrete = constants.%G.e73e91.1] -// CHECK:STDOUT: %G.bound: = bound_method %n.ref, %G.ref.loc27_16 +// CHECK:STDOUT: %G.ref.loc28_16: %G.type.c9825d.1 = name_ref G, @impl.006.%G.decl.loc24_27.1 [concrete = constants.%G.e73e91.1] +// CHECK:STDOUT: %G.bound: = bound_method %n.ref, %G.ref.loc28_16 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.bound() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self.3c9) { // CHECK:STDOUT: %Self => constants.%Self.3c9 -// CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%Self.as_type.716 +// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%Self.as_type.716 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Simple.facet) { // CHECK:STDOUT: %Self => constants.%Simple.facet -// CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%i32 +// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index 3db6497ff806..222d7f8baa06 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -49,38 +50,29 @@ class C { // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .GenericInterface = %GenericInterface.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.c92 = interface_decl @GenericInterface [concrete = constants.%GenericInterface.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc14_28.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_28.2 (constants.%T)] +// CHECK:STDOUT: %T.loc15_28.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_28.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @GenericInterface(%T.loc14_28.1: type) { -// CHECK:STDOUT: %T.loc14_28.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_28.2 (constants.%T)] +// CHECK:STDOUT: generic interface @GenericInterface(%T.loc15_28.1: type) { +// CHECK:STDOUT: %T.loc15_28.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_28.2 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %GenericInterface.type: type = facet_type <@GenericInterface, @GenericInterface(%T.loc14_28.2)> [symbolic = %GenericInterface.type (constants.%GenericInterface.type.3fe)] +// CHECK:STDOUT: %GenericInterface.type: type = facet_type <@GenericInterface, @GenericInterface(%T.loc15_28.2)> [symbolic = %GenericInterface.type (constants.%GenericInterface.type.3fe)] // CHECK:STDOUT: %Self.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.3fe) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] -// CHECK:STDOUT: %F.type: type = fn_type @F.1, @GenericInterface(%T.loc14_28.2) [symbolic = %F.type (constants.%F.type.a4b)] +// CHECK:STDOUT: %F.type: type = fn_type @F.1, @GenericInterface(%T.loc15_28.2) [symbolic = %F.type (constants.%F.type.a4b)] // CHECK:STDOUT: %F: @GenericInterface.%F.type (%F.type.a4b) = struct_value () [symbolic = %F (constants.%F.3d9)] -// CHECK:STDOUT: %GenericInterface.assoc_type: type = assoc_entity_type @GenericInterface, @GenericInterface(%T.loc14_28.2) [symbolic = %GenericInterface.assoc_type (constants.%GenericInterface.assoc_type)] -// CHECK:STDOUT: %assoc0.loc15_13.2: @GenericInterface.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc15_13.2 (constants.%assoc0)] +// CHECK:STDOUT: %GenericInterface.assoc_type: type = assoc_entity_type @GenericInterface, @GenericInterface(%T.loc15_28.2) [symbolic = %GenericInterface.assoc_type (constants.%GenericInterface.assoc_type)] +// CHECK:STDOUT: %assoc0.loc16_13.2: @GenericInterface.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc16_13.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.3fe) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] @@ -89,36 +81,36 @@ class C { // CHECK:STDOUT: %x.param_patt: @F.1.%pattern_type (%pattern_type.7dc) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: @F.1.%T (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, @GenericInterface.%T.loc14_28.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @GenericInterface.%T.loc15_28.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %x: @F.1.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc15_13.1: @GenericInterface.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc15_13.2 (constants.%assoc0)] +// CHECK:STDOUT: %assoc0.loc16_13.1: @GenericInterface.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc16_13.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 // CHECK:STDOUT: .T = -// CHECK:STDOUT: .F = %assoc0.loc15_13.1 +// CHECK:STDOUT: .F = %assoc0.loc16_13.1 // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl(%T.loc23_23.1: type) { -// CHECK:STDOUT: %T.loc23_23.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_23.2 (constants.%T)] -// CHECK:STDOUT: %GenericInterface.type.loc23_54.2: type = facet_type <@GenericInterface, @GenericInterface(%T.loc23_23.2)> [symbolic = %GenericInterface.type.loc23_54.2 (constants.%GenericInterface.type.3fe)] -// CHECK:STDOUT: %require_complete: = require_complete_type %GenericInterface.type.loc23_54.2 [symbolic = %require_complete (constants.%require_complete.70f)] -// CHECK:STDOUT: %GenericInterface.impl_witness: = impl_witness @C.%GenericInterface.impl_witness_table, @impl(%T.loc23_23.2) [symbolic = %GenericInterface.impl_witness (constants.%GenericInterface.impl_witness)] +// CHECK:STDOUT: generic impl @impl(%T.loc24_23.1: type) { +// CHECK:STDOUT: %T.loc24_23.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc24_23.2 (constants.%T)] +// CHECK:STDOUT: %GenericInterface.type.loc24_54.2: type = facet_type <@GenericInterface, @GenericInterface(%T.loc24_23.2)> [symbolic = %GenericInterface.type.loc24_54.2 (constants.%GenericInterface.type.3fe)] +// CHECK:STDOUT: %require_complete: = require_complete_type %GenericInterface.type.loc24_54.2 [symbolic = %require_complete (constants.%require_complete.70f)] +// CHECK:STDOUT: %GenericInterface.impl_witness: = impl_witness @C.%GenericInterface.impl_witness_table, @impl(%T.loc24_23.2) [symbolic = %GenericInterface.impl_witness (constants.%GenericInterface.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc23_23.2) [symbolic = %F.type (constants.%F.type.2cb)] +// CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc24_23.2) [symbolic = %F.type (constants.%F.type.2cb)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2cb) = struct_value () [symbolic = %F (constants.%F.4b1)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc23_54.1 { +// CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc24_54.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2cb) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.4b1)] { // CHECK:STDOUT: %x.patt: @F.2.%pattern_type (%pattern_type.7dc) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @F.2.%pattern_type (%pattern_type.7dc) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: @F.2.%T (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, @impl.%T.loc23_23.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, @impl.%T.loc24_23.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %x: @F.2.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: @@ -135,13 +127,13 @@ class C { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.c92 = name_ref GenericInterface, file.%GenericInterface.decl [concrete = constants.%GenericInterface.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc23_23.1 [symbolic = %T.loc23_23.2 (constants.%T)] -// CHECK:STDOUT: %GenericInterface.type.loc23_54.1: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc23_54.2 (constants.%GenericInterface.type.3fe)] -// CHECK:STDOUT: %T.loc23_23.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_23.2 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc24_23.1 [symbolic = %T.loc24_23.2 (constants.%T)] +// CHECK:STDOUT: %GenericInterface.type.loc24_54.1: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc24_54.2 (constants.%GenericInterface.type.3fe)] +// CHECK:STDOUT: %T.loc24_23.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc24_23.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %GenericInterface.impl_witness_table = impl_witness_table (), @impl [concrete] // CHECK:STDOUT: %GenericInterface.impl_witness: = impl_witness %GenericInterface.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%GenericInterface.impl_witness (constants.%GenericInterface.impl_witness)] -// CHECK:STDOUT: %.loc23: type = specific_constant @impl.%GenericInterface.type.loc23_54.1, @impl(constants.%T) [symbolic = constants.%GenericInterface.type.3fe] +// CHECK:STDOUT: %.loc24: type = specific_constant @impl.%GenericInterface.type.loc24_54.1, @impl(constants.%T) [symbolic = constants.%GenericInterface.type.3fe] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -152,14 +144,14 @@ class C { // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.1(@GenericInterface.%T.loc14_28.1: type, @GenericInterface.%Self.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.3fe)) { +// CHECK:STDOUT: generic fn @F.1(@GenericInterface.%T.loc15_28.1: type, @GenericInterface.%Self.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.3fe)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @F.1.%T (%T)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.2(@impl.%T.loc23_23.1: type) { +// CHECK:STDOUT: generic fn @F.2(@impl.%T.loc24_23.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dc)] // CHECK:STDOUT: @@ -173,7 +165,7 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericInterface(constants.%T) { -// CHECK:STDOUT: %T.loc14_28.2 => constants.%T +// CHECK:STDOUT: %T.loc15_28.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericInterface.type => constants.%GenericInterface.type.3fe @@ -181,7 +173,7 @@ class C { // CHECK:STDOUT: %F.type => constants.%F.type.a4b // CHECK:STDOUT: %F => constants.%F.3d9 // CHECK:STDOUT: %GenericInterface.assoc_type => constants.%GenericInterface.assoc_type -// CHECK:STDOUT: %assoc0.loc15_13.2 => constants.%assoc0 +// CHECK:STDOUT: %assoc0.loc16_13.2 => constants.%assoc0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self) { @@ -190,8 +182,8 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { -// CHECK:STDOUT: %T.loc23_23.2 => constants.%T -// CHECK:STDOUT: %GenericInterface.type.loc23_54.2 => constants.%GenericInterface.type.3fe +// CHECK:STDOUT: %T.loc24_23.2 => constants.%T +// CHECK:STDOUT: %GenericInterface.type.loc24_54.2 => constants.%GenericInterface.type.3fe // CHECK:STDOUT: %require_complete => constants.%require_complete.70f // CHECK:STDOUT: %GenericInterface.impl_witness => constants.%GenericInterface.impl_witness // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index 5fa4760d1d88..5eb02da78c9f 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon index b2cc818456de..f146c58f2eec 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -72,7 +73,7 @@ class E { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon index bbc019850e6b..1a93c475da18 100644 --- a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -37,7 +38,7 @@ class C { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon index 9b2e849e7222..f013d06af6bd 100644 --- a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -35,19 +36,10 @@ interface I { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,7 +72,7 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table, @impl(constants.%Self) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness)] -// CHECK:STDOUT: %.loc23: type = specific_constant @impl.%I.ref, @impl(constants.%Self) [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc24: type = specific_constant @impl.%I.ref, @impl(constants.%Self) [concrete = constants.%I.type] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon index f5b794ed7041..3f73e810d4d7 100644 --- a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -42,21 +43,12 @@ fn F(c: C) { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { @@ -64,7 +56,7 @@ fn F(c: C) { // CHECK:STDOUT: %c.param_patt: %pattern_type = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %c.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc27: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc28: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -93,10 +85,10 @@ fn F(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%c.param: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc28: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %F.ref.loc28: = name_ref F, [concrete = ] -// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %C.ref.loc29: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %F.ref.loc29: = name_ref F, [concrete = ] +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %F.ref.loc30: = name_ref F, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index e2e9b1b86e8e..6b573f34aa76 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon index 847fd6d9cfe4..7ee81ffbddbf 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -39,8 +40,8 @@ impl () as I {} // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { -// CHECK:STDOUT: %.loc23_7.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc23_7.2: type = converted %.loc23_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc24_7.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc24_7.2: type = converted %.loc24_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] @@ -63,7 +64,7 @@ impl () as I {} // CHECK:STDOUT: assoc_const T:! type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc23_7.2 as %I.ref { +// CHECK:STDOUT: impl @impl: %.loc24_7.2 as %I.ref { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index fe2eb4c8510b..050495ad39b2 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -243,7 +244,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] @@ -338,18 +339,18 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %F.be86c9.2: %F.type.d3b58f.2 = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete] // CHECK:STDOUT: %Self.2ff: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type.e1e8: type = facet_access_type %Self.2ff [symbolic] -// CHECK:STDOUT: %ptr.e87: type = ptr_type %Self.as_type.e1e8 [symbolic] +// CHECK:STDOUT: %Self.as_type.e1e: type = facet_access_type %Self.2ff [symbolic] +// CHECK:STDOUT: %ptr.e87: type = ptr_type %Self.as_type.e1e [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %struct_type.x.y.81e: type = struct_type {.x: %Self.as_type.e1e8, .y: %i32} [symbolic] +// CHECK:STDOUT: %struct_type.x.y.81e: type = struct_type {.x: %Self.as_type.e1e, .y: %i32} [symbolic] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.type.229: type = tuple_type (%ptr.e87, %struct_type.x.y.81e) [symbolic] // CHECK:STDOUT: %pattern_type.ced: type = pattern_type %tuple.type.229 [symbolic] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete] -// CHECK:STDOUT: %array_type.873: type = array_type %int_4, %Self.as_type.e1e8 [symbolic] +// CHECK:STDOUT: %array_type.873: type = array_type %int_4, %Self.as_type.e1e [symbolic] // CHECK:STDOUT: %pattern_type.c7e: type = pattern_type %array_type.873 [symbolic] // CHECK:STDOUT: %F.type.6ed: type = fn_type @F.20 [concrete] // CHECK:STDOUT: %F.998: %F.type.6ed = struct_value () [concrete] @@ -394,9 +395,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -443,7 +444,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] {} {} // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.82e] // CHECK:STDOUT: @@ -463,21 +464,21 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc102_44: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc102_44.1: type = value_of_initializer %bool.make_type.loc102_44 [concrete = bool] -// CHECK:STDOUT: %.loc102_44.2: type = converted %bool.make_type.loc102_44, %.loc102_44.1 [concrete = bool] +// CHECK:STDOUT: %bool.make_type.loc103_44: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc103_44.1: type = value_of_initializer %bool.make_type.loc103_44 [concrete = bool] +// CHECK:STDOUT: %.loc103_44.2: type = converted %bool.make_type.loc103_44, %.loc103_44.1 [concrete = bool] // CHECK:STDOUT: %self.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc102_26.1: type = splice_block %.loc102_26.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc102_26: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc102_26.2: type = value_of_initializer %bool.make_type.loc102_26 [concrete = bool] -// CHECK:STDOUT: %.loc102_26.3: type = converted %bool.make_type.loc102_26, %.loc102_26.2 [concrete = bool] +// CHECK:STDOUT: %.loc103_26.1: type = splice_block %.loc103_26.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc103_26: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc103_26.2: type = value_of_initializer %bool.make_type.loc103_26 [concrete = bool] +// CHECK:STDOUT: %.loc103_26.3: type = converted %bool.make_type.loc103_26, %.loc103_26.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %b.param: bool = value_param call_param1 -// CHECK:STDOUT: %.loc102_35.1: type = splice_block %.loc102_35.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc102_35: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc102_35.2: type = value_of_initializer %bool.make_type.loc102_35 [concrete = bool] -// CHECK:STDOUT: %.loc102_35.3: type = converted %bool.make_type.loc102_35, %.loc102_35.2 [concrete = bool] +// CHECK:STDOUT: %.loc103_35.1: type = splice_block %.loc103_35.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc103_35: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc103_35.2: type = value_of_initializer %bool.make_type.loc103_35 [concrete = bool] +// CHECK:STDOUT: %.loc103_35.3: type = converted %bool.make_type.loc103_35, %.loc103_35.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 @@ -494,34 +495,34 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: interface @SelfNested { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2ff] // CHECK:STDOUT: %F.decl: %F.type.6ed = fn_decl @F.20 [concrete = constants.%F.998] { -// CHECK:STDOUT: %x.patt: @F.20.%pattern_type.loc210_8 (%pattern_type.ced) = binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @F.20.%pattern_type.loc210_8 (%pattern_type.ced) = value_param_pattern %x.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @F.20.%pattern_type.loc210_41 (%pattern_type.c7e) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @F.20.%pattern_type.loc210_41 (%pattern_type.c7e) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %x.patt: @F.20.%pattern_type.loc211_8 (%pattern_type.ced) = binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @F.20.%pattern_type.loc211_8 (%pattern_type.ced) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @F.20.%pattern_type.loc211_41 (%pattern_type.c7e) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @F.20.%pattern_type.loc211_41 (%pattern_type.c7e) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc210_50: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] +// CHECK:STDOUT: %Self.ref.loc211_50: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %Self.as_type.loc210_50: type = facet_access_type %Self.ref.loc210_50 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] -// CHECK:STDOUT: %.loc210_50: type = converted %Self.ref.loc210_50, %Self.as_type.loc210_50 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] -// CHECK:STDOUT: %array_type.loc210_57.2: type = array_type %int_4, %.loc210_50 [symbolic = %array_type.loc210_57.1 (constants.%array_type.873)] +// CHECK:STDOUT: %Self.as_type.loc211_50: type = facet_access_type %Self.ref.loc211_50 [symbolic = %Self.as_type.loc211_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %.loc211_50: type = converted %Self.ref.loc211_50, %Self.as_type.loc211_50 [symbolic = %Self.as_type.loc211_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %array_type.loc211_57.2: type = array_type %int_4, %.loc211_50 [symbolic = %array_type.loc211_57.1 (constants.%array_type.873)] // CHECK:STDOUT: %x.param: @F.20.%tuple.type (%tuple.type.229) = value_param call_param0 -// CHECK:STDOUT: %.loc210_38.1: type = splice_block %.loc210_38.3 [symbolic = %tuple.type (constants.%tuple.type.229)] { -// CHECK:STDOUT: %Self.ref.loc210_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] -// CHECK:STDOUT: %Self.as_type.loc210_16.2: type = facet_access_type %Self.ref.loc210_12 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] -// CHECK:STDOUT: %.loc210_16: type = converted %Self.ref.loc210_12, %Self.as_type.loc210_16.2 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] -// CHECK:STDOUT: %ptr.loc210_16.2: type = ptr_type %.loc210_16 [symbolic = %ptr.loc210_16.1 (constants.%ptr.e87)] -// CHECK:STDOUT: %Self.ref.loc210_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] -// CHECK:STDOUT: %Self.as_type.loc210_24: type = facet_access_type %Self.ref.loc210_24 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] -// CHECK:STDOUT: %.loc210_24: type = converted %Self.ref.loc210_24, %Self.as_type.loc210_24 [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] +// CHECK:STDOUT: %.loc211_38.1: type = splice_block %.loc211_38.3 [symbolic = %tuple.type (constants.%tuple.type.229)] { +// CHECK:STDOUT: %Self.ref.loc211_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] +// CHECK:STDOUT: %Self.as_type.loc211_16.2: type = facet_access_type %Self.ref.loc211_12 [symbolic = %Self.as_type.loc211_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %.loc211_16: type = converted %Self.ref.loc211_12, %Self.as_type.loc211_16.2 [symbolic = %Self.as_type.loc211_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %ptr.loc211_16.2: type = ptr_type %.loc211_16 [symbolic = %ptr.loc211_16.1 (constants.%ptr.e87)] +// CHECK:STDOUT: %Self.ref.loc211_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] +// CHECK:STDOUT: %Self.as_type.loc211_24: type = facet_access_type %Self.ref.loc211_24 [symbolic = %Self.as_type.loc211_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %.loc211_24: type = converted %Self.ref.loc211_24, %Self.as_type.loc211_24 [symbolic = %Self.as_type.loc211_16.1 (constants.%Self.as_type.e1e)] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.x.y.loc210_37.2: type = struct_type {.x: @F.20.%Self.as_type.loc210_16.1 (%Self.as_type.e1e8), .y: %i32} [symbolic = %struct_type.x.y.loc210_37.1 (constants.%struct_type.x.y.81e)] -// CHECK:STDOUT: %.loc210_38.2: %tuple.type.24b = tuple_literal (%ptr.loc210_16.2, %struct_type.x.y.loc210_37.2) -// CHECK:STDOUT: %.loc210_38.3: type = converted %.loc210_38.2, constants.%tuple.type.229 [symbolic = %tuple.type (constants.%tuple.type.229)] +// CHECK:STDOUT: %struct_type.x.y.loc211_37.2: type = struct_type {.x: @F.20.%Self.as_type.loc211_16.1 (%Self.as_type.e1e), .y: %i32} [symbolic = %struct_type.x.y.loc211_37.1 (constants.%struct_type.x.y.81e)] +// CHECK:STDOUT: %.loc211_38.2: %tuple.type.24b = tuple_literal (%ptr.loc211_16.2, %struct_type.x.y.loc211_37.2) +// CHECK:STDOUT: %.loc211_38.3: type = converted %.loc211_38.2, constants.%tuple.type.229 [symbolic = %tuple.type (constants.%tuple.type.229)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.20.%tuple.type (%tuple.type.229) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @F.20.%array_type.loc210_57.1 (%array_type.873) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.20.%array_type.loc210_57.1 (%array_type.873) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.20.%array_type.loc211_57.1 (%array_type.873) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.20.%array_type.loc211_57.1 (%array_type.873) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %SelfNested.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.beb] // CHECK:STDOUT: @@ -556,27 +557,27 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.ddd: %Self.ref as %I.ref { -// CHECK:STDOUT: %F.decl.loc68_18.1: %F.type.44ef8c.1 = fn_decl @F.2 [concrete = constants.%F.424e9e.1] { +// CHECK:STDOUT: %F.decl.loc69_18.1: %F.type.44ef8c.1 = fn_decl @F.2 [concrete = constants.%F.424e9e.1] { // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %b.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc68_13.1: type = splice_block %.loc68_13.3 [concrete = bool] { +// CHECK:STDOUT: %.loc69_13.1: type = splice_block %.loc69_13.3 [concrete = bool] { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc68_13.2: type = value_of_initializer %bool.make_type [concrete = bool] -// CHECK:STDOUT: %.loc68_13.3: type = converted %bool.make_type, %.loc68_13.2 [concrete = bool] +// CHECK:STDOUT: %.loc69_13.2: type = value_of_initializer %bool.make_type [concrete = bool] +// CHECK:STDOUT: %.loc69_13.3: type = converted %bool.make_type, %.loc69_13.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc68_18.2: %F.type.44ef8c.2 = fn_decl @F.3 [concrete = constants.%F.424e9e.2] {} {} +// CHECK:STDOUT: %F.decl.loc69_18.2: %F.type.44ef8c.2 = fn_decl @F.3 [concrete = constants.%F.424e9e.2] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %F.decl.loc68_18.1 +// CHECK:STDOUT: .F = %F.decl.loc69_18.1 // CHECK:STDOUT: witness = @FExtraParam.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.698: %Self.ref as %I.ref { -// CHECK:STDOUT: %F.decl.loc84_23.1: %F.type.e1abdd.1 = fn_decl @F.4 [concrete = constants.%F.6ff574.1] { +// CHECK:STDOUT: %F.decl.loc85_23.1: %F.type.e1abdd.1 = fn_decl @F.4 [concrete = constants.%F.6ff574.1] { // CHECK:STDOUT: %self.patt: %pattern_type.8ae = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.8ae = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { @@ -584,10 +585,10 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [concrete = constants.%FExtraImplicitParam] // CHECK:STDOUT: %self: %FExtraImplicitParam = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc84_23.2: %F.type.e1abdd.2 = fn_decl @F.5 [concrete = constants.%F.6ff574.2] {} {} +// CHECK:STDOUT: %F.decl.loc85_23.2: %F.type.e1abdd.2 = fn_decl @F.5 [concrete = constants.%F.6ff574.2] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %F.decl.loc84_23.1 +// CHECK:STDOUT: .F = %F.decl.loc85_23.1 // CHECK:STDOUT: witness = @FExtraImplicitParam.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -597,8 +598,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc98_15.1: type = value_of_initializer %bool.make_type [concrete = bool] -// CHECK:STDOUT: %.loc98_15.2: type = converted %bool.make_type, %.loc98_15.1 [concrete = bool] +// CHECK:STDOUT: %.loc99_15.1: type = value_of_initializer %bool.make_type [concrete = bool] +// CHECK:STDOUT: %.loc99_15.2: type = converted %bool.make_type, %.loc99_15.1 [concrete = bool] // CHECK:STDOUT: %return.param: ref bool = out_param call_param0 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } @@ -609,26 +610,26 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5cf: %Self.ref as %J.ref { -// CHECK:STDOUT: %F.decl.loc116_31.1: %F.type.69596c.1 = fn_decl @F.8 [concrete = constants.%F.738f31.1] { +// CHECK:STDOUT: %F.decl.loc117_31.1: %F.type.69596c.1 = fn_decl @F.8 [concrete = constants.%F.738f31.1] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc116_27: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc116_27.1: type = value_of_initializer %bool.make_type.loc116_27 [concrete = bool] -// CHECK:STDOUT: %.loc116_27.2: type = converted %bool.make_type.loc116_27, %.loc116_27.1 [concrete = bool] +// CHECK:STDOUT: %bool.make_type.loc117_27: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc117_27.1: type = value_of_initializer %bool.make_type.loc117_27 [concrete = bool] +// CHECK:STDOUT: %.loc117_27.2: type = converted %bool.make_type.loc117_27, %.loc117_27.1 [concrete = bool] // CHECK:STDOUT: %self.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc116_16.1: type = splice_block %.loc116_16.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc116_16: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc116_16.2: type = value_of_initializer %bool.make_type.loc116_16 [concrete = bool] -// CHECK:STDOUT: %.loc116_16.3: type = converted %bool.make_type.loc116_16, %.loc116_16.2 [concrete = bool] +// CHECK:STDOUT: %.loc117_16.1: type = splice_block %.loc117_16.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc117_16: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc117_16.2: type = value_of_initializer %bool.make_type.loc117_16 [concrete = bool] +// CHECK:STDOUT: %.loc117_16.3: type = converted %bool.make_type.loc117_16, %.loc117_16.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref bool = out_param call_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc116_31.2: %F.type.69596c.2 = fn_decl @F.9 [concrete = constants.%F.738f31.2] { +// CHECK:STDOUT: %F.decl.loc117_31.2: %F.type.69596c.2 = fn_decl @F.9 [concrete = constants.%F.738f31.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] @@ -645,31 +646,31 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %F.decl.loc116_31.1 +// CHECK:STDOUT: .F = %F.decl.loc117_31.1 // CHECK:STDOUT: witness = @FMissingParam.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.bac: %Self.ref as %J.ref { -// CHECK:STDOUT: %F.decl.loc129_26.1: %F.type.d97cef.1 = fn_decl @F.10 [concrete = constants.%F.01de92.1] { +// CHECK:STDOUT: %F.decl.loc130_26.1: %F.type.d97cef.1 = fn_decl @F.10 [concrete = constants.%F.01de92.1] { // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc129_22: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc129_22.1: type = value_of_initializer %bool.make_type.loc129_22 [concrete = bool] -// CHECK:STDOUT: %.loc129_22.2: type = converted %bool.make_type.loc129_22, %.loc129_22.1 [concrete = bool] +// CHECK:STDOUT: %bool.make_type.loc130_22: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc130_22.1: type = value_of_initializer %bool.make_type.loc130_22 [concrete = bool] +// CHECK:STDOUT: %.loc130_22.2: type = converted %bool.make_type.loc130_22, %.loc130_22.1 [concrete = bool] // CHECK:STDOUT: %b.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc129_13.1: type = splice_block %.loc129_13.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc129_13: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc129_13.2: type = value_of_initializer %bool.make_type.loc129_13 [concrete = bool] -// CHECK:STDOUT: %.loc129_13.3: type = converted %bool.make_type.loc129_13, %.loc129_13.2 [concrete = bool] +// CHECK:STDOUT: %.loc130_13.1: type = splice_block %.loc130_13.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc130_13: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc130_13.2: type = value_of_initializer %bool.make_type.loc130_13 [concrete = bool] +// CHECK:STDOUT: %.loc130_13.3: type = converted %bool.make_type.loc130_13, %.loc130_13.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param call_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc129_26.2: %F.type.d97cef.2 = fn_decl @F.11 [concrete = constants.%F.01de92.2] { +// CHECK:STDOUT: %F.decl.loc130_26.2: %F.type.d97cef.2 = fn_decl @F.11 [concrete = constants.%F.01de92.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] @@ -686,33 +687,33 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %F.decl.loc129_26.1 +// CHECK:STDOUT: .F = %F.decl.loc130_26.1 // CHECK:STDOUT: witness = @FMissingImplicitParam.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1a7: %Self.ref as %J.ref { -// CHECK:STDOUT: %F.decl.loc151_30.1: %F.type.123d7a.1 = fn_decl @F.12 [concrete = constants.%F.c7d02d.1] { +// CHECK:STDOUT: %F.decl.loc152_30.1: %F.type.123d7a.1 = fn_decl @F.12 [concrete = constants.%F.c7d02d.1] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc151_16.1: type = splice_block %.loc151_16.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc151_16: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc151_16.2: type = value_of_initializer %bool.make_type.loc151_16 [concrete = bool] -// CHECK:STDOUT: %.loc151_16.3: type = converted %bool.make_type.loc151_16, %.loc151_16.2 [concrete = bool] +// CHECK:STDOUT: %.loc152_16.1: type = splice_block %.loc152_16.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc152_16: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc152_16.2: type = value_of_initializer %bool.make_type.loc152_16 [concrete = bool] +// CHECK:STDOUT: %.loc152_16.3: type = converted %bool.make_type.loc152_16, %.loc152_16.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %b.param: bool = value_param call_param1 -// CHECK:STDOUT: %.loc151_25.1: type = splice_block %.loc151_25.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc151_25: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc151_25.2: type = value_of_initializer %bool.make_type.loc151_25 [concrete = bool] -// CHECK:STDOUT: %.loc151_25.3: type = converted %bool.make_type.loc151_25, %.loc151_25.2 [concrete = bool] +// CHECK:STDOUT: %.loc152_25.1: type = splice_block %.loc152_25.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc152_25: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc152_25.2: type = value_of_initializer %bool.make_type.loc152_25 [concrete = bool] +// CHECK:STDOUT: %.loc152_25.3: type = converted %bool.make_type.loc152_25, %.loc152_25.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc151_30.2: %F.type.123d7a.2 = fn_decl @F.13 [concrete = constants.%F.c7d02d.2] { +// CHECK:STDOUT: %F.decl.loc152_30.2: %F.type.123d7a.2 = fn_decl @F.13 [concrete = constants.%F.c7d02d.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] @@ -729,12 +730,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %F.decl.loc151_30.1 +// CHECK:STDOUT: .F = %F.decl.loc152_30.1 // CHECK:STDOUT: witness = @FMissingReturnType.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.f2b: %Self.ref as %J.ref { -// CHECK:STDOUT: %F.decl.loc170_38.1: %F.type.6b537d.1 = fn_decl @F.14 [concrete = constants.%F.04313a.1] { +// CHECK:STDOUT: %F.decl.loc171_38.1: %F.type.6b537d.1 = fn_decl @F.14 [concrete = constants.%F.04313a.1] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.b90 = binding_pattern b [concrete] @@ -742,14 +743,14 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc170_34: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc170_34.1: type = value_of_initializer %bool.make_type.loc170_34 [concrete = bool] -// CHECK:STDOUT: %.loc170_34.2: type = converted %bool.make_type.loc170_34, %.loc170_34.1 [concrete = bool] +// CHECK:STDOUT: %bool.make_type.loc171_34: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc171_34.1: type = value_of_initializer %bool.make_type.loc171_34 [concrete = bool] +// CHECK:STDOUT: %.loc171_34.2: type = converted %bool.make_type.loc171_34, %.loc171_34.1 [concrete = bool] // CHECK:STDOUT: %self.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc170_16.1: type = splice_block %.loc170_16.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc170_16: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc170_16.2: type = value_of_initializer %bool.make_type.loc170_16 [concrete = bool] -// CHECK:STDOUT: %.loc170_16.3: type = converted %bool.make_type.loc170_16, %.loc170_16.2 [concrete = bool] +// CHECK:STDOUT: %.loc171_16.1: type = splice_block %.loc171_16.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc171_16: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc171_16.2: type = value_of_initializer %bool.make_type.loc171_16 [concrete = bool] +// CHECK:STDOUT: %.loc171_16.3: type = converted %bool.make_type.loc171_16, %.loc171_16.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %b.param: %FDifferentParamType = value_param call_param1 @@ -758,7 +759,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc170_38.2: %F.type.6b537d.2 = fn_decl @F.15 [concrete = constants.%F.04313a.2] { +// CHECK:STDOUT: %F.decl.loc171_38.2: %F.type.6b537d.2 = fn_decl @F.15 [concrete = constants.%F.04313a.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] @@ -775,12 +776,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %F.decl.loc170_38.1 +// CHECK:STDOUT: .F = %F.decl.loc171_38.1 // CHECK:STDOUT: witness = @FDifferentParamType.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.db4: %Self.ref as %J.ref { -// CHECK:STDOUT: %F.decl.loc183_38.1: %F.type.d6232a.1 = fn_decl @F.16 [concrete = constants.%F.886f70.1] { +// CHECK:STDOUT: %F.decl.loc184_38.1: %F.type.d6232a.1 = fn_decl @F.16 [concrete = constants.%F.886f70.1] { // CHECK:STDOUT: %self.patt: %pattern_type.9cc = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.9cc = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] @@ -788,23 +789,23 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc183_34: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc183_34.1: type = value_of_initializer %bool.make_type.loc183_34 [concrete = bool] -// CHECK:STDOUT: %.loc183_34.2: type = converted %bool.make_type.loc183_34, %.loc183_34.1 [concrete = bool] +// CHECK:STDOUT: %bool.make_type.loc184_34: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc184_34.1: type = value_of_initializer %bool.make_type.loc184_34 [concrete = bool] +// CHECK:STDOUT: %.loc184_34.2: type = converted %bool.make_type.loc184_34, %.loc184_34.1 [concrete = bool] // CHECK:STDOUT: %self.param: %FDifferentImplicitParamType = value_param call_param0 // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType] // CHECK:STDOUT: %self: %FDifferentImplicitParamType = bind_name self, %self.param // CHECK:STDOUT: %b.param: bool = value_param call_param1 -// CHECK:STDOUT: %.loc183_25.1: type = splice_block %.loc183_25.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc183_25: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc183_25.2: type = value_of_initializer %bool.make_type.loc183_25 [concrete = bool] -// CHECK:STDOUT: %.loc183_25.3: type = converted %bool.make_type.loc183_25, %.loc183_25.2 [concrete = bool] +// CHECK:STDOUT: %.loc184_25.1: type = splice_block %.loc184_25.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc184_25: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc184_25.2: type = value_of_initializer %bool.make_type.loc184_25 [concrete = bool] +// CHECK:STDOUT: %.loc184_25.3: type = converted %bool.make_type.loc184_25, %.loc184_25.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc183_38.2: %F.type.d6232a.2 = fn_decl @F.17 [concrete = constants.%F.886f70.2] { +// CHECK:STDOUT: %F.decl.loc184_38.2: %F.type.d6232a.2 = fn_decl @F.17 [concrete = constants.%F.886f70.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] @@ -821,12 +822,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %F.decl.loc183_38.1 +// CHECK:STDOUT: .F = %F.decl.loc184_38.1 // CHECK:STDOUT: witness = @FDifferentImplicitParamType.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.fcc: %Self.ref as %J.ref { -// CHECK:STDOUT: %F.decl.loc199_38.1: %F.type.d3b58f.1 = fn_decl @F.18 [concrete = constants.%F.be86c9.1] { +// CHECK:STDOUT: %F.decl.loc200_38.1: %F.type.d3b58f.1 = fn_decl @F.18 [concrete = constants.%F.be86c9.1] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] @@ -836,23 +837,23 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [concrete = constants.%FDifferentReturnType] // CHECK:STDOUT: %self.param: bool = value_param call_param0 -// CHECK:STDOUT: %.loc199_16.1: type = splice_block %.loc199_16.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc199_16: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc199_16.2: type = value_of_initializer %bool.make_type.loc199_16 [concrete = bool] -// CHECK:STDOUT: %.loc199_16.3: type = converted %bool.make_type.loc199_16, %.loc199_16.2 [concrete = bool] +// CHECK:STDOUT: %.loc200_16.1: type = splice_block %.loc200_16.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc200_16: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc200_16.2: type = value_of_initializer %bool.make_type.loc200_16 [concrete = bool] +// CHECK:STDOUT: %.loc200_16.3: type = converted %bool.make_type.loc200_16, %.loc200_16.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %b.param: bool = value_param call_param1 -// CHECK:STDOUT: %.loc199_25.1: type = splice_block %.loc199_25.3 [concrete = bool] { -// CHECK:STDOUT: %bool.make_type.loc199_25: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc199_25.2: type = value_of_initializer %bool.make_type.loc199_25 [concrete = bool] -// CHECK:STDOUT: %.loc199_25.3: type = converted %bool.make_type.loc199_25, %.loc199_25.2 [concrete = bool] +// CHECK:STDOUT: %.loc200_25.1: type = splice_block %.loc200_25.3 [concrete = bool] { +// CHECK:STDOUT: %bool.make_type.loc200_25: init type = call constants.%Bool() [concrete = bool] +// CHECK:STDOUT: %.loc200_25.2: type = value_of_initializer %bool.make_type.loc200_25 [concrete = bool] +// CHECK:STDOUT: %.loc200_25.3: type = converted %bool.make_type.loc200_25, %.loc200_25.2 [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %FDifferentReturnType = out_param call_param2 // CHECK:STDOUT: %return: ref %FDifferentReturnType = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc199_38.2: %F.type.d3b58f.2 = fn_decl @F.19 [concrete = constants.%F.be86c9.2] { +// CHECK:STDOUT: %F.decl.loc200_38.2: %F.type.d3b58f.2 = fn_decl @F.19 [concrete = constants.%F.be86c9.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete] @@ -869,37 +870,37 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %F.decl.loc199_38.1 +// CHECK:STDOUT: .F = %F.decl.loc200_38.1 // CHECK:STDOUT: witness = @FDifferentReturnType.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.6a5: %Self.ref as %SelfNested.ref { -// CHECK:STDOUT: %F.decl.loc222_87.1: %F.type.f90165.1 = fn_decl @F.21 [concrete = constants.%F.fa8d04.1] { +// CHECK:STDOUT: %F.decl.loc223_87.1: %F.type.f90165.1 = fn_decl @F.21 [concrete = constants.%F.fa8d04.1] { // CHECK:STDOUT: %x.patt: %pattern_type.714 = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.714 = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.1f1 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.1f1 = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %SelfNestedBadParam.ref.loc222_65: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam] +// CHECK:STDOUT: %SelfNestedBadParam.ref.loc223_65: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam.ref.loc222_65 [concrete = constants.%array_type.a41] +// CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam.ref.loc223_65 [concrete = constants.%array_type.a41] // CHECK:STDOUT: %x.param: %tuple.type.a7d = value_param call_param0 -// CHECK:STDOUT: %.loc222_53.1: type = splice_block %.loc222_53.3 [concrete = constants.%tuple.type.a7d] { -// CHECK:STDOUT: %SelfNestedBadParam.ref.loc222_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadParam.ref.loc222_14 [concrete = constants.%ptr.4cd] -// CHECK:STDOUT: %int_32.loc222_40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc222_40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %int_32.loc222_49: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc222_49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc223_53.1: type = splice_block %.loc223_53.3 [concrete = constants.%tuple.type.a7d] { +// CHECK:STDOUT: %SelfNestedBadParam.ref.loc223_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam] +// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadParam.ref.loc223_14 [concrete = constants.%ptr.4cd] +// CHECK:STDOUT: %int_32.loc223_40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc223_40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %int_32.loc223_49: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc223_49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %i32, .y: %i32} [concrete = constants.%struct_type.x.y.871] -// CHECK:STDOUT: %.loc222_53.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) -// CHECK:STDOUT: %.loc222_53.3: type = converted %.loc222_53.2, constants.%tuple.type.a7d [concrete = constants.%tuple.type.a7d] +// CHECK:STDOUT: %.loc223_53.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) +// CHECK:STDOUT: %.loc223_53.3: type = converted %.loc223_53.2, constants.%tuple.type.a7d [concrete = constants.%tuple.type.a7d] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.a7d = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %array_type.a41 = out_param call_param1 // CHECK:STDOUT: %return: ref %array_type.a41 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc222_87.2: %F.type.f90165.2 = fn_decl @F.22 [concrete = constants.%F.fa8d04.2] { +// CHECK:STDOUT: %F.decl.loc223_87.2: %F.type.f90165.2 = fn_decl @F.22 [concrete = constants.%F.fa8d04.2] { // CHECK:STDOUT: %x.patt: %pattern_type.a5c = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.a5c = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.1f1 = return_slot_pattern [concrete] @@ -913,12 +914,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .SelfNestedBadParam = -// CHECK:STDOUT: .F = %F.decl.loc222_87.1 +// CHECK:STDOUT: .F = %F.decl.loc223_87.1 // CHECK:STDOUT: witness = @SelfNestedBadParam.%SelfNested.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.bfc: %Self.ref as %SelfNested.ref { -// CHECK:STDOUT: %F.decl.loc238_112.1: %F.type.0e7d1d.1 = fn_decl @F.23 [concrete = constants.%F.0bc78a.1] { +// CHECK:STDOUT: %F.decl.loc239_112.1: %F.type.0e7d1d.1 = fn_decl @F.23 [concrete = constants.%F.0bc78a.1] { // CHECK:STDOUT: %x.patt: %pattern_type.23f = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.23f = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.1f1 = return_slot_pattern [concrete] @@ -928,21 +929,21 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam.ref [concrete = constants.%array_type.a41] // CHECK:STDOUT: %x.param: %tuple.type.eb9 = value_param call_param0 -// CHECK:STDOUT: %.loc238_78.1: type = splice_block %.loc238_78.3 [concrete = constants.%tuple.type.eb9] { -// CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc238_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [concrete = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadReturnType.ref.loc238_14 [concrete = constants.%ptr.612] -// CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc238_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [concrete = constants.%SelfNestedBadReturnType] +// CHECK:STDOUT: %.loc239_78.1: type = splice_block %.loc239_78.3 [concrete = constants.%tuple.type.eb9] { +// CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc239_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [concrete = constants.%SelfNestedBadReturnType] +// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadReturnType.ref.loc239_14 [concrete = constants.%ptr.612] +// CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc239_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [concrete = constants.%SelfNestedBadReturnType] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [concrete = constants.%struct_type.x.y.ac5] -// CHECK:STDOUT: %.loc238_78.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) -// CHECK:STDOUT: %.loc238_78.3: type = converted %.loc238_78.2, constants.%tuple.type.eb9 [concrete = constants.%tuple.type.eb9] +// CHECK:STDOUT: %.loc239_78.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) +// CHECK:STDOUT: %.loc239_78.3: type = converted %.loc239_78.2, constants.%tuple.type.eb9 [concrete = constants.%tuple.type.eb9] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.eb9 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %array_type.a41 = out_param call_param1 // CHECK:STDOUT: %return: ref %array_type.a41 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc238_112.2: %F.type.0e7d1d.2 = fn_decl @F.24 [concrete = constants.%F.0bc78a.2] { +// CHECK:STDOUT: %F.decl.loc239_112.2: %F.type.0e7d1d.2 = fn_decl @F.24 [concrete = constants.%F.0bc78a.2] { // CHECK:STDOUT: %x.patt: %pattern_type.23f = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.23f = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.f56 = return_slot_pattern [concrete] @@ -957,7 +958,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: !members: // CHECK:STDOUT: .SelfNestedBadReturnType = // CHECK:STDOUT: .SelfNestedBadParam = -// CHECK:STDOUT: .F = %F.decl.loc238_112.1 +// CHECK:STDOUT: .F = %F.decl.loc239_112.1 // CHECK:STDOUT: witness = @SelfNestedBadReturnType.%SelfNested.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1017,7 +1018,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraParam [concrete = constants.%FExtraParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.ddd.%F.decl.loc68_18.2), @impl.ddd [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.ddd.%F.decl.loc69_18.2), @impl.ddd [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.1f3] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1033,7 +1034,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [concrete = constants.%FExtraImplicitParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.698.%F.decl.loc84_23.2), @impl.698 [concrete] +// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.698.%F.decl.loc85_23.2), @impl.698 [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.a7b] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1065,7 +1066,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingParam [concrete = constants.%FMissingParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.5cf.%F.decl.loc116_31.2), @impl.5cf [concrete] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.5cf.%F.decl.loc117_31.2), @impl.5cf [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.4e9] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1081,7 +1082,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingImplicitParam [concrete = constants.%FMissingImplicitParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.bac.%F.decl.loc129_26.2), @impl.bac [concrete] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.bac.%F.decl.loc130_26.2), @impl.bac [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.841] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1097,7 +1098,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingReturnType [concrete = constants.%FMissingReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.1a7.%F.decl.loc151_30.2), @impl.1a7 [concrete] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.1a7.%F.decl.loc152_30.2), @impl.1a7 [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.e75] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1113,7 +1114,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [concrete = constants.%FDifferentParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.f2b.%F.decl.loc170_38.2), @impl.f2b [concrete] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.f2b.%F.decl.loc171_38.2), @impl.f2b [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.cbe] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1129,7 +1130,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.db4.%F.decl.loc183_38.2), @impl.db4 [concrete] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.db4.%F.decl.loc184_38.2), @impl.db4 [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.af2] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1145,7 +1146,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [concrete = constants.%FDifferentReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.fcc.%F.decl.loc199_38.2), @impl.fcc [concrete] +// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.fcc.%F.decl.loc200_38.2), @impl.fcc [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.bc1] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1161,7 +1162,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadParam [concrete = constants.%SelfNestedBadParam] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (@impl.6a5.%F.decl.loc222_87.2), @impl.6a5 [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (@impl.6a5.%F.decl.loc223_87.2), @impl.6a5 [concrete] // CHECK:STDOUT: %SelfNested.impl_witness: = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.e31] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1178,7 +1179,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadReturnType [concrete = constants.%SelfNestedBadReturnType] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (@impl.bfc.%F.decl.loc238_112.2), @impl.bfc [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (@impl.bfc.%F.decl.loc239_112.2), @impl.bfc [concrete] // CHECK:STDOUT: %SelfNested.impl_witness: = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.d5e] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] @@ -1199,17 +1200,17 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%b.param: bool); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.3() [thunk @impl.ddd.%F.decl.loc68_18.1] { +// CHECK:STDOUT: fn @F.3() [thunk @impl.ddd.%F.decl.loc69_18.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.44ef8c.1 = name_ref F, @impl.ddd.%F.decl.loc68_18.1 [concrete = constants.%F.424e9e.1] +// CHECK:STDOUT: %F.ref: %F.type.44ef8c.1 = name_ref F, @impl.ddd.%F.decl.loc69_18.1 [concrete = constants.%F.424e9e.1] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.4(%self.param: %FExtraImplicitParam); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.5() [thunk @impl.698.%F.decl.loc84_23.1] { +// CHECK:STDOUT: fn @F.5() [thunk @impl.698.%F.decl.loc85_23.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.e1abdd.1 = name_ref F, @impl.698.%F.decl.loc84_23.1 [concrete = constants.%F.6ff574.1] +// CHECK:STDOUT: %F.ref: %F.type.e1abdd.1 = name_ref F, @impl.698.%F.decl.loc85_23.1 [concrete = constants.%F.6ff574.1] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1222,9 +1223,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.8(%self.param: bool) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.9(%self.param: bool, %b.param: bool) -> bool [thunk @impl.5cf.%F.decl.loc116_31.1] { +// CHECK:STDOUT: fn @F.9(%self.param: bool, %b.param: bool) -> bool [thunk @impl.5cf.%F.decl.loc117_31.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.69596c.1 = name_ref F, @impl.5cf.%F.decl.loc116_31.1 [concrete = constants.%F.738f31.1] +// CHECK:STDOUT: %F.ref: %F.type.69596c.1 = name_ref F, @impl.5cf.%F.decl.loc117_31.1 [concrete = constants.%F.738f31.1] // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param // CHECK:STDOUT: %return.ref: ref bool = name_ref , %return.param @@ -1234,122 +1235,122 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.10(%b.param: bool) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.11(%self.param: bool, %b.param: bool) -> bool [thunk @impl.bac.%F.decl.loc129_26.1] { +// CHECK:STDOUT: fn @F.11(%self.param: bool, %b.param: bool) -> bool [thunk @impl.bac.%F.decl.loc130_26.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.d97cef.1 = name_ref F, @impl.bac.%F.decl.loc129_26.1 [concrete = constants.%F.01de92.1] +// CHECK:STDOUT: %F.ref: %F.type.d97cef.1 = name_ref F, @impl.bac.%F.decl.loc130_26.1 [concrete = constants.%F.01de92.1] // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param // CHECK:STDOUT: %return.ref: ref bool = name_ref , %return.param // CHECK:STDOUT: %F.call: init bool = call %F.ref(%b.ref) -// CHECK:STDOUT: %.loc129_26.1: bool = value_of_initializer %F.call -// CHECK:STDOUT: %.loc129_26.2: bool = converted %F.call, %.loc129_26.1 -// CHECK:STDOUT: return %.loc129_26.2 +// CHECK:STDOUT: %.loc130_26.1: bool = value_of_initializer %F.call +// CHECK:STDOUT: %.loc130_26.2: bool = converted %F.call, %.loc130_26.1 +// CHECK:STDOUT: return %.loc130_26.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.12(%self.param: bool, %b.param: bool); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.13(%self.param: bool, %b.param: bool) -> bool [thunk @impl.1a7.%F.decl.loc151_30.1] { +// CHECK:STDOUT: fn @F.13(%self.param: bool, %b.param: bool) -> bool [thunk @impl.1a7.%F.decl.loc152_30.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.123d7a.1 = name_ref F, @impl.1a7.%F.decl.loc151_30.1 [concrete = constants.%F.c7d02d.1] +// CHECK:STDOUT: %F.ref: %F.type.123d7a.1 = name_ref F, @impl.1a7.%F.decl.loc152_30.1 [concrete = constants.%F.c7d02d.1] // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param // CHECK:STDOUT: %return.ref: ref bool = name_ref , %return.param // CHECK:STDOUT: %F.bound: = bound_method %self.ref, %F.ref // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound(%self.ref, %b.ref) -// CHECK:STDOUT: %.loc151: bool = converted %F.call, [concrete = ] +// CHECK:STDOUT: %.loc152: bool = converted %F.call, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.14(%self.param: bool, %b.param: %FDifferentParamType) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.15(%self.param: bool, %b.param: bool) -> bool [thunk @impl.f2b.%F.decl.loc170_38.1] { +// CHECK:STDOUT: fn @F.15(%self.param: bool, %b.param: bool) -> bool [thunk @impl.f2b.%F.decl.loc171_38.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.6b537d.1 = name_ref F, @impl.f2b.%F.decl.loc170_38.1 [concrete = constants.%F.04313a.1] +// CHECK:STDOUT: %F.ref: %F.type.6b537d.1 = name_ref F, @impl.f2b.%F.decl.loc171_38.1 [concrete = constants.%F.04313a.1] // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param // CHECK:STDOUT: %return.ref: ref bool = name_ref , %return.param // CHECK:STDOUT: %F.bound: = bound_method %self.ref, %F.ref -// CHECK:STDOUT: %.loc102: %FDifferentParamType = converted %b.ref, [concrete = ] +// CHECK:STDOUT: %.loc103: %FDifferentParamType = converted %b.ref, [concrete = ] // CHECK:STDOUT: %F.call: init bool = call %F.bound(%self.ref, ) -// CHECK:STDOUT: %.loc170_38.1: bool = value_of_initializer %F.call -// CHECK:STDOUT: %.loc170_38.2: bool = converted %F.call, %.loc170_38.1 -// CHECK:STDOUT: return %.loc170_38.2 +// CHECK:STDOUT: %.loc171_38.1: bool = value_of_initializer %F.call +// CHECK:STDOUT: %.loc171_38.2: bool = converted %F.call, %.loc171_38.1 +// CHECK:STDOUT: return %.loc171_38.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.16(%self.param: %FDifferentImplicitParamType, %b.param: bool) -> bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.17(%self.param: bool, %b.param: bool) -> bool [thunk @impl.db4.%F.decl.loc183_38.1] { +// CHECK:STDOUT: fn @F.17(%self.param: bool, %b.param: bool) -> bool [thunk @impl.db4.%F.decl.loc184_38.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.d6232a.1 = name_ref F, @impl.db4.%F.decl.loc183_38.1 [concrete = constants.%F.886f70.1] +// CHECK:STDOUT: %F.ref: %F.type.d6232a.1 = name_ref F, @impl.db4.%F.decl.loc184_38.1 [concrete = constants.%F.886f70.1] // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param // CHECK:STDOUT: %return.ref: ref bool = name_ref , %return.param // CHECK:STDOUT: %F.bound: = bound_method %self.ref, %F.ref -// CHECK:STDOUT: %.loc102: %FDifferentImplicitParamType = converted %self.ref, [concrete = ] +// CHECK:STDOUT: %.loc103: %FDifferentImplicitParamType = converted %self.ref, [concrete = ] // CHECK:STDOUT: %F.call: init bool = call %F.bound(, %b.ref) -// CHECK:STDOUT: %.loc183_38.1: bool = value_of_initializer %F.call -// CHECK:STDOUT: %.loc183_38.2: bool = converted %F.call, %.loc183_38.1 -// CHECK:STDOUT: return %.loc183_38.2 +// CHECK:STDOUT: %.loc184_38.1: bool = value_of_initializer %F.call +// CHECK:STDOUT: %.loc184_38.2: bool = converted %F.call, %.loc184_38.1 +// CHECK:STDOUT: return %.loc184_38.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.18(%self.param: bool, %b.param: bool) -> %return.param: %FDifferentReturnType; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.19(%self.param: bool, %b.param: bool) -> bool [thunk @impl.fcc.%F.decl.loc199_38.1] { +// CHECK:STDOUT: fn @F.19(%self.param: bool, %b.param: bool) -> bool [thunk @impl.fcc.%F.decl.loc200_38.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.d3b58f.1 = name_ref F, @impl.fcc.%F.decl.loc199_38.1 [concrete = constants.%F.be86c9.1] +// CHECK:STDOUT: %F.ref: %F.type.d3b58f.1 = name_ref F, @impl.fcc.%F.decl.loc200_38.1 [concrete = constants.%F.be86c9.1] // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param // CHECK:STDOUT: %return.ref: ref bool = name_ref , %return.param // CHECK:STDOUT: %F.bound: = bound_method %self.ref, %F.ref -// CHECK:STDOUT: %.loc199_38.1: ref %FDifferentReturnType = temporary_storage -// CHECK:STDOUT: %F.call: init %FDifferentReturnType = call %F.bound(%self.ref, %b.ref) to %.loc199_38.1 -// CHECK:STDOUT: %.loc199_38.2: bool = converted %F.call, [concrete = ] +// CHECK:STDOUT: %.loc200_38.1: ref %FDifferentReturnType = temporary_storage +// CHECK:STDOUT: %F.call: init %FDifferentReturnType = call %F.bound(%self.ref, %b.ref) to %.loc200_38.1 +// CHECK:STDOUT: %.loc200_38.2: bool = converted %F.call, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.20(@SelfNested.%Self: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2ff)] -// CHECK:STDOUT: %Self.as_type.loc210_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc210_16.1 (constants.%Self.as_type.e1e8)] -// CHECK:STDOUT: %ptr.loc210_16.1: type = ptr_type %Self.as_type.loc210_16.1 [symbolic = %ptr.loc210_16.1 (constants.%ptr.e87)] -// CHECK:STDOUT: %struct_type.x.y.loc210_37.1: type = struct_type {.x: @F.20.%Self.as_type.loc210_16.1 (%Self.as_type.e1e8), .y: %i32} [symbolic = %struct_type.x.y.loc210_37.1 (constants.%struct_type.x.y.81e)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc210_16.1, %struct_type.x.y.loc210_37.1) [symbolic = %tuple.type (constants.%tuple.type.229)] -// CHECK:STDOUT: %pattern_type.loc210_8: type = pattern_type %tuple.type [symbolic = %pattern_type.loc210_8 (constants.%pattern_type.ced)] -// CHECK:STDOUT: %array_type.loc210_57.1: type = array_type constants.%int_4, %Self.as_type.loc210_16.1 [symbolic = %array_type.loc210_57.1 (constants.%array_type.873)] -// CHECK:STDOUT: %pattern_type.loc210_41: type = pattern_type %array_type.loc210_57.1 [symbolic = %pattern_type.loc210_41 (constants.%pattern_type.c7e)] +// CHECK:STDOUT: %Self.as_type.loc211_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc211_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %ptr.loc211_16.1: type = ptr_type %Self.as_type.loc211_16.1 [symbolic = %ptr.loc211_16.1 (constants.%ptr.e87)] +// CHECK:STDOUT: %struct_type.x.y.loc211_37.1: type = struct_type {.x: @F.20.%Self.as_type.loc211_16.1 (%Self.as_type.e1e), .y: %i32} [symbolic = %struct_type.x.y.loc211_37.1 (constants.%struct_type.x.y.81e)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc211_16.1, %struct_type.x.y.loc211_37.1) [symbolic = %tuple.type (constants.%tuple.type.229)] +// CHECK:STDOUT: %pattern_type.loc211_8: type = pattern_type %tuple.type [symbolic = %pattern_type.loc211_8 (constants.%pattern_type.ced)] +// CHECK:STDOUT: %array_type.loc211_57.1: type = array_type constants.%int_4, %Self.as_type.loc211_16.1 [symbolic = %array_type.loc211_57.1 (constants.%array_type.873)] +// CHECK:STDOUT: %pattern_type.loc211_41: type = pattern_type %array_type.loc211_57.1 [symbolic = %pattern_type.loc211_41 (constants.%pattern_type.c7e)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.20.%tuple.type (%tuple.type.229)) -> @F.20.%array_type.loc210_57.1 (%array_type.873); +// CHECK:STDOUT: fn(%x.param: @F.20.%tuple.type (%tuple.type.229)) -> @F.20.%array_type.loc211_57.1 (%array_type.873); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.21(%x.param: %tuple.type.a7d) -> %return.param: %array_type.a41; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.22(%x.param: %tuple.type.9c9) -> %return.param: %array_type.a41 [thunk @impl.6a5.%F.decl.loc222_87.1] { +// CHECK:STDOUT: fn @F.22(%x.param: %tuple.type.9c9) -> %return.param: %array_type.a41 [thunk @impl.6a5.%F.decl.loc223_87.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.f90165.1 = name_ref F, @impl.6a5.%F.decl.loc222_87.1 [concrete = constants.%F.fa8d04.1] +// CHECK:STDOUT: %F.ref: %F.type.f90165.1 = name_ref F, @impl.6a5.%F.decl.loc223_87.1 [concrete = constants.%F.fa8d04.1] // CHECK:STDOUT: %x.ref: %tuple.type.9c9 = name_ref x, %x.param // CHECK:STDOUT: %return.ref: ref %array_type.a41 = name_ref , %return.param -// CHECK:STDOUT: %.loc210_41: ref %array_type.a41 = splice_block %return {} +// CHECK:STDOUT: %.loc211_41: ref %array_type.a41 = splice_block %return {} // CHECK:STDOUT: %tuple.elem0: %ptr.4cd = tuple_access %x.ref, element0 // CHECK:STDOUT: %tuple.elem1: %struct_type.x.y.a89 = tuple_access %x.ref, element1 -// CHECK:STDOUT: %.loc210_9.1: %SelfNestedBadParam = struct_access %tuple.elem1, element0 -// CHECK:STDOUT: %.loc210_9.2: %i32 = converted %.loc210_9.1, [concrete = ] -// CHECK:STDOUT: %F.call: init %array_type.a41 = call %F.ref() to %.loc210_41 +// CHECK:STDOUT: %.loc211_9.1: %SelfNestedBadParam = struct_access %tuple.elem1, element0 +// CHECK:STDOUT: %.loc211_9.2: %i32 = converted %.loc211_9.1, [concrete = ] +// CHECK:STDOUT: %F.call: init %array_type.a41 = call %F.ref() to %.loc211_41 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.23(%x.param: %tuple.type.eb9) -> %return.param: %array_type.a41; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.24(%x.param: %tuple.type.eb9) -> %return.param: %array_type.126 [thunk @impl.bfc.%F.decl.loc238_112.1] { +// CHECK:STDOUT: fn @F.24(%x.param: %tuple.type.eb9) -> %return.param: %array_type.126 [thunk @impl.bfc.%F.decl.loc239_112.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.0e7d1d.1 = name_ref F, @impl.bfc.%F.decl.loc238_112.1 [concrete = constants.%F.0bc78a.1] +// CHECK:STDOUT: %F.ref: %F.type.0e7d1d.1 = name_ref F, @impl.bfc.%F.decl.loc239_112.1 [concrete = constants.%F.0bc78a.1] // CHECK:STDOUT: %x.ref: %tuple.type.eb9 = name_ref x, %x.param // CHECK:STDOUT: %return.ref: ref %array_type.126 = name_ref , %return.param -// CHECK:STDOUT: %.loc238_112.1: ref %array_type.a41 = temporary_storage -// CHECK:STDOUT: %F.call: init %array_type.a41 = call %F.ref(%x.ref) to %.loc238_112.1 -// CHECK:STDOUT: %.loc238_112.2: %array_type.126 = converted %F.call, [concrete = ] +// CHECK:STDOUT: %.loc239_112.1: ref %array_type.a41 = temporary_storage +// CHECK:STDOUT: %F.call: init %array_type.a41 = call %F.ref(%x.ref) to %.loc239_112.1 +// CHECK:STDOUT: %.loc239_112.2: %array_type.126 = converted %F.call, [concrete = ] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Self.8268) {} +// CHECK:STDOUT: specific @F.1(constants.%Self.826) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%I.facet.fa4) {} // CHECK:STDOUT: @@ -1373,34 +1374,34 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.20(constants.%Self.2ff) { // CHECK:STDOUT: %Self => constants.%Self.2ff -// CHECK:STDOUT: %Self.as_type.loc210_16.1 => constants.%Self.as_type.e1e8 -// CHECK:STDOUT: %ptr.loc210_16.1 => constants.%ptr.e87 -// CHECK:STDOUT: %struct_type.x.y.loc210_37.1 => constants.%struct_type.x.y.81e +// CHECK:STDOUT: %Self.as_type.loc211_16.1 => constants.%Self.as_type.e1e +// CHECK:STDOUT: %ptr.loc211_16.1 => constants.%ptr.e87 +// CHECK:STDOUT: %struct_type.x.y.loc211_37.1 => constants.%struct_type.x.y.81e // CHECK:STDOUT: %tuple.type => constants.%tuple.type.229 -// CHECK:STDOUT: %pattern_type.loc210_8 => constants.%pattern_type.ced -// CHECK:STDOUT: %array_type.loc210_57.1 => constants.%array_type.873 -// CHECK:STDOUT: %pattern_type.loc210_41 => constants.%pattern_type.c7e +// CHECK:STDOUT: %pattern_type.loc211_8 => constants.%pattern_type.ced +// CHECK:STDOUT: %array_type.loc211_57.1 => constants.%array_type.873 +// CHECK:STDOUT: %pattern_type.loc211_41 => constants.%pattern_type.c7e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.20(constants.%SelfNested.facet.608) { // CHECK:STDOUT: %Self => constants.%SelfNested.facet.608 -// CHECK:STDOUT: %Self.as_type.loc210_16.1 => constants.%SelfNestedBadParam -// CHECK:STDOUT: %ptr.loc210_16.1 => constants.%ptr.4cd -// CHECK:STDOUT: %struct_type.x.y.loc210_37.1 => constants.%struct_type.x.y.a89 +// CHECK:STDOUT: %Self.as_type.loc211_16.1 => constants.%SelfNestedBadParam +// CHECK:STDOUT: %ptr.loc211_16.1 => constants.%ptr.4cd +// CHECK:STDOUT: %struct_type.x.y.loc211_37.1 => constants.%struct_type.x.y.a89 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.9c9 -// CHECK:STDOUT: %pattern_type.loc210_8 => constants.%pattern_type.a5c -// CHECK:STDOUT: %array_type.loc210_57.1 => constants.%array_type.a41 -// CHECK:STDOUT: %pattern_type.loc210_41 => constants.%pattern_type.1f1 +// CHECK:STDOUT: %pattern_type.loc211_8 => constants.%pattern_type.a5c +// CHECK:STDOUT: %array_type.loc211_57.1 => constants.%array_type.a41 +// CHECK:STDOUT: %pattern_type.loc211_41 => constants.%pattern_type.1f1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.20(constants.%SelfNested.facet.766) { // CHECK:STDOUT: %Self => constants.%SelfNested.facet.766 -// CHECK:STDOUT: %Self.as_type.loc210_16.1 => constants.%SelfNestedBadReturnType -// CHECK:STDOUT: %ptr.loc210_16.1 => constants.%ptr.612 -// CHECK:STDOUT: %struct_type.x.y.loc210_37.1 => constants.%struct_type.x.y.ac5 +// CHECK:STDOUT: %Self.as_type.loc211_16.1 => constants.%SelfNestedBadReturnType +// CHECK:STDOUT: %ptr.loc211_16.1 => constants.%ptr.612 +// CHECK:STDOUT: %struct_type.x.y.loc211_37.1 => constants.%struct_type.x.y.ac5 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.eb9 -// CHECK:STDOUT: %pattern_type.loc210_8 => constants.%pattern_type.23f -// CHECK:STDOUT: %array_type.loc210_57.1 => constants.%array_type.126 -// CHECK:STDOUT: %pattern_type.loc210_41 => constants.%pattern_type.f56 +// CHECK:STDOUT: %pattern_type.loc211_8 => constants.%pattern_type.23f +// CHECK:STDOUT: %array_type.loc211_57.1 => constants.%array_type.126 +// CHECK:STDOUT: %pattern_type.loc211_41 => constants.%pattern_type.f56 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index 9184e59d75a9..6b1bad38f94a 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -75,8 +76,8 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -84,15 +85,15 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11: type = converted @impl.cf0.%false, [concrete = ] -// CHECK:STDOUT: impl_decl @impl.cf0 [concrete] {} { +// CHECK:STDOUT: %.loc11: type = converted @impl.%false, [concrete = ] +// CHECK:STDOUT: impl_decl @impl [concrete] {} { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.cf0: %i32 as { +// CHECK:STDOUT: impl @impl: %i32 as { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // CHECK:STDOUT: } @@ -110,7 +111,7 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] +// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -146,7 +147,7 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types, Float, loaded [concrete = constants.%Float] +// CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/parts/float, Float, loaded [concrete = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -190,7 +191,7 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] +// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/fail_impl_bad_type.carbon b/toolchain/check/testdata/impl/fail_impl_bad_type.carbon index 8caee7ff6f45..f53d92fa9938 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_type.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_type.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index bc8834391c04..bc81a4bddb53 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -42,7 +43,7 @@ impl i32 as I {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index 04b55a5f4796..f03ced53274f 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -45,20 +46,20 @@ impl i32 as I { // CHECK:STDOUT: --- fail_self_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %X: %T.8b3 = bind_symbolic_name X, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T.8b3 [symbolic] +// CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic] +// CHECK:STDOUT: %pattern_type.7dcd0a.1: type = pattern_type %T [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.b36: type = class_type @C, @C(%T.8b3, %X) [symbolic] +// CHECK:STDOUT: %C.b36: type = class_type @C, @C(%T, %X) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %Self.8268: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %pattern_type.2b5: type = pattern_type %I.type [concrete] -// CHECK:STDOUT: %C.dbb: type = class_type @C, @C(%I.type, %Self.8268) [symbolic] +// CHECK:STDOUT: %C.dbb: type = class_type @C, @C(%I.type, %Self.826) [symbolic] // CHECK:STDOUT: %pattern_type.4fb: type = pattern_type %C.dbb [symbolic] // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete] // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete] @@ -66,7 +67,7 @@ impl i32 as I { // CHECK:STDOUT: %assoc0.82e: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] -// CHECK:STDOUT: %I.impl_witness.c21: = impl_witness file.%I.impl_witness_table.loc27 [concrete] +// CHECK:STDOUT: %I.impl_witness.c21: = impl_witness file.%I.impl_witness_table.loc28 [concrete] // CHECK:STDOUT: %I.facet.e8a: %I.type = facet_value bool, (%I.impl_witness.c21) [concrete] // CHECK:STDOUT: %C.7db: type = class_type @C, @C(%I.type, %I.facet.e8a) [concrete] // CHECK:STDOUT: %pattern_type.225: type = pattern_type %C.7db [concrete] @@ -76,7 +77,7 @@ impl i32 as I { // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %I.impl_witness.863: = impl_witness file.%I.impl_witness_table.loc34 [concrete] +// CHECK:STDOUT: %I.impl_witness.863: = impl_witness file.%I.impl_witness_table.loc35 [concrete] // CHECK:STDOUT: %C.6fb: type = class_type @C, @C(type, %i32) [concrete] // CHECK:STDOUT: %pattern_type.52b: type = pattern_type %C.6fb [concrete] // CHECK:STDOUT: %F.type.066a53.1: type = fn_type @F.3 [concrete] @@ -98,9 +99,9 @@ impl i32 as I { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool] -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -114,41 +115,41 @@ impl i32 as I { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %X.patt: @C.%pattern_type (%pattern_type.7dcd0a.1) = symbolic_binding_pattern X, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.loc14_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.2 (constants.%T.8b3)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_9.1 [symbolic = %T.loc14_9.2 (constants.%T.8b3)] -// CHECK:STDOUT: %X.loc14_19.1: @C.%T.loc14_9.2 (%T.8b3) = bind_symbolic_name X, 1 [symbolic = %X.loc14_19.2 (constants.%X)] +// CHECK:STDOUT: %T.loc15_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_9.2 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_9.1 [symbolic = %T.loc15_9.2 (constants.%T)] +// CHECK:STDOUT: %X.loc15_19.1: @C.%T.loc15_9.2 (%T) = bind_symbolic_name X, 1 [symbolic = %X.loc15_19.2 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: impl_decl @impl.049f [concrete] {} { +// CHECK:STDOUT: impl_decl @impl.049 [concrete] {} { // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] -// CHECK:STDOUT: %.loc27_6.1: type = value_of_initializer %bool.make_type [concrete = bool] -// CHECK:STDOUT: %.loc27_6.2: type = converted %bool.make_type, %.loc27_6.1 [concrete = bool] +// CHECK:STDOUT: %.loc28_6.1: type = value_of_initializer %bool.make_type [concrete = bool] +// CHECK:STDOUT: %.loc28_6.2: type = converted %bool.make_type, %.loc28_6.1 [concrete = bool] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.impl_witness_table.loc27 = impl_witness_table (@impl.049f.%F.decl), @impl.049f [concrete] -// CHECK:STDOUT: %I.impl_witness.loc27: = impl_witness %I.impl_witness_table.loc27 [concrete = constants.%I.impl_witness.c21] +// CHECK:STDOUT: %I.impl_witness_table.loc28 = impl_witness_table (@impl.049.%F.decl), @impl.049 [concrete] +// CHECK:STDOUT: %I.impl_witness.loc28: = impl_witness %I.impl_witness_table.loc28 [concrete = constants.%I.impl_witness.c21] // CHECK:STDOUT: impl_decl @impl.a9a [concrete] {} { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.impl_witness_table.loc34 = impl_witness_table (@impl.a9a.%F.decl.loc42_18.2), @impl.a9a [concrete] -// CHECK:STDOUT: %I.impl_witness.loc34: = impl_witness %I.impl_witness_table.loc34 [concrete = constants.%I.impl_witness.863] +// CHECK:STDOUT: %I.impl_witness_table.loc35 = impl_witness_table (@impl.a9a.%F.decl.loc43_18.2), @impl.a9a [concrete] +// CHECK:STDOUT: %I.impl_witness.loc35: = impl_witness %I.impl_witness_table.loc35 [concrete = constants.%I.impl_witness.863] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.8268] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826] // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] { // CHECK:STDOUT: %c.patt: @F.1.%pattern_type (%pattern_type.4fb) = binding_pattern c [concrete] // CHECK:STDOUT: %c.param_patt: @F.1.%pattern_type (%pattern_type.4fb) = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %c.param: @F.1.%C.loc24_17.1 (%C.dbb) = value_param call_param0 -// CHECK:STDOUT: %.loc24: type = splice_block %C.loc24_17.2 [symbolic = %C.loc24_17.1 (constants.%C.dbb)] { +// CHECK:STDOUT: %c.param: @F.1.%C.loc25_17.1 (%C.dbb) = value_param call_param0 +// CHECK:STDOUT: %.loc25: type = splice_block %C.loc25_17.2 [symbolic = %C.loc25_17.1 (constants.%C.dbb)] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.8268)] -// CHECK:STDOUT: %C.loc24_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self.8268) [symbolic = %C.loc24_17.1 (constants.%C.dbb)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %C.loc25_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self.826) [symbolic = %C.loc25_17.1 (constants.%C.dbb)] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: @F.1.%C.loc24_17.1 (%C.dbb) = bind_name c, %c.param +// CHECK:STDOUT: %c: @F.1.%C.loc25_17.1 (%C.dbb) = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.82e] // CHECK:STDOUT: @@ -159,18 +160,18 @@ impl i32 as I { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.049f: %.loc27_6.2 as %I.ref { +// CHECK:STDOUT: impl @impl.049: %.loc28_6.2 as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.8ba = fn_decl @F.2 [concrete = constants.%F.2cf] { // CHECK:STDOUT: %c.patt: %pattern_type.225 = binding_pattern c [concrete] // CHECK:STDOUT: %c.param_patt: %pattern_type.225 = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %c.param: %C.7db = value_param call_param0 -// CHECK:STDOUT: %.loc31_22: type = splice_block %C [concrete = constants.%C.7db] { +// CHECK:STDOUT: %.loc32_22: type = splice_block %C [concrete = constants.%C.7db] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %I.facet: %I.type = facet_value bool, (constants.%I.impl_witness.c21) [concrete = constants.%I.facet.e8a] -// CHECK:STDOUT: %.loc31_18: %I.type = converted %bool.make_type, %I.facet [concrete = constants.%I.facet.e8a] +// CHECK:STDOUT: %.loc32_18: %I.type = converted %bool.make_type, %I.facet [concrete = constants.%I.facet.e8a] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%I.type, constants.%I.facet.e8a) [concrete = constants.%C.7db] // CHECK:STDOUT: } // CHECK:STDOUT: %c: %C.7db = bind_name c, %c.param @@ -180,16 +181,16 @@ impl i32 as I { // CHECK:STDOUT: .C = // CHECK:STDOUT: .I = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%I.impl_witness.loc27 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc28 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.a9a: %i32 as %I.ref { -// CHECK:STDOUT: %F.decl.loc42_18.1: %F.type.066a53.1 = fn_decl @F.3 [concrete = constants.%F.9ec58f.1] { +// CHECK:STDOUT: %F.decl.loc43_18.1: %F.type.066a53.1 = fn_decl @F.3 [concrete = constants.%F.9ec58f.1] { // CHECK:STDOUT: %c.patt: %pattern_type.52b = binding_pattern c [concrete] // CHECK:STDOUT: %c.param_patt: %pattern_type.52b = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %c.param: %C.6fb = value_param call_param0 -// CHECK:STDOUT: %.loc42: type = splice_block %C [concrete = constants.%C.6fb] { +// CHECK:STDOUT: %.loc43: type = splice_block %C [concrete = constants.%C.6fb] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -197,7 +198,7 @@ impl i32 as I { // CHECK:STDOUT: } // CHECK:STDOUT: %c: %C.6fb = bind_name c, %c.param // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl.loc42_18.2: %F.type.066a53.2 = fn_decl @F.4 [concrete = constants.%F.9ec58f.2] { +// CHECK:STDOUT: %F.decl.loc43_18.2: %F.type.066a53.2 = fn_decl @F.4 [concrete = constants.%F.9ec58f.2] { // CHECK:STDOUT: %c.patt: %pattern_type.c65 = binding_pattern c [concrete] // CHECK:STDOUT: %c.param_patt: %pattern_type.c65 = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { @@ -207,14 +208,14 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = -// CHECK:STDOUT: .F = %F.decl.loc42_18.1 -// CHECK:STDOUT: witness = file.%I.impl_witness.loc34 +// CHECK:STDOUT: .F = %F.decl.loc43_18.1 +// CHECK:STDOUT: witness = file.%I.impl_witness.loc35 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%T.loc14_9.1: type, %X.loc14_19.1: @C.%T.loc14_9.2 (%T.8b3)) { -// CHECK:STDOUT: %T.loc14_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.2 (constants.%T.8b3)] -// CHECK:STDOUT: %X.loc14_19.2: @C.%T.loc14_9.2 (%T.8b3) = bind_symbolic_name X, 1 [symbolic = %X.loc14_19.2 (constants.%X)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc14_9.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] +// CHECK:STDOUT: generic class @C(%T.loc15_9.1: type, %X.loc15_19.1: @C.%T.loc15_9.2 (%T)) { +// CHECK:STDOUT: %T.loc15_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_9.2 (constants.%T)] +// CHECK:STDOUT: %X.loc15_19.2: @C.%T.loc15_9.2 (%T) = bind_symbolic_name X, 1 [symbolic = %X.loc15_19.2 (constants.%X)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc15_9.2 [symbolic = %pattern_type (constants.%pattern_type.7dcd0a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -229,59 +230,59 @@ impl i32 as I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.8268)] -// CHECK:STDOUT: %C.loc24_17.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc24_17.1 (constants.%C.dbb)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %C.loc24_17.1 [symbolic = %pattern_type (constants.%pattern_type.4fb)] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)] +// CHECK:STDOUT: %C.loc25_17.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc25_17.1 (constants.%C.dbb)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %C.loc25_17.1 [symbolic = %pattern_type (constants.%pattern_type.4fb)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%c.param: @F.1.%C.loc24_17.1 (%C.dbb)); +// CHECK:STDOUT: fn(%c.param: @F.1.%C.loc25_17.1 (%C.dbb)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%c.param: %C.7db); // CHECK:STDOUT: // CHECK:STDOUT: fn @F.3(%c.param: %C.6fb); // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.4(%c.param: %C.d88) [thunk @impl.a9a.%F.decl.loc42_18.1] { +// CHECK:STDOUT: fn @F.4(%c.param: %C.d88) [thunk @impl.a9a.%F.decl.loc43_18.1] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %F.type.066a53.1 = name_ref F, @impl.a9a.%F.decl.loc42_18.1 [concrete = constants.%F.9ec58f.1] +// CHECK:STDOUT: %F.ref: %F.type.066a53.1 = name_ref F, @impl.a9a.%F.decl.loc43_18.1 [concrete = constants.%F.9ec58f.1] // CHECK:STDOUT: %c.ref: %C.d88 = name_ref c, %c.param -// CHECK:STDOUT: %.loc24: %C.6fb = converted %c.ref, [concrete = ] +// CHECK:STDOUT: %.loc25: %C.6fb = converted %c.ref, [concrete = ] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T.8b3, constants.%X) { -// CHECK:STDOUT: %T.loc14_9.2 => constants.%T.8b3 -// CHECK:STDOUT: %X.loc14_19.2 => constants.%X +// CHECK:STDOUT: specific @C(constants.%T, constants.%X) { +// CHECK:STDOUT: %T.loc15_9.2 => constants.%T +// CHECK:STDOUT: %X.loc15_19.2 => constants.%X // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dcd0a.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%I.type, constants.%Self.8268) { -// CHECK:STDOUT: %T.loc14_9.2 => constants.%I.type -// CHECK:STDOUT: %X.loc14_19.2 => constants.%Self.8268 +// CHECK:STDOUT: specific @C(constants.%I.type, constants.%Self.826) { +// CHECK:STDOUT: %T.loc15_9.2 => constants.%I.type +// CHECK:STDOUT: %X.loc15_19.2 => constants.%Self.826 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2b5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Self.8268) { -// CHECK:STDOUT: %Self => constants.%Self.8268 -// CHECK:STDOUT: %C.loc24_17.1 => constants.%C.dbb +// CHECK:STDOUT: specific @F.1(constants.%Self.826) { +// CHECK:STDOUT: %Self => constants.%Self.826 +// CHECK:STDOUT: %C.loc25_17.1 => constants.%C.dbb // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4fb // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.e8a) { -// CHECK:STDOUT: %T.loc14_9.2 => constants.%I.type -// CHECK:STDOUT: %X.loc14_19.2 => constants.%I.facet.e8a +// CHECK:STDOUT: %T.loc15_9.2 => constants.%I.type +// CHECK:STDOUT: %X.loc15_19.2 => constants.%I.facet.e8a // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2b5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%I.facet.e8a) { // CHECK:STDOUT: %Self => constants.%I.facet.e8a -// CHECK:STDOUT: %C.loc24_17.1 => constants.%C.7db +// CHECK:STDOUT: %C.loc25_17.1 => constants.%C.7db // CHECK:STDOUT: %pattern_type => constants.%pattern_type.225 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(type, constants.%i32) { -// CHECK:STDOUT: %T.loc14_9.2 => type -// CHECK:STDOUT: %X.loc14_19.2 => constants.%i32 +// CHECK:STDOUT: %T.loc15_9.2 => type +// CHECK:STDOUT: %X.loc15_19.2 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98f // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -289,13 +290,13 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%I.facet.118) { // CHECK:STDOUT: %Self => constants.%I.facet.118 -// CHECK:STDOUT: %C.loc24_17.1 => constants.%C.d88 +// CHECK:STDOUT: %C.loc25_17.1 => constants.%C.d88 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.118) { -// CHECK:STDOUT: %T.loc14_9.2 => constants.%I.type -// CHECK:STDOUT: %X.loc14_19.2 => constants.%I.facet.118 +// CHECK:STDOUT: %T.loc15_9.2 => constants.%I.type +// CHECK:STDOUT: %X.loc15_19.2 => constants.%I.facet.118 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2b5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/impl/fail_undefined_interface.carbon b/toolchain/check/testdata/impl/fail_undefined_interface.carbon index c5bf0a3cf6a8..c4ce8aea435d 100644 --- a/toolchain/check/testdata/impl/fail_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_undefined_interface.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/forward_decls.carbon b/toolchain/check/testdata/impl/forward_decls.carbon index 7818662f16b6..7e7f59598c8f 100644 --- a/toolchain/check/testdata/impl/forward_decls.carbon +++ b/toolchain/check/testdata/impl/forward_decls.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/generic_redeclaration.carbon b/toolchain/check/testdata/impl/generic_redeclaration.carbon index 6acf8466e38a..5cc98801b4af 100644 --- a/toolchain/check/testdata/impl/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/generic_redeclaration.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 0dc3d503405f..84ca26ed62f4 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -47,7 +48,6 @@ class C { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -110,10 +110,10 @@ class C { // CHECK:STDOUT: %c.var_patt: %pattern_type = var_pattern %c.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %c.var: ref %C = var %c.var_patt -// CHECK:STDOUT: %.loc22_19.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc22_19.2: init %C = class_init (), %c.var [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc22_7: init %C = converted %.loc22_19.1, %.loc22_19.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc22_7 +// CHECK:STDOUT: %.loc23_19.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc23_19.2: init %C = class_init (), %c.var [concrete = constants.%C.val] +// CHECK:STDOUT: %.loc23_7: init %C = converted %.loc23_19.1, %.loc23_19.2 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %c.var, %.loc23_7 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index 47850c7776d4..9f0ed9ef34e6 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -36,26 +37,17 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %T, (%Simple.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .Simple = %Simple.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [concrete = constants.%Simple.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc18_14.1 [symbolic = %T.loc18_14.2 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_14.1 [symbolic = %T.loc19_14.2 (constants.%T)] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] -// CHECK:STDOUT: %T.loc18_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc18_14.2 (constants.%T)] +// CHECK:STDOUT: %T.loc19_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete] // CHECK:STDOUT: %Simple.impl_witness: = impl_witness %Simple.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%Simple.impl_witness (constants.%Simple.impl_witness)] @@ -72,12 +64,12 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @impl(%T.loc18_14.1: type) { -// CHECK:STDOUT: %T.loc18_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc18_14.2 (constants.%T)] -// CHECK:STDOUT: %Simple.impl_witness: = impl_witness file.%Simple.impl_witness_table, @impl(%T.loc18_14.2) [symbolic = %Simple.impl_witness (constants.%Simple.impl_witness)] +// CHECK:STDOUT: generic impl @impl(%T.loc19_14.1: type) { +// CHECK:STDOUT: %T.loc19_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_14.2 (constants.%T)] +// CHECK:STDOUT: %Simple.impl_witness: = impl_witness file.%Simple.impl_witness_table, @impl(%T.loc19_14.2) [symbolic = %Simple.impl_witness (constants.%Simple.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc18_14.2) [symbolic = %F.type (constants.%F.type.1e1)] +// CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc19_14.2) [symbolic = %F.type (constants.%F.type.1e1)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.1e1) = struct_value () [symbolic = %F (constants.%F.4c3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %Simple.ref { @@ -93,7 +85,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.2(@impl.%T.loc18_14.1: type) { +// CHECK:STDOUT: generic fn @F.2(@impl.%T.loc19_14.1: type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -105,7 +97,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { -// CHECK:STDOUT: %T.loc18_14.2 => constants.%T +// CHECK:STDOUT: %T.loc19_14.2 => constants.%T // CHECK:STDOUT: %Simple.impl_witness => constants.%Simple.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/impl/import_builtin_call.carbon b/toolchain/check/testdata/impl/import_builtin_call.carbon index dbec8982af65..3062eeee66ce 100644 --- a/toolchain/check/testdata/impl/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/import_builtin_call.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/import_compound.carbon b/toolchain/check/testdata/impl/import_compound.carbon index e8405b97f497..0df3fc739d86 100644 --- a/toolchain/check/testdata/impl/import_compound.carbon +++ b/toolchain/check/testdata/impl/import_compound.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -11,13 +12,6 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/import_compound.carbon -// --- core.carbon -package Core; - -interface ImplicitAs(Dest:! type) { - fn Convert[self: Self]() -> Dest; -} - // --- lib.carbon library "[[@TEST_NAME]]"; @@ -50,7 +44,6 @@ fn NonInstanceCallImport() { library "[[@TEST_NAME]]"; import library "lib"; -import Core; fn NonInstanceCallImportFail(n: {.i: ()}) { // CHECK:STDERR: fail_import_non-instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `{.i: ()}` into type implementing `NonInstance` [ConversionFailureNonTypeToFacet] @@ -67,7 +60,6 @@ fn NonInstanceCallImportFail(n: {.i: ()}) { library "[[@TEST_NAME]]"; import library "lib"; -import Core; fn NonInstanceCallIndirectImport(p: {.i: ()}*) { // CHECK:STDERR: fail_import_non-instance_indirect.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `{.i: ()}` into type implementing `NonInstance` [ConversionFailureNonTypeToFacet] @@ -97,7 +89,6 @@ fn InstanceCallIndirectImport(p: {.i: ()}*) { library "[[@TEST_NAME]]"; import library "lib"; -import Core; fn InstanceCallImportFail() { // CHECK:STDERR: fail_import_instance.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Instance` in type `type` that does not implement that interface [MissingImplInMemberAccess] @@ -107,100 +98,6 @@ fn InstanceCallImportFail() { {.i: ()}.(Instance.G)(); } -// CHECK:STDOUT: --- core.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] -// CHECK:STDOUT: %Self: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %pattern_type.a93: type = pattern_type %Self.as_type [symbolic] -// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %Dest [symbolic] -// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Convert: %Convert.type = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { -// CHECK:STDOUT: %Dest.patt: %pattern_type.98f = symbolic_binding_pattern Dest, 0 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Dest.loc3_22.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.2 (constants.%Dest)] -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(%Dest.loc3_22.1: type) { -// CHECK:STDOUT: %Dest.loc3_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.2 (constants.%Dest)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)] -// CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] -// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest.loc3_22.2) [symbolic = %Convert.type (constants.%Convert.type)] -// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type) = struct_value () [symbolic = %Convert (constants.%Convert)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest.loc3_22.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)] -// CHECK:STDOUT: %assoc0.loc4_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] -// CHECK:STDOUT: -// CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] -// CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type) = fn_decl @Convert [symbolic = @ImplicitAs.%Convert (constants.%Convert)] { -// CHECK:STDOUT: %self.patt: @Convert.%pattern_type.loc4_14 (%pattern_type.a93) = binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Convert.%pattern_type.loc4_14 (%pattern_type.a93) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Convert.%pattern_type.loc4_28 (%pattern_type.7dc) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Convert.%pattern_type.loc4_28 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc3_22.1 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %self.param: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.3 [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc4_20.2: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc4_20.3: type = converted %Self.ref, %Self.as_type.loc4_20.2 [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @Convert.%Dest (%Dest) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Convert.%Dest (%Dest) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.1 -// CHECK:STDOUT: .Dest = -// CHECK:STDOUT: .Convert = %assoc0.loc4_35.1 -// CHECK:STDOUT: witness = (%Convert.decl) -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(@ImplicitAs.%Dest.loc3_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)] -// CHECK:STDOUT: %Self: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type.loc4_14: type = pattern_type %Self.as_type.loc4_20.1 [symbolic = %pattern_type.loc4_14 (constants.%pattern_type.a93)] -// CHECK:STDOUT: %pattern_type.loc4_28: type = pattern_type %Dest [symbolic = %pattern_type.loc4_28 (constants.%pattern_type.7dc)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type)) -> @Convert.%Dest (%Dest); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest.loc3_22.2 => constants.%Dest -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc4_20.1 => constants.%Self.as_type -// CHECK:STDOUT: %pattern_type.loc4_14 => constants.%pattern_type.a93 -// CHECK:STDOUT: %pattern_type.loc4_28 => constants.%pattern_type.7dc -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- lib.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -231,11 +128,20 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Instance.facet: %Instance.type = facet_value %struct_type.i, (%Instance.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { +// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .NonInstance = %NonInstance.decl // CHECK:STDOUT: .Instance = %Instance.decl // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %NonInstance.decl: type = interface_decl @NonInstance [concrete = constants.%NonInstance.type] {} {} // CHECK:STDOUT: impl_decl @impl.c58 [concrete] {} { // CHECK:STDOUT: %.loc7_12.1: %empty_tuple.type = tuple_literal () @@ -374,15 +280,19 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.NonInstance: type = import_ref Main//lib, NonInstance, loaded [concrete = constants.%NonInstance.type] // CHECK:STDOUT: %Main.Instance = import_ref Main//lib, Instance, unloaded -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e3c: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.474: %F.type.9e5 = import_ref Main//lib, loc4_9, loaded [concrete = constants.%F.4e4] -// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst17 [no loc], loaded [symbolic = constants.%Self.73c] +// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst19 [no loc], loaded [symbolic = constants.%Self.73c] // CHECK:STDOUT: %Main.import_ref.a26: = import_ref Main//lib, loc7_30, loaded [concrete = constants.%NonInstance.impl_witness] // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded @@ -396,8 +306,10 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .NonInstance = imports.%Main.NonInstance // CHECK:STDOUT: .Instance = imports.%Main.Instance +// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .NonInstanceCallImport = %NonInstanceCallImport.decl // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %NonInstanceCallImport.decl: %NonInstanceCallImport.type = fn_decl @NonInstanceCallImport [concrete = constants.%NonInstanceCallImport] {} {} // CHECK:STDOUT: } @@ -464,23 +376,6 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] -// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %Dest [symbolic] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic] -// CHECK:STDOUT: %pattern_type.f3e: type = pattern_type %Self.as_type [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0.9f5: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.a4a: type = facet_type <@ImplicitAs, @ImplicitAs(%NonInstance.type)> [concrete] -// CHECK:STDOUT: %Self.254: %ImplicitAs.type.a4a = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Convert.type.0a7: type = fn_type @Convert, @ImplicitAs(%NonInstance.type) [concrete] -// CHECK:STDOUT: %Convert.c2d: %Convert.type.0a7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.assoc_type.572: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%NonInstance.type) [concrete] -// CHECK:STDOUT: %assoc0.363: %ImplicitAs.assoc_type.572 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete] -// CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic] // CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -489,26 +384,19 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Main.Instance = import_ref Main//lib, Instance, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//default +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e3c: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.8ce] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.474: %F.type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%F] -// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst17 [no loc], loaded [symbolic = constants.%Self.73c] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst25 [no loc], unloaded -// CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)] -// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded -// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst25 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] -// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %Core.import_ref.207 = import_ref Core//default, loc4_35, unloaded +// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst19 [no loc], loaded [symbolic = constants.%Self.73c] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded @@ -523,16 +411,16 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .NonInstanceCallImportFail = %NonInstanceCallImportFail.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %NonInstanceCallImportFail.decl: %NonInstanceCallImportFail.type = fn_decl @NonInstanceCallImportFail [concrete = constants.%NonInstanceCallImportFail] { // CHECK:STDOUT: %n.patt: %pattern_type.9b2 = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: %pattern_type.9b2 = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %n.param: %struct_type.i = value_param call_param0 -// CHECK:STDOUT: %.loc6_40: type = splice_block %struct_type.i [concrete = constants.%struct_type.i] { -// CHECK:STDOUT: %.loc6_39.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_39.2: type = converted %.loc6_39.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc5_40: type = splice_block %struct_type.i [concrete = constants.%struct_type.i] { +// CHECK:STDOUT: %.loc5_39.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_39.2: type = converted %.loc5_39.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete = constants.%struct_type.i] // CHECK:STDOUT: } // CHECK:STDOUT: %n: %struct_type.i = bind_name n, %n.param @@ -546,25 +434,6 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)] -// CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)] -// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)] -// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ca0)] -// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.9f5)] -// CHECK:STDOUT: -// CHECK:STDOUT: interface { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5 -// CHECK:STDOUT: .Convert = imports.%Core.import_ref.492 -// CHECK:STDOUT: witness = (imports.%Core.Convert) -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: interface @Instance [from "lib.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.dcd @@ -587,7 +456,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %n.ref: %struct_type.i = name_ref n, %n // CHECK:STDOUT: %NonInstance.ref: type = name_ref NonInstance, imports.%Main.NonInstance [concrete = constants.%NonInstance.type] // CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.e3c [concrete = constants.%assoc0.8ce] -// CHECK:STDOUT: %.loc14: %NonInstance.type = converted %n.ref, [concrete = ] +// CHECK:STDOUT: %.loc13: %NonInstance.type = converted %n.ref, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -595,44 +464,8 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)] -// CHECK:STDOUT: %Self: @Convert.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.f3e)] -// CHECK:STDOUT: %pattern_type.2: type = pattern_type %Dest [symbolic = %pattern_type.2 (constants.%pattern_type.7dc)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self.73c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62 -// CHECK:STDOUT: %Self => constants.%Self.519 -// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type -// CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.f3e -// CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.7dc -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%NonInstance.type) { -// CHECK:STDOUT: %Dest => constants.%NonInstance.type -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.a4a -// CHECK:STDOUT: %Self => constants.%Self.254 -// CHECK:STDOUT: %Convert.type => constants.%Convert.type.0a7 -// CHECK:STDOUT: %Convert => constants.%Convert.c2d -// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.572 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.363 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_non-instance_indirect.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -650,23 +483,6 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] -// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %Dest [symbolic] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic] -// CHECK:STDOUT: %pattern_type.f3e: type = pattern_type %Self.as_type [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0.9f5: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.a4a: type = facet_type <@ImplicitAs, @ImplicitAs(%NonInstance.type)> [concrete] -// CHECK:STDOUT: %Self.254: %ImplicitAs.type.a4a = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %Convert.type.0a7: type = fn_type @Convert, @ImplicitAs(%NonInstance.type) [concrete] -// CHECK:STDOUT: %Convert.c2d: %Convert.type.0a7 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.assoc_type.572: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%NonInstance.type) [concrete] -// CHECK:STDOUT: %assoc0.363: %ImplicitAs.assoc_type.572 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete] -// CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic] // CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -675,26 +491,19 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Main.Instance = import_ref Main//lib, Instance, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: import Core//default +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e3c: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.8ce] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.474: %F.type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%F] -// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst17 [no loc], loaded [symbolic = constants.%Self.73c] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst25 [no loc], unloaded -// CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)] -// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded -// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst25 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] -// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %Core.import_ref.207 = import_ref Core//default, loc4_35, unloaded +// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst19 [no loc], loaded [symbolic = constants.%Self.73c] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded @@ -709,16 +518,16 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .NonInstanceCallIndirectImport = %NonInstanceCallIndirectImport.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %NonInstanceCallIndirectImport.decl: %NonInstanceCallIndirectImport.type = fn_decl @NonInstanceCallIndirectImport [concrete = constants.%NonInstanceCallIndirectImport] { // CHECK:STDOUT: %p.patt: %pattern_type.72c = binding_pattern p [concrete] // CHECK:STDOUT: %p.param_patt: %pattern_type.72c = value_param_pattern %p.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %p.param: %ptr = value_param call_param0 -// CHECK:STDOUT: %.loc6_45: type = splice_block %ptr [concrete = constants.%ptr] { -// CHECK:STDOUT: %.loc6_43.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_43.2: type = converted %.loc6_43.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc5_45: type = splice_block %ptr [concrete = constants.%ptr] { +// CHECK:STDOUT: %.loc5_43.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc5_43.2: type = converted %.loc5_43.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete = constants.%struct_type.i] // CHECK:STDOUT: %ptr: type = ptr_type %struct_type.i [concrete = constants.%ptr] // CHECK:STDOUT: } @@ -733,25 +542,6 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)] -// CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)] -// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)] -// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ca0)] -// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.9f5)] -// CHECK:STDOUT: -// CHECK:STDOUT: interface { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5 -// CHECK:STDOUT: .Convert = imports.%Core.import_ref.492 -// CHECK:STDOUT: witness = (imports.%Core.Convert) -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: interface @Instance [from "lib.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.dcd @@ -774,8 +564,8 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p // CHECK:STDOUT: %NonInstance.ref: type = name_ref NonInstance, imports.%Main.NonInstance [concrete = constants.%NonInstance.type] // CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.e3c [concrete = constants.%assoc0.8ce] -// CHECK:STDOUT: %.loc14_4.1: ref %struct_type.i = deref %p.ref -// CHECK:STDOUT: %.loc14_4.2: %NonInstance.type = converted %.loc14_4.1, [concrete = ] +// CHECK:STDOUT: %.loc13_4.1: ref %struct_type.i = deref %p.ref +// CHECK:STDOUT: %.loc13_4.2: %NonInstance.type = converted %.loc13_4.1, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -783,44 +573,8 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Convert(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] { -// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)] -// CHECK:STDOUT: %Self: @Convert.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.f3e)] -// CHECK:STDOUT: %pattern_type.2: type = pattern_type %Dest [symbolic = %pattern_type.2 (constants.%pattern_type.7dc)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self.73c) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62 -// CHECK:STDOUT: %Self => constants.%Self.519 -// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type -// CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.f3e -// CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.7dc -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%NonInstance.type) { -// CHECK:STDOUT: %Dest => constants.%NonInstance.type -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.a4a -// CHECK:STDOUT: %Self => constants.%Self.254 -// CHECK:STDOUT: %Convert.type => constants.%Convert.type.0a7 -// CHECK:STDOUT: %Convert => constants.%Convert.c2d -// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.572 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.363 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- import_instance_success.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -854,12 +608,16 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.NonInstance = import_ref Main//lib, NonInstance, unloaded // CHECK:STDOUT: %Main.Instance: type = import_ref Main//lib, Instance, loaded [concrete = constants.%Instance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.b4d: %G.type.1e1 = import_ref Main//lib, loc12_21, loaded [concrete = constants.%G.449] -// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst43 [no loc], loaded [symbolic = constants.%Self.cf8] -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst45 [no loc], loaded [symbolic = constants.%Self.cf8] +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded @@ -876,9 +634,11 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .NonInstance = imports.%Main.NonInstance // CHECK:STDOUT: .Instance = imports.%Main.Instance +// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .InstanceCallImport = %InstanceCallImport.decl // CHECK:STDOUT: .InstanceCallIndirectImport = %InstanceCallIndirectImport.decl // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %InstanceCallImport.decl: %InstanceCallImport.type = fn_decl @InstanceCallImport [concrete = constants.%InstanceCallImport] { // CHECK:STDOUT: %n.patt: %pattern_type.9b2 = binding_pattern n [concrete] @@ -997,14 +757,15 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %Main.NonInstance = import_ref Main//lib, NonInstance, unloaded // CHECK:STDOUT: %Main.Instance: type = import_ref Main//lib, Instance, loaded [concrete = constants.%Instance.type] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//default +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.b4d: %G.type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%G] -// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst43 [no loc], loaded [symbolic = constants.%Self.cf8] -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst45 [no loc], loaded [symbolic = constants.%Self.cf8] +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded @@ -1022,8 +783,8 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .InstanceCallImportFail = %InstanceCallImportFail.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %InstanceCallImportFail.decl: %InstanceCallImportFail.type = fn_decl @InstanceCallImportFail [concrete = constants.%InstanceCallImportFail] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1053,8 +814,8 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: // CHECK:STDOUT: fn @InstanceCallImportFail() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Instance.ref: type = name_ref Instance, imports.%Main.Instance [concrete = constants.%Instance.type] // CHECK:STDOUT: %G.ref: %Instance.assoc_type = name_ref G, imports.%Main.import_ref.124 [concrete = constants.%assoc0] diff --git a/toolchain/check/testdata/impl/import_extend_impl.carbon b/toolchain/check/testdata/impl/import_extend_impl.carbon index b4561b17ebc9..22ab44c2d2ae 100644 --- a/toolchain/check/testdata/impl/import_extend_impl.carbon +++ b/toolchain/check/testdata/impl/import_extend_impl.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/import_generic.carbon b/toolchain/check/testdata/impl/import_generic.carbon index ba992c477d35..02efd480d3d3 100644 --- a/toolchain/check/testdata/impl/import_generic.carbon +++ b/toolchain/check/testdata/impl/import_generic.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon index bbcddd7b2b97..5e159b701de6 100644 --- a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon +++ b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/import_self.carbon b/toolchain/check/testdata/impl/import_self.carbon index f996bbfda4f1..b3698200ae02 100644 --- a/toolchain/check/testdata/impl/import_self.carbon +++ b/toolchain/check/testdata/impl/import_self.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 719a692bae97..1c295042cd72 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/import_use_generic.carbon b/toolchain/check/testdata/impl/import_use_generic.carbon index 8307ade0e972..e5e2a18310c1 100644 --- a/toolchain/check/testdata/impl/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/import_use_generic.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/interface_args.carbon b/toolchain/check/testdata/impl/interface_args.carbon index 2275be130734..32ac40a1010c 100644 --- a/toolchain/check/testdata/impl/interface_args.carbon +++ b/toolchain/check/testdata/impl/interface_args.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index aaa982c280af..72faf67acbf2 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -51,21 +52,12 @@ fn G(c: C) { // CHECK:STDOUT: %.fec: type = fn_type_with_self_type %F.type.b7b, %HasF.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { @@ -79,7 +71,7 @@ fn G(c: C) { // CHECK:STDOUT: %c.param_patt: %pattern_type = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %c.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc26: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc27: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -128,14 +120,14 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%c.param: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc27: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %G.ref.loc27: %HasF.assoc_type = name_ref G, @C.%G [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc27: %.fec = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.dc7] -// CHECK:STDOUT: %F.call.loc27: init %empty_tuple.type = call %impl.elem0.loc27() -// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %C.ref.loc28: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %G.ref.loc28: %HasF.assoc_type = name_ref G, @C.%G [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc28: %.fec = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.dc7] // CHECK:STDOUT: %F.call.loc28: init %empty_tuple.type = call %impl.elem0.loc28() +// CHECK:STDOUT: %c.ref: %C = name_ref c, %c +// CHECK:STDOUT: %G.ref.loc29: %HasF.assoc_type = name_ref G, @C.%G [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc29: %.fec = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.dc7] +// CHECK:STDOUT: %F.call.loc29: init %empty_tuple.type = call %impl.elem0.loc29() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon index edb8dee72f48..e6dcee91842d 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon index 8a8803aee1fe..da6540a01c77 100644 --- a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -49,21 +50,12 @@ fn F(c: C) { // CHECK:STDOUT: %F.c41: %F.type.b25 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type.b25 = fn_decl @F.2 [concrete = constants.%F.c41] { @@ -71,7 +63,7 @@ fn F(c: C) { // CHECK:STDOUT: %c.param_patt: %pattern_type = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %c.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc23: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -107,10 +99,10 @@ fn F(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%c.param: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc27: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %F.ref.loc27: %I.assoc_type = name_ref F, @C.%F [concrete = constants.%assoc0] +// CHECK:STDOUT: %C.ref.loc28: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %F.ref.loc28: %I.assoc_type = name_ref F, @C.%F [concrete = constants.%assoc0] // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc32: %I.assoc_type = name_ref F, @C.%F [concrete = constants.%assoc0] +// CHECK:STDOUT: %F.ref.loc33: %I.assoc_type = name_ref F, @C.%F [concrete = constants.%assoc0] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon index 414464f54210..69d9d4673cae 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -72,22 +73,13 @@ fn G() { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type.b25 = fn_decl @F.2 [concrete = constants.%F.c41] {} {} diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index 80df0b841c62..3db6671c1dee 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -159,20 +160,11 @@ fn G(x: A) { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -352,20 +344,11 @@ fn G(x: A) { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -573,21 +556,12 @@ fn G(x: A) { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.c77, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {} // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -816,20 +790,11 @@ fn G(x: A) { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.8c6, @F.2(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: %HasF.type.fe3 = interface_decl @HasF [concrete = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { @@ -1050,20 +1015,11 @@ fn G(x: A) { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] @@ -1223,22 +1179,13 @@ fn G(x: A) { // CHECK:STDOUT: %assoc0.402: %HasF.assoc_type.1af = assoc_entity element0, @HasF.%F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: %HasF.type.fe3 = interface_decl @HasF [concrete = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { diff --git a/toolchain/check/testdata/impl/lookup/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/impl_forall.carbon index 4d1915a7f31c..d648bc171dfa 100644 --- a/toolchain/check/testdata/impl/lookup/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_forall.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index 619573c38ace..eafe5d1f1472 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 85b1b5a5ace1..d4ad17e5c5a7 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -62,20 +63,20 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl.loc14 +// CHECK:STDOUT: .C = %C.decl.loc15 // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl.loc14: type = class_decl @C [concrete = constants.%C] {} {} +// CHECK:STDOUT: %C.decl.loc15: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} -// CHECK:STDOUT: %C.decl.loc20: type = class_decl @C [concrete = constants.%C] {} {} +// CHECK:STDOUT: %C.decl.loc21: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type.b25 = fn_decl @F.3 [concrete = constants.%F.c41] { // CHECK:STDOUT: %c.patt: %pattern_type.c48 = binding_pattern c [concrete] // CHECK:STDOUT: %c.param_patt: %pattern_type.c48 = value_param_pattern %c.patt, call_param0 [concrete] @@ -85,7 +86,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %c.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc14 [concrete = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc15 [concrete = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -102,13 +103,13 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc17_14.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc17_14.1: type = splice_block %.loc17_14.2 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc18_14.1 (%Self.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc18_14.1: type = splice_block %.loc18_14.2 [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type)] { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc17_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc17_14.2: type = converted %Self.ref, %Self.as_type.loc17_14.2 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self.as_type.loc18_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc18_14.2: type = converted %Self.ref, %Self.as_type.loc18_14.2 [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc17_14.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc18_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -161,10 +162,10 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc17_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc17_14.1 [symbolic = %pattern_type (constants.%pattern_type.6de)] +// CHECK:STDOUT: %Self.as_type.loc18_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc18_14.1 [symbolic = %pattern_type (constants.%pattern_type.6de)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc17_14.1 (%Self.as_type)) -> %i32; +// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc18_14.1 (%Self.as_type)) -> %i32; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%self.param: %C) -> %i32; @@ -176,20 +177,20 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %impl.elem0: %.832 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%F.4c3] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %F.call: init %i32 = call %bound_method(%c.ref) -// CHECK:STDOUT: %.loc27_15.1: %i32 = value_of_initializer %F.call -// CHECK:STDOUT: %.loc27_15.2: %i32 = converted %F.call, %.loc27_15.1 -// CHECK:STDOUT: return %.loc27_15.2 +// CHECK:STDOUT: %.loc28_15.1: %i32 = value_of_initializer %F.call +// CHECK:STDOUT: %.loc28_15.2: %i32 = converted %F.call, %.loc28_15.1 +// CHECK:STDOUT: return %.loc28_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc17_14.1 => constants.%Self.as_type +// CHECK:STDOUT: %Self.as_type.loc18_14.1 => constants.%Self.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet -// CHECK:STDOUT: %Self.as_type.loc17_14.1 => constants.%C +// CHECK:STDOUT: %Self.as_type.loc18_14.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c48 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon index b3adc8998ce2..ccb0127a0493 100644 --- a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon +++ b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/overlap_with_non_types.carbon b/toolchain/check/testdata/impl/lookup/overlap_with_non_types.carbon index 5c7dd16118e0..ec7db4729788 100644 --- a/toolchain/check/testdata/impl/lookup/overlap_with_non_types.carbon +++ b/toolchain/check/testdata/impl/lookup/overlap_with_non_types.carbon @@ -2,6 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon +// // AUTOUPDATE // TIP: To test this file alone, run: // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/lookup/overlap_with_non_types.carbon diff --git a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon index 80e9885a5b5f..a572a68ff4e3 100644 --- a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon @@ -2,9 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/facet_types.carbon // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/lookup/specific_args.carbon b/toolchain/check/testdata/impl/lookup/specific_args.carbon index b1afddf9fc35..9ae3a85621d3 100644 --- a/toolchain/check/testdata/impl/lookup/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/specific_args.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/multiple_extend.carbon b/toolchain/check/testdata/impl/multiple_extend.carbon index c1bbb6df7034..7670d7cfe85a 100644 --- a/toolchain/check/testdata/impl/multiple_extend.carbon +++ b/toolchain/check/testdata/impl/multiple_extend.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -197,22 +198,13 @@ fn P(o: O) { // CHECK:STDOUT: %.521: type = fn_type_with_self_type %G.type.d27, %HasG.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasF = %HasF.decl // CHECK:STDOUT: .HasG = %HasG.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {} // CHECK:STDOUT: %HasG.decl: type = interface_decl @HasG [concrete = constants.%HasG.type] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -372,22 +364,13 @@ fn P(o: O) { // CHECK:STDOUT: %B: %B.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasA1 = %HasA1.decl // CHECK:STDOUT: .HasA2 = %HasA2.decl // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasA1.decl: type = interface_decl @HasA1 [concrete = constants.%HasA1.type] {} {} // CHECK:STDOUT: %HasA2.decl: type = interface_decl @HasA2 [concrete = constants.%HasA2.type] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} @@ -530,22 +513,13 @@ fn P(o: O) { // CHECK:STDOUT: %.06f: type = fn_type_with_self_type %I.type.9bd, %HasI.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .HasI = %HasI.decl // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .E = %E.decl // CHECK:STDOUT: .H = %H.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasI.decl: type = interface_decl @HasI [concrete = constants.%HasI.type] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {} @@ -680,22 +654,13 @@ fn P(o: O) { // CHECK:STDOUT: %M: %M.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .Base = %Base.decl // CHECK:STDOUT: .HasK = %HasK.decl // CHECK:STDOUT: .L = %L.decl // CHECK:STDOUT: .M = %M.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Base.decl: type = class_decl @Base [concrete = constants.%Base] {} {} // CHECK:STDOUT: %HasK.decl: type = interface_decl @HasK [concrete = constants.%HasK.type] {} {} // CHECK:STDOUT: %L.decl: type = class_decl @L [concrete = constants.%L] {} {} @@ -830,23 +795,14 @@ fn P(o: O) { // CHECK:STDOUT: %P: %P.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .NBase = %NBase.decl // CHECK:STDOUT: .HasN1 = %HasN1.decl // CHECK:STDOUT: .HasN2 = %HasN2.decl // CHECK:STDOUT: .O = %O.decl // CHECK:STDOUT: .P = %P.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %NBase.decl: type = class_decl @NBase [concrete = constants.%NBase] {} {} // CHECK:STDOUT: %HasN1.decl: type = interface_decl @HasN1 [concrete = constants.%HasN1.type] {} {} // CHECK:STDOUT: %HasN2.decl: type = interface_decl @HasN2 [concrete = constants.%HasN2.type] {} {} diff --git a/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon b/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon index df17fe1282c4..e1e4d6000ad7 100644 --- a/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index c0082ec641b5..edd8c7ed0aa7 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -42,7 +43,7 @@ impl i32 as I {} // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,17 +55,17 @@ impl i32 as I {} // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %I.ref.loc16: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %I.ref.loc17: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl [concrete] {} { -// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %I.ref.loc22: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %I.ref.loc23: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -76,16 +77,16 @@ impl i32 as I {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %i32.loc16 as %I.ref.loc16 { +// CHECK:STDOUT: impl @impl: %i32.loc17 as %I.ref.loc17 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { // CHECK:STDOUT: impl_decl @impl [concrete] {} { -// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %I.ref.loc19: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %I.ref.loc20: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357] diff --git a/toolchain/check/testdata/impl/self_in_class.carbon b/toolchain/check/testdata/impl/self_in_class.carbon index 29ea9dadc042..d0e1e78f4432 100644 --- a/toolchain/check/testdata/impl/self_in_class.carbon +++ b/toolchain/check/testdata/impl/self_in_class.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -66,10 +67,10 @@ class A { // CHECK:STDOUT: %return.param_patt: @Make.1.%pattern_type (%pattern_type.839) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %DefaultConstructible.type = name_ref Self, @DefaultConstructible.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc15_16.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc15_16.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc15: type = converted %Self.ref, %Self.as_type.loc15_16.2 [symbolic = %Self.as_type.loc15_16.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %return.param: ref @Make.1.%Self.as_type.loc15_16.1 (%Self.as_type) = out_param call_param0 -// CHECK:STDOUT: %return: ref @Make.1.%Self.as_type.loc15_16.1 (%Self.as_type) = return_slot %return.param +// CHECK:STDOUT: %Self.as_type.loc16_16.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc16: type = converted %Self.ref, %Self.as_type.loc16_16.2 [symbolic = %Self.as_type.loc16_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %return.param: ref @Make.1.%Self.as_type.loc16_16.1 (%Self.as_type) = out_param call_param0 +// CHECK:STDOUT: %return: ref @Make.1.%Self.as_type.loc16_16.1 (%Self.as_type) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %DefaultConstructible.assoc_type = assoc_entity element0, %Make.decl [concrete = constants.%assoc0] // CHECK:STDOUT: @@ -122,29 +123,29 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Make.1(@DefaultConstructible.%Self: %DefaultConstructible.type) { // CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc15_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc15_16.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc15_16.1 [symbolic = %pattern_type (constants.%pattern_type.839)] +// CHECK:STDOUT: %Self.as_type.loc16_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_16.1 [symbolic = %pattern_type (constants.%pattern_type.839)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @Make.1.%Self.as_type.loc15_16.1 (%Self.as_type); +// CHECK:STDOUT: fn() -> @Make.1.%Self.as_type.loc16_16.1 (%Self.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make.2() -> %return.param: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc24_33.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc24_33.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc24_34: init %C = converted %.loc24_33.1, %.loc24_33.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc24_34 to %return +// CHECK:STDOUT: %.loc25_33.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc25_33.2: init %C = class_init (), %return [concrete = constants.%C.val] +// CHECK:STDOUT: %.loc25_34: init %C = converted %.loc25_33.1, %.loc25_33.2 [concrete = constants.%C.val] +// CHECK:STDOUT: return %.loc25_34 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Make.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc15_16.1 => constants.%Self.as_type +// CHECK:STDOUT: %Self.as_type.loc16_16.1 => constants.%Self.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.839 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Make.1(constants.%DefaultConstructible.facet) { // CHECK:STDOUT: %Self => constants.%DefaultConstructible.facet -// CHECK:STDOUT: %Self.as_type.loc15_16.1 => constants.%C +// CHECK:STDOUT: %Self.as_type.loc16_16.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c48 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/self_in_signature.carbon b/toolchain/check/testdata/impl/self_in_signature.carbon index 00dc87c409e1..f8946a5b32c1 100644 --- a/toolchain/check/testdata/impl/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/self_in_signature.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: @@ -55,13 +56,13 @@ impl D as SelfNested { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] -// CHECK:STDOUT: %UseSelf.impl_witness.b25: = impl_witness file.%UseSelf.impl_witness_table.loc22 [concrete] +// CHECK:STDOUT: %UseSelf.impl_witness.b25: = impl_witness file.%UseSelf.impl_witness_table.loc23 [concrete] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %F.type.fc6: type = fn_type @F.2 [concrete] // CHECK:STDOUT: %F.5e2: %F.type.fc6 = struct_value () [concrete] // CHECK:STDOUT: %UseSelf.facet.727: %UseSelf.type = facet_value %C, (%UseSelf.impl_witness.b25) [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %UseSelf.impl_witness.f90: = impl_witness file.%UseSelf.impl_witness_table.loc26 [concrete] +// CHECK:STDOUT: %UseSelf.impl_witness.f90: = impl_witness file.%UseSelf.impl_witness_table.loc27 [concrete] // CHECK:STDOUT: %pattern_type.510: type = pattern_type %D [concrete] // CHECK:STDOUT: %F.type.0aa: type = fn_type @F.3 [concrete] // CHECK:STDOUT: %F.f71: %F.type.0aa = struct_value () [concrete] @@ -79,7 +80,7 @@ impl D as SelfNested { // CHECK:STDOUT: %F.998: %F.type.6ed = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.assoc_type: type = assoc_entity_type @SelfNested [concrete] // CHECK:STDOUT: %assoc0.beb: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.%F.decl [concrete] -// CHECK:STDOUT: %SelfNested.impl_witness.5d5: = impl_witness file.%SelfNested.impl_witness_table.loc34 [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.5d5: = impl_witness file.%SelfNested.impl_witness_table.loc35 [concrete] // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete] // CHECK:STDOUT: %struct_type.x.y.2f0: type = struct_type {.x: %C, .y: %empty_tuple.type} [concrete] // CHECK:STDOUT: %tuple.type.a17: type = tuple_type (%ptr.019, %struct_type.x.y.2f0) [concrete] @@ -87,7 +88,7 @@ impl D as SelfNested { // CHECK:STDOUT: %F.type.ef0: type = fn_type @F.5 [concrete] // CHECK:STDOUT: %F.9a9: %F.type.ef0 = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.facet.2b2: %SelfNested.type = facet_value %C, (%SelfNested.impl_witness.5d5) [concrete] -// CHECK:STDOUT: %SelfNested.impl_witness.16b: = impl_witness file.%SelfNested.impl_witness_table.loc38 [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.16b: = impl_witness file.%SelfNested.impl_witness_table.loc39 [concrete] // CHECK:STDOUT: %ptr.19c: type = ptr_type %D [concrete] // CHECK:STDOUT: %struct_type.x.y.527: type = struct_type {.x: %D, .y: %empty_tuple.type} [concrete] // CHECK:STDOUT: %tuple.type.a5f: type = tuple_type (%ptr.19c, %struct_type.x.y.527) [concrete] @@ -111,27 +112,27 @@ impl D as SelfNested { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [concrete = constants.%UseSelf.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %UseSelf.impl_witness_table.loc22 = impl_witness_table (@impl.c4a.%F.decl), @impl.c4a [concrete] -// CHECK:STDOUT: %UseSelf.impl_witness.loc22: = impl_witness %UseSelf.impl_witness_table.loc22 [concrete = constants.%UseSelf.impl_witness.b25] +// CHECK:STDOUT: %UseSelf.impl_witness_table.loc23 = impl_witness_table (@impl.c4a.%F.decl), @impl.c4a [concrete] +// CHECK:STDOUT: %UseSelf.impl_witness.loc23: = impl_witness %UseSelf.impl_witness_table.loc23 [concrete = constants.%UseSelf.impl_witness.b25] // CHECK:STDOUT: impl_decl @impl.659 [concrete] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [concrete = constants.%UseSelf.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %UseSelf.impl_witness_table.loc26 = impl_witness_table (@impl.659.%F.decl), @impl.659 [concrete] -// CHECK:STDOUT: %UseSelf.impl_witness.loc26: = impl_witness %UseSelf.impl_witness_table.loc26 [concrete = constants.%UseSelf.impl_witness.f90] +// CHECK:STDOUT: %UseSelf.impl_witness_table.loc27 = impl_witness_table (@impl.659.%F.decl), @impl.659 [concrete] +// CHECK:STDOUT: %UseSelf.impl_witness.loc27: = impl_witness %UseSelf.impl_witness_table.loc27 [concrete = constants.%UseSelf.impl_witness.f90] // CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [concrete = constants.%SelfNested.type] {} {} // CHECK:STDOUT: impl_decl @impl.730 [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %SelfNested.impl_witness_table.loc34 = impl_witness_table (@impl.730.%F.decl), @impl.730 [concrete] -// CHECK:STDOUT: %SelfNested.impl_witness.loc34: = impl_witness %SelfNested.impl_witness_table.loc34 [concrete = constants.%SelfNested.impl_witness.5d5] +// CHECK:STDOUT: %SelfNested.impl_witness_table.loc35 = impl_witness_table (@impl.730.%F.decl), @impl.730 [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.loc35: = impl_witness %SelfNested.impl_witness_table.loc35 [concrete = constants.%SelfNested.impl_witness.5d5] // CHECK:STDOUT: impl_decl @impl.82d [concrete] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %SelfNested.impl_witness_table.loc38 = impl_witness_table (@impl.82d.%F.decl), @impl.82d [concrete] -// CHECK:STDOUT: %SelfNested.impl_witness.loc38: = impl_witness %SelfNested.impl_witness_table.loc38 [concrete = constants.%SelfNested.impl_witness.16b] +// CHECK:STDOUT: %SelfNested.impl_witness_table.loc39 = impl_witness_table (@impl.82d.%F.decl), @impl.82d [concrete] +// CHECK:STDOUT: %SelfNested.impl_witness.loc39: = impl_witness %SelfNested.impl_witness_table.loc39 [concrete = constants.%SelfNested.impl_witness.16b] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { @@ -144,25 +145,25 @@ impl D as SelfNested { // CHECK:STDOUT: %return.patt: @F.1.%pattern_type (%pattern_type.3ef) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type (%pattern_type.3ef) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc15_32: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.085)] -// CHECK:STDOUT: %Self.as_type.loc15_32: type = facet_access_type %Self.ref.loc15_32 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.599)] -// CHECK:STDOUT: %.loc15_32: type = converted %Self.ref.loc15_32, %Self.as_type.loc15_32 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.599)] -// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.599) = value_param call_param0 -// CHECK:STDOUT: %.loc15_14.1: type = splice_block %.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.599)] { -// CHECK:STDOUT: %Self.ref.loc15_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.085)] -// CHECK:STDOUT: %Self.as_type.loc15_14.2: type = facet_access_type %Self.ref.loc15_14 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.599)] -// CHECK:STDOUT: %.loc15_14.2: type = converted %Self.ref.loc15_14, %Self.as_type.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.599)] +// CHECK:STDOUT: %Self.ref.loc16_32: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.085)] +// CHECK:STDOUT: %Self.as_type.loc16_32: type = facet_access_type %Self.ref.loc16_32 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.599)] +// CHECK:STDOUT: %.loc16_32: type = converted %Self.ref.loc16_32, %Self.as_type.loc16_32 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.599)] +// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.599) = value_param call_param0 +// CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.599)] { +// CHECK:STDOUT: %Self.ref.loc16_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.085)] +// CHECK:STDOUT: %Self.as_type.loc16_14.2: type = facet_access_type %Self.ref.loc16_14 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.599)] +// CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref.loc16_14, %Self.as_type.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.599)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.599) = bind_name self, %self.param -// CHECK:STDOUT: %x.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.599) = value_param call_param1 -// CHECK:STDOUT: %.loc15_23.1: type = splice_block %.loc15_23.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.599)] { -// CHECK:STDOUT: %Self.ref.loc15_23: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.085)] -// CHECK:STDOUT: %Self.as_type.loc15_23: type = facet_access_type %Self.ref.loc15_23 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.599)] -// CHECK:STDOUT: %.loc15_23.2: type = converted %Self.ref.loc15_23, %Self.as_type.loc15_23 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.599)] +// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.599) = bind_name self, %self.param +// CHECK:STDOUT: %x.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.599) = value_param call_param1 +// CHECK:STDOUT: %.loc16_23.1: type = splice_block %.loc16_23.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.599)] { +// CHECK:STDOUT: %Self.ref.loc16_23: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.085)] +// CHECK:STDOUT: %Self.as_type.loc16_23: type = facet_access_type %Self.ref.loc16_23 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.599)] +// CHECK:STDOUT: %.loc16_23.2: type = converted %Self.ref.loc16_23, %Self.as_type.loc16_23 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.599)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.599) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.599) = out_param call_param2 -// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.599) = return_slot %return.param +// CHECK:STDOUT: %x: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.599) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.599) = out_param call_param2 +// CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.599) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.24c] // CHECK:STDOUT: @@ -179,19 +180,19 @@ impl D as SelfNested { // CHECK:STDOUT: %x.param_patt: @F.4.%pattern_type (%pattern_type.5a1) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: @F.4.%tuple.type (%tuple.type.46b) = value_param call_param0 -// CHECK:STDOUT: %.loc31_37.1: type = splice_block %.loc31_37.3 [symbolic = %tuple.type (constants.%tuple.type.46b)] { -// CHECK:STDOUT: %Self.ref.loc31_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] -// CHECK:STDOUT: %Self.as_type.loc31_16.2: type = facet_access_type %Self.ref.loc31_12 [symbolic = %Self.as_type.loc31_16.1 (constants.%Self.as_type.e1e)] -// CHECK:STDOUT: %.loc31_16: type = converted %Self.ref.loc31_12, %Self.as_type.loc31_16.2 [symbolic = %Self.as_type.loc31_16.1 (constants.%Self.as_type.e1e)] -// CHECK:STDOUT: %ptr.loc31_16.2: type = ptr_type %.loc31_16 [symbolic = %ptr.loc31_16.1 (constants.%ptr.e87)] -// CHECK:STDOUT: %Self.ref.loc31_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] -// CHECK:STDOUT: %Self.as_type.loc31_24: type = facet_access_type %Self.ref.loc31_24 [symbolic = %Self.as_type.loc31_16.1 (constants.%Self.as_type.e1e)] -// CHECK:STDOUT: %.loc31_24: type = converted %Self.ref.loc31_24, %Self.as_type.loc31_24 [symbolic = %Self.as_type.loc31_16.1 (constants.%Self.as_type.e1e)] -// CHECK:STDOUT: %.loc31_35.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc31_35.2: type = converted %.loc31_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.x.y.loc31_36.2: type = struct_type {.x: @F.4.%Self.as_type.loc31_16.1 (%Self.as_type.e1e), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc31_36.1 (constants.%struct_type.x.y.270)] -// CHECK:STDOUT: %.loc31_37.2: %tuple.type.24b = tuple_literal (%ptr.loc31_16.2, %struct_type.x.y.loc31_36.2) -// CHECK:STDOUT: %.loc31_37.3: type = converted %.loc31_37.2, constants.%tuple.type.46b [symbolic = %tuple.type (constants.%tuple.type.46b)] +// CHECK:STDOUT: %.loc32_37.1: type = splice_block %.loc32_37.3 [symbolic = %tuple.type (constants.%tuple.type.46b)] { +// CHECK:STDOUT: %Self.ref.loc32_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] +// CHECK:STDOUT: %Self.as_type.loc32_16.2: type = facet_access_type %Self.ref.loc32_12 [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %.loc32_16: type = converted %Self.ref.loc32_12, %Self.as_type.loc32_16.2 [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %ptr.loc32_16.2: type = ptr_type %.loc32_16 [symbolic = %ptr.loc32_16.1 (constants.%ptr.e87)] +// CHECK:STDOUT: %Self.ref.loc32_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)] +// CHECK:STDOUT: %Self.as_type.loc32_24: type = facet_access_type %Self.ref.loc32_24 [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %.loc32_24: type = converted %Self.ref.loc32_24, %Self.as_type.loc32_24 [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %.loc32_35.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc32_35.2: type = converted %.loc32_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %struct_type.x.y.loc32_36.2: type = struct_type {.x: @F.4.%Self.as_type.loc32_16.1 (%Self.as_type.e1e), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc32_36.1 (constants.%struct_type.x.y.270)] +// CHECK:STDOUT: %.loc32_37.2: %tuple.type.24b = tuple_literal (%ptr.loc32_16.2, %struct_type.x.y.loc32_36.2) +// CHECK:STDOUT: %.loc32_37.3: type = converted %.loc32_37.2, constants.%tuple.type.46b [symbolic = %tuple.type (constants.%tuple.type.46b)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.4.%tuple.type (%tuple.type.46b) = bind_name x, %x.param // CHECK:STDOUT: } @@ -212,12 +213,12 @@ impl D as SelfNested { // CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_26: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc24_26: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param call_param0 -// CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc24_14: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %x.param: %C = value_param call_param1 -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc24_20: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %C = out_param call_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -226,7 +227,7 @@ impl D as SelfNested { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%UseSelf.impl_witness.loc22 +// CHECK:STDOUT: witness = file.%UseSelf.impl_witness.loc23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.659: %D.ref as %UseSelf.ref { @@ -238,12 +239,12 @@ impl D as SelfNested { // CHECK:STDOUT: %return.patt: %pattern_type.510 = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.510 = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc27_32: type = name_ref Self, @impl.659.%D.ref [concrete = constants.%D] +// CHECK:STDOUT: %Self.ref.loc28_32: type = name_ref Self, @impl.659.%D.ref [concrete = constants.%D] // CHECK:STDOUT: %self.param: %D = value_param call_param0 -// CHECK:STDOUT: %Self.ref.loc27_14: type = name_ref Self, @impl.659.%D.ref [concrete = constants.%D] +// CHECK:STDOUT: %Self.ref.loc28_14: type = name_ref Self, @impl.659.%D.ref [concrete = constants.%D] // CHECK:STDOUT: %self: %D = bind_name self, %self.param // CHECK:STDOUT: %x.param: %D = value_param call_param1 -// CHECK:STDOUT: %Self.ref.loc27_23: type = name_ref Self, @impl.659.%D.ref [concrete = constants.%D] +// CHECK:STDOUT: %Self.ref.loc28_23: type = name_ref Self, @impl.659.%D.ref [concrete = constants.%D] // CHECK:STDOUT: %x: %D = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %D = out_param call_param2 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -251,7 +252,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%UseSelf.impl_witness.loc26 +// CHECK:STDOUT: witness = file.%UseSelf.impl_witness.loc27 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.730: %C.ref as %SelfNested.ref { @@ -260,15 +261,15 @@ impl D as SelfNested { // CHECK:STDOUT: %x.param_patt: %pattern_type.809 = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: %tuple.type.a17 = value_param call_param0 -// CHECK:STDOUT: %.loc35_31.1: type = splice_block %.loc35_31.3 [concrete = constants.%tuple.type.a17] { -// CHECK:STDOUT: %C.ref.loc35_12: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc35_12 [concrete = constants.%ptr.019] -// CHECK:STDOUT: %C.ref.loc35_21: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %.loc35_29.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc35_29.2: type = converted %.loc35_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc36_31.1: type = splice_block %.loc36_31.3 [concrete = constants.%tuple.type.a17] { +// CHECK:STDOUT: %C.ref.loc36_12: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc36_12 [concrete = constants.%ptr.019] +// CHECK:STDOUT: %C.ref.loc36_21: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc36_29.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc36_29.2: type = converted %.loc36_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %C, .y: %empty_tuple.type} [concrete = constants.%struct_type.x.y.2f0] -// CHECK:STDOUT: %.loc35_31.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) -// CHECK:STDOUT: %.loc35_31.3: type = converted %.loc35_31.2, constants.%tuple.type.a17 [concrete = constants.%tuple.type.a17] +// CHECK:STDOUT: %.loc36_31.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) +// CHECK:STDOUT: %.loc36_31.3: type = converted %.loc36_31.2, constants.%tuple.type.a17 [concrete = constants.%tuple.type.a17] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.a17 = bind_name x, %x.param // CHECK:STDOUT: } @@ -276,7 +277,7 @@ impl D as SelfNested { // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%SelfNested.impl_witness.loc34 +// CHECK:STDOUT: witness = file.%SelfNested.impl_witness.loc35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.82d: %D.ref as %SelfNested.ref { @@ -285,22 +286,22 @@ impl D as SelfNested { // CHECK:STDOUT: %x.param_patt: %pattern_type.b43 = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: %tuple.type.a5f = value_param call_param0 -// CHECK:STDOUT: %.loc39_37.1: type = splice_block %.loc39_37.3 [concrete = constants.%tuple.type.a5f] { -// CHECK:STDOUT: %Self.ref.loc39_12: type = name_ref Self, @impl.82d.%D.ref [concrete = constants.%D] -// CHECK:STDOUT: %ptr: type = ptr_type %Self.ref.loc39_12 [concrete = constants.%ptr.19c] -// CHECK:STDOUT: %Self.ref.loc39_24: type = name_ref Self, @impl.82d.%D.ref [concrete = constants.%D] -// CHECK:STDOUT: %.loc39_35.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc39_35.2: type = converted %.loc39_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc40_37.1: type = splice_block %.loc40_37.3 [concrete = constants.%tuple.type.a5f] { +// CHECK:STDOUT: %Self.ref.loc40_12: type = name_ref Self, @impl.82d.%D.ref [concrete = constants.%D] +// CHECK:STDOUT: %ptr: type = ptr_type %Self.ref.loc40_12 [concrete = constants.%ptr.19c] +// CHECK:STDOUT: %Self.ref.loc40_24: type = name_ref Self, @impl.82d.%D.ref [concrete = constants.%D] +// CHECK:STDOUT: %.loc40_35.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc40_35.2: type = converted %.loc40_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %D, .y: %empty_tuple.type} [concrete = constants.%struct_type.x.y.527] -// CHECK:STDOUT: %.loc39_37.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) -// CHECK:STDOUT: %.loc39_37.3: type = converted %.loc39_37.2, constants.%tuple.type.a5f [concrete = constants.%tuple.type.a5f] +// CHECK:STDOUT: %.loc40_37.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) +// CHECK:STDOUT: %.loc40_37.3: type = converted %.loc40_37.2, constants.%tuple.type.a5f [concrete = constants.%tuple.type.a5f] // CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.a5f = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = file.%SelfNested.impl_witness.loc38 +// CHECK:STDOUT: witness = file.%SelfNested.impl_witness.loc39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -323,34 +324,34 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@UseSelf.%Self: %UseSelf.type) { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.085)] -// CHECK:STDOUT: %Self.as_type.loc15_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type.599)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc15_14.1 [symbolic = %pattern_type (constants.%pattern_type.3ef)] +// CHECK:STDOUT: %Self.as_type.loc16_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.599)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_14.1 [symbolic = %pattern_type (constants.%pattern_type.3ef)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.599), %x.param: @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.599)) -> @F.1.%Self.as_type.loc15_14.1 (%Self.as_type.599); +// CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.599), %x.param: @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.599)) -> @F.1.%Self.as_type.loc16_14.1 (%Self.as_type.599); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%self.param: %C, %x.param: %C) -> %return.param: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23_38.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc23_38.2: init %C = class_init (), %return [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc23_39: init %C = converted %.loc23_38.1, %.loc23_38.2 [concrete = constants.%C.val] -// CHECK:STDOUT: return %.loc23_39 to %return +// CHECK:STDOUT: %.loc24_38.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc24_38.2: init %C = class_init (), %return [concrete = constants.%C.val] +// CHECK:STDOUT: %.loc24_39: init %C = converted %.loc24_38.1, %.loc24_38.2 [concrete = constants.%C.val] +// CHECK:STDOUT: return %.loc24_39 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.3(%self.param: %D, %x.param: %D) -> %return.param: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc27_47.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc27_47.2: init %D = class_init (), %return [concrete = constants.%D.val] -// CHECK:STDOUT: %.loc27_48: init %D = converted %.loc27_47.1, %.loc27_47.2 [concrete = constants.%D.val] -// CHECK:STDOUT: return %.loc27_48 to %return +// CHECK:STDOUT: %.loc28_47.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc28_47.2: init %D = class_init (), %return [concrete = constants.%D.val] +// CHECK:STDOUT: %.loc28_48: init %D = converted %.loc28_47.1, %.loc28_47.2 [concrete = constants.%D.val] +// CHECK:STDOUT: return %.loc28_48 to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.4(@SelfNested.%Self: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2ff)] -// CHECK:STDOUT: %Self.as_type.loc31_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc31_16.1 (constants.%Self.as_type.e1e)] -// CHECK:STDOUT: %ptr.loc31_16.1: type = ptr_type %Self.as_type.loc31_16.1 [symbolic = %ptr.loc31_16.1 (constants.%ptr.e87)] -// CHECK:STDOUT: %struct_type.x.y.loc31_36.1: type = struct_type {.x: @F.4.%Self.as_type.loc31_16.1 (%Self.as_type.e1e), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc31_36.1 (constants.%struct_type.x.y.270)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc31_16.1, %struct_type.x.y.loc31_36.1) [symbolic = %tuple.type (constants.%tuple.type.46b)] +// CHECK:STDOUT: %Self.as_type.loc32_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.e1e)] +// CHECK:STDOUT: %ptr.loc32_16.1: type = ptr_type %Self.as_type.loc32_16.1 [symbolic = %ptr.loc32_16.1 (constants.%ptr.e87)] +// CHECK:STDOUT: %struct_type.x.y.loc32_36.1: type = struct_type {.x: @F.4.%Self.as_type.loc32_16.1 (%Self.as_type.e1e), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc32_36.1 (constants.%struct_type.x.y.270)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc32_16.1, %struct_type.x.y.loc32_36.1) [symbolic = %tuple.type (constants.%tuple.type.46b)] // CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [symbolic = %pattern_type (constants.%pattern_type.5a1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @F.4.%tuple.type (%tuple.type.46b)); @@ -362,45 +363,45 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.085) { // CHECK:STDOUT: %Self => constants.%Self.085 -// CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%Self.as_type.599 +// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%Self.as_type.599 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3ef // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%UseSelf.facet.727) { // CHECK:STDOUT: %Self => constants.%UseSelf.facet.727 -// CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%C +// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%UseSelf.facet.d11) { // CHECK:STDOUT: %Self => constants.%UseSelf.facet.d11 -// CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%D +// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%D // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%Self.2ff) { // CHECK:STDOUT: %Self => constants.%Self.2ff -// CHECK:STDOUT: %Self.as_type.loc31_16.1 => constants.%Self.as_type.e1e -// CHECK:STDOUT: %ptr.loc31_16.1 => constants.%ptr.e87 -// CHECK:STDOUT: %struct_type.x.y.loc31_36.1 => constants.%struct_type.x.y.270 +// CHECK:STDOUT: %Self.as_type.loc32_16.1 => constants.%Self.as_type.e1e +// CHECK:STDOUT: %ptr.loc32_16.1 => constants.%ptr.e87 +// CHECK:STDOUT: %struct_type.x.y.loc32_36.1 => constants.%struct_type.x.y.270 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.46b // CHECK:STDOUT: %pattern_type => constants.%pattern_type.5a1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%SelfNested.facet.2b2) { // CHECK:STDOUT: %Self => constants.%SelfNested.facet.2b2 -// CHECK:STDOUT: %Self.as_type.loc31_16.1 => constants.%C -// CHECK:STDOUT: %ptr.loc31_16.1 => constants.%ptr.019 -// CHECK:STDOUT: %struct_type.x.y.loc31_36.1 => constants.%struct_type.x.y.2f0 +// CHECK:STDOUT: %Self.as_type.loc32_16.1 => constants.%C +// CHECK:STDOUT: %ptr.loc32_16.1 => constants.%ptr.019 +// CHECK:STDOUT: %struct_type.x.y.loc32_36.1 => constants.%struct_type.x.y.2f0 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a17 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.809 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%SelfNested.facet.f2c) { // CHECK:STDOUT: %Self => constants.%SelfNested.facet.f2c -// CHECK:STDOUT: %Self.as_type.loc31_16.1 => constants.%D -// CHECK:STDOUT: %ptr.loc31_16.1 => constants.%ptr.19c -// CHECK:STDOUT: %struct_type.x.y.loc31_36.1 => constants.%struct_type.x.y.527 +// CHECK:STDOUT: %Self.as_type.loc32_16.1 => constants.%D +// CHECK:STDOUT: %ptr.loc32_16.1 => constants.%ptr.19c +// CHECK:STDOUT: %struct_type.x.y.loc32_36.1 => constants.%struct_type.x.y.527 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b43 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon b/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon index 4ffa0f0d5204..e2e62e74f3ae 100644 --- a/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon +++ b/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon @@ -2,8 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". -// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present // // AUTOUPDATE // TIP: To test this file alone, run: diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index 04a685f96898..2c91659fe5d1 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -34,20 +35,20 @@ var d: i32 = a[b]; // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] -// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.1e1: %i32 = int_value 12 [concrete] +// CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Convert.bound.ef4: = bound_method %int_24.e3c, %Convert.956 [concrete] // CHECK:STDOUT: %bound_method.477: = bound_method %int_24.e3c, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_24.365: %i32 = int_value 24 [concrete] @@ -67,9 +68,9 @@ var d: i32 = a[b]; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -87,11 +88,11 @@ var d: i32 = a[b]; // CHECK:STDOUT: %a.var_patt: %pattern_type.ae7 = var_pattern %a.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt [concrete] -// CHECK:STDOUT: %.loc14: type = splice_block %array_type [concrete = constants.%array_type] { -// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32.loc14 [concrete = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32.loc15 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var [concrete = %a.var] // CHECK:STDOUT: name_binding_decl { @@ -99,9 +100,9 @@ var d: i32 = a[b]; // CHECK:STDOUT: %b.var_patt: %pattern_type.7ce = var_pattern %b.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %i32 = var %b.var_patt [concrete] -// CHECK:STDOUT: %.loc15: type = splice_block %i32.loc15 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc16: type = splice_block %i32.loc16 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var [concrete = %b.var] // CHECK:STDOUT: name_binding_decl { @@ -109,9 +110,9 @@ var d: i32 = a[b]; // CHECK:STDOUT: %c.var_patt: %pattern_type.7ce = var_pattern %c.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %c.var: ref %i32 = var %c.var_patt [concrete] -// CHECK:STDOUT: %.loc16: type = splice_block %i32.loc16 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc17: type = splice_block %i32.loc17 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var [concrete = %c.var] // CHECK:STDOUT: name_binding_decl { @@ -119,9 +120,9 @@ var d: i32 = a[b]; // CHECK:STDOUT: %d.var_patt: %pattern_type.7ce = var_pattern %d.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %d.var: ref %i32 = var %d.var_patt [concrete] -// CHECK:STDOUT: %.loc17: type = splice_block %i32.loc17 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc18: type = splice_block %i32.loc18 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var [concrete = %d.var] // CHECK:STDOUT: } @@ -130,58 +131,58 @@ var d: i32 = a[b]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [concrete = constants.%int_24.e3c] -// CHECK:STDOUT: %.loc14_31.1: %tuple.type = tuple_literal (%int_12, %int_24) -// CHECK:STDOUT: %impl.elem0.loc14_31.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc14_31.1: = bound_method %int_12, %impl.elem0.loc14_31.1 [concrete = constants.%Convert.bound.221] -// CHECK:STDOUT: %specific_fn.loc14_31.1: = specific_function %impl.elem0.loc14_31.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_31.2: = bound_method %int_12, %specific_fn.loc14_31.1 [concrete = constants.%bound_method.dae] -// CHECK:STDOUT: %int.convert_checked.loc14_31.1: init %i32 = call %bound_method.loc14_31.2(%int_12) [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %.loc14_31.2: init %i32 = converted %int_12, %int.convert_checked.loc14_31.1 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %int_0.loc14: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc14_31.3: ref %i32 = array_index file.%a.var, %int_0.loc14 -// CHECK:STDOUT: %.loc14_31.4: init %i32 = initialize_from %.loc14_31.2 to %.loc14_31.3 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %impl.elem0.loc14_31.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc14_31.3: = bound_method %int_24, %impl.elem0.loc14_31.2 [concrete = constants.%Convert.bound.ef4] -// CHECK:STDOUT: %specific_fn.loc14_31.2: = specific_function %impl.elem0.loc14_31.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_31.4: = bound_method %int_24, %specific_fn.loc14_31.2 [concrete = constants.%bound_method.477] -// CHECK:STDOUT: %int.convert_checked.loc14_31.2: init %i32 = call %bound_method.loc14_31.4(%int_24) [concrete = constants.%int_24.365] -// CHECK:STDOUT: %.loc14_31.5: init %i32 = converted %int_24, %int.convert_checked.loc14_31.2 [concrete = constants.%int_24.365] -// CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %.loc14_31.6: ref %i32 = array_index file.%a.var, %int_1.loc14 -// CHECK:STDOUT: %.loc14_31.7: init %i32 = initialize_from %.loc14_31.5 to %.loc14_31.6 [concrete = constants.%int_24.365] -// CHECK:STDOUT: %.loc14_31.8: init %array_type = array_init (%.loc14_31.4, %.loc14_31.7) to file.%a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc14_1: init %array_type = converted %.loc14_31.1, %.loc14_31.8 [concrete = constants.%array] -// CHECK:STDOUT: assign file.%a.var, %.loc14_1 +// CHECK:STDOUT: %.loc15_31.1: %tuple.type = tuple_literal (%int_12, %int_24) +// CHECK:STDOUT: %impl.elem0.loc15_31.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc15_31.1: = bound_method %int_12, %impl.elem0.loc15_31.1 [concrete = constants.%Convert.bound.221] +// CHECK:STDOUT: %specific_fn.loc15_31.1: = specific_function %impl.elem0.loc15_31.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc15_31.2: = bound_method %int_12, %specific_fn.loc15_31.1 [concrete = constants.%bound_method.dae] +// CHECK:STDOUT: %int.convert_checked.loc15_31.1: init %i32 = call %bound_method.loc15_31.2(%int_12) [concrete = constants.%int_12.1e1] +// CHECK:STDOUT: %.loc15_31.2: init %i32 = converted %int_12, %int.convert_checked.loc15_31.1 [concrete = constants.%int_12.1e1] +// CHECK:STDOUT: %int_0.loc15: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %.loc15_31.3: ref %i32 = array_index file.%a.var, %int_0.loc15 +// CHECK:STDOUT: %.loc15_31.4: init %i32 = initialize_from %.loc15_31.2 to %.loc15_31.3 [concrete = constants.%int_12.1e1] +// CHECK:STDOUT: %impl.elem0.loc15_31.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc15_31.3: = bound_method %int_24, %impl.elem0.loc15_31.2 [concrete = constants.%Convert.bound.ef4] +// CHECK:STDOUT: %specific_fn.loc15_31.2: = specific_function %impl.elem0.loc15_31.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc15_31.4: = bound_method %int_24, %specific_fn.loc15_31.2 [concrete = constants.%bound_method.477] +// CHECK:STDOUT: %int.convert_checked.loc15_31.2: init %i32 = call %bound_method.loc15_31.4(%int_24) [concrete = constants.%int_24.365] +// CHECK:STDOUT: %.loc15_31.5: init %i32 = converted %int_24, %int.convert_checked.loc15_31.2 [concrete = constants.%int_24.365] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc15_1.1: = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_1.2: = bound_method %int_1.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %bound_method.loc15_1.2(%int_1.loc15) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc15: init %i32 = converted %int_1.loc15, %int.convert_checked.loc15 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: assign file.%b.var, %.loc15 -// CHECK:STDOUT: %a.ref.loc16: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] -// CHECK:STDOUT: %int_0.loc16: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_31.6: ref %i32 = array_index file.%a.var, %int_1.loc15 +// CHECK:STDOUT: %.loc15_31.7: init %i32 = initialize_from %.loc15_31.5 to %.loc15_31.6 [concrete = constants.%int_24.365] +// CHECK:STDOUT: %.loc15_31.8: init %array_type = array_init (%.loc15_31.4, %.loc15_31.7) to file.%a.var [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_31.1, %.loc15_31.8 [concrete = constants.%array] +// CHECK:STDOUT: assign file.%a.var, %.loc15_1 +// CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc16: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc16_16.1: = bound_method %int_0.loc16, %impl.elem0.loc16 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc16_16.2: = bound_method %int_0.loc16, %specific_fn.loc16 [concrete = constants.%bound_method.b6e] -// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %bound_method.loc16_16.2(%int_0.loc16) [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc16_16.1: %i32 = value_of_initializer %int.convert_checked.loc16 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc16_16.2: %i32 = converted %int_0.loc16, %.loc16_16.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc16_17.1: ref %i32 = array_index %a.ref.loc16, %.loc16_16.2 -// CHECK:STDOUT: %.loc16_17.2: %i32 = bind_value %.loc16_17.1 -// CHECK:STDOUT: assign file.%c.var, %.loc16_17.2 +// CHECK:STDOUT: %bound_method.loc16_1.1: = bound_method %int_1.loc16, %impl.elem0.loc16 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc16_1.2: = bound_method %int_1.loc16, %specific_fn.loc16 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %bound_method.loc16_1.2(%int_1.loc16) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc16: init %i32 = converted %int_1.loc16, %int.convert_checked.loc16 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: assign file.%b.var, %.loc16 // CHECK:STDOUT: %a.ref.loc17: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] -// CHECK:STDOUT: %b.ref: ref %i32 = name_ref b, file.%b [concrete = file.%b.var] +// CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc17_16: %i32 = bind_value %b.ref -// CHECK:STDOUT: %.loc17_17.1: ref %i32 = array_index %a.ref.loc17, %.loc17_16 +// CHECK:STDOUT: %impl.elem0.loc17: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc17_16.1: = bound_method %int_0.loc17, %impl.elem0.loc17 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc17_16.2: = bound_method %int_0.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %bound_method.loc17_16.2(%int_0.loc17) [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc17_16.1: %i32 = value_of_initializer %int.convert_checked.loc17 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc17_16.2: %i32 = converted %int_0.loc17, %.loc17_16.1 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc17_17.1: ref %i32 = array_index %a.ref.loc17, %.loc17_16.2 // CHECK:STDOUT: %.loc17_17.2: %i32 = bind_value %.loc17_17.1 -// CHECK:STDOUT: assign file.%d.var, %.loc17_17.2 +// CHECK:STDOUT: assign file.%c.var, %.loc17_17.2 +// CHECK:STDOUT: %a.ref.loc18: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] +// CHECK:STDOUT: %b.ref: ref %i32 = name_ref b, file.%b [concrete = file.%b.var] +// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc18_16: %i32 = bind_value %b.ref +// CHECK:STDOUT: %.loc18_17.1: ref %i32 = array_index %a.ref.loc18, %.loc18_16 +// CHECK:STDOUT: %.loc18_17.2: %i32 = bind_value %.loc18_17.1 +// CHECK:STDOUT: assign file.%d.var, %.loc18_17.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: 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 599161e75f6c..97e4c6a2d3ed 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -38,17 +39,17 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.1e1: %i32 = int_value 12 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.1e1) [concrete] @@ -62,9 +63,9 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -80,11 +81,11 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %a.var_patt: %pattern_type.a98 = var_pattern %a.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt [concrete] -// CHECK:STDOUT: %.loc14: type = splice_block %array_type [concrete = constants.%array_type] { -// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc14 [concrete = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc15 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var [concrete = %a.var] // CHECK:STDOUT: name_binding_decl { @@ -92,9 +93,9 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %b.var_patt: %pattern_type.7ce = var_pattern %b.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %i32 = var %b.var_patt [concrete] -// CHECK:STDOUT: %.loc22: type = splice_block %i32.loc22 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc23: type = splice_block %i32.loc23 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var [concrete = %b.var] // CHECK:STDOUT: } @@ -102,27 +103,27 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] -// CHECK:STDOUT: %.loc14_28.1: %tuple.type = tuple_literal (%int_12) +// CHECK:STDOUT: %.loc15_28.1: %tuple.type = tuple_literal (%int_12) // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc14_28.1: = bound_method %int_12, %impl.elem0 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_28.2: = bound_method %int_12, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_28.2(%int_12) [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %.loc14_28.2: init %i32 = converted %int_12, %int.convert_checked [concrete = constants.%int_12.1e1] +// CHECK:STDOUT: %bound_method.loc15_28.1: = bound_method %int_12, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc15_28.2: = bound_method %int_12, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_28.2(%int_12) [concrete = constants.%int_12.1e1] +// CHECK:STDOUT: %.loc15_28.2: init %i32 = converted %int_12, %int.convert_checked [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc14_28.3: ref %i32 = array_index file.%a.var, %int_0 -// CHECK:STDOUT: %.loc14_28.4: init %i32 = initialize_from %.loc14_28.2 to %.loc14_28.3 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %.loc14_28.5: init %array_type = array_init (%.loc14_28.4) to file.%a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc14_1: init %array_type = converted %.loc14_28.1, %.loc14_28.5 [concrete = constants.%array] -// CHECK:STDOUT: assign file.%a.var, %.loc14_1 +// CHECK:STDOUT: %.loc15_28.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc15_28.4: init %i32 = initialize_from %.loc15_28.2 to %.loc15_28.3 [concrete = constants.%int_12.1e1] +// CHECK:STDOUT: %.loc15_28.5: init %array_type = array_init (%.loc15_28.4) to file.%a.var [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_28.1, %.loc15_28.5 [concrete = constants.%array] +// CHECK:STDOUT: assign file.%a.var, %.loc15_1 // CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] // CHECK:STDOUT: %float: f64 = float_literal 2.6000000000000001 [concrete = constants.%float] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc22_16: %i32 = converted %float, [concrete = ] -// CHECK:STDOUT: %.loc22_19.1: ref %i32 = array_index %a.ref, [concrete = ] -// CHECK:STDOUT: %.loc22_19.2: %i32 = bind_value %.loc22_19.1 [concrete = ] -// CHECK:STDOUT: assign file.%b.var, %.loc22_19.2 +// CHECK:STDOUT: %.loc23_16: %i32 = converted %float, [concrete = ] +// CHECK:STDOUT: %.loc23_19.1: ref %i32 = array_index %a.ref, [concrete = ] +// CHECK:STDOUT: %.loc23_19.2: %i32 = bind_value %.loc23_19.1 [concrete = ] +// CHECK:STDOUT: assign file.%b.var, %.loc23_19.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: 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 ae14182970fa..b29e76d8b7ce 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 @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -35,17 +36,17 @@ var b: i32 = a[1]; // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.221: = bound_method %int_12.6a3, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dae: = bound_method %int_12.6a3, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_12.1e1: %i32 = int_value 12 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.1e1) [concrete] @@ -61,9 +62,9 @@ var b: i32 = a[1]; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -79,11 +80,11 @@ var b: i32 = a[1]; // CHECK:STDOUT: %a.var_patt: %pattern_type.a98 = var_pattern %a.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt [concrete] -// CHECK:STDOUT: %.loc14: type = splice_block %array_type [concrete = constants.%array_type] { -// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc14 [concrete = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32.loc15 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var [concrete = %a.var] // CHECK:STDOUT: name_binding_decl { @@ -91,9 +92,9 @@ var b: i32 = a[1]; // CHECK:STDOUT: %b.var_patt: %pattern_type.7ce = var_pattern %b.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %i32 = var %b.var_patt [concrete] -// CHECK:STDOUT: %.loc19: type = splice_block %i32.loc19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc20: type = splice_block %i32.loc20 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var [concrete = %b.var] // CHECK:STDOUT: } @@ -101,33 +102,33 @@ var b: i32 = a[1]; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] -// CHECK:STDOUT: %.loc14_28.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0.loc14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc14_28.1: = bound_method %int_12, %impl.elem0.loc14 [concrete = constants.%Convert.bound.221] -// CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_28.2: = bound_method %int_12, %specific_fn.loc14 [concrete = constants.%bound_method.dae] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %bound_method.loc14_28.2(%int_12) [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %.loc14_28.2: init %i32 = converted %int_12, %int.convert_checked.loc14 [concrete = constants.%int_12.1e1] +// CHECK:STDOUT: %.loc15_28.1: %tuple.type = tuple_literal (%int_12) +// CHECK:STDOUT: %impl.elem0.loc15: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc15_28.1: = bound_method %int_12, %impl.elem0.loc15 [concrete = constants.%Convert.bound.221] +// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc15_28.2: = bound_method %int_12, %specific_fn.loc15 [concrete = constants.%bound_method.dae] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %bound_method.loc15_28.2(%int_12) [concrete = constants.%int_12.1e1] +// CHECK:STDOUT: %.loc15_28.2: init %i32 = converted %int_12, %int.convert_checked.loc15 [concrete = constants.%int_12.1e1] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc14_28.3: ref %i32 = array_index file.%a.var, %int_0 -// CHECK:STDOUT: %.loc14_28.4: init %i32 = initialize_from %.loc14_28.2 to %.loc14_28.3 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %.loc14_28.5: init %array_type = array_init (%.loc14_28.4) to file.%a.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc14_1: init %array_type = converted %.loc14_28.1, %.loc14_28.5 [concrete = constants.%array] -// CHECK:STDOUT: assign file.%a.var, %.loc14_1 +// CHECK:STDOUT: %.loc15_28.3: ref %i32 = array_index file.%a.var, %int_0 +// CHECK:STDOUT: %.loc15_28.4: init %i32 = initialize_from %.loc15_28.2 to %.loc15_28.3 [concrete = constants.%int_12.1e1] +// CHECK:STDOUT: %.loc15_28.5: init %array_type = array_init (%.loc15_28.4) to file.%a.var [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_28.1, %.loc15_28.5 [concrete = constants.%array] +// CHECK:STDOUT: assign file.%a.var, %.loc15_1 // CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a [concrete = file.%a.var] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc19_16.1: = bound_method %int_1, %impl.elem0.loc19 [concrete = constants.%Convert.bound.ab5] -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc19_16.2: = bound_method %int_1, %specific_fn.loc19 [concrete = constants.%bound_method.9a1] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %bound_method.loc19_16.2(%int_1) [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc19_16.1: %i32 = value_of_initializer %int.convert_checked.loc19 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc19_16.2: %i32 = converted %int_1, %.loc19_16.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %.loc19_17.1: ref %i32 = array_index %a.ref, %.loc19_16.2 [concrete = ] -// CHECK:STDOUT: %.loc19_17.2: %i32 = bind_value %.loc19_17.1 [concrete = ] -// CHECK:STDOUT: assign file.%b.var, %.loc19_17.2 +// CHECK:STDOUT: %impl.elem0.loc20: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc20_16.1: = bound_method %int_1, %impl.elem0.loc20 [concrete = constants.%Convert.bound.ab5] +// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc20_16.2: = bound_method %int_1, %specific_fn.loc20 [concrete = constants.%bound_method.9a1] +// CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %bound_method.loc20_16.2(%int_1) [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc20_16.1: %i32 = value_of_initializer %int.convert_checked.loc20 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc20_16.2: %i32 = converted %int_1, %.loc20_16.1 [concrete = constants.%int_1.5d2] +// CHECK:STDOUT: %.loc20_17.1: ref %i32 = array_index %a.ref, %.loc20_16.2 [concrete = ] +// CHECK:STDOUT: %.loc20_17.2: %i32 = bind_value %.loc20_17.1 [concrete = ] +// CHECK:STDOUT: assign file.%b.var, %.loc20_17.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 9f6ec5a66321..f28ead6e4d57 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -61,16 +62,16 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.d04: = bound_method %int_0.5c6, %Convert.956 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.b6e: = bound_method %int_0.5c6, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] @@ -86,9 +87,9 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -115,11 +116,11 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %b.param_patt: %pattern_type.5d8 = value_param_pattern %b.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %b.param: %array_type = value_param call_param0 -// CHECK:STDOUT: %.loc16: type = splice_block %array_type [concrete = constants.%array_type] { -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc17: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32.loc16 [concrete = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32.loc17 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %b: %array_type = bind_name b, %b.param // CHECK:STDOUT: } @@ -134,103 +135,103 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %pb.var_patt: %pattern_type.fe8 = var_pattern %pb.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %pb.var: ref %ptr.235 = var %pb.var_patt -// CHECK:STDOUT: %b.ref.loc22: %array_type = name_ref b, %b -// CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %int_32.loc22_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc22_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc22: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc22_21.1: = bound_method %int_0.loc22, %impl.elem0.loc22 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_21.2: = bound_method %int_0.loc22, %specific_fn.loc22 [concrete = constants.%bound_method.b6e] -// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %bound_method.loc22_21.2(%int_0.loc22) [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc22_21.1: %i32 = value_of_initializer %int.convert_checked.loc22 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc22_21.2: %i32 = converted %int_0.loc22, %.loc22_21.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc22_22.1: ref %array_type = value_as_ref %b.ref.loc22 -// CHECK:STDOUT: %.loc22_22.2: ref %i32 = array_index %.loc22_22.1, %.loc22_21.2 -// CHECK:STDOUT: %.loc22_22.3: %i32 = bind_value %.loc22_22.2 -// CHECK:STDOUT: %addr.loc22: %ptr.235 = addr_of [concrete = ] -// CHECK:STDOUT: assign %pb.var, %addr.loc22 -// CHECK:STDOUT: %.loc22_14: type = splice_block %ptr.loc22 [concrete = constants.%ptr.235] { -// CHECK:STDOUT: %int_32.loc22_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc22_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %ptr.loc22: type = ptr_type %i32.loc22_11 [concrete = constants.%ptr.235] +// CHECK:STDOUT: %b.ref.loc23: %array_type = name_ref b, %b +// CHECK:STDOUT: %int_0.loc23: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %int_32.loc23_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc23_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc23_21.1: = bound_method %int_0.loc23, %impl.elem0.loc23 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc23_21.2: = bound_method %int_0.loc23, %specific_fn.loc23 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %bound_method.loc23_21.2(%int_0.loc23) [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc23_21.1: %i32 = value_of_initializer %int.convert_checked.loc23 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc23_21.2: %i32 = converted %int_0.loc23, %.loc23_21.1 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc23_22.1: ref %array_type = value_as_ref %b.ref.loc23 +// CHECK:STDOUT: %.loc23_22.2: ref %i32 = array_index %.loc23_22.1, %.loc23_21.2 +// CHECK:STDOUT: %.loc23_22.3: %i32 = bind_value %.loc23_22.2 +// CHECK:STDOUT: %addr.loc23: %ptr.235 = addr_of [concrete = ] +// CHECK:STDOUT: assign %pb.var, %addr.loc23 +// CHECK:STDOUT: %.loc23_14: type = splice_block %ptr.loc23 [concrete = constants.%ptr.235] { +// CHECK:STDOUT: %int_32.loc23_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc23_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %ptr.loc23: type = ptr_type %i32.loc23_11 [concrete = constants.%ptr.235] // CHECK:STDOUT: } // CHECK:STDOUT: %pb: ref %ptr.235 = bind_name pb, %pb.var -// CHECK:STDOUT: %b.ref.loc27: %array_type = name_ref b, %b -// CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc27_5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc27_5.1: = bound_method %int_0.loc27, %impl.elem0.loc27_5 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc27_5: = specific_function %impl.elem0.loc27_5, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc27_5.2: = bound_method %int_0.loc27, %specific_fn.loc27_5 [concrete = constants.%bound_method.b6e] -// CHECK:STDOUT: %int.convert_checked.loc27_5: init %i32 = call %bound_method.loc27_5.2(%int_0.loc27) [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc27_5.1: %i32 = value_of_initializer %int.convert_checked.loc27_5 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc27_5.2: %i32 = converted %int_0.loc27, %.loc27_5.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc27_6.1: ref %array_type = value_as_ref %b.ref.loc27 -// CHECK:STDOUT: %.loc27_6.2: ref %i32 = array_index %.loc27_6.1, %.loc27_5.2 -// CHECK:STDOUT: %.loc27_6.3: %i32 = bind_value %.loc27_6.2 -// CHECK:STDOUT: %int_4.loc27: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc27_8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc27_8.1: = bound_method %int_4.loc27, %impl.elem0.loc27_8 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc27_8: = specific_function %impl.elem0.loc27_8, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc27_8.2: = bound_method %int_4.loc27, %specific_fn.loc27_8 [concrete = constants.%bound_method.1da] -// CHECK:STDOUT: %int.convert_checked.loc27_8: init %i32 = call %bound_method.loc27_8.2(%int_4.loc27) [concrete = constants.%int_4.940] -// CHECK:STDOUT: %.loc27_8: init %i32 = converted %int_4.loc27, %int.convert_checked.loc27_8 [concrete = constants.%int_4.940] -// CHECK:STDOUT: assign %.loc27_6.3, %.loc27_8 +// CHECK:STDOUT: %b.ref.loc28: %array_type = name_ref b, %b +// CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc28_5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc28_5.1: = bound_method %int_0.loc28, %impl.elem0.loc28_5 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc28_5: = specific_function %impl.elem0.loc28_5, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc28_5.2: = bound_method %int_0.loc28, %specific_fn.loc28_5 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %int.convert_checked.loc28_5: init %i32 = call %bound_method.loc28_5.2(%int_0.loc28) [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc28_5.1: %i32 = value_of_initializer %int.convert_checked.loc28_5 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc28_5.2: %i32 = converted %int_0.loc28, %.loc28_5.1 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc28_6.1: ref %array_type = value_as_ref %b.ref.loc28 +// CHECK:STDOUT: %.loc28_6.2: ref %i32 = array_index %.loc28_6.1, %.loc28_5.2 +// CHECK:STDOUT: %.loc28_6.3: %i32 = bind_value %.loc28_6.2 +// CHECK:STDOUT: %int_4.loc28: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] +// CHECK:STDOUT: %impl.elem0.loc28_8: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc28_8.1: = bound_method %int_4.loc28, %impl.elem0.loc28_8 [concrete = constants.%Convert.bound.ac3] +// CHECK:STDOUT: %specific_fn.loc28_8: = specific_function %impl.elem0.loc28_8, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc28_8.2: = bound_method %int_4.loc28, %specific_fn.loc28_8 [concrete = constants.%bound_method.1da] +// CHECK:STDOUT: %int.convert_checked.loc28_8: init %i32 = call %bound_method.loc28_8.2(%int_4.loc28) [concrete = constants.%int_4.940] +// CHECK:STDOUT: %.loc28_8: init %i32 = converted %int_4.loc28, %int.convert_checked.loc28_8 [concrete = constants.%int_4.940] +// CHECK:STDOUT: assign %.loc28_6.3, %.loc28_8 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %pf.patt: %pattern_type.fe8 = binding_pattern pf [concrete] // CHECK:STDOUT: %pf.var_patt: %pattern_type.fe8 = var_pattern %pf.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %pf.var: ref %ptr.235 = var %pf.var_patt -// CHECK:STDOUT: %F.ref.loc35: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %.loc35_21.1: ref %array_type = temporary_storage -// CHECK:STDOUT: %F.call.loc35: init %array_type = call %F.ref.loc35() to %.loc35_21.1 -// CHECK:STDOUT: %int_0.loc35: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc35_21.2: ref %array_type = temporary %.loc35_21.1, %F.call.loc35 -// CHECK:STDOUT: %int_32.loc35_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc35_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc35: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc35_23.1: = bound_method %int_0.loc35, %impl.elem0.loc35 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc35_23.2: = bound_method %int_0.loc35, %specific_fn.loc35 [concrete = constants.%bound_method.b6e] -// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %bound_method.loc35_23.2(%int_0.loc35) [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc35_23.1: %i32 = value_of_initializer %int.convert_checked.loc35 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc35_23.2: %i32 = converted %int_0.loc35, %.loc35_23.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc35_24.1: ref %i32 = array_index %.loc35_21.2, %.loc35_23.2 -// CHECK:STDOUT: %.loc35_24.2: %i32 = bind_value %.loc35_24.1 -// CHECK:STDOUT: %addr.loc35: %ptr.235 = addr_of [concrete = ] -// CHECK:STDOUT: assign %pf.var, %addr.loc35 -// CHECK:STDOUT: %.loc35_14: type = splice_block %ptr.loc35 [concrete = constants.%ptr.235] { -// CHECK:STDOUT: %int_32.loc35_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc35_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %ptr.loc35: type = ptr_type %i32.loc35_11 [concrete = constants.%ptr.235] +// CHECK:STDOUT: %F.ref.loc36: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] +// CHECK:STDOUT: %.loc36_21.1: ref %array_type = temporary_storage +// CHECK:STDOUT: %F.call.loc36: init %array_type = call %F.ref.loc36() to %.loc36_21.1 +// CHECK:STDOUT: %int_0.loc36: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %.loc36_21.2: ref %array_type = temporary %.loc36_21.1, %F.call.loc36 +// CHECK:STDOUT: %int_32.loc36_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc36_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc36: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc36_23.1: = bound_method %int_0.loc36, %impl.elem0.loc36 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc36: = specific_function %impl.elem0.loc36, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc36_23.2: = bound_method %int_0.loc36, %specific_fn.loc36 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %bound_method.loc36_23.2(%int_0.loc36) [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc36_23.1: %i32 = value_of_initializer %int.convert_checked.loc36 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc36_23.2: %i32 = converted %int_0.loc36, %.loc36_23.1 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc36_24.1: ref %i32 = array_index %.loc36_21.2, %.loc36_23.2 +// CHECK:STDOUT: %.loc36_24.2: %i32 = bind_value %.loc36_24.1 +// CHECK:STDOUT: %addr.loc36: %ptr.235 = addr_of [concrete = ] +// CHECK:STDOUT: assign %pf.var, %addr.loc36 +// CHECK:STDOUT: %.loc36_14: type = splice_block %ptr.loc36 [concrete = constants.%ptr.235] { +// CHECK:STDOUT: %int_32.loc36_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc36_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %ptr.loc36: type = ptr_type %i32.loc36_11 [concrete = constants.%ptr.235] // CHECK:STDOUT: } // CHECK:STDOUT: %pf: ref %ptr.235 = bind_name pf, %pf.var -// CHECK:STDOUT: %F.ref.loc40: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %.loc40_5.1: ref %array_type = temporary_storage -// CHECK:STDOUT: %F.call.loc40: init %array_type = call %F.ref.loc40() to %.loc40_5.1 -// CHECK:STDOUT: %int_0.loc40: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc40_5.2: ref %array_type = temporary %.loc40_5.1, %F.call.loc40 -// CHECK:STDOUT: %int_32.loc40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc40_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc40_7.1: = bound_method %int_0.loc40, %impl.elem0.loc40_7 [concrete = constants.%Convert.bound.d04] -// CHECK:STDOUT: %specific_fn.loc40_7: = specific_function %impl.elem0.loc40_7, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc40_7.2: = bound_method %int_0.loc40, %specific_fn.loc40_7 [concrete = constants.%bound_method.b6e] -// CHECK:STDOUT: %int.convert_checked.loc40_7: init %i32 = call %bound_method.loc40_7.2(%int_0.loc40) [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc40_7.1: %i32 = value_of_initializer %int.convert_checked.loc40_7 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc40_7.2: %i32 = converted %int_0.loc40, %.loc40_7.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %.loc40_8.1: ref %i32 = array_index %.loc40_5.2, %.loc40_7.2 -// CHECK:STDOUT: %.loc40_8.2: %i32 = bind_value %.loc40_8.1 -// CHECK:STDOUT: %int_4.loc40: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc40_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc40_10.1: = bound_method %int_4.loc40, %impl.elem0.loc40_10 [concrete = constants.%Convert.bound.ac3] -// CHECK:STDOUT: %specific_fn.loc40_10: = specific_function %impl.elem0.loc40_10, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc40_10.2: = bound_method %int_4.loc40, %specific_fn.loc40_10 [concrete = constants.%bound_method.1da] -// CHECK:STDOUT: %int.convert_checked.loc40_10: init %i32 = call %bound_method.loc40_10.2(%int_4.loc40) [concrete = constants.%int_4.940] -// CHECK:STDOUT: %.loc40_10: init %i32 = converted %int_4.loc40, %int.convert_checked.loc40_10 [concrete = constants.%int_4.940] -// CHECK:STDOUT: assign %.loc40_8.2, %.loc40_10 +// CHECK:STDOUT: %F.ref.loc41: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] +// CHECK:STDOUT: %.loc41_5.1: ref %array_type = temporary_storage +// CHECK:STDOUT: %F.call.loc41: init %array_type = call %F.ref.loc41() to %.loc41_5.1 +// CHECK:STDOUT: %int_0.loc41: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] +// CHECK:STDOUT: %.loc41_5.2: ref %array_type = temporary %.loc41_5.1, %F.call.loc41 +// CHECK:STDOUT: %int_32.loc41: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc41: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc41_7: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc41_7.1: = bound_method %int_0.loc41, %impl.elem0.loc41_7 [concrete = constants.%Convert.bound.d04] +// CHECK:STDOUT: %specific_fn.loc41_7: = specific_function %impl.elem0.loc41_7, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc41_7.2: = bound_method %int_0.loc41, %specific_fn.loc41_7 [concrete = constants.%bound_method.b6e] +// CHECK:STDOUT: %int.convert_checked.loc41_7: init %i32 = call %bound_method.loc41_7.2(%int_0.loc41) [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc41_7.1: %i32 = value_of_initializer %int.convert_checked.loc41_7 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc41_7.2: %i32 = converted %int_0.loc41, %.loc41_7.1 [concrete = constants.%int_0.6a9] +// CHECK:STDOUT: %.loc41_8.1: ref %i32 = array_index %.loc41_5.2, %.loc41_7.2 +// CHECK:STDOUT: %.loc41_8.2: %i32 = bind_value %.loc41_8.1 +// CHECK:STDOUT: %int_4.loc41: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] +// CHECK:STDOUT: %impl.elem0.loc41_10: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc41_10.1: = bound_method %int_4.loc41, %impl.elem0.loc41_10 [concrete = constants.%Convert.bound.ac3] +// CHECK:STDOUT: %specific_fn.loc41_10: = specific_function %impl.elem0.loc41_10, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc41_10.2: = bound_method %int_4.loc41, %specific_fn.loc41_10 [concrete = constants.%bound_method.1da] +// CHECK:STDOUT: %int.convert_checked.loc41_10: init %i32 = call %bound_method.loc41_10.2(%int_4.loc41) [concrete = constants.%int_4.940] +// CHECK:STDOUT: %.loc41_10: init %i32 = converted %int_4.loc41, %int.convert_checked.loc41_10 [concrete = constants.%int_4.940] +// CHECK:STDOUT: assign %.loc41_8.2, %.loc41_10 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index 3927ce2ee3a5..4a688db83a65 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -38,7 +39,7 @@ fn Main() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,7 +62,7 @@ fn Main() { // CHECK:STDOUT: %a.ref: = name_ref a, [concrete = ] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: assign %b.var, -// CHECK:STDOUT: %.loc19: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc20: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 1b2f2b12b569..04db06837f70 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only". // EXTRA-ARGS: --dump-sem-ir-ranges=if-present // @@ -36,28 +37,28 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete] -// CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] -// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3, @impl.4f9(%To.c80) [symbolic] +// CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic] +// CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To) [symbolic] // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete] -// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete] +// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete] // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] -// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete] +// CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Convert.bound.132: = bound_method %int_42.20e, %Convert.956 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.3(%int_32) [concrete] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.956, @Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.8c1: = bound_method %int_42.20e, %Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.c68: %i32 = int_value 42 [concrete] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_42.c68, %int_42.c68) [concrete] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete] -// CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.95 [concrete] +// CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Negate.impl_witness.973: = impl_witness imports.%Negate.impl_witness_table.b22 [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness.973) [concrete] // CHECK:STDOUT: %.d3d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [concrete] -// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.96 [concrete] +// CHECK:STDOUT: %Op.type.18a: type = fn_type @Op.3 [concrete] // CHECK:STDOUT: %Op.99f: %Op.type.18a = struct_value () [concrete] // CHECK:STDOUT: %Op.bound: = bound_method %int_10, %Op.99f [concrete] // CHECK:STDOUT: %int_-10.06d: Core.IntLiteral = int_value -10 [concrete] @@ -74,14 +75,14 @@ var d: i32 = c[-10]; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] +// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete] -// CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type] -// CHECK:STDOUT: %Core.import_ref.abd9 = import_ref Core//prelude/operators/arithmetic, loc111_50, unloaded -// CHECK:STDOUT: %Core.import_ref.5e6a: %Op.type.18a = import_ref Core//prelude/operators/arithmetic, loc112_31, loaded [concrete = constants.%Op.99f] -// CHECK:STDOUT: %Negate.impl_witness_table.b22 = impl_witness_table (%Core.import_ref.abd9, %Core.import_ref.5e6a), @impl.0ef [concrete] +// CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type] +// CHECK:STDOUT: %Core.import_ref.abd = import_ref Core//prelude/parts/int_literal, loc13_50, unloaded +// CHECK:STDOUT: %Core.import_ref.5e6: %Op.type.18a = import_ref Core//prelude/parts/int_literal, loc14_31, loaded [concrete = constants.%Op.99f] +// CHECK:STDOUT: %Negate.impl_witness_table.b22 = impl_witness_table (%Core.import_ref.abd, %Core.import_ref.5e6), @impl.0ef [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -96,11 +97,11 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %c.var_patt: %pattern_type.ae7 = var_pattern %c.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %c.var: ref %array_type = var %c.var_patt [concrete] -// CHECK:STDOUT: %.loc14: type = splice_block %array_type [concrete = constants.%array_type] { -// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32.loc14 [concrete = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32.loc15 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %c: ref %array_type = bind_name c, %c.var [concrete = %c.var] // CHECK:STDOUT: name_binding_decl { @@ -108,58 +109,58 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %d.var_patt: %pattern_type.7ce = var_pattern %d.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %d.var: ref %i32 = var %d.var_patt [concrete] -// CHECK:STDOUT: %.loc19: type = splice_block %i32.loc19 [concrete = constants.%i32] { -// CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] +// CHECK:STDOUT: %.loc20: type = splice_block %i32.loc20 [concrete = constants.%i32] { +// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var [concrete = %d.var] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_42.loc14_25: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %int_42.loc14_29: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %.loc14_31.1: %tuple.type = tuple_literal (%int_42.loc14_25, %int_42.loc14_29) -// CHECK:STDOUT: %impl.elem0.loc14_31.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc14_31.1: = bound_method %int_42.loc14_25, %impl.elem0.loc14_31.1 [concrete = constants.%Convert.bound.132] -// CHECK:STDOUT: %specific_fn.loc14_31.1: = specific_function %impl.elem0.loc14_31.1, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_31.2: = bound_method %int_42.loc14_25, %specific_fn.loc14_31.1 [concrete = constants.%bound_method.8c1] -// CHECK:STDOUT: %int.convert_checked.loc14_31.1: init %i32 = call %bound_method.loc14_31.2(%int_42.loc14_25) [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %.loc14_31.2: init %i32 = converted %int_42.loc14_25, %int.convert_checked.loc14_31.1 [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %int_42.loc15_25: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] +// CHECK:STDOUT: %int_42.loc15_29: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] +// CHECK:STDOUT: %.loc15_31.1: %tuple.type = tuple_literal (%int_42.loc15_25, %int_42.loc15_29) +// CHECK:STDOUT: %impl.elem0.loc15_31.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc15_31.1: = bound_method %int_42.loc15_25, %impl.elem0.loc15_31.1 [concrete = constants.%Convert.bound.132] +// CHECK:STDOUT: %specific_fn.loc15_31.1: = specific_function %impl.elem0.loc15_31.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc15_31.2: = bound_method %int_42.loc15_25, %specific_fn.loc15_31.1 [concrete = constants.%bound_method.8c1] +// CHECK:STDOUT: %int.convert_checked.loc15_31.1: init %i32 = call %bound_method.loc15_31.2(%int_42.loc15_25) [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %.loc15_31.2: init %i32 = converted %int_42.loc15_25, %int.convert_checked.loc15_31.1 [concrete = constants.%int_42.c68] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc14_31.3: ref %i32 = array_index file.%c.var, %int_0 -// CHECK:STDOUT: %.loc14_31.4: init %i32 = initialize_from %.loc14_31.2 to %.loc14_31.3 [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %impl.elem0.loc14_31.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc14_31.3: = bound_method %int_42.loc14_29, %impl.elem0.loc14_31.2 [concrete = constants.%Convert.bound.132] -// CHECK:STDOUT: %specific_fn.loc14_31.2: = specific_function %impl.elem0.loc14_31.2, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc14_31.4: = bound_method %int_42.loc14_29, %specific_fn.loc14_31.2 [concrete = constants.%bound_method.8c1] -// CHECK:STDOUT: %int.convert_checked.loc14_31.2: init %i32 = call %bound_method.loc14_31.4(%int_42.loc14_29) [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %.loc14_31.5: init %i32 = converted %int_42.loc14_29, %int.convert_checked.loc14_31.2 [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %.loc15_31.3: ref %i32 = array_index file.%c.var, %int_0 +// CHECK:STDOUT: %.loc15_31.4: init %i32 = initialize_from %.loc15_31.2 to %.loc15_31.3 [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %impl.elem0.loc15_31.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc15_31.3: = bound_method %int_42.loc15_29, %impl.elem0.loc15_31.2 [concrete = constants.%Convert.bound.132] +// CHECK:STDOUT: %specific_fn.loc15_31.2: = specific_function %impl.elem0.loc15_31.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc15_31.4: = bound_method %int_42.loc15_29, %specific_fn.loc15_31.2 [concrete = constants.%bound_method.8c1] +// CHECK:STDOUT: %int.convert_checked.loc15_31.2: init %i32 = call %bound_method.loc15_31.4(%int_42.loc15_29) [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %.loc15_31.5: init %i32 = converted %int_42.loc15_29, %int.convert_checked.loc15_31.2 [concrete = constants.%int_42.c68] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc14_31.6: ref %i32 = array_index file.%c.var, %int_1 -// CHECK:STDOUT: %.loc14_31.7: init %i32 = initialize_from %.loc14_31.5 to %.loc14_31.6 [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %.loc14_31.8: init %array_type = array_init (%.loc14_31.4, %.loc14_31.7) to file.%c.var [concrete = constants.%array] -// CHECK:STDOUT: %.loc14_1: init %array_type = converted %.loc14_31.1, %.loc14_31.8 [concrete = constants.%array] -// CHECK:STDOUT: assign file.%c.var, %.loc14_1 +// CHECK:STDOUT: %.loc15_31.6: ref %i32 = array_index file.%c.var, %int_1 +// CHECK:STDOUT: %.loc15_31.7: init %i32 = initialize_from %.loc15_31.5 to %.loc15_31.6 [concrete = constants.%int_42.c68] +// CHECK:STDOUT: %.loc15_31.8: init %array_type = array_init (%.loc15_31.4, %.loc15_31.7) to file.%c.var [concrete = constants.%array] +// CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_31.1, %.loc15_31.8 [concrete = constants.%array] +// CHECK:STDOUT: assign file.%c.var, %.loc15_1 // CHECK:STDOUT: %c.ref: ref %array_type = name_ref c, file.%c [concrete = file.%c.var] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] // CHECK:STDOUT: %impl.elem1: %.d3d = impl_witness_access constants.%Negate.impl_witness.973, element1 [concrete = constants.%Op.99f] -// CHECK:STDOUT: %bound_method.loc19_16.1: = bound_method %int_10, %impl.elem1 [concrete = constants.%Op.bound] -// CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method.loc19_16.1(%int_10) [concrete = constants.%int_-10.06d] +// CHECK:STDOUT: %bound_method.loc20_16.1: = bound_method %int_10, %impl.elem1 [concrete = constants.%Op.bound] +// CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method.loc20_16.1(%int_10) [concrete = constants.%int_-10.06d] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] -// CHECK:STDOUT: %bound_method.loc19_16.2: = bound_method %int.snegate, %impl.elem0.loc19 [concrete = constants.%Convert.bound.1ca] -// CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc19_16.3: = bound_method %int.snegate, %specific_fn.loc19 [concrete = constants.%bound_method.af0] -// CHECK:STDOUT: %.loc19_16.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-10.06d] -// CHECK:STDOUT: %.loc19_16.2: Core.IntLiteral = converted %int.snegate, %.loc19_16.1 [concrete = constants.%int_-10.06d] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %bound_method.loc19_16.3(%.loc19_16.2) [concrete = constants.%int_-10.c17] -// CHECK:STDOUT: %.loc19_16.3: %i32 = value_of_initializer %int.convert_checked.loc19 [concrete = constants.%int_-10.c17] -// CHECK:STDOUT: %.loc19_16.4: %i32 = converted %int.snegate, %.loc19_16.3 [concrete = constants.%int_-10.c17] -// CHECK:STDOUT: %.loc19_19.1: ref %i32 = array_index %c.ref, %.loc19_16.4 [concrete = ] -// CHECK:STDOUT: %.loc19_19.2: %i32 = bind_value %.loc19_19.1 [concrete = ] -// CHECK:STDOUT: assign file.%d.var, %.loc19_19.2 +// CHECK:STDOUT: %impl.elem0.loc20: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956] +// CHECK:STDOUT: %bound_method.loc20_16.2: = bound_method %int.snegate, %impl.elem0.loc20 [concrete = constants.%Convert.bound.1ca] +// CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc20_16.3: = bound_method %int.snegate, %specific_fn.loc20 [concrete = constants.%bound_method.af0] +// CHECK:STDOUT: %.loc20_16.1: Core.IntLiteral = value_of_initializer %int.snegate [concrete = constants.%int_-10.06d] +// CHECK:STDOUT: %.loc20_16.2: Core.IntLiteral = converted %int.snegate, %.loc20_16.1 [concrete = constants.%int_-10.06d] +// CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %bound_method.loc20_16.3(%.loc20_16.2) [concrete = constants.%int_-10.c17] +// CHECK:STDOUT: %.loc20_16.3: %i32 = value_of_initializer %int.convert_checked.loc20 [concrete = constants.%int_-10.c17] +// CHECK:STDOUT: %.loc20_16.4: %i32 = converted %int.snegate, %.loc20_16.3 [concrete = constants.%int_-10.c17] +// CHECK:STDOUT: %.loc20_19.1: ref %i32 = array_index %c.ref, %.loc20_16.4 [concrete = ] +// CHECK:STDOUT: %.loc20_19.2: %i32 = bind_value %.loc20_19.1 [concrete = ] +// CHECK:STDOUT: assign file.%d.var, %.loc20_19.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/index/array_element_access.carbon b/toolchain/lower/testdata/index/array_element_access.carbon index 9fb764d01947..2ef4368e0d4b 100644 --- a/toolchain/lower/testdata/index/array_element_access.carbon +++ b/toolchain/lower/testdata/index/array_element_access.carbon @@ -2,6 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// // AUTOUPDATE // TIP: To test this file alone, run: // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/index/array_element_access.carbon @@ -21,22 +23,22 @@ fn Run() { // CHECK:STDOUT: ; ModuleID = 'array_element_access.carbon' // CHECK:STDOUT: source_filename = "array_element_access.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.loc10_37 = internal constant { i32, i32 } { i32 1, i32 2 } -// CHECK:STDOUT: @array.loc12_40 = internal constant [2 x i32] [i32 1, i32 2] +// CHECK:STDOUT: @tuple.loc12_37 = internal constant { i32, i32 } { i32 1, i32 2 } +// CHECK:STDOUT: @array.loc14_40 = internal constant [2 x i32] [i32 1, i32 2] // CHECK:STDOUT: // CHECK:STDOUT: define void @_CA.Main(ptr sret({ i32, i32 }) %return) !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.loc10_37, i64 8, i1 false), !dbg !8 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.loc12_37, i64 8, i1 false), !dbg !8 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CB.Main(ptr sret([2 x i32]) %return) !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_39.3.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 0, !dbg !10 -// CHECK:STDOUT: %.loc12_39.6.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 1, !dbg !10 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @array.loc12_40, i64 8, i1 false), !dbg !11 +// CHECK:STDOUT: %.loc14_39.3.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 0, !dbg !10 +// CHECK:STDOUT: %.loc14_39.6.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 1, !dbg !10 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @array.loc14_40, i64 8, i1 false), !dbg !11 // CHECK:STDOUT: ret void, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -47,29 +49,29 @@ fn Run() { // CHECK:STDOUT: %c.var = alloca i32, align 4, !dbg !15 // CHECK:STDOUT: %d.var = alloca i32, align 4, !dbg !16 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 8, ptr %a.var), !dbg !13 -// CHECK:STDOUT: %.loc15_28.1.temp = alloca { i32, i32 }, align 8, !dbg !17 -// CHECK:STDOUT: call void @_CA.Main(ptr %.loc15_28.1.temp), !dbg !17 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_28.1.temp, i32 0, i32 0, !dbg !17 -// CHECK:STDOUT: %.loc15_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !17 -// CHECK:STDOUT: %.loc15_28.4.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 0, !dbg !17 -// CHECK:STDOUT: store i32 %.loc15_28.3, ptr %.loc15_28.4.array.index, align 4, !dbg !17 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_28.1.temp, i32 0, i32 1, !dbg !17 -// CHECK:STDOUT: %.loc15_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !17 -// CHECK:STDOUT: %.loc15_28.7.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 1, !dbg !17 -// CHECK:STDOUT: store i32 %.loc15_28.6, ptr %.loc15_28.7.array.index, align 4, !dbg !17 +// CHECK:STDOUT: %.loc17_28.1.temp = alloca { i32, i32 }, align 8, !dbg !17 +// CHECK:STDOUT: call void @_CA.Main(ptr %.loc17_28.1.temp), !dbg !17 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 0, !dbg !17 +// CHECK:STDOUT: %.loc17_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !17 +// CHECK:STDOUT: %.loc17_28.4.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 0, !dbg !17 +// CHECK:STDOUT: store i32 %.loc17_28.3, ptr %.loc17_28.4.array.index, align 4, !dbg !17 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 1, !dbg !17 +// CHECK:STDOUT: %.loc17_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !17 +// CHECK:STDOUT: %.loc17_28.7.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 1, !dbg !17 +// CHECK:STDOUT: store i32 %.loc17_28.6, ptr %.loc17_28.7.array.index, align 4, !dbg !17 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 4, ptr %b.var), !dbg !14 // CHECK:STDOUT: store i32 1, ptr %b.var, align 4, !dbg !14 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 4, ptr %c.var), !dbg !15 -// CHECK:STDOUT: %.loc17_18 = load i32, ptr %b.var, align 4, !dbg !18 -// CHECK:STDOUT: %.loc17_19.1.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc17_18, !dbg !19 -// CHECK:STDOUT: %.loc17_19.2 = load i32, ptr %.loc17_19.1.array.index, align 4, !dbg !19 -// CHECK:STDOUT: store i32 %.loc17_19.2, ptr %c.var, align 4, !dbg !15 +// CHECK:STDOUT: %.loc19_18 = load i32, ptr %b.var, align 4, !dbg !18 +// CHECK:STDOUT: %.loc19_19.1.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc19_18, !dbg !19 +// CHECK:STDOUT: %.loc19_19.2 = load i32, ptr %.loc19_19.1.array.index, align 4, !dbg !19 +// CHECK:STDOUT: store i32 %.loc19_19.2, ptr %c.var, align 4, !dbg !15 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 4, ptr %d.var), !dbg !16 -// CHECK:STDOUT: %.loc18_18.1.temp = alloca [2 x i32], align 4, !dbg !20 -// CHECK:STDOUT: call void @_CB.Main(ptr %.loc18_18.1.temp), !dbg !20 -// CHECK:STDOUT: %.loc18_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc18_18.1.temp, i32 0, i32 1, !dbg !20 -// CHECK:STDOUT: %.loc18_21.2 = load i32, ptr %.loc18_21.1.array.index, align 4, !dbg !20 -// CHECK:STDOUT: store i32 %.loc18_21.2, ptr %d.var, align 4, !dbg !16 +// CHECK:STDOUT: %.loc20_18.1.temp = alloca [2 x i32], align 4, !dbg !20 +// CHECK:STDOUT: call void @_CB.Main(ptr %.loc20_18.1.temp), !dbg !20 +// CHECK:STDOUT: %.loc20_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc20_18.1.temp, i32 0, i32 1, !dbg !20 +// CHECK:STDOUT: %.loc20_21.2 = load i32, ptr %.loc20_21.1.array.index, align 4, !dbg !20 +// CHECK:STDOUT: store i32 %.loc20_21.2, ptr %d.var, align 4, !dbg !16 // CHECK:STDOUT: ret void, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -93,21 +95,21 @@ fn Run() { // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !3 = !DIFile(filename: "array_element_access.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{} -// CHECK:STDOUT: !7 = !DILocation(line: 10, column: 31, scope: !4) -// CHECK:STDOUT: !8 = !DILocation(line: 10, column: 24, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !10 = !DILocation(line: 12, column: 34, scope: !9) -// CHECK:STDOUT: !11 = !DILocation(line: 12, column: 27, scope: !9) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !13 = !DILocation(line: 15, column: 3, scope: !12) -// CHECK:STDOUT: !14 = !DILocation(line: 16, column: 3, scope: !12) -// CHECK:STDOUT: !15 = !DILocation(line: 17, column: 3, scope: !12) -// CHECK:STDOUT: !16 = !DILocation(line: 18, column: 3, scope: !12) -// CHECK:STDOUT: !17 = !DILocation(line: 15, column: 26, scope: !12) -// CHECK:STDOUT: !18 = !DILocation(line: 17, column: 18, scope: !12) -// CHECK:STDOUT: !19 = !DILocation(line: 17, column: 16, scope: !12) -// CHECK:STDOUT: !20 = !DILocation(line: 18, column: 16, scope: !12) -// CHECK:STDOUT: !21 = !DILocation(line: 14, column: 1, scope: !12) +// CHECK:STDOUT: !7 = !DILocation(line: 12, column: 31, scope: !4) +// CHECK:STDOUT: !8 = !DILocation(line: 12, column: 24, scope: !4) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = !DILocation(line: 14, column: 34, scope: !9) +// CHECK:STDOUT: !11 = !DILocation(line: 14, column: 27, scope: !9) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = !DILocation(line: 17, column: 3, scope: !12) +// CHECK:STDOUT: !14 = !DILocation(line: 18, column: 3, scope: !12) +// CHECK:STDOUT: !15 = !DILocation(line: 19, column: 3, scope: !12) +// CHECK:STDOUT: !16 = !DILocation(line: 20, column: 3, scope: !12) +// CHECK:STDOUT: !17 = !DILocation(line: 17, column: 26, scope: !12) +// CHECK:STDOUT: !18 = !DILocation(line: 19, column: 18, scope: !12) +// CHECK:STDOUT: !19 = !DILocation(line: 19, column: 16, scope: !12) +// CHECK:STDOUT: !20 = !DILocation(line: 20, column: 16, scope: !12) +// CHECK:STDOUT: !21 = !DILocation(line: 16, column: 1, scope: !12) diff --git a/toolchain/lower/testdata/let/copy_value_rep.carbon b/toolchain/lower/testdata/let/copy_value_rep.carbon index b42fd451671c..2cfaedebba2d 100644 --- a/toolchain/lower/testdata/let/copy_value_rep.carbon +++ b/toolchain/lower/testdata/let/copy_value_rep.carbon @@ -2,6 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// // AUTOUPDATE // TIP: To test this file alone, run: // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/let/copy_value_rep.carbon @@ -23,19 +25,19 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'copy_value_rep.carbon' // CHECK:STDOUT: source_filename = "copy_value_rep.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @X.val.loc16_3 = internal constant { i32 } { i32 1 } +// CHECK:STDOUT: @X.val.loc18_3 = internal constant { i32 } { i32 1 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { i32 }, align 8, !dbg !7 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 4, ptr %x.var), !dbg !7 -// CHECK:STDOUT: %.loc16_21.3.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @X.val.loc16_3, i64 4, i1 false), !dbg !7 -// CHECK:STDOUT: %.loc17_17.1.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !9 -// CHECK:STDOUT: %.loc17_17.2 = load i32, ptr %.loc17_17.1.a, align 4, !dbg !9 -// CHECK:STDOUT: %.loc18_4.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !10 -// CHECK:STDOUT: store i32 2, ptr %.loc18_4.a, align 4, !dbg !10 -// CHECK:STDOUT: ret i32 %.loc17_17.2, !dbg !11 +// CHECK:STDOUT: %.loc18_21.3.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @X.val.loc18_3, i64 4, i1 false), !dbg !7 +// CHECK:STDOUT: %.loc19_17.1.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !9 +// CHECK:STDOUT: %.loc19_17.2 = load i32, ptr %.loc19_17.1.a, align 4, !dbg !9 +// CHECK:STDOUT: %.loc20_4.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !10 +// CHECK:STDOUT: store i32 2, ptr %.loc20_4.a, align 4, !dbg !10 +// CHECK:STDOUT: ret i32 %.loc19_17.2, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -54,11 +56,11 @@ fn Run() -> i32 { // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !3 = !DIFile(filename: "copy_value_rep.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{} -// CHECK:STDOUT: !7 = !DILocation(line: 16, column: 3, scope: !4) -// CHECK:STDOUT: !8 = !DILocation(line: 16, column: 14, scope: !4) -// CHECK:STDOUT: !9 = !DILocation(line: 17, column: 16, scope: !4) -// CHECK:STDOUT: !10 = !DILocation(line: 18, column: 3, scope: !4) -// CHECK:STDOUT: !11 = !DILocation(line: 20, column: 3, scope: !4) +// CHECK:STDOUT: !7 = !DILocation(line: 18, column: 3, scope: !4) +// CHECK:STDOUT: !8 = !DILocation(line: 18, column: 14, scope: !4) +// CHECK:STDOUT: !9 = !DILocation(line: 19, column: 16, scope: !4) +// CHECK:STDOUT: !10 = !DILocation(line: 20, column: 3, scope: !4) +// CHECK:STDOUT: !11 = !DILocation(line: 22, column: 3, scope: !4)