diff --git a/toolchain/check/facet_type.cpp b/toolchain/check/facet_type.cpp index 2438d91a0614..0069528f34db 100644 --- a/toolchain/check/facet_type.cpp +++ b/toolchain/check/facet_type.cpp @@ -614,4 +614,26 @@ auto ResolveFacetTypeRewriteConstraints( return true; } +auto MakePeriodSelfFacetValue(Context& context, SemIR::TypeId self_type_id) + -> SemIR::InstId { + auto entity_name_id = context.entity_names().AddCanonical({ + .name_id = SemIR::NameId::PeriodSelf, + .parent_scope_id = context.scope_stack().PeekNameScopeId(), + }); + auto inst_id = AddInst( + context, SemIR::LocIdAndInst::NoLoc({ + .type_id = self_type_id, + .entity_name_id = entity_name_id, + // `None` because there is no equivalent non-symbolic value. + .value_id = SemIR::InstId::None, + })); + // TODO: LookupOrAddName should (optionally?) take a callback to run and + // construct the `inst_id` only if it's not found by lookup. + auto existing = + context.scope_stack().LookupOrAddName(SemIR::NameId::PeriodSelf, inst_id); + // Shouldn't have any names in newly created scope. + CARBON_CHECK(!existing.has_value()); + return inst_id; +} + } // namespace Carbon::Check diff --git a/toolchain/check/facet_type.h b/toolchain/check/facet_type.h index af0e5ae8ba1e..5a0828540937 100644 --- a/toolchain/check/facet_type.h +++ b/toolchain/check/facet_type.h @@ -95,6 +95,14 @@ auto ResolveFacetTypeRewriteConstraints( llvm::SmallVector& rewrites) -> bool; +// Introduce `.Self` as a symbolic binding into the current scope, and return +// the `BindSymbolicName` instruction. +// +// The `self_type_id` is either a facet type (as `FacetType`) or `type` (as +// `TypeType`). +auto MakePeriodSelfFacetValue(Context& context, SemIR::TypeId self_type_id) + -> SemIR::InstId; + } // namespace Carbon::Check #endif // CARBON_TOOLCHAIN_CHECK_FACET_TYPE_H_ diff --git a/toolchain/check/handle_binding_pattern.cpp b/toolchain/check/handle_binding_pattern.cpp index a7ae20ea1c13..8cada947ed42 100644 --- a/toolchain/check/handle_binding_pattern.cpp +++ b/toolchain/check/handle_binding_pattern.cpp @@ -4,6 +4,7 @@ #include "toolchain/check/context.h" #include "toolchain/check/convert.h" +#include "toolchain/check/facet_type.h" #include "toolchain/check/handle.h" #include "toolchain/check/inst.h" #include "toolchain/check/interface.h" @@ -57,6 +58,12 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id, AddBindingPattern(context, name_node, name_id, cast_type_id, type_expr_region_id, is_generic, is_template); + // TODO: If `is_generic`, then `binding.bind_id is a BindSymbolicName. Subst + // the `.Self` of type `type` in the `cast_type_id` type (a `FacetType`) + // with the `binding.bind_id` itself, and build a new pattern with that. + // This is kind of cyclical. So we need to reuse the EntityNameId, which + // will also reuse the CompileTimeBinding for the new BindSymbolicName. + if (name_id != SemIR::NameId::Underscore) { // Add name to lookup immediately, so it can be used in the rest of the // enclosing pattern. @@ -273,11 +280,28 @@ auto HandleParseNode(Context& context, Parse::VarBindingPatternId node_id) Parse::NodeKind::VarBindingPattern); } +auto HandleParseNode(Context& context, + Parse::CompileTimeBindingPatternStartId /*node_id*/) + -> bool { + // Make a scope to contain the `.Self` facet value for use in the type of the + // compile time binding. This is popped when handling the + // CompileTimeBindingPatternId. + context.scope_stack().PushForSameRegion(); + MakePeriodSelfFacetValue(context, SemIR::TypeType::TypeId); + return true; +} + auto HandleParseNode(Context& context, Parse::CompileTimeBindingPatternId node_id) -> bool { + // Pop the `.Self` facet value name introduced by the + // CompileTimeBindingPatternStart. + context.scope_stack().Pop(); + auto node_kind = Parse::NodeKind::CompileTimeBindingPattern; - if (context.decl_introducer_state_stack().innermost().kind == - Lex::TokenKind::Let) { + + const DeclIntroducerState& introducer = + context.decl_introducer_state_stack().innermost(); + if (introducer.kind == Lex::TokenKind::Let) { // Disallow `let` outside of function and interface definitions. // TODO: Find a less brittle way of doing this. A `scope_inst_id` of `None` // can represent a block scope, but is also used for other kinds of scopes diff --git a/toolchain/check/handle_where.cpp b/toolchain/check/handle_where.cpp index edf0d43172d9..add04afd7cf1 100644 --- a/toolchain/check/handle_where.cpp +++ b/toolchain/check/handle_where.cpp @@ -54,24 +54,8 @@ auto HandleParseNode(Context& context, Parse::WhereOperandId node_id) -> bool { context.scope_stack().PushForSameRegion(); // Introduce `.Self` as a symbolic binding. Its type is the value of the // expression to the left of `where`, so `MyInterface` in the example above. - // - // It uses the `Self` type _without_ any constraints so that the `Self` is the - // same at all levels of a nested facet type such as: - // `(Z where .X = {}) where .X = {}`. - auto entity_name_id = context.entity_names().AddCanonical( - {.name_id = SemIR::NameId::PeriodSelf, - .parent_scope_id = context.scope_stack().PeekNameScopeId()}); - auto period_self_inst_id = AddInst( - context, SemIR::LocIdAndInst::NoLoc({ - .type_id = self_without_constraints_type_id, - .entity_name_id = entity_name_id, - // `None` because there is no equivalent non-symbolic value. - .value_id = SemIR::InstId::None, - })); - auto existing = context.scope_stack().LookupOrAddName( - SemIR::NameId::PeriodSelf, period_self_inst_id); - // Shouldn't have any names in newly created scope. - CARBON_CHECK(!existing.has_value()); + auto period_self_inst_id = + MakePeriodSelfFacetValue(context, self_without_constraints_type_id); // Save the `.Self` symbolic binding on the node stack. It will become the // first argument to the `WhereExpr` instruction. diff --git a/toolchain/check/node_stack.h b/toolchain/check/node_stack.h index d5d79a4d1ab3..552d6b38377f 100644 --- a/toolchain/check/node_stack.h +++ b/toolchain/check/node_stack.h @@ -479,6 +479,7 @@ class NodeStack { case Parse::NodeKind::CallExprComma: case Parse::NodeKind::ChoiceAlternativeListComma: case Parse::NodeKind::CodeBlock: + case Parse::NodeKind::CompileTimeBindingPatternStart: case Parse::NodeKind::ContinueStatementStart: case Parse::NodeKind::CorePackageName: case Parse::NodeKind::ExportIntroducer: diff --git a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon index 15c228da0876..c3b2cd40a7b7 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon @@ -25,15 +25,16 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} // CHECK:STDOUT: import_ir_insts: {} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst43}} +// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst45}} // CHECK:STDOUT: entity_names: -// CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name1: {name: name2, parent_scope: name_scope, index: -1, is_template: 0} +// CHECK:STDOUT: entity_name0: {name: name(PeriodSelf), parent_scope: name_scope, index: -1, is_template: 0} +// CHECK:STDOUT: entity_name1: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name2: {name: name2, parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block13, return_slot_pattern: inst39, body: [inst_block20]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block13, return_slot_pattern: inst41, body: [inst_block20]} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: -// CHECK:STDOUT: generic0: {decl: inst43, bindings: inst_block16} +// CHECK:STDOUT: generic0: {decl: inst45, bindings: inst_block16} // CHECK:STDOUT: specifics: // CHECK:STDOUT: specific0: {generic: generic0, args: inst_block17} // CHECK:STDOUT: struct_type_fields: @@ -45,213 +46,220 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)} // CHECK:STDOUT: 'type(inst(NamespaceType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))} -// CHECK:STDOUT: 'type(inst44)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst28)} -// CHECK:STDOUT: 'type(inst28)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst28)} -// CHECK:STDOUT: 'type(symbolic_constant0)': -// CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant0)} -// CHECK:STDOUT: 'type(symbolic_constant4)': -// CHECK:STDOUT: value_repr: {kind: pointer, type: type(symbolic_constant8)} -// CHECK:STDOUT: 'type(symbolic_constant8)': -// CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant8)} -// CHECK:STDOUT: 'type(inst(WitnessType))': -// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(WitnessType))} +// CHECK:STDOUT: 'type(inst46)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst30)} +// CHECK:STDOUT: 'type(inst30)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst30)} // CHECK:STDOUT: 'type(symbolic_constant1)': // CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant1)} // CHECK:STDOUT: 'type(symbolic_constant5)': -// CHECK:STDOUT: value_repr: {kind: pointer, type: type(symbolic_constant8)} +// CHECK:STDOUT: value_repr: {kind: pointer, type: type(symbolic_constant9)} +// CHECK:STDOUT: 'type(symbolic_constant9)': +// CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant9)} +// CHECK:STDOUT: 'type(inst(WitnessType))': +// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(WitnessType))} +// CHECK:STDOUT: 'type(symbolic_constant2)': +// CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant2)} +// CHECK:STDOUT: 'type(symbolic_constant6)': +// CHECK:STDOUT: value_repr: {kind: pointer, type: type(symbolic_constant9)} // CHECK:STDOUT: insts: // CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} // CHECK:STDOUT: inst16: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} // CHECK:STDOUT: inst17: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} -// CHECK:STDOUT: inst18: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} -// CHECK:STDOUT: inst19: {kind: PatternType, arg0: inst(TypeType), type: type(TypeType)} -// CHECK:STDOUT: inst20: {kind: SymbolicBindingPattern, arg0: entity_name0, type: type(inst19)} -// CHECK:STDOUT: inst21: {kind: NameRef, arg0: name1, arg1: inst16, type: type(TypeType)} -// CHECK:STDOUT: inst22: {kind: BindName, arg0: entity_name1, arg1: inst40, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst23: {kind: PatternType, arg0: inst17, type: type(TypeType)} -// CHECK:STDOUT: inst24: {kind: BindingPattern, arg0: entity_name1, type: type(symbolic_constant3)} -// CHECK:STDOUT: inst25: {kind: PatternType, arg0: inst18, type: type(TypeType)} -// CHECK:STDOUT: inst26: {kind: ValueParamPattern, arg0: inst24, arg1: call_param0, type: type(symbolic_constant3)} -// CHECK:STDOUT: inst27: {kind: NameRef, arg0: name1, arg1: inst16, type: type(TypeType)} -// CHECK:STDOUT: inst28: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} -// CHECK:STDOUT: inst29: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst28)} -// CHECK:STDOUT: inst30: {kind: TupleType, arg0: inst_block9, type: type(TypeType)} -// CHECK:STDOUT: inst31: {kind: TupleLiteral, arg0: inst_block8, type: type(inst30)} -// CHECK:STDOUT: inst32: {kind: Converted, arg0: inst29, arg1: inst28, type: type(TypeType)} -// CHECK:STDOUT: inst33: {kind: TupleType, arg0: inst_block11, type: type(TypeType)} -// CHECK:STDOUT: inst34: {kind: Converted, arg0: inst31, arg1: inst33, type: type(TypeType)} -// CHECK:STDOUT: inst35: {kind: TupleType, arg0: inst_block12, type: type(TypeType)} -// CHECK:STDOUT: inst36: {kind: PatternType, arg0: inst33, type: type(TypeType)} -// CHECK:STDOUT: inst37: {kind: ReturnSlotPattern, arg0: inst34, type: type(symbolic_constant7)} +// CHECK:STDOUT: inst18: {kind: BindSymbolicName, arg0: entity_name1, arg1: inst, type: type(TypeType)} +// CHECK:STDOUT: inst19: {kind: BindSymbolicName, arg0: entity_name1, arg1: inst, type: type(TypeType)} +// CHECK:STDOUT: inst20: {kind: BindSymbolicName, arg0: entity_name1, arg1: inst, type: type(TypeType)} +// CHECK:STDOUT: inst21: {kind: PatternType, arg0: inst(TypeType), type: type(TypeType)} +// CHECK:STDOUT: inst22: {kind: SymbolicBindingPattern, arg0: entity_name1, type: type(inst21)} +// CHECK:STDOUT: inst23: {kind: NameRef, arg0: name1, arg1: inst18, type: type(TypeType)} +// CHECK:STDOUT: inst24: {kind: BindName, arg0: entity_name2, arg1: inst42, type: type(symbolic_constant2)} +// CHECK:STDOUT: inst25: {kind: PatternType, arg0: inst19, type: type(TypeType)} +// CHECK:STDOUT: inst26: {kind: BindingPattern, arg0: entity_name2, type: type(symbolic_constant4)} +// CHECK:STDOUT: inst27: {kind: PatternType, arg0: inst20, type: type(TypeType)} +// CHECK:STDOUT: inst28: {kind: ValueParamPattern, arg0: inst26, arg1: call_param0, type: type(symbolic_constant4)} +// CHECK:STDOUT: inst29: {kind: NameRef, arg0: name1, arg1: inst18, type: type(TypeType)} +// CHECK:STDOUT: inst30: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} +// CHECK:STDOUT: inst31: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst30)} +// CHECK:STDOUT: inst32: {kind: TupleType, arg0: inst_block9, type: type(TypeType)} +// CHECK:STDOUT: inst33: {kind: TupleLiteral, arg0: inst_block8, type: type(inst32)} +// CHECK:STDOUT: inst34: {kind: Converted, arg0: inst31, arg1: inst30, type: type(TypeType)} +// CHECK:STDOUT: inst35: {kind: TupleType, arg0: inst_block11, type: type(TypeType)} +// CHECK:STDOUT: inst36: {kind: Converted, arg0: inst33, arg1: inst35, type: type(TypeType)} +// CHECK:STDOUT: inst37: {kind: TupleType, arg0: inst_block12, type: type(TypeType)} // CHECK:STDOUT: inst38: {kind: PatternType, arg0: inst35, type: type(TypeType)} -// CHECK:STDOUT: inst39: {kind: OutParamPattern, arg0: inst37, arg1: call_param1, type: type(symbolic_constant7)} -// CHECK:STDOUT: inst40: {kind: ValueParam, arg0: call_param0, arg1: name2, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst41: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(symbolic_constant5)} -// CHECK:STDOUT: inst42: {kind: ReturnSlot, arg0: inst33, arg1: inst41, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst43: {kind: FunctionDecl, arg0: function0, arg1: inst_block15, type: type(inst44)} -// CHECK:STDOUT: inst44: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst45: {kind: StructValue, arg0: inst_block_empty, type: type(inst44)} -// CHECK:STDOUT: inst46: {kind: PointerType, arg0: inst33, type: type(TypeType)} -// CHECK:STDOUT: inst47: {kind: RequireCompleteType, arg0: inst33, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst48: {kind: RequireCompleteType, arg0: inst33, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst39: {kind: ReturnSlotPattern, arg0: inst36, type: type(symbolic_constant8)} +// CHECK:STDOUT: inst40: {kind: PatternType, arg0: inst37, type: type(TypeType)} +// CHECK:STDOUT: inst41: {kind: OutParamPattern, arg0: inst39, arg1: call_param1, type: type(symbolic_constant8)} +// CHECK:STDOUT: inst42: {kind: ValueParam, arg0: call_param0, arg1: name2, type: type(symbolic_constant2)} +// CHECK:STDOUT: inst43: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(symbolic_constant6)} +// CHECK:STDOUT: inst44: {kind: ReturnSlot, arg0: inst35, arg1: inst43, type: type(symbolic_constant6)} +// CHECK:STDOUT: inst45: {kind: FunctionDecl, arg0: function0, arg1: inst_block15, type: type(inst46)} +// CHECK:STDOUT: inst46: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst47: {kind: StructValue, arg0: inst_block_empty, type: type(inst46)} +// CHECK:STDOUT: inst48: {kind: PointerType, arg0: inst35, type: type(TypeType)} // CHECK:STDOUT: inst49: {kind: RequireCompleteType, arg0: inst35, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst50: {kind: RequireCompleteType, arg0: inst17, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst51: {kind: RequireCompleteType, arg0: inst17, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst52: {kind: RequireCompleteType, arg0: inst18, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst53: {kind: NameRef, arg0: name2, arg1: inst22, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst54: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst28)} -// CHECK:STDOUT: inst55: {kind: TupleLiteral, arg0: inst_block21, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst56: {kind: RequireCompleteType, arg0: inst33, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst57: {kind: TupleAccess, arg0: inst42, arg1: element0, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst58: {kind: RequireCompleteType, arg0: inst17, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst59: {kind: InitializeFrom, arg0: inst53, arg1: inst57, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst60: {kind: TupleAccess, arg0: inst42, arg1: element1, type: type(inst28)} -// CHECK:STDOUT: inst61: {kind: TupleInit, arg0: inst_block_empty, arg1: inst60, type: type(inst28)} -// CHECK:STDOUT: inst62: {kind: TupleValue, arg0: inst_block_empty, type: type(inst28)} -// CHECK:STDOUT: inst63: {kind: Converted, arg0: inst54, arg1: inst61, type: type(inst28)} -// CHECK:STDOUT: inst64: {kind: TupleInit, arg0: inst_block22, arg1: inst42, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst65: {kind: Converted, arg0: inst55, arg1: inst64, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst66: {kind: ReturnExpr, arg0: inst65, arg1: inst42} +// CHECK:STDOUT: inst50: {kind: RequireCompleteType, arg0: inst35, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst51: {kind: RequireCompleteType, arg0: inst37, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst52: {kind: RequireCompleteType, arg0: inst19, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst53: {kind: RequireCompleteType, arg0: inst19, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst54: {kind: RequireCompleteType, arg0: inst20, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst55: {kind: NameRef, arg0: name2, arg1: inst24, type: type(symbolic_constant2)} +// CHECK:STDOUT: inst56: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst30)} +// CHECK:STDOUT: inst57: {kind: TupleLiteral, arg0: inst_block21, type: type(symbolic_constant6)} +// CHECK:STDOUT: inst58: {kind: RequireCompleteType, arg0: inst35, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst59: {kind: TupleAccess, arg0: inst44, arg1: element0, type: type(symbolic_constant2)} +// CHECK:STDOUT: inst60: {kind: RequireCompleteType, arg0: inst19, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst61: {kind: InitializeFrom, arg0: inst55, arg1: inst59, type: type(symbolic_constant2)} +// CHECK:STDOUT: inst62: {kind: TupleAccess, arg0: inst44, arg1: element1, type: type(inst30)} +// CHECK:STDOUT: inst63: {kind: TupleInit, arg0: inst_block_empty, arg1: inst62, type: type(inst30)} +// CHECK:STDOUT: inst64: {kind: TupleValue, arg0: inst_block_empty, type: type(inst30)} +// CHECK:STDOUT: inst65: {kind: Converted, arg0: inst56, arg1: inst63, type: type(inst30)} +// CHECK:STDOUT: inst66: {kind: TupleInit, arg0: inst_block22, arg1: inst44, type: type(symbolic_constant6)} +// CHECK:STDOUT: inst67: {kind: Converted, arg0: inst57, arg1: inst66, type: type(symbolic_constant6)} +// CHECK:STDOUT: inst68: {kind: ReturnExpr, arg0: inst67, arg1: inst44} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: // CHECK:STDOUT: inst15: concrete_constant(inst15) -// CHECK:STDOUT: inst16: symbolic_constant1 +// CHECK:STDOUT: inst16: symbolic_constant0 // CHECK:STDOUT: inst17: symbolic_constant0 -// CHECK:STDOUT: inst18: symbolic_constant1 -// CHECK:STDOUT: inst19: concrete_constant(inst19) -// CHECK:STDOUT: inst20: concrete_constant(inst20) -// CHECK:STDOUT: inst21: symbolic_constant1 +// CHECK:STDOUT: inst18: symbolic_constant2 +// CHECK:STDOUT: inst19: symbolic_constant1 +// CHECK:STDOUT: inst20: symbolic_constant2 +// CHECK:STDOUT: inst21: concrete_constant(inst21) +// CHECK:STDOUT: inst22: concrete_constant(inst22) // CHECK:STDOUT: inst23: symbolic_constant2 -// CHECK:STDOUT: inst24: concrete_constant(inst24) // CHECK:STDOUT: inst25: symbolic_constant3 // CHECK:STDOUT: inst26: concrete_constant(inst26) -// CHECK:STDOUT: inst27: symbolic_constant1 +// CHECK:STDOUT: inst27: symbolic_constant4 // CHECK:STDOUT: inst28: concrete_constant(inst28) +// CHECK:STDOUT: inst29: symbolic_constant2 // CHECK:STDOUT: inst30: concrete_constant(inst30) -// CHECK:STDOUT: inst32: concrete_constant(inst28) -// CHECK:STDOUT: inst33: symbolic_constant4 -// CHECK:STDOUT: inst34: symbolic_constant5 +// CHECK:STDOUT: inst32: concrete_constant(inst32) +// CHECK:STDOUT: inst34: concrete_constant(inst30) // CHECK:STDOUT: inst35: symbolic_constant5 // CHECK:STDOUT: inst36: symbolic_constant6 -// CHECK:STDOUT: inst37: concrete_constant(inst37) +// CHECK:STDOUT: inst37: symbolic_constant6 // CHECK:STDOUT: inst38: symbolic_constant7 // CHECK:STDOUT: inst39: concrete_constant(inst39) -// CHECK:STDOUT: inst43: concrete_constant(inst45) -// CHECK:STDOUT: inst44: concrete_constant(inst44) -// CHECK:STDOUT: inst45: concrete_constant(inst45) -// CHECK:STDOUT: inst46: symbolic_constant8 -// CHECK:STDOUT: inst47: symbolic_constant10 +// CHECK:STDOUT: inst40: symbolic_constant8 +// CHECK:STDOUT: inst41: concrete_constant(inst41) +// CHECK:STDOUT: inst45: concrete_constant(inst47) +// CHECK:STDOUT: inst46: concrete_constant(inst46) +// CHECK:STDOUT: inst47: concrete_constant(inst47) // CHECK:STDOUT: inst48: symbolic_constant9 -// CHECK:STDOUT: inst49: symbolic_constant10 -// CHECK:STDOUT: inst50: symbolic_constant12 +// CHECK:STDOUT: inst49: symbolic_constant11 +// CHECK:STDOUT: inst50: symbolic_constant10 // CHECK:STDOUT: inst51: symbolic_constant11 -// CHECK:STDOUT: inst52: symbolic_constant12 -// CHECK:STDOUT: inst56: symbolic_constant10 -// CHECK:STDOUT: inst58: symbolic_constant12 -// CHECK:STDOUT: inst61: concrete_constant(inst62) -// CHECK:STDOUT: inst62: concrete_constant(inst62) -// CHECK:STDOUT: inst63: concrete_constant(inst62) +// CHECK:STDOUT: inst52: symbolic_constant13 +// CHECK:STDOUT: inst53: symbolic_constant12 +// CHECK:STDOUT: inst54: symbolic_constant13 +// CHECK:STDOUT: inst58: symbolic_constant11 +// CHECK:STDOUT: inst60: symbolic_constant13 +// CHECK:STDOUT: inst63: concrete_constant(inst64) +// CHECK:STDOUT: inst64: concrete_constant(inst64) +// CHECK:STDOUT: inst65: concrete_constant(inst64) // CHECK:STDOUT: symbolic_constants: -// CHECK:STDOUT: symbolic_constant0: {inst: inst17, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant1: {inst: inst17, generic: generic0, index: generic_inst_in_decl0, kind: checked} -// CHECK:STDOUT: symbolic_constant2: {inst: inst23, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant3: {inst: inst23, generic: generic0, index: generic_inst_in_decl1, kind: checked} -// CHECK:STDOUT: symbolic_constant4: {inst: inst33, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant5: {inst: inst33, generic: generic0, index: generic_inst_in_decl2, kind: checked} -// CHECK:STDOUT: symbolic_constant6: {inst: inst36, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant7: {inst: inst36, generic: generic0, index: generic_inst_in_decl3, kind: checked} -// CHECK:STDOUT: symbolic_constant8: {inst: inst46, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant0: {inst: inst17, generic: generic, index: generic_inst, kind: self} +// CHECK:STDOUT: symbolic_constant1: {inst: inst19, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant2: {inst: inst19, generic: generic0, index: generic_inst_in_decl0, kind: checked} +// CHECK:STDOUT: symbolic_constant3: {inst: inst25, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant4: {inst: inst25, generic: generic0, index: generic_inst_in_decl1, kind: checked} +// CHECK:STDOUT: symbolic_constant5: {inst: inst35, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant6: {inst: inst35, generic: generic0, index: generic_inst_in_decl2, kind: checked} +// CHECK:STDOUT: symbolic_constant7: {inst: inst38, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant8: {inst: inst38, generic: generic0, index: generic_inst_in_decl3, kind: checked} // CHECK:STDOUT: symbolic_constant9: {inst: inst48, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant10: {inst: inst48, generic: generic0, index: generic_inst_in_def0, kind: checked} -// CHECK:STDOUT: symbolic_constant11: {inst: inst51, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant12: {inst: inst51, generic: generic0, index: generic_inst_in_def1, kind: checked} +// CHECK:STDOUT: symbolic_constant10: {inst: inst50, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant11: {inst: inst50, generic: generic0, index: generic_inst_in_def0, kind: checked} +// CHECK:STDOUT: symbolic_constant12: {inst: inst53, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant13: {inst: inst53, generic: generic0, index: generic_inst_in_def1, kind: checked} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: -// CHECK:STDOUT: 0: inst43 +// CHECK:STDOUT: 0: inst45 // CHECK:STDOUT: imports: {} // CHECK:STDOUT: global_init: {} -// CHECK:STDOUT: inst_block4: {} +// CHECK:STDOUT: inst_block4: +// CHECK:STDOUT: 0: inst16 // CHECK:STDOUT: inst_block5: -// CHECK:STDOUT: 0: inst20 +// CHECK:STDOUT: 0: inst22 // CHECK:STDOUT: inst_block6: -// CHECK:STDOUT: 0: inst21 +// CHECK:STDOUT: 0: inst23 // CHECK:STDOUT: inst_block7: -// CHECK:STDOUT: 0: inst26 +// CHECK:STDOUT: 0: inst28 // CHECK:STDOUT: inst_block8: -// CHECK:STDOUT: 0: inst27 -// CHECK:STDOUT: 1: inst29 +// CHECK:STDOUT: 0: inst29 +// CHECK:STDOUT: 1: inst31 // CHECK:STDOUT: inst_block9: // CHECK:STDOUT: 0: inst(TypeType) -// CHECK:STDOUT: 1: inst28 +// CHECK:STDOUT: 1: inst30 // CHECK:STDOUT: inst_block10: -// CHECK:STDOUT: 0: inst27 -// CHECK:STDOUT: 1: inst32 +// CHECK:STDOUT: 0: inst29 +// CHECK:STDOUT: 1: inst34 // CHECK:STDOUT: inst_block11: -// CHECK:STDOUT: 0: inst17 -// CHECK:STDOUT: 1: inst28 +// CHECK:STDOUT: 0: inst19 +// CHECK:STDOUT: 1: inst30 // CHECK:STDOUT: inst_block12: -// CHECK:STDOUT: 0: inst18 -// CHECK:STDOUT: 1: inst28 -// CHECK:STDOUT: inst_block13: -// CHECK:STDOUT: 0: inst40 -// CHECK:STDOUT: 1: inst41 -// CHECK:STDOUT: inst_block14: // CHECK:STDOUT: 0: inst20 -// CHECK:STDOUT: 1: inst24 -// CHECK:STDOUT: 2: inst26 -// CHECK:STDOUT: 3: inst37 -// CHECK:STDOUT: 4: inst39 +// CHECK:STDOUT: 1: inst30 +// CHECK:STDOUT: inst_block13: +// CHECK:STDOUT: 0: inst42 +// CHECK:STDOUT: 1: inst43 +// CHECK:STDOUT: inst_block14: +// CHECK:STDOUT: 0: inst22 +// CHECK:STDOUT: 1: inst26 +// CHECK:STDOUT: 2: inst28 +// CHECK:STDOUT: 3: inst39 +// CHECK:STDOUT: 4: inst41 // CHECK:STDOUT: inst_block15: -// CHECK:STDOUT: 0: inst27 -// CHECK:STDOUT: 1: inst29 -// CHECK:STDOUT: 2: inst31 -// CHECK:STDOUT: 3: inst32 -// CHECK:STDOUT: 4: inst34 +// CHECK:STDOUT: 0: inst29 +// CHECK:STDOUT: 1: inst31 +// CHECK:STDOUT: 2: inst33 +// CHECK:STDOUT: 3: inst34 +// CHECK:STDOUT: 4: inst36 // CHECK:STDOUT: 5: inst16 -// CHECK:STDOUT: 6: inst40 -// CHECK:STDOUT: 7: inst21 -// CHECK:STDOUT: 8: inst22 -// CHECK:STDOUT: 9: inst41 -// CHECK:STDOUT: 10: inst42 +// CHECK:STDOUT: 6: inst18 +// CHECK:STDOUT: 7: inst42 +// CHECK:STDOUT: 8: inst23 +// CHECK:STDOUT: 9: inst24 +// CHECK:STDOUT: 10: inst43 +// CHECK:STDOUT: 11: inst44 // CHECK:STDOUT: inst_block16: -// CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: inst_block17: -// CHECK:STDOUT: 0: inst17 -// CHECK:STDOUT: inst_block18: // CHECK:STDOUT: 0: inst18 +// CHECK:STDOUT: inst_block17: +// CHECK:STDOUT: 0: inst19 +// CHECK:STDOUT: inst_block18: +// CHECK:STDOUT: 0: inst20 +// CHECK:STDOUT: 1: inst27 +// CHECK:STDOUT: 2: inst37 +// CHECK:STDOUT: 3: inst40 +// CHECK:STDOUT: inst_block19: +// CHECK:STDOUT: 0: inst19 // CHECK:STDOUT: 1: inst25 // CHECK:STDOUT: 2: inst35 // CHECK:STDOUT: 3: inst38 -// CHECK:STDOUT: inst_block19: -// CHECK:STDOUT: 0: inst17 -// CHECK:STDOUT: 1: inst23 -// CHECK:STDOUT: 2: inst33 -// CHECK:STDOUT: 3: inst36 // CHECK:STDOUT: inst_block20: -// CHECK:STDOUT: 0: inst53 -// CHECK:STDOUT: 1: inst54 -// CHECK:STDOUT: 2: inst55 -// CHECK:STDOUT: 3: inst57 -// CHECK:STDOUT: 4: inst59 -// CHECK:STDOUT: 5: inst60 -// CHECK:STDOUT: 6: inst61 -// CHECK:STDOUT: 7: inst63 -// CHECK:STDOUT: 8: inst64 -// CHECK:STDOUT: 9: inst65 -// CHECK:STDOUT: 10: inst66 +// CHECK:STDOUT: 0: inst55 +// CHECK:STDOUT: 1: inst56 +// CHECK:STDOUT: 2: inst57 +// CHECK:STDOUT: 3: inst59 +// CHECK:STDOUT: 4: inst61 +// CHECK:STDOUT: 5: inst62 +// CHECK:STDOUT: 6: inst63 +// CHECK:STDOUT: 7: inst65 +// CHECK:STDOUT: 8: inst66 +// CHECK:STDOUT: 9: inst67 +// CHECK:STDOUT: 10: inst68 // CHECK:STDOUT: inst_block21: -// CHECK:STDOUT: 0: inst53 -// CHECK:STDOUT: 1: inst54 +// CHECK:STDOUT: 0: inst55 +// CHECK:STDOUT: 1: inst56 // CHECK:STDOUT: inst_block22: -// CHECK:STDOUT: 0: inst59 -// CHECK:STDOUT: 1: inst63 +// CHECK:STDOUT: 0: inst61 +// CHECK:STDOUT: 1: inst65 // CHECK:STDOUT: inst_block23: -// CHECK:STDOUT: 0: inst49 -// CHECK:STDOUT: 1: inst52 +// CHECK:STDOUT: 0: inst51 +// CHECK:STDOUT: 1: inst54 // CHECK:STDOUT: inst_block24: // CHECK:STDOUT: 0: inst15 -// CHECK:STDOUT: 1: inst43 +// CHECK:STDOUT: 1: inst45 // CHECK:STDOUT: ... diff --git a/toolchain/check/testdata/choice/generic.carbon b/toolchain/check/testdata/choice/generic.carbon index 70f5a131b5eb..339953136f83 100644 --- a/toolchain/check/testdata/choice/generic.carbon +++ b/toolchain/check/testdata/choice/generic.carbon @@ -39,6 +39,7 @@ choice Always(T:! type) { // CHECK:STDOUT: %Always.decl: %Always.type = class_decl @Always [concrete = constants.%Always.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: // CHECK:STDOUT: %T.loc14_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/comp_time_field.carbon b/toolchain/check/testdata/class/comp_time_field.carbon index 3e43ac61c6bb..da96d2e0c6d8 100644 --- a/toolchain/check/testdata/class/comp_time_field.carbon +++ b/toolchain/check/testdata/class/comp_time_field.carbon @@ -58,6 +58,7 @@ var x: Class = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -75,11 +76,13 @@ var x: Class = {}; // CHECK:STDOUT: %A.patt: %pattern_type = binding_pattern A [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref.loc9: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %A: type = bind_name A, %Class.ref.loc9 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %B.patt: %pattern_type = binding_pattern B [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref.loc15: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %B: type = bind_name B, %Class.ref.loc15 // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/class/destroy_calls.carbon b/toolchain/check/testdata/class/destroy_calls.carbon index 2ee289eb143d..d780fb384e3c 100644 --- a/toolchain/check/testdata/class/destroy_calls.carbon +++ b/toolchain/check/testdata/class/destroy_calls.carbon @@ -434,6 +434,7 @@ fn G() { F({}); } // 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: } { +// CHECK:STDOUT: // CHECK:STDOUT: %T.loc6_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc6_15.1 (constants.%T.8b3d5d.1)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index d7fc82ef083c..914c1c7336b2 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -128,6 +128,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: --- adapt_specific_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -188,6 +189,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Adapter.decl: type = class_decl @Adapter [concrete = constants.%Adapter] {} {} @@ -392,10 +394,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//adapt_specific_type, loc4_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.b5f: = import_ref Main//adapt_specific_type, loc6_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.433)] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//adapt_specific_type, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//adapt_specific_type, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.262: @C.%C.elem (%C.elem.66c) = import_ref Main//adapt_specific_type, loc5_8, loaded [concrete = %.22b] // CHECK:STDOUT: %Main.import_ref.709: = import_ref Main//adapt_specific_type, loc10_1, loaded [concrete = constants.%complete_type.c07] -// CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//adapt_specific_type, inst92 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//adapt_specific_type, inst94 [no loc], unloaded // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %.22b: @C.%C.elem (%C.elem.66c) = field_decl x, element0 [concrete] // CHECK:STDOUT: } @@ -485,6 +487,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: --- fail_todo_extend_adapt_specific_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -549,6 +552,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Adapter.decl: type = class_decl @Adapter [concrete = constants.%Adapter] {} {} @@ -713,6 +717,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: --- extend_adapt_specific_type_library.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -768,6 +773,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Adapter.decl: type = class_decl @Adapter [concrete = constants.%Adapter] {} {} @@ -950,10 +956,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//extend_adapt_specific_type_library, loc7_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.b5f: = import_ref Main//extend_adapt_specific_type_library, loc9_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.433)] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//extend_adapt_specific_type_library, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//extend_adapt_specific_type_library, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.262: @C.%C.elem (%C.elem.66c) = import_ref Main//extend_adapt_specific_type_library, loc8_8, loaded [concrete = %.22b] // CHECK:STDOUT: %Main.import_ref.709: = import_ref Main//extend_adapt_specific_type_library, loc13_1, loaded [concrete = constants.%complete_type.c07] -// CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//extend_adapt_specific_type_library, inst92 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//extend_adapt_specific_type_library, inst94 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.19d12e.2: type = import_ref Main//extend_adapt_specific_type_library, loc12_21, loaded [concrete = constants.%C.239] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %.22b: @C.%C.elem (%C.elem.66c) = field_decl x, element0 [concrete] @@ -961,13 +967,13 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Main.import_ref.21a = import_ref Main//extend_adapt_specific_type_library, loc7_19, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//extend_adapt_specific_type_library, loc7_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.db0: type = import_ref Main//extend_adapt_specific_type_library, loc7_19, loaded [symbolic = @C.as.Destroy.impl.%C (constants.%C.f2e)] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//extend_adapt_specific_type_library, inst38 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//extend_adapt_specific_type_library, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.251 = import_ref Main//extend_adapt_specific_type_library, loc7_19, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.00b = impl_witness_table (%Main.import_ref.251), @C.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//extend_adapt_specific_type_library, loc7_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.07a = import_ref Main//extend_adapt_specific_type_library, loc11_15, unloaded // CHECK:STDOUT: %Main.import_ref.dd9: type = import_ref Main//extend_adapt_specific_type_library, loc11_15, loaded [concrete = constants.%Adapter] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//extend_adapt_specific_type_library, inst38 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//extend_adapt_specific_type_library, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1094,6 +1100,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: --- adapt_generic_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Adapter.type: type = generic_class_type @Adapter [concrete] @@ -1143,6 +1150,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Adapter.decl: %Adapter.type = class_decl @Adapter [concrete = constants.%Adapter.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Convert.decl: %Convert.type = fn_decl @Convert [concrete = constants.%Convert] { @@ -1313,7 +1321,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//adapt_generic_type, loc4_15, loaded [symbolic = @Adapter.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.fb3: = import_ref Main//adapt_generic_type, loc6_1, loaded [symbolic = @Adapter.%complete_type (constants.%complete_type.f87)] -// CHECK:STDOUT: %Main.import_ref.9a3 = import_ref Main//adapt_generic_type, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.9a3 = import_ref Main//adapt_generic_type, inst29 [no loc], unloaded // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/base_is_generic.carbon b/toolchain/check/testdata/class/generic/base_is_generic.carbon index dc2990a5b433..aad08d9bd828 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -92,6 +92,7 @@ fn H() { // CHECK:STDOUT: --- extend_generic_base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -163,6 +164,7 @@ fn H() { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_17.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Param.decl: type = class_decl @Param [concrete = constants.%Param] {} {} @@ -405,14 +407,14 @@ fn H() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.e8d: = import_ref Main//extend_generic_base, loc10_1, loaded [concrete = constants.%complete_type.09d] -// CHECK:STDOUT: %Main.import_ref.446 = import_ref Main//extend_generic_base, inst92 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.446 = import_ref Main//extend_generic_base, inst94 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.a92: %Param.elem = import_ref Main//extend_generic_base, loc9_8, loaded [concrete = %.be7] // CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//extend_generic_base, loc4_17, loaded [symbolic = @Base.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.b5f: = import_ref Main//extend_generic_base, loc6_1, loaded [symbolic = @Base.%complete_type (constants.%complete_type.433)] -// CHECK:STDOUT: %Main.import_ref.8e0 = import_ref Main//extend_generic_base, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.8e0 = import_ref Main//extend_generic_base, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.7f7: @Base.%Base.elem (%Base.elem.9af) = import_ref Main//extend_generic_base, loc5_8, loaded [concrete = %.e66] // CHECK:STDOUT: %Main.import_ref.bd0: = import_ref Main//extend_generic_base, loc14_1, loaded [concrete = constants.%complete_type.b07] -// CHECK:STDOUT: %Main.import_ref.f6c = import_ref Main//extend_generic_base, inst142 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.f6c = import_ref Main//extend_generic_base, inst144 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.d24 = import_ref Main//extend_generic_base, loc13_27, unloaded // CHECK:STDOUT: %Main.import_ref.77a301.2: type = import_ref Main//extend_generic_base, loc13_26, loaded [concrete = constants.%Base.7a8] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] @@ -515,6 +517,7 @@ fn H() { // CHECK:STDOUT: --- fail_todo_extend_symbolic_base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -563,6 +566,7 @@ fn H() { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} @@ -707,6 +711,7 @@ fn H() { // CHECK:STDOUT: --- extend_generic_symbolic_base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %X.type: type = generic_class_type @X [concrete] @@ -783,11 +788,13 @@ fn H() { // CHECK:STDOUT: %X.decl: %X.type = class_decl @X [concrete = constants.%X.generic] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc4_14.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc4_14.1 (constants.%U)] // CHECK:STDOUT: } // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} @@ -1122,11 +1129,11 @@ fn H() { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//extend_generic_symbolic_base, loc4_14, loaded [symbolic = @X.%U (constants.%U)] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//extend_generic_symbolic_base, loc6_1, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Main.import_ref.e8e = import_ref Main//extend_generic_symbolic_base, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e8e = import_ref Main//extend_generic_symbolic_base, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b8a: @X.%X.G.type (%X.G.type.56f312.1) = import_ref Main//extend_generic_symbolic_base, loc5_15, loaded [symbolic = @X.%X.G (constants.%X.G.b504c4.1)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//extend_generic_symbolic_base, loc8_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.93f: = import_ref Main//extend_generic_symbolic_base, loc10_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.768)] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//extend_generic_symbolic_base, inst116 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//extend_generic_symbolic_base, inst119 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.65d = import_ref Main//extend_generic_symbolic_base, loc9_20, unloaded // CHECK:STDOUT: %Main.import_ref.561eb2.2: type = import_ref Main//extend_generic_symbolic_base, loc9_19, loaded [symbolic = @C.%X (constants.%X.75b6d8.2)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//extend_generic_symbolic_base, loc4_14, loaded [symbolic = @X.%U (constants.%U)] diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index bd950f42e53e..ef3429ac41ac 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -30,6 +30,7 @@ class Declaration(T:! type); // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -80,11 +81,13 @@ class Declaration(T:! type); // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Declaration.decl: %Declaration.type = class_decl @Declaration [concrete = constants.%Declaration.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc28_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_19.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index d828da970969..ff44bf62aa53 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -93,6 +93,7 @@ class Outer(T:! type) { // CHECK:STDOUT: --- call.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -169,8 +170,10 @@ class Outer(T:! type) { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // 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: } @@ -317,6 +320,7 @@ class Outer(T:! type) { // CHECK:STDOUT: --- fail_too_few.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -362,8 +366,10 @@ class Outer(T:! type) { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // 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: } @@ -467,6 +473,7 @@ class Outer(T:! type) { // CHECK:STDOUT: --- fail_too_many.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -514,8 +521,10 @@ class Outer(T:! type) { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // 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: } @@ -621,6 +630,7 @@ class Outer(T:! type) { // CHECK:STDOUT: --- fail_no_conversion.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -671,8 +681,10 @@ class Outer(T:! type) { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // 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: } @@ -778,6 +790,7 @@ class Outer(T:! type) { // CHECK:STDOUT: --- call_in_nested_return_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -853,6 +866,7 @@ class Outer(T:! type) { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc2_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc2_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -927,6 +941,7 @@ class Outer(T:! type) { // 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: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc3_15.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc3_15.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Outer.9d6 [symbolic = @Outer.as.Destroy.impl.%Outer (constants.%Outer.9d6)] diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index 3be061f25c6c..91a498aed4ff 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -54,6 +54,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.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: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type.878: type = generic_class_type @Int.1 [concrete] // CHECK:STDOUT: %Int.generic: %Int.type.878 = struct_value () [concrete] @@ -166,6 +167,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int.1, @Int.1(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index 68319249fc78..55bdf2e46ff6 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -31,6 +31,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: --- field.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -102,6 +103,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { @@ -131,6 +133,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %return.param_patt: @G.%pattern_type.loc23_29 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc23_32: type = name_ref T, %T.loc23_6.2 [symbolic = %T.loc23_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc23_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_6.1 (constants.%T)] // CHECK:STDOUT: %c.param: @G.%Class.loc23_26.1 (%Class.fe1b2d.1) = value_param call_param0 // CHECK:STDOUT: %.loc23: type = splice_block %Class.loc23_26.2 [symbolic = %Class.loc23_26.1 (constants.%Class.fe1b2d.1)] { @@ -150,6 +153,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %return.param_patt: @H.%pattern_type.loc27_29 (%pattern_type.7dcd0a.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref.loc27_32: type = name_ref U, %U.loc27_6.2 [symbolic = %U.loc27_6.1 (constants.%U)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc27_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc27_6.1 (constants.%U)] // CHECK:STDOUT: %c.param: @H.%Class.loc27_26.1 (%Class.fe1b2d.2) = value_param call_param0 // CHECK:STDOUT: %.loc27: type = splice_block %Class.loc27_26.2 [symbolic = %Class.loc27_26.1 (constants.%Class.fe1b2d.2)] { diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 89ae6b6c2759..32e145a8deff 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -92,6 +92,7 @@ class Class(U:! type) { // CHECK:STDOUT: --- foo.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -165,11 +166,13 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CompleteClass.decl: %CompleteClass.type = class_decl @CompleteClass [concrete = constants.%CompleteClass.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc6_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_21.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { @@ -348,6 +351,7 @@ class Class(U:! type) { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.595 = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.458: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6 = struct_value () [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] @@ -395,18 +399,18 @@ class Class(U:! type) { // CHECK:STDOUT: %Main.import_ref.b22 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.a68] -// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst34 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst37 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.051 = import_ref Main//foo, loc7_8, unloaded // CHECK:STDOUT: %Main.import_ref.570 = import_ref Main//foo, loc8_17, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.e27: type = import_ref Main//foo, loc6_31, loaded [symbolic = @CompleteClass.as.Destroy.impl.%CompleteClass (constants.%CompleteClass.f97)] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst79 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst82 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.894484.1 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.894484.2 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.cce = impl_witness_table (%Main.import_ref.894484.2), @CompleteClass.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.4: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Main//foo, inst216 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] +// CHECK:STDOUT: %Main.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Main//foo, inst219 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (%Main.import_ref.773), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.5: type = import_ref Main//foo, loc4_13, loaded [symbolic = @Class.%T.1 (constants.%T)] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] @@ -427,6 +431,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { @@ -687,7 +692,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.54b] -// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst34 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst37 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e76: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.28a) = import_ref Main//foo, loc7_8, loaded [concrete = %.364] // CHECK:STDOUT: %Main.import_ref.a52: @CompleteClass.%CompleteClass.F.type (%CompleteClass.F.type.14f) = import_ref Main//foo, loc8_17, loaded [symbolic = @CompleteClass.%CompleteClass.F (constants.%CompleteClass.F.874)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] @@ -695,7 +700,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Main.import_ref.029: = import_ref Main//foo, loc6_31, loaded [symbolic = @CompleteClass.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.39b)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.e27: type = import_ref Main//foo, loc6_31, loaded [symbolic = @CompleteClass.as.Destroy.impl.%CompleteClass (constants.%CompleteClass.f97)] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst79 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst82 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.b79: @CompleteClass.as.Destroy.impl.%CompleteClass.as.Destroy.impl.Op.type (%CompleteClass.as.Destroy.impl.Op.type.058) = import_ref Main//foo, loc6_31, loaded [symbolic = @CompleteClass.as.Destroy.impl.%CompleteClass.as.Destroy.impl.Op (constants.%CompleteClass.as.Destroy.impl.Op.2ef)] // CHECK:STDOUT: %Destroy.impl_witness_table.d6d = impl_witness_table (%Main.import_ref.b79), @CompleteClass.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.4: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] @@ -981,7 +986,7 @@ class Class(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.a68] -// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst34 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst37 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.051 = import_ref Main//foo, loc7_8, unloaded // CHECK:STDOUT: %Main.import_ref.570 = import_ref Main//foo, loc8_17, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] @@ -990,7 +995,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Main.import_ref.029: = import_ref Main//foo, loc6_31, loaded [symbolic = @CompleteClass.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.e33)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.e27: type = import_ref Main//foo, loc6_31, loaded [symbolic = @CompleteClass.as.Destroy.impl.%CompleteClass (constants.%CompleteClass.f97)] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst79 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst82 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.e54: @CompleteClass.as.Destroy.impl.%CompleteClass.as.Destroy.impl.Op.type (%CompleteClass.as.Destroy.impl.Op.type.6b5) = import_ref Main//foo, loc6_31, loaded [symbolic = @CompleteClass.as.Destroy.impl.%CompleteClass.as.Destroy.impl.Op (constants.%CompleteClass.as.Destroy.impl.Op.d10)] // CHECK:STDOUT: %Destroy.impl_witness_table.ed1 = impl_witness_table (%Main.import_ref.e54), @CompleteClass.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.4: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] @@ -1195,6 +1200,7 @@ class Class(U:! type) { // CHECK:STDOUT: %ptr.5b4: type = ptr_type %CompleteClass [symbolic] // CHECK:STDOUT: %pattern_type.1fe: type = pattern_type %ptr.5b4 [symbolic] // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %Class.type.cf06d9.1: type = generic_class_type @Class.1 [concrete] // CHECK:STDOUT: %Class.generic.9545f5.1: %Class.type.cf06d9.1 = struct_value () [concrete] @@ -1220,12 +1226,12 @@ class Class(U:! type) { // CHECK:STDOUT: %Main.import_ref.b22 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.a68] -// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst34 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst37 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.051 = import_ref Main//foo, loc7_8, unloaded // CHECK:STDOUT: %Main.import_ref.570 = import_ref Main//foo, loc8_17, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.e27: type = import_ref Main//foo, loc6_31, loaded [symbolic = @CompleteClass.as.Destroy.impl.%CompleteClass (constants.%CompleteClass)] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst79 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst82 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.894484.1 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.894484.2 = import_ref Main//foo, loc6_31, unloaded @@ -1249,6 +1255,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.decl: %Class.type.cf06d9.2 = class_decl @Class.loc12 [concrete = constants.%Class.generic.9545f5.2] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %U.loc12_13.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_13.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index ad5327815e96..5ef07c2b48f0 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -49,6 +49,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: --- from_struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -120,6 +121,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %InitFromStructGeneric.decl: %InitFromStructGeneric.type = fn_decl @InitFromStructGeneric [concrete = constants.%InitFromStructGeneric] { @@ -130,6 +132,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: @InitFromStructGeneric.%pattern_type.loc8 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc8_45: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc8_26.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_26.1 (constants.%T)] // CHECK:STDOUT: %x.param: @InitFromStructGeneric.%T.loc8_26.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc8_39: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)] @@ -374,6 +377,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: --- adapt.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Adapt.type: type = generic_class_type @Adapt [concrete] @@ -427,6 +431,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Adapt.decl: %Adapt.type = class_decl @Adapt [concrete = constants.%Adapt.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %InitFromAdaptedGeneric.decl: %InitFromAdaptedGeneric.type = fn_decl @InitFromAdaptedGeneric [concrete = constants.%InitFromAdaptedGeneric] { @@ -437,6 +442,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc8_46: type = name_ref T, %T.loc8_27.2 [symbolic = %T.loc8_27.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_27.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_27.1 (constants.%T)] // CHECK:STDOUT: %x.param: @InitFromAdaptedGeneric.%T.loc8_27.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc8_40: type = name_ref T, %T.loc8_27.2 [symbolic = %T.loc8_27.1 (constants.%T)] diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index 0b5ee520d48d..7f46512c978d 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -49,6 +49,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: --- member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -131,6 +132,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc2_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc2_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %DirectFieldAccess.decl: %DirectFieldAccess.type = fn_decl @DirectFieldAccess [concrete = constants.%DirectFieldAccess] { @@ -477,6 +479,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: --- static_member_fn_call.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -526,6 +529,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %StaticMemberFunctionCall.decl: %StaticMemberFunctionCall.type = fn_decl @StaticMemberFunctionCall [concrete = constants.%StaticMemberFunctionCall] { @@ -536,6 +540,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.ref.loc8: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc8_29.2 [symbolic = %T.loc8_29.1 (constants.%T)] // CHECK:STDOUT: %Class.loc8_49.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.1 (constants.%Class)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_29.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_29.1 (constants.%T)] // CHECK:STDOUT: %return.param: ref @StaticMemberFunctionCall.%Class.loc8_49.1 (%Class) = out_param call_param0 // CHECK:STDOUT: %return: ref @StaticMemberFunctionCall.%Class.loc8_49.1 (%Class) = return_slot %return.param diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index 73bca4a58ad0..d816dc322cbe 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -46,6 +46,7 @@ class C(T:! type) { // CHECK:STDOUT: --- member_inline.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -89,6 +90,7 @@ class C(T:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -273,6 +275,7 @@ class C(T:! type) { // CHECK:STDOUT: --- fail_member_inline.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -311,6 +314,7 @@ class C(T:! 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/member_lookup.carbon b/toolchain/check/testdata/class/generic/member_lookup.carbon index f24e2fa0ec40..e5b5ca6f4cba 100644 --- a/toolchain/check/testdata/class/generic/member_lookup.carbon +++ b/toolchain/check/testdata/class/generic/member_lookup.carbon @@ -77,6 +77,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: --- member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -158,11 +159,13 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_17.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: %Derived.type = class_decl @Derived [concrete = constants.%Derived.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %AccessDerived.decl: %AccessDerived.type = fn_decl @AccessDerived [concrete = constants.%AccessDerived] { @@ -173,6 +176,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.param_patt: @AccessDerived.%pattern_type.loc13_43 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc13_46: type = name_ref T, %T.loc13_18.2 [symbolic = %T.loc13_18.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc13_18.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc13_18.1 (constants.%T)] // CHECK:STDOUT: %x.param: @AccessDerived.%Derived.loc13_40.1 (%Derived.85c) = value_param call_param0 // CHECK:STDOUT: %.loc13: type = splice_block %Derived.loc13_40.2 [symbolic = %Derived.loc13_40.1 (constants.%Derived.85c)] { @@ -192,6 +196,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.param_patt: @AccessBase.%pattern_type.loc17_40 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc17_43: type = name_ref T, %T.loc17_15.2 [symbolic = %T.loc17_15.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc17_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T)] // CHECK:STDOUT: %x.param: @AccessBase.%Derived.loc17_37.1 (%Derived.85c) = value_param call_param0 // CHECK:STDOUT: %.loc17: type = splice_block %Derived.loc17_37.2 [symbolic = %Derived.loc17_37.1 (constants.%Derived.85c)] { @@ -519,6 +524,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: --- fail_no_member.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -601,11 +607,13 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_17.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: %Derived.type = class_decl @Derived [concrete = constants.%Derived.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMissingBase.decl: %AccessMissingBase.type = fn_decl @AccessMissingBase [concrete = constants.%AccessMissingBase] { @@ -616,6 +624,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.param_patt: @AccessMissingBase.%pattern_type.loc13_44 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc13_47: type = name_ref T, %T.loc13_22.2 [symbolic = %T.loc13_22.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc13_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc13_22.1 (constants.%T)] // CHECK:STDOUT: %x.param: @AccessMissingBase.%Base.loc13_41.1 (%Base.370) = value_param call_param0 // CHECK:STDOUT: %.loc13: type = splice_block %Base.loc13_41.2 [symbolic = %Base.loc13_41.1 (constants.%Base.370)] { @@ -635,6 +644,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.param_patt: @AccessMissingDerived.%pattern_type.loc21_50 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc21_53: type = name_ref T, %T.loc21_25.2 [symbolic = %T.loc21_25.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc21_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_25.1 (constants.%T)] // CHECK:STDOUT: %x.param: @AccessMissingDerived.%Derived.loc21_47.1 (%Derived.85c) = value_param call_param0 // CHECK:STDOUT: %.loc21: type = splice_block %Derived.loc21_47.2 [symbolic = %Derived.loc21_47.1 (constants.%Derived.85c)] { diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index de9218dbd794..a36590c080e7 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -113,6 +113,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -156,6 +157,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.F.decl: %Class.F.type = fn_decl @Class.F [symbolic = constants.%Class.F] { @@ -164,6 +166,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %return.patt: @Class.F.%pattern_type (%pattern_type.7dc) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Class.F.%pattern_type (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc10: type = bind_symbolic_name T, 0 [symbolic = @Class.%T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc10_31: type = name_ref T, %T.loc10 [symbolic = %T.loc5 (constants.%T)] // CHECK:STDOUT: %n.param.loc10: @Class.F.%T.loc5 (%T) = value_param call_param0 @@ -178,6 +181,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %return.patt: @Class.G.%pattern_type.loc6_22 (%pattern_type.7dc) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Class.G.%pattern_type.loc6_22 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc14: type = bind_symbolic_name T, 0 [symbolic = @Class.%T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc14 [symbolic = %T.loc6 (constants.%T)] // CHECK:STDOUT: %self.param.loc14: @Class.G.%Class (%Class) = value_param call_param0 @@ -371,6 +375,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: --- nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %A.type: type = generic_class_type @A [concrete] @@ -420,6 +425,7 @@ fn Generic(T:! ()).WrongType() {} // 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] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %B.F.decl: %B.F.type = fn_decl @B.F [symbolic = constants.%B.F] { @@ -428,8 +434,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %a.patt: @B.F.%pattern_type.loc6_22 (%pattern_type.7dc) = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: @B.F.%pattern_type.loc6_22 (%pattern_type.7dc) = value_param_pattern %a.patt, call_param1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc10: type = bind_symbolic_name T, 0 [symbolic = @A.%T.loc4_9.1 (constants.%T)] -// CHECK:STDOUT: %T.ref.loc10_22: type = name_ref T, %T.loc10 [symbolic = @B.%T (constants.%T)] +// CHECK:STDOUT: %.loc10_22: type = splice_block %T.ref.loc10_22 [symbolic = @B.%T (constants.%T)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %T.ref.loc10_22: type = name_ref T, %T.loc10 [symbolic = @B.%T (constants.%T)] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc10: @B.%T (%T) = bind_symbolic_name N, 1 [symbolic = @B.%N.loc5_11.1 (constants.%N)] // CHECK:STDOUT: %self.param.loc10: @B.F.%B (%B) = value_param call_param0 // CHECK:STDOUT: %.loc10_33.1: type = splice_block %Self.ref.loc10 [symbolic = %B (constants.%B)] { @@ -513,7 +523,10 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %B.decl: @A.%B.type (%B.type) = class_decl @B [symbolic = @A.%B.generic (constants.%B.generic)] { // CHECK:STDOUT: %N.patt: @B.%pattern_type (%pattern_type.7dc) = symbolic_binding_pattern N, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc4_9.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %.loc5: type = splice_block %T.ref [symbolic = %T (constants.%T)] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc4_9.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc5_11.2: @B.%T (%T) = bind_symbolic_name N, 1 [symbolic = %N.loc5_11.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [symbolic = @A.as.Destroy.impl.%A (constants.%A)] @@ -681,6 +694,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %NotGeneric.as.Destroy.impl.Op: %NotGeneric.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -703,6 +717,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %NotGeneric.decl: type = class_decl @NotGeneric [concrete = constants.%NotGeneric] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -759,6 +774,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: --- fail_mismatched_too_few_args.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [concrete] @@ -797,6 +813,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %TooFew.decl: %TooFew.type = fn_decl @TooFew [concrete = constants.%TooFew] {} {} @@ -895,6 +912,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: --- fail_mismatched_too_many_args.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [concrete] @@ -934,10 +952,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %TooMany.decl: %TooMany.type = fn_decl @TooMany [concrete = constants.%TooMany] {} { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_12.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_12.1 (constants.%T)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc15_22.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc15_22.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1047,6 +1068,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: --- fail_mismatched_wrong_arg_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [concrete] @@ -1087,10 +1109,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Generic.decl: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %WrongType.decl: %WrongType.type = fn_decl @WrongType [concrete = constants.%WrongType] {} { // CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc15_17.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_17.3: type = converted %.loc15_17.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index a12fb29847d1..518b670ea641 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -59,6 +59,7 @@ fn Test() -> i32 { // CHECK:STDOUT: --- class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -157,6 +158,7 @@ fn Test() -> i32 { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] { @@ -492,6 +494,7 @@ fn Test() -> i32 { // CHECK:STDOUT: --- interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -602,6 +605,7 @@ fn Test() -> i32 { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index 725c171f6fb4..31bfc9bd9b2c 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -49,6 +49,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %pattern_type.960: type = pattern_type %ptr.e79 [concrete] // CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -134,6 +135,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc18_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc18_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { @@ -282,6 +284,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %U.ref.loc19_27: type = name_ref U, %U.loc19_10.2 [symbolic = %U.loc19_10.1 (constants.%U)] // CHECK:STDOUT: %.loc19_28.1: %tuple.type.24b = tuple_literal (%T.ref, %U.ref.loc19_27) // CHECK:STDOUT: %.loc19_28.2: type = converted %.loc19_28.1, constants.%tuple.type.30b [symbolic = %tuple.type (constants.%tuple.type.30b)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc19_10.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc19_10.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref @Class.Get.%tuple.type (%tuple.type.30b) = out_param call_param0 // CHECK:STDOUT: %return: ref @Class.Get.%tuple.type (%tuple.type.30b) = return_slot %return.param @@ -300,6 +303,7 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %x.param: @Class.GetNoDeduce.%T (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc20_21: type = name_ref T, @Class.%T.loc18_13.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %x: @Class.GetNoDeduce.%T (%T) = bind_name x, %x.param +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc20_24.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc20_24.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref @Class.GetNoDeduce.%tuple.type (%tuple.type.30b) = out_param call_param1 // CHECK:STDOUT: %return: ref @Class.GetNoDeduce.%tuple.type (%tuple.type.30b) = return_slot %return.param diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 4df0733411ad..982147452601 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -100,6 +100,7 @@ class E(U:! type) {} // CHECK:STDOUT: --- valid.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [concrete] @@ -134,11 +135,13 @@ class E(U:! type) {} // CHECK:STDOUT: %Generic.decl.loc4: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Generic.decl.loc6: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -222,6 +225,7 @@ class E(U:! type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.466: type = class_type @A.loc4 [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %A.type: type = generic_class_type @A.loc12 [concrete] @@ -257,6 +261,7 @@ class E(U:! type) {} // CHECK:STDOUT: %A.decl.loc12: %A.type = class_decl @A.loc12 [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -351,6 +356,7 @@ class E(U:! type) {} // CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %N.9e6: %A = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete] // CHECK:STDOUT: %B.type.844c0f.1: type = generic_class_type @B.loc6 [concrete] @@ -390,15 +396,22 @@ class E(U:! type) {} // CHECK:STDOUT: %B.decl.loc6: %B.type.844c0f.1 = class_decl @B.loc6 [concrete = constants.%B.generic.ba299b.1] { // CHECK:STDOUT: %N.patt: %pattern_type.c10 = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] +// CHECK:STDOUT: %.loc6: type = splice_block %A.ref [concrete = constants.%A] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc6_9.2: %A = bind_symbolic_name N, 0 [symbolic = %N.loc6_9.1 (constants.%N.9e6)] // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl.loc14: %B.type.844c0f.2 = class_decl @B.loc14 [concrete = constants.%B.generic.ba299b.2] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %N.patt: @B.loc14.%pattern_type (%pattern_type.7dc) = symbolic_binding_pattern N, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc14_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.1 (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_9.2 [symbolic = %T.loc14_9.1 (constants.%T)] +// CHECK:STDOUT: %.loc14: type = splice_block %T.ref [symbolic = %T.loc14_9.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_9.2 [symbolic = %T.loc14_9.1 (constants.%T)] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc14_19.2: @B.loc14.%T.loc14_9.1 (%T) = bind_symbolic_name N, 1 [symbolic = %N.loc14_19.1 (constants.%N.f22)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -540,6 +553,7 @@ class E(U:! type) {} // CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %C.type.e6e560.1: type = generic_class_type @C.loc6 [concrete] @@ -576,14 +590,19 @@ class E(U:! type) {} // CHECK:STDOUT: %C.decl.loc6: %C.type.e6e560.1 = class_decl @C.loc6 [concrete = constants.%C.generic.965b12.1] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl.loc14: %C.type.e6e560.2 = class_decl @C.loc14 [concrete = constants.%C.generic.965b12.2] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %U.patt: %pattern_type.c10 = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc14_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.1 (constants.%T)] -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] +// CHECK:STDOUT: %.loc14: type = splice_block %A.ref [concrete = constants.%A] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc14_19.2: %A = bind_symbolic_name U, 1 [symbolic = %U.loc14_19.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -722,6 +741,7 @@ class E(U:! type) {} // CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %D.type.bbd080.1: type = generic_class_type @D.loc6 [concrete] @@ -758,12 +778,16 @@ class E(U:! type) {} // CHECK:STDOUT: %D.decl.loc6: %D.type.bbd080.1 = class_decl @D.loc6 [concrete = constants.%D.generic.4e2319.1] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl.loc14: %D.type.bbd080.2 = class_decl @D.loc14 [concrete = constants.%D.generic.4e2319.2] { // CHECK:STDOUT: %T.patt: %pattern_type.c10 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] +// CHECK:STDOUT: %.loc14: type = splice_block %A.ref [concrete = constants.%A] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc14_9.2: %A = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.1 (constants.%T.9e6)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -886,6 +910,7 @@ class E(U:! type) {} // CHECK:STDOUT: --- fail_mismatch_param_name.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %E.type.b0f8dc.1: type = generic_class_type @E.loc4 [concrete] @@ -923,11 +948,13 @@ class E(U:! type) {} // CHECK:STDOUT: %E.decl.loc4: %E.type.b0f8dc.1 = class_decl @E.loc4 [concrete = constants.%E.generic.f281ba.1] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %E.decl.loc12: %E.type.b0f8dc.2 = class_decl @E.loc12 [concrete = constants.%E.generic.f281ba.2] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc12_9.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_9.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index fb367a973965..732544dd572e 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -26,6 +26,7 @@ class Class(T:! type) { // CHECK:STDOUT: --- self.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -77,6 +78,7 @@ class Class(T:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index 377244c9fd5f..0a07fdfc1704 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -231,6 +231,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: --- fail_nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -295,6 +296,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: name_binding_decl { @@ -402,6 +404,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // 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: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc5_15.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Outer.9d6 [symbolic = @Outer.as.Destroy.impl.%Outer (constants.%Outer.9d6)] @@ -519,6 +522,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: --- fail_int_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -585,6 +589,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // 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: } @@ -717,6 +722,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %D.as.Destroy.impl.Op: %D.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %struct_type.a.b.501: type = struct_type {.a: %i32, .b: %i32} [concrete] // CHECK:STDOUT: %complete_type.705: = complete_type_witness %struct_type.a.b.501 [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %F: %D = bind_symbolic_name F, 0 [symbolic] // CHECK:STDOUT: %pattern_type.510: type = pattern_type %D [concrete] // CHECK:STDOUT: %E.type: type = generic_class_type @E [concrete] @@ -790,7 +796,10 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %E.decl: %E.type = class_decl @E [concrete = constants.%E.generic] { // CHECK:STDOUT: %F.patt: %pattern_type.510 = symbolic_binding_pattern F, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] +// CHECK:STDOUT: %.loc9: type = splice_block %D.ref [concrete = constants.%D] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] +// CHECK:STDOUT: } // CHECK:STDOUT: %F.loc9_9.2: %D = bind_symbolic_name F, 0 [symbolic = %F.loc9_9.1 (constants.%F)] // CHECK:STDOUT: } // CHECK:STDOUT: name_binding_decl { diff --git a/toolchain/check/testdata/class/generic_method.carbon b/toolchain/check/testdata/class/generic_method.carbon index 79fe9add8811..3411418641be 100644 --- a/toolchain/check/testdata/class/generic_method.carbon +++ b/toolchain/check/testdata/class/generic_method.carbon @@ -22,6 +22,7 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: --- generic_method.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -63,6 +64,7 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.F.decl: %Class.F.type = fn_decl @Class.F [symbolic = constants.%Class.F] { @@ -71,6 +73,7 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %n.patt: @Class.F.%pattern_type.loc17_20 (%pattern_type.7dc) = binding_pattern n [concrete] // CHECK:STDOUT: %n.param_patt: @Class.F.%pattern_type.loc17_20 (%pattern_type.7dc) = value_param_pattern %n.patt, call_param1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc20: type = bind_symbolic_name T, 0 [symbolic = @Class.%T.loc15_13.1 (constants.%T)] // CHECK:STDOUT: %self.param.loc20: @Class.F.%Class (%Class) = value_param call_param0 // CHECK:STDOUT: %.loc20_28.1: type = splice_block %Self.ref.loc20 [symbolic = %Class (constants.%Class)] { diff --git a/toolchain/check/testdata/class/generic_vs_params.carbon b/toolchain/check/testdata/class/generic_vs_params.carbon index 16eb138b8e3c..e5d40e5b9bec 100644 --- a/toolchain/check/testdata/class/generic_vs_params.carbon +++ b/toolchain/check/testdata/class/generic_vs_params.carbon @@ -87,6 +87,7 @@ class Foo[T:! type]; // CHECK:STDOUT: %NotGenericButParams.type: type = generic_class_type @NotGenericButParams [concrete] // CHECK:STDOUT: %NotGenericButParams.generic: %NotGenericButParams.type = struct_value () [concrete] // CHECK:STDOUT: %NotGenericButParams: type = class_type @NotGenericButParams [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %GenericAndParams.type.c8d: type = generic_class_type @GenericAndParams.loc6 [concrete] @@ -137,11 +138,13 @@ class Foo[T:! type]; // CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.c8d = class_decl @GenericAndParams.loc6 [concrete = constants.%GenericAndParams.generic.1e4] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_24.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_24.1 (constants.%T)] // CHECK:STDOUT: } // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} @@ -246,6 +249,7 @@ class Foo[T:! type]; // CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.3ce) = class_decl @GenericAndParams.loc10 [symbolic = @C.%GenericAndParams.generic (constants.%GenericAndParams.generic.54a)] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc10_26.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc10_26.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] @@ -389,6 +393,7 @@ class Foo[T:! type]; // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -404,6 +409,7 @@ class Foo[T:! type]; // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc11_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -453,6 +459,7 @@ class Foo[T:! type]; // CHECK:STDOUT: --- fail_implicit_params_only.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [concrete] @@ -466,6 +473,7 @@ class Foo[T:! type]; // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_11.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_11.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/syntactic_merge.carbon b/toolchain/check/testdata/class/syntactic_merge.carbon index 00e6fed372a4..a3508a631f35 100644 --- a/toolchain/check/testdata/class/syntactic_merge.carbon +++ b/toolchain/check/testdata/class/syntactic_merge.carbon @@ -190,6 +190,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [concrete] @@ -213,25 +214,37 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref.loc7 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc8: type = splice_block %C.ref.loc8 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc8: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = class_decl @Bar [concrete = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc10: type = splice_block %D.ref.loc10 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc10_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc10_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = class_decl @Bar [concrete = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc11: type = splice_block %D.ref.loc11 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc11: %C = bind_symbolic_name a, 0 [symbolic = %a.loc10_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -286,6 +299,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [concrete] @@ -302,13 +316,19 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: type = splice_block %C.ref.loc6 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_17.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_17.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref.loc7 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_17.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -345,6 +365,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.39e446.1: type = generic_class_type @Foo.loc6 [concrete] @@ -363,13 +384,19 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.39e446.1 = class_decl @Foo.loc6 [concrete = constants.%Foo.generic.80461b.1] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc14: %Foo.type.39e446.2 = class_decl @Foo.loc14 [concrete = constants.%Foo.generic.80461b.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc14: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc14_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc14_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -416,6 +443,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [concrete] @@ -432,13 +460,19 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: type = splice_block %C.ref.loc6 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref.loc7 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -475,6 +509,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [concrete] @@ -496,13 +531,19 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [concrete = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc8: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc8_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc8_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -538,6 +579,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: --- two_file.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -572,13 +614,19 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] +// CHECK:STDOUT: %.loc4: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc4: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [concrete = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%C] +// CHECK:STDOUT: %.loc5: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc5: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -632,6 +680,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.39e446.1: type = generic_class_type @Foo.loc7 [concrete] @@ -654,13 +703,19 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.39e446.1 = class_decl @Foo.loc7 [concrete = constants.%Foo.generic.80461b.1] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc15: %Foo.type.39e446.2 = class_decl @Foo.loc15 [concrete = constants.%Foo.generic.80461b.2] { // CHECK:STDOUT: %b.patt: %pattern_type = symbolic_binding_pattern b, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc15: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %b.loc15_11.2: %C = bind_symbolic_name b, 0 [symbolic = %b.loc15_11.1 (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -707,6 +762,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.39e446.1: type = generic_class_type @Foo.loc7 [concrete] @@ -728,13 +784,19 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.39e446.1 = class_decl @Foo.loc7 [concrete = constants.%Foo.generic.80461b.1] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc15: %Foo.type.39e446.2 = class_decl @Foo.loc15 [concrete = constants.%Foo.generic.80461b.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc15: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc15_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc15_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -781,6 +843,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.39e446.1: type = generic_class_type @Foo.loc7 [concrete] @@ -802,13 +865,19 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.39e446.1 = class_decl @Foo.loc7 [concrete = constants.%Foo.generic.80461b.1] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc15: %Foo.type.39e446.2 = class_decl @Foo.loc15 [concrete = constants.%Foo.generic.80461b.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc15: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc15_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc15_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -855,6 +924,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [concrete] @@ -870,7 +940,10 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_11.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_11.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -899,6 +972,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type: type = generic_class_type @Foo [concrete] @@ -926,7 +1000,10 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6: %C = bind_symbolic_name a, 0 [symbolic = %a.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -962,6 +1039,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %const: type = const_type %C [concrete] // CHECK:STDOUT: %a: %const = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %const [concrete] @@ -982,6 +1060,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6: type = splice_block %const [concrete = constants.%const] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %const: type = const_type %C.ref [concrete = constants.%const] // CHECK:STDOUT: } @@ -991,6 +1070,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_15 [concrete = constants.%const] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %const.loc18_22: type = const_type %C.ref [concrete = constants.%const] // CHECK:STDOUT: %const.loc18_15: type = const_type %const.loc18_22 [concrete = constants.%const] diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index 8795b5cce577..ad4ce590e7b1 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -38,6 +38,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: --- int_match.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -112,6 +113,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt: %pattern_type.7ce = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // 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: } @@ -121,6 +123,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %b.patt: %pattern_type.dfb = symbolic_binding_pattern b, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5_20.1: type = splice_block %C.loc5 [concrete = constants.%C.262] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %C.ref.loc5: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc5: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0.loc5: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.956] @@ -138,6 +141,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %b.patt: %pattern_type.dfb = symbolic_binding_pattern b, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6_20.1: type = splice_block %C.loc6 [concrete = constants.%C.262] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %C.ref.loc6: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc6: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.956] @@ -312,6 +316,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: --- fail_int_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -388,6 +393,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt: %pattern_type.7ce = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // 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: } @@ -397,6 +403,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %b.patt: %pattern_type.dfb = symbolic_binding_pattern b, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5_19.1: type = splice_block %C [concrete = constants.%C.262] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.956] @@ -414,6 +421,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %b.patt: %pattern_type.dfb = symbolic_binding_pattern b, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc13_20.1: type = splice_block %C [concrete = constants.%C.262] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.956] diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index dfa18e449399..7b3012b32a30 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -2851,6 +2851,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- fail_generic_virtual_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -2891,6 +2892,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_17.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -3020,6 +3022,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.as.Destroy.impl.Op: %T1.as.Destroy.impl.Op.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: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -3084,6 +3087,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_17.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [concrete = constants.%Derived] {} {} @@ -3630,6 +3634,7 @@ class T2(G2:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T1: type = class_type @T1 [concrete] // CHECK:STDOUT: %pattern_type.28b: type = pattern_type %T1 [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F [concrete] @@ -3688,6 +3693,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %self.param: %T1 = value_param call_param0 // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%T1 [concrete = constants.%T1] // CHECK:STDOUT: %self: %T1 = bind_name self, %self.param +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc9_28.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_28.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%T1 [concrete = constants.%T1] @@ -3717,6 +3723,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- fail_generic_virtual_in_generic_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %T1.type: type = generic_class_type @T1 [concrete] @@ -3755,6 +3762,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.decl: %T1.type = class_decl @T1 [concrete = constants.%T1.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -3807,6 +3815,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc9_22.2 [symbolic = %T1 (constants.%T1)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @T1.F.%T1 (%T1) = bind_name self, %self.param +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc9_28.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc9_28.1 (constants.%T.336)] // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%T1 [symbolic = @T1.as.Destroy.impl.%T1 (constants.%T1)] @@ -3869,6 +3878,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- generic_with_virtual.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %T1.type: type = generic_class_type @T1 [concrete] @@ -3910,6 +3920,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.decl: %T1.type = class_decl @T1 [concrete = constants.%T1.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -4044,6 +4055,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- with_dependent_arg.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %T1.type: type = generic_class_type @T1 [concrete] @@ -4087,6 +4099,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.decl: %T1.type = class_decl @T1 [concrete = constants.%T1.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -4308,6 +4321,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %NonGenericBase.vtable_ptr: ref %ptr.454 = vtable_ptr @NonGenericBase.vtable [concrete] // CHECK:STDOUT: %struct_type.vptr: type = struct_type {.: %ptr.454} [concrete] // CHECK:STDOUT: %complete_type.513: = complete_type_witness %struct_type.vptr [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %GenericDerived.type: type = generic_class_type @GenericDerived [concrete] @@ -4352,6 +4366,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %GenericDerived.decl: %GenericDerived.type = class_decl @GenericDerived [concrete = constants.%GenericDerived.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc9_27.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_27.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -4604,6 +4619,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- nongeneric_derived_from_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %GenericBase.type: type = generic_class_type @GenericBase [concrete] @@ -4675,6 +4691,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %GenericBase.decl: %GenericBase.type = class_decl @GenericBase [concrete = constants.%GenericBase.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_24.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_24.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %T1.decl: type = class_decl @T1 [concrete = constants.%T1] {} {} @@ -4961,6 +4978,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- impl_generic_specifically.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -5028,6 +5046,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_17.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %T1.decl: type = class_decl @T1 [concrete = constants.%T1] {} {} @@ -5277,6 +5296,7 @@ class T2(G2:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %T1: type = class_type @T1 [concrete] // CHECK:STDOUT: %T2: type = class_type @T2 [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -5346,6 +5366,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_17.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %D1.decl: type = class_decl @D1 [concrete = constants.%D1] {} {} @@ -5581,6 +5602,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- fail_impl_generic_generic_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -5645,11 +5667,13 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: %Derived.type = class_decl @Derived [concrete = constants.%Derived.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -5959,6 +5983,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- impl_generic_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -6030,11 +6055,13 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: %Derived.type = class_decl @Derived [concrete = constants.%Derived.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -6368,6 +6395,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- abstract_generic_undefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -6430,6 +6458,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %T1.decl: type = class_decl @T1 [concrete = constants.%T1] {} {} @@ -6627,6 +6656,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- generic_lib.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [concrete] @@ -6668,6 +6698,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_17.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -6838,7 +6869,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Main.import_ref.03f: ref %ptr.454 = import_ref Main//generic_lib, loc6_1, loaded [symbolic = @Base.%vtable_ptr (constants.%Base.vtable_ptr.16a6e1.3)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//generic_lib, loc4_17, loaded [symbolic = @Base.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.05e: = import_ref Main//generic_lib, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.8e0 = import_ref Main//generic_lib, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.8e0 = import_ref Main//generic_lib, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e54 = import_ref Main//generic_lib, loc5_30, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//generic_lib, loc4_17, loaded [symbolic = @Base.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.78ad15.1: = import_ref Main//generic_lib, loc6_1, loaded [symbolic = constants.%Base.F.specific_fn.892] @@ -6965,6 +6996,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- generic_derived_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %G1: type = bind_symbolic_name G1, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %T1.type: type = generic_class_type @T1 [concrete] @@ -7027,11 +7059,13 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.decl: %T1.type = class_decl @T1 [concrete = constants.%T1.generic] { // CHECK:STDOUT: %G1.patt: %pattern_type.98f = symbolic_binding_pattern G1, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %G1.loc4_15.2: type = bind_symbolic_name G1, 0 [symbolic = %G1.loc4_15.1 (constants.%G1)] // CHECK:STDOUT: } // CHECK:STDOUT: %T2.decl: %T2.type = class_decl @T2 [concrete = constants.%T2.generic] { // CHECK:STDOUT: %G2.patt: %pattern_type.98f = symbolic_binding_pattern G2, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %G2.loc8_10.2: type = bind_symbolic_name G2, 0 [symbolic = %G2.loc8_10.1 (constants.%G2)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -7285,6 +7319,7 @@ class T2(G2:! type) { // CHECK:STDOUT: --- generic_derived_generic_context.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %G1: type = bind_symbolic_name G1, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %T1.type: type = generic_class_type @T1 [concrete] @@ -7355,11 +7390,13 @@ class T2(G2:! type) { // CHECK:STDOUT: %T1.decl: %T1.type = class_decl @T1 [concrete = constants.%T1.generic] { // CHECK:STDOUT: %G1.patt: %pattern_type.98f = symbolic_binding_pattern G1, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %G1.loc4_15.2: type = bind_symbolic_name G1, 0 [symbolic = %G1.loc4_15.1 (constants.%G1)] // CHECK:STDOUT: } // CHECK:STDOUT: %T2.decl: %T2.type = class_decl @T2 [concrete = constants.%T2.generic] { // CHECK:STDOUT: %G2.patt: %pattern_type.98f = symbolic_binding_pattern G2, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %G2.loc8_10.2: type = bind_symbolic_name G2, 0 [symbolic = %G2.loc8_10.1 (constants.%G2)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 8ba5c01b85a6..ef8b751a5327 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -139,6 +139,7 @@ fn G() -> i32 { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.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: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] @@ -220,6 +221,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc6_32 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_35: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: %a.param: @F.%array_type.loc6_29.1 (%array_type.743) = value_param call_param0 // CHECK:STDOUT: %.loc6_29: type = splice_block %array_type.loc6_29.2 [symbolic = %array_type.loc6_29.1 (constants.%array_type.743)] { @@ -382,6 +384,7 @@ fn G() -> i32 { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.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: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] @@ -470,6 +473,7 @@ fn G() -> 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: %.loc6_26.1: type = splice_block %.loc6_26.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] @@ -632,6 +636,7 @@ fn G() -> i32 { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.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: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] @@ -688,8 +693,10 @@ fn G() -> i32 { // CHECK:STDOUT: %a.patt: @F.%pattern_type (%pattern_type.261) = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: @F.%pattern_type (%pattern_type.261) = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: %.loc6_36.1: type = splice_block %.loc6_36.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] @@ -829,6 +836,7 @@ fn G() -> i32 { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.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: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] @@ -912,6 +920,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc6_32 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_35: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: %a.param: @F.%array_type.loc6_29.1 (%array_type.9d4) = value_param call_param0 // CHECK:STDOUT: %.loc6_29: type = splice_block %array_type.loc6_29.2 [symbolic = %array_type.loc6_29.1 (constants.%array_type.9d4)] { @@ -1080,6 +1089,7 @@ fn G() -> i32 { // CHECK:STDOUT: %pattern_type.a94: type = pattern_type %ptr.19c [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op.type: type = fn_type @D.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op: %D.as.Destroy.impl.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] @@ -1172,6 +1182,7 @@ fn G() -> 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: %.loc7_26.1: type = splice_block %.loc7_26.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] @@ -1364,6 +1375,7 @@ fn G() -> i32 { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.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: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -1442,6 +1454,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_32.loc6_34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6_34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc6_10: type = splice_block %i32.loc6_10 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/binding_pattern.carbon b/toolchain/check/testdata/deduce/binding_pattern.carbon index 025ebdc2b65f..2387bcfa958a 100644 --- a/toolchain/check/testdata/deduce/binding_pattern.carbon +++ b/toolchain/check/testdata/deduce/binding_pattern.carbon @@ -60,6 +60,7 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: --- fail_incompatible_deduce.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -127,13 +128,16 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: %V.patt: %pattern_type.98f = symbolic_binding_pattern V, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc8_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc8_6.1 (constants.%U)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %V.loc8_16.2: type = bind_symbolic_name V, 1 [symbolic = %V.loc8_16.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -305,6 +309,7 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: --- fail_todo_compatible_deduce.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -325,7 +330,6 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -377,22 +381,25 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: %V.patt: %pattern_type.344 = symbolic_binding_pattern V, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc9_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc9_6.1 (constants.%U)] // CHECK:STDOUT: %.loc9_25.1: type = splice_block %.loc9_25.2 [concrete = constants.%type_where] { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.3: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc9_32.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.cc7 = name_ref ImplicitAs, imports.%Core.ImplicitAs [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self.3 [symbolic_self = constants.%.Self] // CHECK:STDOUT: %ImplicitAs.type.loc9: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self)> [symbolic_self = constants.%ImplicitAs.type.aba] // CHECK:STDOUT: %.loc9_32.2: type = converted %.loc9_32.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc9_25.2: type = where_expr %.Self [concrete = constants.%type_where] { +// CHECK:STDOUT: %.loc9_25.2: type = where_expr %.Self.3 [concrete = constants.%type_where] { // CHECK:STDOUT: requirement_base_facet_type type // CHECK:STDOUT: requirement_impls %.loc9_32.2, %ImplicitAs.type.loc9 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 6ede36c3d892..207bf164dd13 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -72,6 +72,7 @@ fn G() -> i32 { // CHECK:STDOUT: --- class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -129,6 +130,7 @@ fn G() -> i32 { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} @@ -140,6 +142,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc7_25 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc7_28: type = name_ref T, %T.loc7_6.2 [symbolic = %T.loc7_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.1 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%C.loc7_22.1 (%C.f2e) = value_param call_param0 // CHECK:STDOUT: %.loc7_22: type = splice_block %C.loc7_22.2 [symbolic = %C.loc7_22.1 (constants.%C.f2e)] { @@ -346,6 +349,7 @@ fn G() -> i32 { // CHECK:STDOUT: --- interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %I.type: type = generic_class_type @I [concrete] @@ -401,6 +405,7 @@ fn G() -> i32 { // CHECK:STDOUT: %I.decl: %I.type = class_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -412,6 +417,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.1 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%I.loc7_22.1 (%I.ff1) = value_param call_param0 // CHECK:STDOUT: %.loc7_22: type = splice_block %I.loc7_22.2 [symbolic = %I.loc7_22.1 (constants.%I.ff1)] { @@ -614,6 +620,7 @@ fn G() -> i32 { // CHECK:STDOUT: --- nested.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -715,6 +722,7 @@ fn G() -> i32 { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -731,7 +739,9 @@ fn G() -> i32 { // CHECK:STDOUT: %U.ref.loc13_55: type = name_ref U, %U.loc13_16.2 [symbolic = %U.loc13_16.1 (constants.%U)] // CHECK:STDOUT: %.loc13_56.1: %tuple.type.24b = tuple_literal (%T.ref.loc13_52, %U.ref.loc13_55) // CHECK:STDOUT: %.loc13_56.2: type = converted %.loc13_56.1, constants.%tuple.type.30b [symbolic = %tuple.type (constants.%tuple.type.30b)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc13_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc13_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc13_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc13_16.1 (constants.%U)] // CHECK:STDOUT: %p.param: @F.%Inner.loc13_45.1 (%Inner.c71) = value_param call_param0 // CHECK:STDOUT: %.loc13_45: type = splice_block %Inner.loc13_45.2 [symbolic = %Inner.loc13_45.1 (constants.%Inner.c71)] { @@ -875,6 +885,7 @@ fn G() -> i32 { // 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: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc5_15.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Outer.9d6 [symbolic = @Outer.as.Destroy.impl.%Outer (constants.%Outer.9d6)] @@ -1124,6 +1135,7 @@ fn G() -> i32 { // CHECK:STDOUT: --- nontype.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -1205,6 +1217,7 @@ fn G() -> i32 { // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // 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: } @@ -1220,6 +1233,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_32.loc6_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc6_10: type = splice_block %i32.loc6_10 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index f36675e8b650..36772e75a719 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -39,6 +39,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: --- int.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] @@ -91,6 +92,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %.loc4_64.1: type = value_of_initializer %IntLiteral.call.loc4_64 [concrete = Core.IntLiteral] // CHECK:STDOUT: %.loc4_64.2: type = converted %IntLiteral.call.loc4_64, %.loc4_64.1 [concrete = Core.IntLiteral] // CHECK:STDOUT: %.loc4_26.1: type = splice_block %.loc4_26.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Core.ref.loc4_10: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref.loc4_14: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call.loc4_26: init type = call %IntLiteral.ref.loc4_14() [concrete = Core.IntLiteral] @@ -175,6 +177,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: --- float.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] @@ -227,6 +230,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %.loc4_66.1: type = value_of_initializer %IntLiteral.call.loc4_66 [concrete = Core.IntLiteral] // CHECK:STDOUT: %.loc4_66.2: type = converted %IntLiteral.call.loc4_66, %.loc4_66.1 [concrete = Core.IntLiteral] // CHECK:STDOUT: %.loc4_26.1: type = splice_block %.loc4_26.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Core.ref.loc4_10: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref.loc4_14: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call.loc4_26: init type = call %IntLiteral.ref.loc4_14() [concrete = Core.IntLiteral] diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index 4e1452f7e352..9dd6e1f07883 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -77,6 +77,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %pattern_type.a94: type = pattern_type %ptr.19c [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op.type: type = fn_type @D.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op: %D.as.Destroy.impl.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] @@ -127,7 +128,9 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc7_40 (%pattern_type.a32) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref.loc7_43: type = name_ref U, %U.loc7_16.2 [symbolic = %U.loc7_16.1 (constants.%U)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc7_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc7_16.1 (constants.%U)] // CHECK:STDOUT: %pair.param: @F.%tuple.type (%tuple.type.30b) = value_param call_param0 // CHECK:STDOUT: %.loc7_37.1: type = splice_block %.loc7_37.3 [symbolic = %tuple.type (constants.%tuple.type.30b)] { @@ -286,6 +289,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: --- tuple_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -372,6 +376,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %Pair.patt: %pattern_type.511 = symbolic_binding_pattern Pair, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_31.1: type = splice_block %.loc4_31.3 [concrete = constants.%tuple.type.d07] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc4_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc4_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_32.loc4_28: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -392,11 +397,13 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %int_32.loc6_47: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6_47: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc6_10: type = splice_block %i32.loc6_10 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %A.loc6_6.2: %i32 = bind_symbolic_name A, 0 [symbolic = %A.loc6_6.1 (constants.%A)] // CHECK:STDOUT: %.loc6_19: type = splice_block %i32.loc6_19 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc6_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } @@ -606,6 +613,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %pattern_type.a94: type = pattern_type %ptr.19c [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op.type: type = fn_type @D.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op: %D.as.Destroy.impl.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] @@ -649,6 +657,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc7_30 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc7_33: type = name_ref T, %T.loc7_6.2 [symbolic = %T.loc7_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.1 (constants.%T)] // CHECK:STDOUT: %pair.param: @F.%tuple.type (%tuple.type.d00) = value_param call_param0 // CHECK:STDOUT: %.loc7_27.1: type = splice_block %.loc7_27.3 [symbolic = %tuple.type (constants.%tuple.type.d00)] { diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index 6c5e5f004736..f567ad0d122a 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -81,6 +81,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.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: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] @@ -124,6 +125,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc6_23 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.1 (%ptr.79f) = value_param call_param0 // CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.2 [symbolic = %ptr.loc6_20.1 (constants.%ptr.79f)] { @@ -256,6 +258,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.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: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %const.a1a: type = const_type %T [symbolic] @@ -303,6 +306,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc6_29 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc6_26.1 (%ptr.6d4) = value_param call_param0 // CHECK:STDOUT: %.loc6_26: type = splice_block %ptr.loc6_26.2 [symbolic = %ptr.loc6_26.1 (constants.%ptr.6d4)] { @@ -440,6 +444,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.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: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] @@ -489,6 +494,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc6_23 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.1 (%ptr.79f) = value_param call_param0 // CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.2 [symbolic = %ptr.loc6_20.1 (constants.%ptr.79f)] { @@ -624,6 +630,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %const.a1a: type = const_type %T [symbolic] @@ -667,6 +674,7 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc6_29 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_6.2 [symbolic = %T.loc6_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc6_26.1 (%ptr.6d4) = value_param call_param0 // CHECK:STDOUT: %.loc6_26: type = splice_block %ptr.loc6_26.2 [symbolic = %ptr.loc6_26.1 (constants.%ptr.6d4)] { diff --git a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon index 17653e9d855f..84f8b89db1b4 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -105,6 +105,7 @@ fn G() { // CHECK:STDOUT: --- tuple_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %tuple.type: type = tuple_type (type) [concrete] // CHECK:STDOUT: %T.6eb: %tuple.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f1e: type = pattern_type %tuple.type [concrete] @@ -174,6 +175,7 @@ fn G() { // CHECK:STDOUT: %T.patt: %pattern_type.f1e = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_28.1: type = splice_block %.loc4_28.3 [concrete = constants.%tuple.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc4_28.2: %tuple.type = tuple_literal (type) // CHECK:STDOUT: %.loc4_28.3: type = converted %.loc4_28.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } @@ -187,6 +189,7 @@ fn G() { // CHECK:STDOUT: %a.param_patt: @F.%pattern_type.loc8_37 (%pattern_type.08e) = value_param_pattern %a.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.3 [concrete = constants.%tuple.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc8_17.2: %tuple.type = tuple_literal (type) // CHECK:STDOUT: %.loc8_17.3: type = converted %.loc8_17.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } @@ -414,6 +417,7 @@ fn G() { // CHECK:STDOUT: --- struct_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete] // CHECK:STDOUT: %T.08d: %struct_type.t = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.7f2: type = pattern_type %struct_type.t [concrete] @@ -481,7 +485,10 @@ fn G() { // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.7f2 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] +// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.t [concrete = constants.%struct_type.t] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_17.2: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc4_17.1 (constants.%T.08d)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { @@ -491,7 +498,10 @@ fn G() { // CHECK:STDOUT: %a.patt: @F.%pattern_type.loc8_39 (%pattern_type.9f0) = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: @F.%pattern_type.loc8_39 (%pattern_type.9f0) = value_param_pattern %a.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] +// CHECK:STDOUT: %.loc8_19: type = splice_block %struct_type.t [concrete = constants.%struct_type.t] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_6.2: %struct_type.t = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.1 (constants.%T.08d)] // CHECK:STDOUT: %x.param: @F.%HoldsType.loc8_36.1 (%HoldsType.843) = value_param call_param0 // CHECK:STDOUT: %.loc8_36: type = splice_block %HoldsType.loc8_36.2 [symbolic = %HoldsType.loc8_36.1 (constants.%HoldsType.843)] { @@ -728,6 +738,7 @@ fn G() { // CHECK:STDOUT: %Class.as.Destroy.impl.Op: %Class.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete] // CHECK:STDOUT: %complete_type.509: = complete_type_witness %struct_type.t [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.0de: %Class = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.761: type = pattern_type %Class [concrete] // CHECK:STDOUT: %HoldsType.type: type = generic_class_type @HoldsType [concrete] @@ -790,7 +801,10 @@ fn G() { // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.761 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] +// CHECK:STDOUT: %.loc8: type = splice_block %Class.ref [concrete = constants.%Class] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_17.2: %Class = bind_symbolic_name T, 0 [symbolic = %T.loc8_17.1 (constants.%T.0de)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { @@ -800,7 +814,10 @@ fn G() { // CHECK:STDOUT: %a.patt: = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] +// CHECK:STDOUT: %.loc21_10: type = splice_block %Class.ref [concrete = constants.%Class] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc21_6.2: %Class = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.1 (constants.%T.0de)] // CHECK:STDOUT: %x.param: @F.%HoldsType.loc21_31.1 (%HoldsType.f95cf2.1) = value_param call_param0 // CHECK:STDOUT: %.loc21_31: type = splice_block %HoldsType.loc21_31.2 [symbolic = %HoldsType.loc21_31.1 (constants.%HoldsType.f95cf2.1)] { @@ -971,7 +988,10 @@ fn G() { // CHECK:STDOUT: %.loc26_26.5: init %Class = class_init (%.loc26_26.4), %.loc26_26.2 [concrete = constants.%Class.val] // CHECK:STDOUT: %.loc26_26.6: ref %Class = temporary %.loc26_26.2, %.loc26_26.5 // CHECK:STDOUT: %.loc26_28.1: ref %Class = converted %.loc26_26.1, %.loc26_26.6 -// CHECK:STDOUT: %Class.ref.loc26_11: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] +// CHECK:STDOUT: %.loc26_11: type = splice_block %Class.ref.loc26_11 [concrete = constants.%Class] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Class.ref.loc26_11: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] +// CHECK:STDOUT: } // CHECK:STDOUT: %.loc26_28.2: %Class = bind_value %.loc26_28.1 // CHECK:STDOUT: %c: %Class = bind_symbolic_name c, 0, %.loc26_28.2 [symbolic = constants.%c] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] @@ -1048,6 +1068,7 @@ fn G() { // CHECK:STDOUT: --- fail_todo_array_index.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete] // CHECK:STDOUT: %T.eb6: %array_type = bind_symbolic_name T, 0 [symbolic] @@ -1134,6 +1155,7 @@ fn G() { // CHECK:STDOUT: %T.patt: %pattern_type.dcb = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete = constants.%array_type] // CHECK:STDOUT: } @@ -1147,6 +1169,7 @@ fn G() { // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc12_23: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete = constants.%array_type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/access.carbon b/toolchain/check/testdata/facet/access.carbon index dad360e23d14..05623c980bb2 100644 --- a/toolchain/check/testdata/facet/access.carbon +++ b/toolchain/check/testdata/facet/access.carbon @@ -321,7 +321,10 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %T.ref.loc9_24: %I.type = name_ref T, %T.loc9_8.2 [symbolic = %T.loc9_8.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc9_24: type = facet_access_type %T.ref.loc9_24 [symbolic = %T.as_type.loc9_18.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_24: type = converted %T.ref.loc9_24, %T.as_type.loc9_24 [symbolic = %T.as_type.loc9_18.1 (constants.%T.as_type)] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc9_12: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_8.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_8.1 (constants.%T)] // CHECK:STDOUT: %x.param: @Use.%T.as_type.loc9_18.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [symbolic = %T.as_type.loc9_18.1 (constants.%T.as_type)] { @@ -483,9 +486,9 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] // CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%X [concrete] -// CHECK:STDOUT: %.Self: %A.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %A.lookup_impl_witness.5ad: = lookup_impl_witness %.Self, @A [symbolic_self] +// CHECK:STDOUT: %.Self.3ca: %A.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.3ca [symbolic_self] +// CHECK:STDOUT: %A.lookup_impl_witness.5ad: = lookup_impl_witness %.Self.3ca, @A [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %A.lookup_impl_witness.5ad, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %A_where.type: type = facet_type <@A where %impl.elem0 = %empty_tuple.type> [concrete] @@ -514,16 +517,17 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %.loc6_33: type = converted %AA.ref, %AA.as_type.loc6_33.2 [symbolic = %AA.as_type.loc6_33.1 (constants.%AA.as_type)] // CHECK:STDOUT: %impl.elem0.loc6_33: type = impl_witness_access constants.%A.lookup_impl_witness.c50, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc6_13.1: type = splice_block %.loc6_13.2 [concrete = constants.%A_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %A.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %A.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.3ca] // CHECK:STDOUT: %X.ref.loc6_19: %A.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc6_19: type = impl_witness_access constants.%A.lookup_impl_witness.5ad, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_25.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc6_25.2: type = converted %.loc6_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc6_13.2: type = where_expr %.Self [concrete = constants.%A_where.type] { +// CHECK:STDOUT: %.loc6_13.2: type = where_expr %.Self.2 [concrete = constants.%A_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%A.type // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc6_19, %.loc6_25.2 // CHECK:STDOUT: } @@ -575,11 +579,11 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %facet_type.938: type = facet_type <@A & @B> [concrete] -// CHECK:STDOUT: %.Self: %facet_type.938 = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %A.lookup_impl_witness.878: = lookup_impl_witness %.Self, @A [symbolic_self] +// CHECK:STDOUT: %.Self.680: %facet_type.938 = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.680 [symbolic_self] +// CHECK:STDOUT: %A.lookup_impl_witness.878: = lookup_impl_witness %.Self.680, @A [symbolic_self] // CHECK:STDOUT: %impl.elem0.c9d: type = impl_witness_access %A.lookup_impl_witness.878, element0 [symbolic_self] -// CHECK:STDOUT: %B.lookup_impl_witness.a3c: = lookup_impl_witness %.Self, @B [symbolic_self] +// CHECK:STDOUT: %B.lookup_impl_witness.a3c: = lookup_impl_witness %.Self.680, @B [symbolic_self] // CHECK:STDOUT: %impl.elem0.7b2: type = impl_witness_access %B.lookup_impl_witness.a3c, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %facet_type.6d1: type = facet_type <@A & @B where %impl.elem0.c9d = %empty_tuple.type and %impl.elem0.7b2 = %empty_struct_type> [concrete] @@ -615,6 +619,7 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %.loc14_49: type = converted %AB.ref, %AB.as_type.loc14_49.2 [symbolic = %AB.as_type.loc14_49.1 (constants.%AB.as_type)] // CHECK:STDOUT: %impl.elem0.loc14_49: type = impl_witness_access constants.%A.lookup_impl_witness.d31, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [concrete = constants.%facet_type.6d1] { +// CHECK:STDOUT: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: %impl.elem0.loc14_13: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] @@ -623,21 +628,21 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.938] // CHECK:STDOUT: %.loc14_13.2: type = converted %type.as.BitAndWith.impl.Op.call, %.loc14_13.1 [concrete = constants.%facet_type.938] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc14_23: %facet_type.938 = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc14_23: %facet_type.938 = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.680] // CHECK:STDOUT: %X.ref.loc14_23: %A.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.752] // CHECK:STDOUT: %.Self.as_type.loc14_23: type = facet_access_type %.Self.ref.loc14_23 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc14_23: type = converted %.Self.ref.loc14_23, %.Self.as_type.loc14_23 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc14_23: type = impl_witness_access constants.%A.lookup_impl_witness.878, element0 [symbolic_self = constants.%impl.elem0.c9d] // CHECK:STDOUT: %.loc14_29.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc14_29.2: type = converted %.loc14_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.Self.ref.loc14_35: %facet_type.938 = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc14_35: %facet_type.938 = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.680] // CHECK:STDOUT: %Y.ref: %B.assoc_type = name_ref Y, @Y.%assoc0 [concrete = constants.%assoc0.081] // CHECK:STDOUT: %.Self.as_type.loc14_35: type = facet_access_type %.Self.ref.loc14_35 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc14_35: type = converted %.Self.ref.loc14_35, %.Self.as_type.loc14_35 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc14_35: type = impl_witness_access constants.%B.lookup_impl_witness.a3c, element0 [symbolic_self = constants.%impl.elem0.7b2] // CHECK:STDOUT: %.loc14_41.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc14_41.2: type = converted %.loc14_41.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc14_17.2: type = where_expr %.Self [concrete = constants.%facet_type.6d1] { +// CHECK:STDOUT: %.loc14_17.2: type = where_expr %.Self.2 [concrete = constants.%facet_type.6d1] { // CHECK:STDOUT: requirement_base_facet_type constants.%facet_type.938 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc14_23, %.loc14_29.2 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc14_35, %.loc14_41.2 @@ -658,6 +663,7 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %.loc18_49: type = converted %AB.ref, %AB.as_type.loc18_49.2 [symbolic = %AB.as_type.loc18_49.1 (constants.%AB.as_type)] // CHECK:STDOUT: %impl.elem0.loc18_49: type = impl_witness_access constants.%B.lookup_impl_witness.fc8, element0 [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc18_17.1: type = splice_block %.loc18_17.2 [concrete = constants.%facet_type.6d1] { +// CHECK:STDOUT: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: %impl.elem0.loc18_13: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] @@ -666,21 +672,21 @@ fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { // CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.938] // CHECK:STDOUT: %.loc18_13.2: type = converted %type.as.BitAndWith.impl.Op.call, %.loc18_13.1 [concrete = constants.%facet_type.938] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc18_23: %facet_type.938 = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc18_23: %facet_type.938 = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.680] // CHECK:STDOUT: %X.ref: %A.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.752] // CHECK:STDOUT: %.Self.as_type.loc18_23: type = facet_access_type %.Self.ref.loc18_23 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc18_23: type = converted %.Self.ref.loc18_23, %.Self.as_type.loc18_23 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc18_23: type = impl_witness_access constants.%A.lookup_impl_witness.878, element0 [symbolic_self = constants.%impl.elem0.c9d] // CHECK:STDOUT: %.loc18_29.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc18_29.2: type = converted %.loc18_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.Self.ref.loc18_35: %facet_type.938 = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc18_35: %facet_type.938 = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.680] // CHECK:STDOUT: %Y.ref.loc18_35: %B.assoc_type = name_ref Y, @Y.%assoc0 [concrete = constants.%assoc0.081] // CHECK:STDOUT: %.Self.as_type.loc18_35: type = facet_access_type %.Self.ref.loc18_35 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc18_35: type = converted %.Self.ref.loc18_35, %.Self.as_type.loc18_35 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc18_35: type = impl_witness_access constants.%B.lookup_impl_witness.a3c, element0 [symbolic_self = constants.%impl.elem0.7b2] // CHECK:STDOUT: %.loc18_41.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc18_41.2: type = converted %.loc18_41.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc18_17.2: type = where_expr %.Self [concrete = constants.%facet_type.6d1] { +// CHECK:STDOUT: %.loc18_17.2: type = where_expr %.Self.2 [concrete = constants.%facet_type.6d1] { // CHECK:STDOUT: requirement_base_facet_type constants.%facet_type.938 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc18_23, %.loc18_29.2 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc18_35, %.loc18_41.2 diff --git a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon index 8ead5f2def7f..17277507cbd4 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -82,6 +82,7 @@ fn F() { // CHECK:STDOUT: %C.as.B.impl.BB.type: type = fn_type @C.as.B.impl.BB [concrete] // CHECK:STDOUT: %C.as.B.impl.BB: %C.as.B.impl.BB.type = struct_value () [concrete] // CHECK:STDOUT: %B.facet.82f: %B.type = facet_value %C, (%B.impl_witness) [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] @@ -174,6 +175,7 @@ fn F() { // CHECK:STDOUT: %t.param_patt: @G.%pattern_type (%pattern_type.9a0) = value_param_pattern %t.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc33_20.1: type = splice_block %.loc33_20.3 [concrete = constants.%facet_type.242] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %A.ref.loc33: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] // CHECK:STDOUT: %impl.elem0.loc33_12: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] diff --git a/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon b/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon index 7f3413b58b15..6234fdb29c40 100644 --- a/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon +++ b/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon @@ -40,6 +40,7 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %A: %Animal.type = bind_symbolic_name A, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3b0: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %WalkAnimal.type: type = fn_type @WalkAnimal [concrete] @@ -79,7 +80,10 @@ fn F() { // CHECK:STDOUT: %WalkAnimal.decl: %WalkAnimal.type = fn_decl @WalkAnimal [concrete = constants.%WalkAnimal] { // CHECK:STDOUT: %A.patt: %pattern_type.3b0 = symbolic_binding_pattern A, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc20: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %A.loc20_15.2: %Animal.type = bind_symbolic_name A, 0 [symbolic = %A.loc20_15.1 (constants.%A)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} diff --git a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon index 1f21ae250ec9..19d5a8ba978e 100644 --- a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon @@ -65,6 +65,7 @@ fn G() { // CHECK:STDOUT: --- generic_facet_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Scalar: type = bind_symbolic_name Scalar, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type.c21: type = generic_interface_type @Generic [concrete] @@ -144,6 +145,7 @@ fn G() { // CHECK:STDOUT: %Generic.decl: %Generic.type.c21 = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Scalar.loc4_19.2: type = bind_symbolic_name Scalar, 0 [symbolic = %Scalar.loc4_19.1 (constants.%Scalar)] // CHECK:STDOUT: } // CHECK:STDOUT: %GenericParam.decl: type = class_decl @GenericParam [concrete = constants.%GenericParam] {} {} @@ -160,8 +162,10 @@ fn G() { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %U.patt: @CallGenericMethod.%pattern_type (%pattern_type.80f) = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T)] // CHECK:STDOUT: %.loc15: type = splice_block %Generic.type.loc15_45.2 [symbolic = %Generic.type.loc15_45.1 (constants.%Generic.type.91ccba.2)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_22.2 [symbolic = %T.loc15_22.1 (constants.%T)] // CHECK:STDOUT: %Generic.type.loc15_45.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_45.1 (constants.%Generic.type.91ccba.2)] @@ -173,8 +177,10 @@ fn G() { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %U.patt: @PassThroughToGenericMethod.%pattern_type (%pattern_type.80f) = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc21_31.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_31.1 (constants.%T)] // CHECK:STDOUT: %.loc21: type = splice_block %Generic.type.loc21_54.2 [symbolic = %Generic.type.loc21_54.1 (constants.%Generic.type.91ccba.2)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] // CHECK:STDOUT: %T.ref.loc21: type = name_ref T, %T.loc21_31.2 [symbolic = %T.loc21_31.1 (constants.%T)] // CHECK:STDOUT: %Generic.type.loc21_54.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc21_54.1 (constants.%Generic.type.91ccba.2)] @@ -404,6 +410,7 @@ fn G() { // CHECK:STDOUT: --- generic_facet_type_from_implicit_param.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Scalar: type = bind_symbolic_name Scalar, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type.c21: type = generic_interface_type @Generic [concrete] @@ -479,6 +486,7 @@ fn G() { // CHECK:STDOUT: %Generic.decl: %Generic.type.c21 = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Scalar.loc4_19.2: type = bind_symbolic_name Scalar, 0 [symbolic = %Scalar.loc4_19.1 (constants.%Scalar)] // CHECK:STDOUT: } // CHECK:STDOUT: %GenericParam.decl: type = class_decl @GenericParam [concrete = constants.%GenericParam] {} {} @@ -497,8 +505,10 @@ fn G() { // CHECK:STDOUT: %t.patt: @CallGenericMethod.%pattern_type.loc15_48 (%pattern_type.7dc) = binding_pattern t [concrete] // CHECK:STDOUT: %t.param_patt: @CallGenericMethod.%pattern_type.loc15_48 (%pattern_type.7dc) = value_param_pattern %t.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T)] // CHECK:STDOUT: %.loc15: type = splice_block %Generic.type.loc15_45.2 [symbolic = %Generic.type.loc15_45.1 (constants.%Generic.type.91ccba.2)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] // CHECK:STDOUT: %T.ref.loc15_44: type = name_ref T, %T.loc15_22.2 [symbolic = %T.loc15_22.1 (constants.%T)] // CHECK:STDOUT: %Generic.type.loc15_45.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_45.1 (constants.%Generic.type.91ccba.2)] diff --git a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon index a989abda784b..0aeecce91c08 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon @@ -28,6 +28,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.fd4: %Animal.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3b0: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.fd4 [symbolic] @@ -79,7 +80,10 @@ fn F() { // CHECK:STDOUT: %a.patt: @WalkAnimal.%pattern_type (%pattern_type.36a) = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: @WalkAnimal.%pattern_type (%pattern_type.36a) = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc17_19: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc17_15.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T.fd4)] // CHECK:STDOUT: %a.param: @WalkAnimal.%T.as_type.loc17_30.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc17_30.1: type = splice_block %.loc17_30.2 [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] { diff --git a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon index b7396f978fd9..df245b880897 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon @@ -97,6 +97,7 @@ fn B() { // CHECK:STDOUT: --- convert_class_value_to_generic_facet_value_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Scalar: type = bind_symbolic_name Scalar, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type.c21: type = generic_interface_type @Generic [concrete] @@ -190,6 +191,7 @@ fn B() { // CHECK:STDOUT: %Generic.decl: %Generic.type.c21 = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Scalar.loc4_19.2: type = bind_symbolic_name Scalar, 0 [symbolic = %Scalar.loc4_19.1 (constants.%Scalar)] // CHECK:STDOUT: } // CHECK:STDOUT: %GenericParam.decl: type = class_decl @GenericParam [concrete = constants.%GenericParam] {} {} @@ -210,8 +212,10 @@ fn B() { // CHECK:STDOUT: %s.patt: @CallGenericMethod.%pattern_type.loc15_54 (%pattern_type.7dc) = binding_pattern s [concrete] // CHECK:STDOUT: %s.param_patt: @CallGenericMethod.%pattern_type.loc15_54 (%pattern_type.7dc) = value_param_pattern %s.patt, call_param1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T)] // CHECK:STDOUT: %.loc15_45: type = splice_block %Generic.type.loc15_45.2 [symbolic = %Generic.type.loc15_45.1 (constants.%Generic.type.91ccba.2)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] // CHECK:STDOUT: %T.ref.loc15_44: type = name_ref T, %T.loc15_22.2 [symbolic = %T.loc15_22.1 (constants.%T)] // CHECK:STDOUT: %Generic.type.loc15_45.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_45.1 (constants.%Generic.type.91ccba.2)] @@ -467,6 +471,7 @@ fn B() { // CHECK:STDOUT: --- multiple_generic_params_one_fixed_one_deduced.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %W: type = bind_symbolic_name W, 1 [symbolic] @@ -531,7 +536,9 @@ fn B() { // CHECK:STDOUT: %V.patt: %pattern_type.98f = symbolic_binding_pattern V, 0 [concrete] // CHECK:STDOUT: %W.patt: %pattern_type.98f = symbolic_binding_pattern W, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %V.loc3_13.2: type = bind_symbolic_name V, 0 [symbolic = %V.loc3_13.1 (constants.%V)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %W.loc3_23.2: type = bind_symbolic_name W, 1 [symbolic = %W.loc3_23.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -544,6 +551,7 @@ fn B() { // CHECK:STDOUT: %.loc7_35: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc7_36: type = converted %.loc7_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.type.loc7_36.1: type = facet_type <@I, @I(constants.%T.8b3, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.bea)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete] @@ -554,6 +562,7 @@ fn B() { // CHECK:STDOUT: %t.param_patt: @A.%pattern_type (%pattern_type.3ff) = value_param_pattern %t.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_18.1: type = splice_block %I.type [concrete = constants.%I.type.202] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %.loc9_13: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_17: %empty_tuple.type = tuple_literal () @@ -727,6 +736,7 @@ fn B() { // CHECK:STDOUT: --- fail_mismatch_impl_constraint_with_fixed_specific.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %W: type = bind_symbolic_name W, 1 [symbolic] @@ -785,7 +795,9 @@ fn B() { // CHECK:STDOUT: %V.patt: %pattern_type.98f = symbolic_binding_pattern V, 0 [concrete] // CHECK:STDOUT: %W.patt: %pattern_type.98f = symbolic_binding_pattern W, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %V.loc3_13.2: type = bind_symbolic_name V, 0 [symbolic = %V.loc3_13.1 (constants.%V)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %W.loc3_23.2: type = bind_symbolic_name W, 1 [symbolic = %W.loc3_23.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -798,6 +810,7 @@ fn B() { // CHECK:STDOUT: %.loc7_35: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc7_36: type = converted %.loc7_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.type.loc7_36.1: type = facet_type <@I, @I(constants.%T.8b3, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.bea)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete] @@ -808,6 +821,7 @@ fn B() { // CHECK:STDOUT: %t.param_patt: @A.%pattern_type (%pattern_type.f1c) = value_param_pattern %t.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_18.1: type = splice_block %I.type [concrete = constants.%I.type.906] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %.loc9_13: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_17: %empty_struct_type = struct_literal () @@ -954,6 +968,7 @@ fn B() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %W: type = bind_symbolic_name W, 1 [symbolic] @@ -1015,7 +1030,9 @@ fn B() { // CHECK:STDOUT: %V.patt: %pattern_type.98f = symbolic_binding_pattern V, 0 [concrete] // CHECK:STDOUT: %W.patt: %pattern_type.98f = symbolic_binding_pattern W, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %V.loc5_9.2: type = bind_symbolic_name V, 0 [symbolic = %V.loc5_9.1 (constants.%V)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %W.loc5_19.2: type = bind_symbolic_name W, 1 [symbolic = %W.loc5_19.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] { @@ -1027,6 +1044,7 @@ fn B() { // CHECK:STDOUT: %.loc7_31: type = converted %.loc7_30, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %C.loc7_31.1: type = class_type @C, @C(constants.%T.8b3, constants.%empty_tuple.type) [symbolic = %C.loc7_31.2 (constants.%C.463)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete] @@ -1036,7 +1054,10 @@ fn B() { // CHECK:STDOUT: %t.patt: @A.%pattern_type (%pattern_type.6de) = binding_pattern t [concrete] // CHECK:STDOUT: %t.param_patt: @A.%pattern_type (%pattern_type.6de) = value_param_pattern %t.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc9_10: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_6.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.1 (constants.%T.826)] // CHECK:STDOUT: %t.param: @A.%T.as_type.loc9_16.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [symbolic = %T.as_type.loc9_16.1 (constants.%T.as_type)] { diff --git a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon index cc779b1c8cbc..dfed68aecd33 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon @@ -79,6 +79,7 @@ fn F() { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] // CHECK:STDOUT: %Eats.impl_witness: = impl_witness file.%Eats.impl_witness_table [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %e: %Eats.type = bind_symbolic_name e, 0 [symbolic] // CHECK:STDOUT: %pattern_type.a05: type = pattern_type %Eats.type [concrete] // CHECK:STDOUT: %Feed.type: type = fn_type @Feed [concrete] @@ -127,7 +128,10 @@ fn F() { // CHECK:STDOUT: %Feed.decl: %Feed.type = fn_decl @Feed [concrete = constants.%Feed] { // CHECK:STDOUT: %e.patt: %pattern_type.a05 = symbolic_binding_pattern e, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] +// CHECK:STDOUT: %.loc11: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %e.loc11_9.2: %Eats.type = bind_symbolic_name e, 0 [symbolic = %e.loc11_9.1 (constants.%e)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon index aa18bc9b335b..6adc10a656ef 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon @@ -30,6 +30,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %Animal.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3b0: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %FeedAnimal.type: type = fn_type @FeedAnimal [concrete] @@ -79,13 +80,19 @@ fn F() { // CHECK:STDOUT: %FeedAnimal.decl: %FeedAnimal.type = fn_decl @FeedAnimal [concrete = constants.%FeedAnimal] { // CHECK:STDOUT: %T.patt: %pattern_type.3b0 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc17: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc17_15.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %HandleAnimal.decl: %HandleAnimal.type = fn_decl @HandleAnimal [concrete = constants.%HandleAnimal] { // CHECK:STDOUT: %T.patt: %pattern_type.3b0 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc19: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc19_17.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc19_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Goat.decl: type = class_decl @Goat [concrete = constants.%Goat] {} {} diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon index f281e298611e..996adf06a0bf 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon @@ -96,6 +96,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Self.1b5: %Eats.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %Eats.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.a05: type = pattern_type %Eats.type [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] @@ -154,7 +155,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %e.patt: @Feed.%pattern_type (%pattern_type.2b4) = binding_pattern e [concrete] // CHECK:STDOUT: %e.param_patt: @Feed.%pattern_type (%pattern_type.2b4) = value_param_pattern %e.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] +// CHECK:STDOUT: %.loc6_13: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_9.2: %Eats.type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T)] // CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc6_22.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc6_22.1: type = splice_block %.loc6_22.2 [symbolic = %T.as_type.loc6_22.1 (constants.%T.as_type)] { @@ -170,6 +174,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %a.param_patt: @HandleAnimal.%pattern_type (%pattern_type.56f) = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] @@ -274,6 +279,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Tame.type: type = facet_type <@Tame> [concrete] // CHECK:STDOUT: %Self.7ee: %Tame.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] @@ -340,6 +346,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %v.param_patt: @FeedTame.%pattern_type (%pattern_type.760) = value_param_pattern %v.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc7_22.1: type = splice_block %.loc7_22.3 [concrete = constants.%facet_type.6ff] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] @@ -363,6 +370,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %w.param_patt: @HandleTameAnimal.%pattern_type (%pattern_type.002) = value_param_pattern %w.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_39.1: type = splice_block %.loc9_39.3 [concrete = constants.%facet_type.a95] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %impl.elem0.loc9_30: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] @@ -482,6 +490,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Tame.type: type = facet_type <@Tame> [concrete] // CHECK:STDOUT: %Self.7ee: %Tame.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %A: %Animal.type = bind_symbolic_name A, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3b0: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %A.as_type: type = facet_access_type %A [symbolic] @@ -552,9 +561,12 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %Animal.type = name_ref A, %A.loc7_14.1 [symbolic = %A.loc7_14.2 (constants.%A)] // CHECK:STDOUT: %A.as_type.loc7_26.1: type = facet_access_type %A.ref [symbolic = %A.as_type.loc7_26.2 (constants.%A.as_type)] -// CHECK:STDOUT: %.loc7: type = converted %A.ref, %A.as_type.loc7_26.1 [symbolic = %A.as_type.loc7_26.2 (constants.%A.as_type)] +// CHECK:STDOUT: %.loc7_26: type = converted %A.ref, %A.as_type.loc7_26.1 [symbolic = %A.as_type.loc7_26.2 (constants.%A.as_type)] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc7_18: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %A.loc7_14.1: %Animal.type = bind_symbolic_name A, 0 [symbolic = %A.loc7_14.2 (constants.%A)] // CHECK:STDOUT: } // CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @A.as_type.as.Eats.impl [concrete] @@ -565,6 +577,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %v.param_patt: @FeedTame2.%pattern_type (%pattern_type.760) = value_param_pattern %v.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.3 [concrete = constants.%facet_type.6ff] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] @@ -588,6 +601,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %w.param_patt: @HandleTameAnimal2.%pattern_type (%pattern_type.5d1) = value_param_pattern %w.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc11_33.1: type = splice_block %.loc11_33.3 [concrete = constants.%facet_type.65c] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] @@ -638,7 +652,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc7 as %Eats.ref { +// CHECK:STDOUT: impl: %.loc7_26 as %Eats.ref { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%Eats.impl_witness // CHECK:STDOUT: } @@ -734,6 +748,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %A.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.a2b: type = pattern_type %A.type [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] @@ -742,8 +757,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %TakesA: %TakesA.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.cf45b7.1: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %.Self: %A.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] +// CHECK:STDOUT: %.Self.3ca: %A.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.3ca [symbolic_self] // CHECK:STDOUT: %U: %A.type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.as_type: type = facet_access_type %U [symbolic] // CHECK:STDOUT: %pattern_type.f9844e.2: type = pattern_type %U.as_type [symbolic] @@ -774,7 +789,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %x.patt: @TakesA.%pattern_type (%pattern_type.f9844e.1) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @TakesA.%pattern_type (%pattern_type.f9844e.1) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] +// CHECK:STDOUT: %.loc7_15: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_11.2: %A.type = bind_symbolic_name T, 0 [symbolic = %T.loc7_11.1 (constants.%T)] // CHECK:STDOUT: %x.param: @TakesA.%T.as_type.loc7_21.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc7_21.1: type = splice_block %.loc7_21.2 [symbolic = %T.as_type.loc7_21.1 (constants.%T.as_type)] { @@ -790,12 +808,13 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %y.param_patt: @WithExtraWhere.%pattern_type (%pattern_type.f9844e.2) = value_param_pattern %y.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_25.1: type = splice_block %.loc9_25.2 [concrete = constants.%A.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %.Self: %A.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %A.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: %A.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.3ca] +// CHECK:STDOUT: %.Self.ref: %A.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.3ca] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_31: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc9_25.2: type = where_expr %.Self [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc9_25.2: type = where_expr %.Self.2 [concrete = constants.%A.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%A.type // CHECK:STDOUT: requirement_impls %.loc9_31, type // CHECK:STDOUT: } @@ -878,6 +897,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: --- no_interfaces_success.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] @@ -885,7 +905,6 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %TakesTypeDeduced: %TakesTypeDeduced.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.4ae: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %U: %type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.d06: type = pattern_type %type [concrete] @@ -923,6 +942,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %x.patt: @TakesTypeDeduced.%pattern_type (%pattern_type.7dc) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @TakesTypeDeduced.%pattern_type (%pattern_type.7dc) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc3_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_21.1 (constants.%T)] // CHECK:STDOUT: %x.param: @TakesTypeDeduced.%T.loc3_21.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc3_21.2 [symbolic = %T.loc3_21.1 (constants.%T)] @@ -934,9 +954,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %y.param_patt: @CallsWithExtraWhere.%pattern_type (%pattern_type.772) = value_param_pattern %y.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_33.1: type = splice_block %.loc4_33.2 [concrete = constants.%type] { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.loc4_33.2: type = where_expr %.Self [concrete = constants.%type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.loc4_33.2: type = where_expr %.Self.2 [concrete = constants.%type] { // CHECK:STDOUT: requirement_base_facet_type type // CHECK:STDOUT: requirement_impls %.Self.ref, type // CHECK:STDOUT: } @@ -953,15 +974,17 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %TakesTypeExplicit.decl: %TakesTypeExplicit.type = fn_decl @TakesTypeExplicit [concrete = constants.%TakesTypeExplicit] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_22.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallsWithExtraWhereExplicit.decl: %CallsWithExtraWhereExplicit.type = fn_decl @CallsWithExtraWhereExplicit [concrete = constants.%CallsWithExtraWhereExplicit] { // CHECK:STDOUT: %U.patt: %pattern_type.d06 = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_41.1: type = splice_block %.loc9_41.2 [concrete = constants.%type] { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.loc9_41.2: type = where_expr %.Self [concrete = constants.%type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.loc9_41.2: type = where_expr %.Self.2 [concrete = constants.%type] { // CHECK:STDOUT: requirement_base_facet_type type // CHECK:STDOUT: requirement_impls %.Self.ref, type // CHECK:STDOUT: } @@ -1115,9 +1138,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %x.param_patt: @TakesExtraWhereDeduced.%pattern_type (%pattern_type.772) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc3_36.1: type = splice_block %.loc3_36.2 [concrete = constants.%type] { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.loc3_36.2: type = where_expr %.Self [concrete = constants.%type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.loc3_36.2: type = where_expr %.Self.2 [concrete = constants.%type] { // CHECK:STDOUT: requirement_base_facet_type type // CHECK:STDOUT: requirement_impls %.Self.ref, type // CHECK:STDOUT: } @@ -1136,6 +1160,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %y.patt: @CallsWithType.%pattern_type (%pattern_type.7dc) = binding_pattern y [concrete] // CHECK:STDOUT: %y.param_patt: @CallsWithType.%pattern_type (%pattern_type.7dc) = value_param_pattern %y.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc4_18.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc4_18.1 (constants.%U)] // CHECK:STDOUT: %y.param: @CallsWithType.%U.loc4_18.1 (%U) = value_param call_param0 // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc4_18.2 [symbolic = %U.loc4_18.1 (constants.%U)] @@ -1145,9 +1170,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %T.patt: %pattern_type.d06 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8_37.1: type = splice_block %.loc8_37.2 [concrete = constants.%type] { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.loc8_37.2: type = where_expr %.Self [concrete = constants.%type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.loc8_37.2: type = where_expr %.Self.2 [concrete = constants.%type] { // CHECK:STDOUT: requirement_base_facet_type type // CHECK:STDOUT: requirement_impls %.Self.ref, type // CHECK:STDOUT: } @@ -1157,6 +1183,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %CallsWithTypeExplicit.decl: %CallsWithTypeExplicit.type = fn_decl @CallsWithTypeExplicit [concrete = constants.%CallsWithTypeExplicit] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc9_26.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc9_26.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon index 7606a3ad0dae..d778ab890b1d 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon @@ -28,6 +28,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %Self.1b5: %Eats.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %A: %Animal.type = bind_symbolic_name A, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3b0: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %A.as_type: type = facet_access_type %A [symbolic] @@ -75,9 +76,12 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %Animal.type = name_ref A, %A.loc18_14.1 [symbolic = %A.loc18_14.2 (constants.%A)] // CHECK:STDOUT: %A.as_type.loc18_26.1: type = facet_access_type %A.ref [symbolic = %A.as_type.loc18_26.2 (constants.%A.as_type)] -// CHECK:STDOUT: %.loc18: type = converted %A.ref, %A.as_type.loc18_26.1 [symbolic = %A.as_type.loc18_26.2 (constants.%A.as_type)] +// CHECK:STDOUT: %.loc18_26: type = converted %A.ref, %A.as_type.loc18_26.1 [symbolic = %A.as_type.loc18_26.2 (constants.%A.as_type)] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc18_18: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %A.loc18_14.1: %Animal.type = bind_symbolic_name A, 0 [symbolic = %A.loc18_14.2 (constants.%A)] // CHECK:STDOUT: } // CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @A.as_type.as.Eats.impl [concrete] @@ -87,7 +91,10 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %e.patt: @Feed.%pattern_type (%pattern_type.2b4) = binding_pattern e [concrete] // CHECK:STDOUT: %e.param_patt: @Feed.%pattern_type (%pattern_type.2b4) = value_param_pattern %e.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] +// CHECK:STDOUT: %.loc20_13: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc20_9.2: %Eats.type = bind_symbolic_name T, 0 [symbolic = %T.loc20_9.1 (constants.%T.1b5)] // CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc20_22.1 (%T.as_type.27d) = value_param call_param0 // CHECK:STDOUT: %.loc20_22.1: type = splice_block %.loc20_22.2 [symbolic = %T.as_type.loc20_22.1 (constants.%T.as_type.27d)] { @@ -102,7 +109,10 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %a.patt: @HandleAnimal.%pattern_type (%pattern_type.36a) = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: @HandleAnimal.%pattern_type (%pattern_type.36a) = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc22_21: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc22_17.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc22_17.1 (constants.%T.fd4)] // CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc22_32.1 (%T.as_type.2ad) = value_param call_param0 // CHECK:STDOUT: %.loc22_32.1: type = splice_block %.loc22_32.2 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.2ad)] { @@ -137,7 +147,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc18 as %Eats.ref { +// CHECK:STDOUT: impl: %.loc18_26 as %Eats.ref { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%Eats.impl_witness // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon index 2dbe54c448c7..79d16f8478c9 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon @@ -54,6 +54,7 @@ fn F() { // CHECK:STDOUT: %Edible.impl_witness: = impl_witness file.%Edible.impl_witness_table [concrete] // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Food.8b3: type = bind_symbolic_name Food, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Eats.type.ba2: type = generic_interface_type @Eats [concrete] @@ -156,6 +157,7 @@ fn F() { // CHECK:STDOUT: %Eats.decl: %Eats.type.ba2 = interface_decl @Eats [concrete = constants.%Eats.generic] { // CHECK:STDOUT: %Food.patt: %pattern_type.98f = symbolic_binding_pattern Food, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Food.loc21_16.2: type = bind_symbolic_name Food, 0 [symbolic = %Food.loc21_16.1 (constants.%Food.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @T.as_type.as.Eats.impl [concrete] { @@ -170,9 +172,15 @@ fn F() { // CHECK:STDOUT: %U.as_type.loc26_49.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc26_49.2 (constants.%U.as_type)] // CHECK:STDOUT: %.loc26_49: type = converted %U.ref, %U.as_type.loc26_49.1 [symbolic = %U.as_type.loc26_49.2 (constants.%U.as_type)] // CHECK:STDOUT: %Eats.type.loc26_49.1: type = facet_type <@Eats, @Eats(constants.%U.as_type)> [symbolic = %Eats.type.loc26_49.2 (constants.%Eats.type.f54c3d.1)] -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc26_18: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc26_14.1: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T.fd4)] -// CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] +// CHECK:STDOUT: %.loc26_30: type = splice_block %Edible.ref [concrete = constants.%Edible.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc26_26.1: %Edible.type = bind_symbolic_name U, 1 [symbolic = %U.loc26_26.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @T.as_type.as.Eats.impl [concrete] @@ -192,9 +200,13 @@ fn F() { // CHECK:STDOUT: %food.patt: @Feed.%pattern_type.loc31_46 (%pattern_type.54f) = binding_pattern food [concrete] // CHECK:STDOUT: %food.param_patt: @Feed.%pattern_type.loc31_46 (%pattern_type.54f) = value_param_pattern %food.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] +// CHECK:STDOUT: %.loc31_16: type = splice_block %Edible.ref [concrete = constants.%Edible.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %Food.loc31_9.2: %Edible.type = bind_symbolic_name Food, 0 [symbolic = %Food.loc31_9.1 (constants.%Food.9af)] // CHECK:STDOUT: %.loc31_37.1: type = splice_block %Eats.type.loc31_37.2 [symbolic = %Eats.type.loc31_37.1 (constants.%Eats.type.b39)] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Eats.ref: %Eats.type.ba2 = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.generic] // CHECK:STDOUT: %Food.ref.loc31_33: %Edible.type = name_ref Food, %Food.loc31_9.2 [symbolic = %Food.loc31_9.1 (constants.%Food.9af)] // CHECK:STDOUT: %Food.as_type.loc31_37.2: type = facet_access_type %Food.ref.loc31_33 [symbolic = %Food.as_type.loc31_37.1 (constants.%Food.as_type.952)] @@ -225,9 +237,15 @@ fn F() { // CHECK:STDOUT: %food.patt: @HandleAnimal.%pattern_type.loc32_50 (%pattern_type.f86) = binding_pattern food [concrete] // CHECK:STDOUT: %food.param_patt: @HandleAnimal.%pattern_type.loc32_50 (%pattern_type.f86) = value_param_pattern %food.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc32_21: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc32_17.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc32_17.1 (constants.%T.fd4)] -// CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] +// CHECK:STDOUT: %.loc32_36: type = splice_block %Edible.ref [concrete = constants.%Edible.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %Food.loc32_29.2: %Edible.type = bind_symbolic_name Food, 1 [symbolic = %Food.loc32_29.1 (constants.%Food.5fe)] // CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc32_47.1 (%T.as_type.2ad) = value_param call_param0 // CHECK:STDOUT: %.loc32_47.1: type = splice_block %.loc32_47.2 [symbolic = %T.as_type.loc32_47.1 (constants.%T.as_type.2ad)] { diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon index ebbeb5dae8c5..2ffd17e09252 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon @@ -30,6 +30,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.fd4: %Animal.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3b0: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.fd4 [symbolic] @@ -86,7 +87,10 @@ fn F() { // CHECK:STDOUT: %a.patt: @FeedAnimal.%pattern_type (%pattern_type.36a) = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: @FeedAnimal.%pattern_type (%pattern_type.36a) = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc17_19: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc17_15.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_15.1 (constants.%T.fd4)] // CHECK:STDOUT: %a.param: @FeedAnimal.%T.as_type.loc17_30.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc17_30.1: type = splice_block %.loc17_30.2 [symbolic = %T.as_type.loc17_30.1 (constants.%T.as_type)] { @@ -101,7 +105,10 @@ fn F() { // CHECK:STDOUT: %a.patt: @HandleAnimal.%pattern_type (%pattern_type.36a) = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: @HandleAnimal.%pattern_type (%pattern_type.36a) = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc19_21: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc19_17.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc19_17.1 (constants.%T.fd4)] // CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc19_32.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc19_32.1: type = splice_block %.loc19_32.2 [symbolic = %T.as_type.loc19_32.1 (constants.%T.as_type)] { diff --git a/toolchain/check/testdata/facet/facet_assoc_const.carbon b/toolchain/check/testdata/facet/facet_assoc_const.carbon index cc40490ff523..60426e79af41 100644 --- a/toolchain/check/testdata/facet/facet_assoc_const.carbon +++ b/toolchain/check/testdata/facet/facet_assoc_const.carbon @@ -664,9 +664,9 @@ fn F(T:! I & J where .I1 = .J1.I2) {} // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%X [concrete] // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%Y [concrete] // CHECK:STDOUT: %assoc2: %M.assoc_type = assoc_entity element2, @M.%Z [concrete] -// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self, @M [symbolic_self] +// CHECK:STDOUT: %.Self.a61: %M.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.a61 [symbolic_self] +// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self.a61, @M [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %impl.elem1: type = impl_witness_access %M.lookup_impl_witness, element1 [symbolic_self] // CHECK:STDOUT: %impl.elem2: type = impl_witness_access %M.lookup_impl_witness, element2 [symbolic_self] @@ -683,37 +683,38 @@ fn F(T:! I & J where .I1 = .J1.I2) {} // CHECK:STDOUT: %T.patt: = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc13_12.1: type = splice_block %.loc13_12.2 [concrete = ] { +// CHECK:STDOUT: // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc13_18: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_18: %M.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %X.ref.loc13_18: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_18: type = facet_access_type %.Self.ref.loc13_18 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_18: type = converted %.Self.ref.loc13_18, %.Self.as_type.loc13_18 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc13_18: type = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] -// CHECK:STDOUT: %.Self.ref.loc13_23: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_23: %M.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %Y.ref.loc13_23: %M.assoc_type = name_ref Y, @Y.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc13_23: type = facet_access_type %.Self.ref.loc13_23 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_23: type = converted %.Self.ref.loc13_23, %.Self.as_type.loc13_23 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem1.loc13_23: type = impl_witness_access constants.%M.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] -// CHECK:STDOUT: %.Self.ref.loc13_30: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_30: %M.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %Y.ref.loc13_30: %M.assoc_type = name_ref Y, @Y.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc13_30: type = facet_access_type %.Self.ref.loc13_30 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_30: type = converted %.Self.ref.loc13_30, %.Self.as_type.loc13_30 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem1.loc13_30: type = impl_witness_access constants.%M.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] -// CHECK:STDOUT: %.Self.ref.loc13_35: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_35: %M.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %X.ref.loc13_35: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_35: type = facet_access_type %.Self.ref.loc13_35 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_35: type = converted %.Self.ref.loc13_35, %.Self.as_type.loc13_35 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc13_35: type = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc13_35, %impl.elem1.loc13_23 [symbolic_self = constants.%impl.elem1] -// CHECK:STDOUT: %.Self.ref.loc13_42: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_42: %M.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc2 [concrete = constants.%assoc2] // CHECK:STDOUT: %.Self.as_type.loc13_42: type = facet_access_type %.Self.ref.loc13_42 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_42: type = converted %.Self.ref.loc13_42, %.Self.as_type.loc13_42 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem2: type = impl_witness_access constants.%M.lookup_impl_witness, element2 [symbolic_self = constants.%impl.elem2] // CHECK:STDOUT: %.loc13_48.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc13_48.2: type = converted %.loc13_48.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc13_12.2: type = where_expr %.Self [concrete = ] { +// CHECK:STDOUT: %.loc13_12.2: type = where_expr %.Self.2 [concrete = ] { // CHECK:STDOUT: requirement_base_facet_type constants.%M.type // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc13_18, %impl.elem1.loc13_23 // CHECK:STDOUT: requirement_rewrite %impl.elem1.loc13_30, %impl.elem0.subst diff --git a/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon index 60c4cb42a23a..9060d28ddf0a 100644 --- a/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon @@ -40,6 +40,7 @@ fn G() { // CHECK:STDOUT: --- fail_convert_class_type_to_generic_facet_value.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Scalar: type = bind_symbolic_name Scalar, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type.c21: type = generic_interface_type @Generic [concrete] @@ -115,6 +116,7 @@ fn G() { // CHECK:STDOUT: %Generic.decl: %Generic.type.c21 = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Scalar.loc15_19.2: type = bind_symbolic_name Scalar, 0 [symbolic = %Scalar.loc15_19.1 (constants.%Scalar)] // CHECK:STDOUT: } // CHECK:STDOUT: %GenericParam.decl: type = class_decl @GenericParam [concrete = constants.%GenericParam] {} {} @@ -132,8 +134,10 @@ fn G() { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %U.patt: @CallGenericMethod.%pattern_type (%pattern_type.80f) = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc27_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc27_22.1 (constants.%T)] // CHECK:STDOUT: %.loc27: type = splice_block %Generic.type.loc27_45.2 [symbolic = %Generic.type.loc27_45.1 (constants.%Generic.type.91ccba.2)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc27_22.2 [symbolic = %T.loc27_22.1 (constants.%T)] // CHECK:STDOUT: %Generic.type.loc27_45.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc27_45.1 (constants.%Generic.type.91ccba.2)] diff --git a/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon b/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon index 36f2cf1f7e74..08ad572c1912 100644 --- a/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon +++ b/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon @@ -33,6 +33,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %Self.1b5: %Eats.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.fd4: %Animal.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.1b5: %Eats.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.a05: type = pattern_type %Eats.type [concrete] // CHECK:STDOUT: %T.as_type.27d: type = facet_access_type %T.1b5 [symbolic] @@ -72,7 +73,10 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %e.patt: @Feed.%pattern_type (%pattern_type.2b4) = binding_pattern e [concrete] // CHECK:STDOUT: %e.param_patt: @Feed.%pattern_type (%pattern_type.2b4) = value_param_pattern %e.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] +// CHECK:STDOUT: %.loc18_13: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc18_9.2: %Eats.type = bind_symbolic_name T, 0 [symbolic = %T.loc18_9.1 (constants.%T.1b5)] // CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc18_22.1 (%T.as_type.27d) = value_param call_param0 // CHECK:STDOUT: %.loc18_22.1: type = splice_block %.loc18_22.2 [symbolic = %T.as_type.loc18_22.1 (constants.%T.as_type.27d)] { @@ -87,7 +91,10 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %a.patt: @HandleAnimal.%pattern_type (%pattern_type.36a) = binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: @HandleAnimal.%pattern_type (%pattern_type.36a) = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc27_21: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc27_17.2: %Animal.type = bind_symbolic_name T, 0 [symbolic = %T.loc27_17.1 (constants.%T.fd4)] // CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc27_32.1 (%T.as_type.2ad) = value_param call_param0 // CHECK:STDOUT: %.loc27_32.1: type = splice_block %.loc27_32.2 [symbolic = %T.as_type.loc27_32.1 (constants.%T.as_type.2ad)] { diff --git a/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon b/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon index 4586533b7ae0..bb8c44624cd4 100644 --- a/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon +++ b/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon @@ -47,6 +47,7 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness file.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %Animal.type = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3b0: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %WalkAnimal.type: type = fn_type @WalkAnimal [concrete] @@ -86,7 +87,10 @@ fn F() { // CHECK:STDOUT: %WalkAnimal.decl: %WalkAnimal.type = fn_decl @WalkAnimal [concrete = constants.%WalkAnimal] { // CHECK:STDOUT: %a.patt: %pattern_type.3b0 = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: %.loc20: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc20_15.2: %Animal.type = bind_symbolic_name a, 0 [symbolic = %a.loc20_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} @@ -152,6 +156,7 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.98f = symbolic_binding_pattern x, 0 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %Goat.ref: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %x: type = bind_symbolic_name x, 0, %Goat.ref [symbolic = constants.%x] // CHECK:STDOUT: %WalkAnimal.ref: %WalkAnimal.type = name_ref WalkAnimal, file.%WalkAnimal.decl [concrete = constants.%WalkAnimal] // CHECK:STDOUT: %x.ref: type = name_ref x, %x [symbolic = constants.%x] diff --git a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon index 28f86b74642f..ed9a50058222 100644 --- a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon +++ b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon @@ -44,6 +44,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: --- fail_deduction_uses_runtime_type_conversion.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %tuple.type: type = tuple_type (type) [concrete] // CHECK:STDOUT: %T.6eb: %tuple.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f1e: type = pattern_type %tuple.type [concrete] @@ -127,6 +128,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %T.patt: %pattern_type.f1e = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc17_28.1: type = splice_block %.loc17_28.3 [concrete = constants.%tuple.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc17_28.2: %tuple.type = tuple_literal (type) // CHECK:STDOUT: %.loc17_28.3: type = converted %.loc17_28.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } @@ -150,11 +152,13 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %x.param_patt: @F.%pattern_type.loc27_29 (%pattern_type.ec6) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc27_17.1: type = splice_block %.loc27_17.3 [concrete = constants.%tuple.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc27_17.2: %tuple.type = tuple_literal (type) // CHECK:STDOUT: %.loc27_17.3: type = converted %.loc27_17.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc27_6.2: %tuple.type = bind_symbolic_name T, 0 [symbolic = %T.loc27_6.1 (constants.%T.6eb)] // CHECK:STDOUT: %.loc27_25: type = splice_block %tuple.elem0.loc27_25.2 [symbolic = %tuple.elem0.loc27_25.1 (constants.%tuple.elem0)] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.ref.loc27_24: %tuple.type = name_ref T, %T.loc27_6.2 [symbolic = %T.loc27_6.1 (constants.%T.6eb)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc27_25.2: type = tuple_access %T.ref.loc27_24, element0 [symbolic = %tuple.elem0.loc27_25.1 (constants.%tuple.elem0)] @@ -360,7 +364,10 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) { // CHECK:STDOUT: %.loc30_36.3: init %RuntimeConvertFrom = class_init (), %.loc30_36.2 [concrete = constants.%RuntimeConvertFrom.val] // CHECK:STDOUT: %.loc30_36.4: ref %RuntimeConvertFrom = temporary %.loc30_36.2, %.loc30_36.3 // CHECK:STDOUT: %.loc30_38.1: ref %RuntimeConvertFrom = converted %.loc30_36.1, %.loc30_36.4 -// CHECK:STDOUT: %RuntimeConvertFrom.ref.loc30_14: type = name_ref RuntimeConvertFrom, file.%RuntimeConvertFrom.decl [concrete = constants.%RuntimeConvertFrom] +// CHECK:STDOUT: %.loc30_14: type = splice_block %RuntimeConvertFrom.ref.loc30_14 [concrete = constants.%RuntimeConvertFrom] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %RuntimeConvertFrom.ref.loc30_14: type = name_ref RuntimeConvertFrom, file.%RuntimeConvertFrom.decl [concrete = constants.%RuntimeConvertFrom] +// CHECK:STDOUT: } // CHECK:STDOUT: %.loc30_38.2: %RuntimeConvertFrom = bind_value %.loc30_38.1 // CHECK:STDOUT: %from: %RuntimeConvertFrom = bind_symbolic_name from, 0, %.loc30_38.2 [symbolic = constants.%from] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] diff --git a/toolchain/check/testdata/facet/fail_todo_self_in_interface_param.carbon b/toolchain/check/testdata/facet/fail_todo_self_in_interface_param.carbon deleted file mode 100644 index e2ebfd0436b6..000000000000 --- a/toolchain/check/testdata/facet/fail_todo_self_in_interface_param.carbon +++ /dev/null @@ -1,25 +0,0 @@ -// 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/none.carbon -// -// AUTOUPDATE -// TIP: To test this file alone, run: -// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/facet/fail_todo_self_in_interface_param.carbon -// TIP: To dump output, run: -// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/facet/fail_todo_self_in_interface_param.carbon - -interface I(T:! type) { - let I1:! type; -} - -// @dump-sem-ir-begin -// CHECK:STDERR: fail_todo_self_in_interface_param.carbon:[[@LINE+4]]:12: error: name `.Self` not found [NameNotFound] -// CHECK:STDERR: fn F(T:! I(.Self) where .I1 = ()) -> T.I1 { -// CHECK:STDERR: ^~~~~ -// CHECK:STDERR: -fn F(T:! I(.Self) where .I1 = ()) -> T.I1 { - return (); -} -// @dump-sem-ir-end diff --git a/toolchain/check/testdata/facet/self_in_interface_param.carbon b/toolchain/check/testdata/facet/self_in_interface_param.carbon new file mode 100644 index 000000000000..e50e6a442d9a --- /dev/null +++ b/toolchain/check/testdata/facet/self_in_interface_param.carbon @@ -0,0 +1,108 @@ +// 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/none.carbon +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/facet/self_in_interface_param.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/facet/self_in_interface_param.carbon + +interface I(T:! type) { + let I1:! type; +} + +//@dump-sem-ir-begin +fn F(T:! I(.Self) where .I1 = ()) -> T.I1 { + return (); +} +//@dump-sem-ir-end + +fn G(_:! I(.Self) where .I1 = ()) {} + +// CHECK:STDOUT: --- self_in_interface_param.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [concrete] +// CHECK:STDOUT: %I.type.962: type = facet_type <@I, @I(%.Self.644)> [symbolic_self] +// CHECK:STDOUT: %.Self.50d: %I.type.962 = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %I.assoc_type.180: type = assoc_entity_type @I, @I(%.Self.644) [symbolic_self] +// CHECK:STDOUT: %assoc0.357: %I.assoc_type.180 = assoc_entity element0, @I.%I1 [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.50d [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness.aee: = lookup_impl_witness %.Self.50d, @I, @I(%.Self.644) [symbolic_self] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness.aee, element0 [symbolic_self] +// CHECK:STDOUT: %I_where.type: type = facet_type <@I, @I(%.Self.644) where %impl.elem0 = %empty_tuple.type> [symbolic_self] +// CHECK:STDOUT: %T.735: %I_where.type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.3cf: type = pattern_type %I_where.type [symbolic_self] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.735 [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness.262: = lookup_impl_witness %T.735, @I, @I(%.Self.644) [symbolic] +// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] +// CHECK:STDOUT: %F.type: type = fn_type @F [concrete] +// CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { +// CHECK:STDOUT: %T.patt: %pattern_type.3cf = symbolic_binding_pattern T, 0 [concrete] +// 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: %T.ref: %I_where.type = name_ref T, %T.loc18_6.2 [symbolic = %T.loc18_6.1 (constants.%T.735)] +// CHECK:STDOUT: %.loc18_39.1: %I.assoc_type.180 = specific_constant @I1.%assoc0, @I(constants.%.Self.644) [symbolic_self = constants.%assoc0.357] +// CHECK:STDOUT: %I1.ref.loc18_39: %I.assoc_type.180 = name_ref I1, %.loc18_39.1 [symbolic_self = constants.%assoc0.357] +// CHECK:STDOUT: %T.as_type.loc18_39.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_39.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc18_39.2: type = converted %T.ref, %T.as_type.loc18_39.2 [symbolic = %T.as_type.loc18_39.1 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem0.loc18_39: type = impl_witness_access constants.%I.lookup_impl_witness.262, element0 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc18_19.1: type = splice_block %.loc18_19.2 [symbolic_self = constants.%I_where.type] { +// CHECK:STDOUT: +// CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] +// CHECK:STDOUT: %.Self.ref.loc18_12: type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%.Self.644)> [symbolic_self = constants.%I.type.962] +// CHECK:STDOUT: +// CHECK:STDOUT: %.Self.ref.loc18_25: %I.type.962 = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.50d] +// CHECK:STDOUT: %.loc18_25.1: %I.assoc_type.180 = specific_constant @I1.%assoc0, @I(constants.%.Self.644) [symbolic_self = constants.%assoc0.357] +// CHECK:STDOUT: %I1.ref.loc18_25: %I.assoc_type.180 = name_ref I1, %.loc18_25.1 [symbolic_self = constants.%assoc0.357] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref.loc18_25 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc18_25.2: type = converted %.Self.ref.loc18_25, %.Self.as_type [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impl.elem0.loc18_25: type = impl_witness_access constants.%I.lookup_impl_witness.aee, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %.loc18_32.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc18_32.2: type = converted %.loc18_32.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc18_19.2: type = where_expr %.Self.2 [symbolic_self = constants.%I_where.type] { +// CHECK:STDOUT: requirement_base_facet_type constants.%I.type.962 +// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc18_25, %.loc18_32.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: %T.loc18_6.2: %I_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc18_6.1 (constants.%T.735)] +// 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: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @F(%T.loc18_6.2: %I_where.type) { +// CHECK:STDOUT: %T.loc18_6.1: %I_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc18_6.1 (constants.%T.735)] +// CHECK:STDOUT: %T.as_type.loc18_39.1: type = facet_access_type %T.loc18_6.1 [symbolic = %T.as_type.loc18_39.1 (constants.%T.as_type)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc18_6.1, @I, @I(constants.%.Self.644) [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness.262)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: fn() -> %empty_tuple.type { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %.loc19_11: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc19_12: %empty_tuple.type = converted %.loc19_11, %empty_tuple [concrete = constants.%empty_tuple] +// CHECK:STDOUT: return %.loc19_12 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F(constants.%T.735) { +// CHECK:STDOUT: %T.loc18_6.1 => constants.%T.735 +// CHECK:STDOUT: %T.as_type.loc18_39.1 => constants.%T.as_type +// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.262 +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/validate_impl_constraints.carbon b/toolchain/check/testdata/facet/validate_impl_constraints.carbon index 5610cef28095..f6f2d4092fc0 100644 --- a/toolchain/check/testdata/facet/validate_impl_constraints.carbon +++ b/toolchain/check/testdata/facet/validate_impl_constraints.carbon @@ -91,22 +91,14 @@ fn G(T:! L) { F(T); } -// --- fail_todo_self_in_interface_generic_param_unconstrained.carbon +// --- self_in_interface_generic_param_unconstrained.carbon library "[[@TEST_NAME]]"; interface Z {} interface I(T:! type) {} -// CHECK:STDERR: fail_todo_self_in_interface_generic_param_unconstrained.carbon:[[@LINE+4]]:12: error: name `.Self` not found [NameNotFound] -// CHECK:STDERR: fn F(T:! I(.Self) where .Self impls Z) {} -// CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fn F(T:! I(.Self) where .Self impls Z) {} -// CHECK:STDERR: fail_todo_self_in_interface_generic_param_unconstrained.carbon:[[@LINE+4]]:16: error: name `.Self` not found [NameNotFound] -// CHECK:STDERR: fn G(T:! Z & I(.Self)) { -// CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fn G(T:! Z & I(.Self)) { F(T); } @@ -119,15 +111,21 @@ interface I(T:! Z) {} // Implied constraint: .Self impls Z, which is satisfied and checked at the end // of the fn signature. -// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE+4]]:12: error: name `.Self` not found [NameNotFound] +// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE+7]]:10: error: cannot convert type `.Self` into type implementing `Z` [ConversionFailureTypeToFacet] // CHECK:STDERR: fn F(T:! I(.Self) where .Self impls Z) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE-7]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] +// CHECK:STDERR: interface I(T:! Z) {} +// CHECK:STDERR: ^ // CHECK:STDERR: fn F(T:! I(.Self) where .Self impls Z) {} -// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE+4]]:16: error: name `.Self` not found [NameNotFound] +// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE+7]]:14: error: cannot convert type `.Self` into type implementing `Z` [ConversionFailureTypeToFacet] // CHECK:STDERR: fn G(T:! Z & I(.Self)) { -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE-16]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] +// CHECK:STDERR: interface I(T:! Z) {} +// CHECK:STDERR: ^ // CHECK:STDERR: fn G(T:! Z & I(.Self)) { F(T); diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index c9af90362a8c..c18f09542dee 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -53,6 +53,7 @@ fn Read() { // CHECK:STDOUT: --- lib.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete] // CHECK:STDOUT: %N.c80: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] @@ -221,28 +222,28 @@ fn Read() { // CHECK:STDOUT: %Core.import_ref.1c9: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc12_18, loaded [concrete = constants.%assoc0.724] // CHECK:STDOUT: %Core.import_ref.ed6: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc13_17, loaded [concrete = constants.%assoc1.02e] // CHECK:STDOUT: %Core.import_ref.9e6: type = import_ref Core//prelude/iterate, loc13_17, loaded [concrete = %CursorType] -// CHECK:STDOUT: %Core.import_ref.f49: @Optional.%Optional.None.type (%Optional.None.type.ef2) = import_ref Core//prelude/iterate, inst134 [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.fd6)] -// CHECK:STDOUT: %Core.import_ref.1a8: @Optional.%Optional.Some.type (%Optional.Some.type.b2c) = import_ref Core//prelude/iterate, inst135 [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.d0d)] -// CHECK:STDOUT: %Core.import_ref.36a9: @Optional.as.Destroy.impl.%Optional.as.Destroy.impl.Op.type (%Optional.as.Destroy.impl.Op.type.764) = import_ref Core//prelude/iterate, inst6883 [indirect], loaded [symbolic = @Optional.as.Destroy.impl.%Optional.as.Destroy.impl.Op (constants.%Optional.as.Destroy.impl.Op.bf8)] +// CHECK:STDOUT: %Core.import_ref.f49: @Optional.%Optional.None.type (%Optional.None.type.ef2) = import_ref Core//prelude/iterate, inst137 [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.fd6)] +// CHECK:STDOUT: %Core.import_ref.1a8: @Optional.%Optional.Some.type (%Optional.Some.type.b2c) = import_ref Core//prelude/iterate, inst138 [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.d0d)] +// CHECK:STDOUT: %Core.import_ref.36a9: @Optional.as.Destroy.impl.%Optional.as.Destroy.impl.Op.type (%Optional.as.Destroy.impl.Op.type.764) = import_ref Core//prelude/iterate, inst6888 [indirect], loaded [symbolic = @Optional.as.Destroy.impl.%Optional.as.Destroy.impl.Op (constants.%Optional.as.Destroy.impl.Op.bf8)] // CHECK:STDOUT: %Destroy.impl_witness_table.2ff = impl_witness_table (%Core.import_ref.36a9), @Optional.as.Destroy.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.cf4: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/iterate, inst476 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)] +// CHECK:STDOUT: %Core.import_ref.cf4: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/iterate, inst481 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.2b9 = impl_witness_table (%Core.import_ref.cf4), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.741: @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op.type (%Int.as.Destroy.impl.Op.type) = import_ref Core//prelude/iterate, inst444 [indirect], loaded [symbolic = @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op (constants.%Int.as.Destroy.impl.Op)] +// CHECK:STDOUT: %Core.import_ref.741: @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op.type (%Int.as.Destroy.impl.Op.type) = import_ref Core//prelude/iterate, inst449 [indirect], loaded [symbolic = @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op (constants.%Int.as.Destroy.impl.Op)] // CHECK:STDOUT: %Destroy.impl_witness_table.1b4 = impl_witness_table (%Core.import_ref.741), @Int.as.Destroy.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.19a: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.03c) = import_ref Core//prelude/iterate, inst856 [indirect], loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.5db)] -// CHECK:STDOUT: %Core.import_ref.b2b: @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.2c7) = import_ref Core//prelude/iterate, inst945 [indirect], loaded [symbolic = @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.a5a)] -// CHECK:STDOUT: %Core.import_ref.ab6 = import_ref Core//prelude/iterate, inst946 [indirect], unloaded -// CHECK:STDOUT: %Core.import_ref.875 = import_ref Core//prelude/iterate, inst947 [indirect], unloaded -// CHECK:STDOUT: %Core.import_ref.82b = import_ref Core//prelude/iterate, inst948 [indirect], unloaded +// CHECK:STDOUT: %Core.import_ref.19a: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.03c) = import_ref Core//prelude/iterate, inst861 [indirect], loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.5db)] +// CHECK:STDOUT: %Core.import_ref.b2b: @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.2c7) = import_ref Core//prelude/iterate, inst950 [indirect], loaded [symbolic = @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.a5a)] +// CHECK:STDOUT: %Core.import_ref.ab6 = import_ref Core//prelude/iterate, inst951 [indirect], unloaded +// CHECK:STDOUT: %Core.import_ref.875 = import_ref Core//prelude/iterate, inst952 [indirect], unloaded +// CHECK:STDOUT: %Core.import_ref.82b = import_ref Core//prelude/iterate, inst953 [indirect], unloaded // CHECK:STDOUT: %OrderedWith.impl_witness_table.476 = impl_witness_table (%Core.import_ref.b2b, %Core.import_ref.ab6, %Core.import_ref.875, %Core.import_ref.82b), @Int.as.OrderedWith.impl.db3 [concrete] -// CHECK:STDOUT: %Core.import_ref.13d: @OrderedWith.%OrderedWith.Less.type (%OrderedWith.Less.type.f19) = import_ref Core//prelude/iterate, inst1920 [indirect], loaded [symbolic = @OrderedWith.%OrderedWith.Less (constants.%OrderedWith.Less.02e)] +// CHECK:STDOUT: %Core.import_ref.13d: @OrderedWith.%OrderedWith.Less.type (%OrderedWith.Less.type.f19) = import_ref Core//prelude/iterate, inst1925 [indirect], loaded [symbolic = @OrderedWith.%OrderedWith.Less (constants.%OrderedWith.Less.02e)] // CHECK:STDOUT: %CursorType: type = assoc_const_decl @CursorType [concrete] {} // CHECK:STDOUT: %Core.import_ref.4f9: type = import_ref Core//prelude/iterate, loc12_18, loaded [concrete = %ElementType] // CHECK:STDOUT: %ElementType: type = assoc_const_decl @ElementType [concrete] {} // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Core.OrderedWith: %OrderedWith.type.270 = import_ref Core//prelude/operators/comparison, OrderedWith, loaded [concrete = constants.%OrderedWith.generic] -// CHECK:STDOUT: %Core.import_ref.d49 = import_ref Core//prelude/iterate, inst6638 [indirect], unloaded +// CHECK:STDOUT: %Core.import_ref.d49 = import_ref Core//prelude/iterate, inst6643 [indirect], unloaded // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } @@ -258,6 +259,7 @@ fn Read() { // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Core.ref.loc4: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] @@ -869,6 +871,7 @@ fn Read() { // CHECK:STDOUT: %Read.type: type = fn_type @Read [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Read: %Read.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete] // CHECK:STDOUT: %y: Core.IntLiteral = bind_symbolic_name y, 0 [symbolic] @@ -1001,7 +1004,7 @@ fn Read() { // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] // CHECK:STDOUT: %Main.import_ref.f1e294.1: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] // CHECK:STDOUT: %Main.import_ref.30f: = import_ref Main//lib, loc24_1, loaded [symbolic = @IntRange.%complete_type (constants.%complete_type.c76)] -// CHECK:STDOUT: %Main.import_ref.d13 = import_ref Main//lib, inst40 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.d13 = import_ref Main//lib, inst42 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.d98 = import_ref Main//lib, loc5_57, unloaded // CHECK:STDOUT: %Main.import_ref.e58 = import_ref Main//lib, loc22_20, unloaded // CHECK:STDOUT: %Main.import_ref.261 = import_ref Main//lib, loc23_18, unloaded @@ -1017,7 +1020,7 @@ fn Read() { // CHECK:STDOUT: %Core.import_ref.c4c = import_ref Core//prelude/types/int, loc55_61, unloaded // CHECK:STDOUT: %OrderedWith.impl_witness_table.0e1 = impl_witness_table (%Core.import_ref.e33, %Core.import_ref.a58, %Core.import_ref.a39, %Core.import_ref.c4c), @Int.as.OrderedWith.impl.5b6 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Main.import_ref.03a = import_ref Main//lib, inst309 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.03a = import_ref Main//lib, inst311 [indirect], unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.954 = impl_witness_table (%Main.import_ref.03a), @Optional.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.0c8 = import_ref Main//lib, loc9_87, unloaded // CHECK:STDOUT: %Main.import_ref.f1e294.3: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] @@ -1030,11 +1033,11 @@ fn Read() { // CHECK:STDOUT: %Iterate.impl_witness_table.b32 = impl_witness_table (%Main.import_ref.e3faa9.1, %Main.import_ref.e3faa9.2, %Main.import_ref.11c, %Main.import_ref.f97), @IntRange.as.Iterate.impl [concrete] // CHECK:STDOUT: %Main.import_ref.f1e294.4: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] // CHECK:STDOUT: %Main.import_ref.f1e294.5: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] -// CHECK:STDOUT: %Main.import_ref.026 = import_ref Main//lib, inst1894 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.026 = import_ref Main//lib, inst1896 [indirect], unloaded // CHECK:STDOUT: %Main.import_ref.bdb: = import_ref Main//lib, loc4_39, loaded [symbolic = @IntRange.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.45d)] // CHECK:STDOUT: %Main.import_ref.f1e294.6: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] // CHECK:STDOUT: %Main.import_ref.daedfd.2: type = import_ref Main//lib, loc4_39, loaded [symbolic = @IntRange.as.Destroy.impl.%IntRange (constants.%IntRange.349)] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//lib, inst299 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//lib, inst301 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.967: @IntRange.as.Destroy.impl.%IntRange.as.Destroy.impl.Op.type (%IntRange.as.Destroy.impl.Op.type.3e7) = import_ref Main//lib, loc4_39, loaded [symbolic = @IntRange.as.Destroy.impl.%IntRange.as.Destroy.impl.Op (constants.%IntRange.as.Destroy.impl.Op.8a1)] // CHECK:STDOUT: %Destroy.impl_witness_table.68d = impl_witness_table (%Main.import_ref.967), @IntRange.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.f1e294.7: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] @@ -1118,6 +1121,7 @@ fn Read() { // CHECK:STDOUT: } // CHECK:STDOUT: %int_43: Core.IntLiteral = int_value 43 [concrete = constants.%int_43] // CHECK:STDOUT: %.loc5_27.1: type = splice_block %.loc5_27.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core.ece [concrete = imports.%Core.ece] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] diff --git a/toolchain/check/testdata/for/basic.carbon b/toolchain/check/testdata/for/basic.carbon index 6a0cceb69840..570cf403cd44 100644 --- a/toolchain/check/testdata/for/basic.carbon +++ b/toolchain/check/testdata/for/basic.carbon @@ -103,8 +103,8 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.cd6: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.a15) = import_ref Core//prelude/parts/iterate, inst99 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.73f)] -// CHECK:STDOUT: %Core.import_ref.4fd: @Optional.%Optional.Get.type (%Optional.Get.type.e03) = import_ref Core//prelude/parts/iterate, inst100 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.971)] +// CHECK:STDOUT: %Core.import_ref.cd6: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.a15) = import_ref Core//prelude/parts/iterate, inst102 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.73f)] +// CHECK:STDOUT: %Core.import_ref.4fd: @Optional.%Optional.Get.type (%Optional.Get.type.e03) = import_ref Core//prelude/parts/iterate, inst103 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.971)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { diff --git a/toolchain/check/testdata/for/pattern.carbon b/toolchain/check/testdata/for/pattern.carbon index 543df1a33b8e..74635e412d12 100644 --- a/toolchain/check/testdata/for/pattern.carbon +++ b/toolchain/check/testdata/for/pattern.carbon @@ -186,8 +186,8 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.57b: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.f5f) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.ec1)] // CHECK:STDOUT: %Main.import_ref.170: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.264) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.08e)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst138 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] -// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst139 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] +// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst140 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] +// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst141 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -343,8 +343,8 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.57b: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.f5f) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.ec1)] // CHECK:STDOUT: %Main.import_ref.170: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.264) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.08e)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst138 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] -// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst139 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] +// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst140 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] +// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst141 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -509,8 +509,8 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.57b: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.f5f) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.ec1)] // CHECK:STDOUT: %Main.import_ref.170: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.264) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.08e)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst138 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] -// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst139 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] +// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst140 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] +// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst141 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -694,8 +694,8 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.57b: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.f5f) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.ec1)] // CHECK:STDOUT: %Main.import_ref.170: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.264) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.08e)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst138 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] -// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst139 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] +// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst140 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] +// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst141 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { diff --git a/toolchain/check/testdata/function/builtin/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/call_from_operator.carbon index a7392f9d52ee..74b2ae90c204 100644 --- a/toolchain/check/testdata/function/builtin/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/call_from_operator.carbon @@ -62,6 +62,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete] // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete] // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %AddWith.type.b35: type = generic_interface_type @AddWith [concrete] // CHECK:STDOUT: %AddWith.generic: %AddWith.type.b35 = struct_value () [concrete] @@ -174,16 +175,19 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %AddWith.decl: %AddWith.type.b35 = interface_decl @AddWith [concrete = constants.%AddWith.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_19.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %As.decl: %As.type.b51 = interface_decl @As [concrete = constants.%As.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc11_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @i32.builtin.as.AddWith.impl [concrete] {} { @@ -761,36 +765,36 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int] // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//default, As, loaded [concrete = constants.%As.generic] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst104 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst107 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.5e1: @As.%As.assoc_type (%As.assoc_type.760) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.97d)] // CHECK:STDOUT: %Core.Convert.313 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst104 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)] +// CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst107 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)] // CHECK:STDOUT: %Core.import_ref.708: @As.%As.Convert.type (%As.Convert.type.843) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%As.Convert (constants.%As.Convert.95f)] // CHECK:STDOUT: %Core.import_ref.4e8 = import_ref Core//default, loc12_32, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.476 = import_ref Core//default, inst50 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.476 = import_ref Core//default, inst52 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.35d: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.c10) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%assoc0 (constants.%assoc0.89962d.2)] // CHECK:STDOUT: %Core.Op = import_ref Core//default, Op, unloaded // CHECK:STDOUT: %Core.import_ref.772: = import_ref Core//default, loc19_26, loaded [concrete = constants.%AddWith.impl_witness] // CHECK:STDOUT: %Core.import_ref.c8c7cd.1: type = import_ref Core//default, loc19_6, loaded [concrete = constants.%i32.builtin] // CHECK:STDOUT: %Core.import_ref.ef3: type = import_ref Core//default, loc19_24, loaded [concrete = constants.%AddWith.type.6f5] // CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3) = import_ref Core//default, inst50 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.6c1)] +// CHECK:STDOUT: %Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3) = import_ref Core//default, inst52 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.6c1)] // CHECK:STDOUT: %Core.import_ref.7e6ace.1 = import_ref Core//default, loc8_41, unloaded // CHECK:STDOUT: %Core.import_ref.1b9: @AddWith.%AddWith.Op.type (%AddWith.Op.type.22d) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%AddWith.Op (constants.%AddWith.Op.965)] // CHECK:STDOUT: %Core.import_ref.cb6: = import_ref Core//default, loc23_30, loaded [concrete = constants.%As.impl_witness] // CHECK:STDOUT: %Core.import_ref.8721d7.1: type = import_ref Core//default, loc23_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.1e5: type = import_ref Core//default, loc23_28, loaded [concrete = constants.%As.type.a6d] // CHECK:STDOUT: %Core.import_ref.5ab3ec.5: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst148 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst152 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc001e.2)] // CHECK:STDOUT: %Core.Convert.e69 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.c62: = import_ref Core//default, loc27_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a] // CHECK:STDOUT: %Core.import_ref.8721d7.2: type = import_ref Core//default, loc27_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc27_36, loaded [concrete = constants.%ImplicitAs.type.61e] // CHECK:STDOUT: %Core.import_ref.5ab3ec.6: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst148 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] +// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst152 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc16_32, unloaded // CHECK:STDOUT: %Core.import_ref.1c752f.1: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.42e)] // CHECK:STDOUT: %Core.import_ref.c5f: = import_ref Core//default, loc31_38, loaded [concrete = constants.%ImplicitAs.impl_witness.9c5] diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index 5028564f1be4..5ef463b99bdb 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -30,6 +30,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: --- prefer_unqualified_lookup.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %F: type = bind_symbolic_name F, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete] @@ -103,12 +104,14 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %F.patt: %pattern_type.98f = symbolic_binding_pattern F, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %F.loc5_13.2: type = bind_symbolic_name F, 0 [symbolic = %F.loc5_13.1 (constants.%F)] // CHECK:STDOUT: } // CHECK:STDOUT: %Inner.G.decl: %Inner.G.type = fn_decl @Inner.G [symbolic = constants.%Inner.G] { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %F.loc13_10: type = bind_symbolic_name F, 0 [symbolic = @Class.%F.loc5_13.1 (constants.%F)] // CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] diff --git a/toolchain/check/testdata/function/definition/syntactic_merge.carbon b/toolchain/check/testdata/function/definition/syntactic_merge.carbon index c24910ed11fc..f6d8d241a0f4 100644 --- a/toolchain/check/testdata/function/definition/syntactic_merge.carbon +++ b/toolchain/check/testdata/function/definition/syntactic_merge.carbon @@ -691,6 +691,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.a02530.1: type = fn_type @Foo.loc7 [concrete] @@ -711,13 +712,19 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.a02530.1 = fn_decl @Foo.loc7 [concrete = constants.%Foo.ddeb7d.1] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_8.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_8.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc15: %Foo.type.a02530.2 = fn_decl @Foo.loc15 [concrete = constants.%Foo.ddeb7d.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc15: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc15_8.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc15_8.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/call.carbon b/toolchain/check/testdata/function/generic/call.carbon index 54ee983b484b..f4897e6e8615 100644 --- a/toolchain/check/testdata/function/generic/call.carbon +++ b/toolchain/check/testdata/function/generic/call.carbon @@ -59,6 +59,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: --- explicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] @@ -118,6 +119,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_32: type = name_ref T, %T.loc4_13.2 [symbolic = %T.loc4_13.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: %x.param: @Function.%T.loc4_13.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.2 [symbolic = %T.loc4_13.1 (constants.%T)] @@ -133,6 +135,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.param_patt: @CallGeneric.%pattern_type (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc8_35: type = name_ref T, %T.loc8_16.2 [symbolic = %T.loc8_16.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_16.1 (constants.%T)] // CHECK:STDOUT: %x.param: @CallGeneric.%T.loc8_16.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.2 [symbolic = %T.loc8_16.1 (constants.%T)] @@ -149,6 +152,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.2 [symbolic = %T.loc12_19.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc12_40: type = ptr_type %T.ref.loc12_39 [symbolic = %ptr.loc12_33.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc12_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_19.1 (constants.%T)] // CHECK:STDOUT: %x.param: @CallGenericPtr.%ptr.loc12_33.1 (%ptr.79f) = value_param call_param0 // CHECK:STDOUT: %.loc12: type = splice_block %ptr.loc12_33.2 [symbolic = %ptr.loc12_33.1 (constants.%ptr.79f)] { @@ -315,6 +319,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: --- deduced.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] @@ -374,6 +379,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_32: type = name_ref T, %T.loc4_13.2 [symbolic = %T.loc4_13.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: %x.param: @Function.%T.loc4_13.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.2 [symbolic = %T.loc4_13.1 (constants.%T)] @@ -389,6 +395,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.param_patt: @CallGeneric.%pattern_type (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc8_35: type = name_ref T, %T.loc8_16.2 [symbolic = %T.loc8_16.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_16.1 (constants.%T)] // CHECK:STDOUT: %x.param: @CallGeneric.%T.loc8_16.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.2 [symbolic = %T.loc8_16.1 (constants.%T)] @@ -405,6 +412,7 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.2 [symbolic = %T.loc12_19.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc12_40: type = ptr_type %T.ref.loc12_39 [symbolic = %ptr.loc12_33.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc12_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_19.1 (constants.%T)] // CHECK:STDOUT: %x.param: @CallGenericPtr.%ptr.loc12_33.1 (%ptr.79f) = value_param call_param0 // CHECK:STDOUT: %.loc12: type = splice_block %ptr.loc12_33.2 [symbolic = %ptr.loc12_33.1 (constants.%ptr.79f)] { diff --git a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon index a136f0274fe4..4a9e190eb7ab 100644 --- a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon +++ b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon @@ -41,6 +41,7 @@ fn G() { // CHECK:STDOUT: --- call_method_on_generic_facet.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Scalar: type = bind_symbolic_name Scalar, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type.c21: type = generic_interface_type @Generic [concrete] @@ -137,6 +138,7 @@ fn G() { // CHECK:STDOUT: %Generic.decl: %Generic.type.c21 = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Scalar.loc15_19.2: type = bind_symbolic_name Scalar, 0 [symbolic = %Scalar.loc15_19.1 (constants.%Scalar)] // CHECK:STDOUT: } // CHECK:STDOUT: %GenericParam.decl: type = class_decl @GenericParam [concrete = constants.%GenericParam] {} {} @@ -160,8 +162,10 @@ fn G() { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %U.patt: @CallGenericMethod.%pattern_type (%pattern_type.80f) = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc33_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc33_22.1 (constants.%T)] // CHECK:STDOUT: %.loc33: type = splice_block %Generic.type.loc33_45.2 [symbolic = %Generic.type.loc33_45.1 (constants.%Generic.type.91ccba.2)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc33_22.2 [symbolic = %T.loc33_22.1 (constants.%T)] // CHECK:STDOUT: %Generic.type.loc33_45.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc33_45.1 (constants.%Generic.type.91ccba.2)] diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index fe5ddb0b6e51..748c45a20047 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -216,6 +216,7 @@ fn F() { // CHECK:STDOUT: --- deduce_explicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] @@ -267,6 +268,7 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.2 [symbolic = %T.loc4_25.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc4_39.2: type = ptr_type %T.ref.loc4_38 [symbolic = %ptr.loc4_39.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.1 (constants.%T)] // CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr.79f) = out_param call_param0 // CHECK:STDOUT: %return: ref @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr.79f) = return_slot %return.param @@ -289,6 +291,7 @@ fn F() { // CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.loc10_43.2 [symbolic = %T.loc10_43.1 (constants.%T)] // CHECK:STDOUT: %struct_type.a.loc10_62.2: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_43.1 (%T)} [symbolic = %struct_type.a.loc10_62.1 (constants.%struct_type.a)] // CHECK:STDOUT: %ptr.loc10_63.2: type = ptr_type %struct_type.a.loc10_62.2 [symbolic = %ptr.loc10_63.1 (constants.%ptr.48a)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc10_43.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_43.1 (constants.%T)] // CHECK:STDOUT: %return.param: ref @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.1 (%ptr.48a) = out_param call_param0 // CHECK:STDOUT: %return: ref @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.1 (%ptr.48a) = return_slot %return.param @@ -391,6 +394,7 @@ fn F() { // CHECK:STDOUT: --- fail_deduce_explicit_non_constant.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] @@ -427,6 +431,7 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.2 [symbolic = %T.loc4_25.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc4_39.2: type = ptr_type %T.ref.loc4_38 [symbolic = %ptr.loc4_39.1 (constants.%ptr)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.1 (constants.%T)] // CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr) = out_param call_param0 // CHECK:STDOUT: %return: ref @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr) = return_slot %return.param @@ -434,6 +439,7 @@ fn F() { // CHECK:STDOUT: %CallExplicitGenericParamConst.decl: %CallExplicitGenericParamConst.type = fn_decl @CallExplicitGenericParamConst [concrete = constants.%CallExplicitGenericParamConst] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_34.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_34.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParamNonConst.decl: %CallExplicitGenericParamNonConst.type = fn_decl @CallExplicitGenericParamNonConst [concrete = constants.%CallExplicitGenericParamNonConst] { @@ -519,6 +525,7 @@ fn F() { // CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.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: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] @@ -564,6 +571,7 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_46: type = name_ref T, %T.loc6_27.2 [symbolic = %T.loc6_27.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc6_47.2: type = ptr_type %T.ref.loc6_46 [symbolic = %ptr.loc6_47.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_27.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_27.1 (constants.%T)] // CHECK:STDOUT: %x.param: @ExplicitAndAlsoDeduced.%T.loc6_27.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc6_40: type = name_ref T, %T.loc6_27.2 [symbolic = %T.loc6_27.1 (constants.%T)] @@ -683,6 +691,7 @@ fn F() { // CHECK:STDOUT: --- deduce_implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] @@ -733,6 +742,7 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_25.2 [symbolic = %T.loc4_25.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc4_45.2: type = ptr_type %T.ref.loc4_44 [symbolic = %ptr.loc4_45.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.1 (constants.%T)] // CHECK:STDOUT: %x.param: @ImplicitGenericParam.%T.loc4_25.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.2 [symbolic = %T.loc4_25.1 (constants.%T)] @@ -821,6 +831,7 @@ fn F() { // CHECK:STDOUT: --- deduce_nested_tuple.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -887,6 +898,7 @@ fn F() { // CHECK:STDOUT: %x.patt: @TupleParam.%pattern_type (%pattern_type.ec8) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @TupleParam.%pattern_type (%pattern_type.ec8) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %x.param: @TupleParam.%tuple.type (%tuple.type.f83) = value_param call_param0 // CHECK:STDOUT: %.loc4_35.1: type = splice_block %.loc4_35.3 [symbolic = %tuple.type (constants.%tuple.type.f83)] { @@ -953,6 +965,7 @@ fn F() { // CHECK:STDOUT: --- deduce_nested_struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -1018,6 +1031,7 @@ fn F() { // CHECK:STDOUT: %x.patt: @StructParam.%pattern_type (%pattern_type.e94) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @StructParam.%pattern_type (%pattern_type.e94) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: %x.param: @StructParam.%struct_type.a.b.loc4_44.1 (%struct_type.a.b.46e) = value_param call_param0 // CHECK:STDOUT: %.loc4: type = splice_block %struct_type.a.b.loc4_44.2 [symbolic = %struct_type.a.b.loc4_44.1 (constants.%struct_type.a.b.46e)] { @@ -1083,6 +1097,7 @@ fn F() { // CHECK:STDOUT: --- fail_deduce_bigger_struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -1122,6 +1137,7 @@ fn F() { // CHECK:STDOUT: %x.patt: @BigStructParam.%pattern_type (%pattern_type.c31) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @BigStructParam.%pattern_type (%pattern_type.c31) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_19.1 (constants.%T)] // CHECK:STDOUT: %x.param: @BigStructParam.%struct_type.c.d.e.loc4_56.1 (%struct_type.c.d.e) = value_param call_param0 // CHECK:STDOUT: %.loc4: type = splice_block %struct_type.c.d.e.loc4_56.2 [symbolic = %struct_type.c.d.e.loc4_56.1 (constants.%struct_type.c.d.e)] { @@ -1169,6 +1185,7 @@ fn F() { // CHECK:STDOUT: --- fail_deduce_smaller_struct.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -1209,6 +1226,7 @@ fn F() { // CHECK:STDOUT: %x.patt: @SmallStructParam.%pattern_type (%pattern_type.5b8) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @SmallStructParam.%pattern_type (%pattern_type.5b8) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.1 (constants.%T)] // CHECK:STDOUT: %x.param: @SmallStructParam.%struct_type.f.g.loc4_49.1 (%struct_type.f.g) = value_param call_param0 // CHECK:STDOUT: %.loc4: type = splice_block %struct_type.f.g.loc4_49.2 [symbolic = %struct_type.f.g.loc4_49.1 (constants.%struct_type.f.g)] { @@ -1255,6 +1273,7 @@ fn F() { // CHECK:STDOUT: --- fail_deduce_struct_wrong_name.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -1294,6 +1313,7 @@ fn F() { // CHECK:STDOUT: %x.patt: @WrongNameStructParam.%pattern_type (%pattern_type.685) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @WrongNameStructParam.%pattern_type (%pattern_type.685) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.1 (constants.%T)] // CHECK:STDOUT: %x.param: @WrongNameStructParam.%struct_type.i.different.loc4_61.1 (%struct_type.i.different) = value_param call_param0 // CHECK:STDOUT: %.loc4: type = splice_block %struct_type.i.different.loc4_61.2 [symbolic = %struct_type.i.different.loc4_61.1 (constants.%struct_type.i.different)] { @@ -1339,6 +1359,7 @@ fn F() { // CHECK:STDOUT: --- fail_todo_deduce_struct_wrong_order.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -1378,6 +1399,7 @@ fn F() { // CHECK:STDOUT: %x.patt: @WrongOrderStructParam.%pattern_type (%pattern_type.422) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @WrongOrderStructParam.%pattern_type (%pattern_type.422) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_26.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] // CHECK:STDOUT: %x.param: @WrongOrderStructParam.%struct_type.first.second.loc4_63.1 (%struct_type.first.second) = value_param call_param0 // CHECK:STDOUT: %.loc4: type = splice_block %struct_type.first.second.loc4_63.2 [symbolic = %struct_type.first.second.loc4_63.1 (constants.%struct_type.first.second)] { @@ -1423,6 +1445,7 @@ fn F() { // CHECK:STDOUT: --- fail_deduce_incomplete.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] @@ -1458,7 +1481,9 @@ fn F() { // CHECK:STDOUT: %return.param_patt: @ImplicitNotDeducible.%pattern_type.loc6_51 (%pattern_type.a32) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc6_35.2 [symbolic = %U.loc6_35.1 (constants.%U)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_25.1 (constants.%T)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc6_35.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc6_35.1 (constants.%U)] // CHECK:STDOUT: %x.param: @ImplicitNotDeducible.%T.loc6_25.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_25.2 [symbolic = %T.loc6_25.1 (constants.%T)] @@ -1495,6 +1520,7 @@ fn F() { // CHECK:STDOUT: --- fail_deduce_inconsistent.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] @@ -1531,6 +1557,7 @@ fn F() { // CHECK:STDOUT: %return.param_patt: @ImplicitNotDeducible.%pattern_type (%pattern_type.7dc) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_50: type = name_ref T, %T.loc4_25.2 [symbolic = %T.loc4_25.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_25.1 (constants.%T)] // CHECK:STDOUT: %x.param: @ImplicitNotDeducible.%T.loc4_25.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.2 [symbolic = %T.loc4_25.1 (constants.%T)] @@ -1581,6 +1608,7 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Z.impl_witness.354: = impl_witness file.%Z.impl_witness_table.loc6 [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %E: type = bind_symbolic_name E, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %DD.type: type = generic_class_type @DD [concrete] @@ -1646,6 +1674,7 @@ fn F() { // CHECK:STDOUT: %DD.decl: %DD.type = class_decl @DD [concrete = constants.%DD.generic] { // CHECK:STDOUT: %E.patt: %pattern_type.98f = symbolic_binding_pattern E, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %E.loc8_10.2: type = bind_symbolic_name E, 0 [symbolic = %E.loc8_10.1 (constants.%E)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @DD.as.Z.impl [concrete] { @@ -1655,6 +1684,7 @@ fn F() { // CHECK:STDOUT: %E.ref: type = name_ref E, %E.loc9_14.1 [symbolic = %E.loc9_14.2 (constants.%E)] // CHECK:STDOUT: %DD.loc9_28.1: type = class_type @DD, @DD(constants.%E) [symbolic = %DD.loc9_28.2 (constants.%DD.296)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %E.loc9_14.1: type = bind_symbolic_name E, 0 [symbolic = %E.loc9_14.2 (constants.%E)] // CHECK:STDOUT: } // CHECK:STDOUT: %Z.impl_witness_table.loc9 = impl_witness_table (), @DD.as.Z.impl [concrete] @@ -1662,7 +1692,10 @@ fn F() { // CHECK:STDOUT: %CC.decl: %CC.type = class_decl @CC [concrete = constants.%CC.generic] { // CHECK:STDOUT: %D.patt: %pattern_type.5af = symbolic_binding_pattern D, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] +// CHECK:STDOUT: %.loc11: type = splice_block %Z.ref [concrete = constants.%Z.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %D.loc11_10.2: %Z.type = bind_symbolic_name D, 0 [symbolic = %D.loc11_10.1 (constants.%D)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @CC.as.Z.impl [concrete] { @@ -1676,6 +1709,7 @@ fn F() { // CHECK:STDOUT: %.loc12: %Z.type = converted %DD.loc12_31.1, %Z.facet.loc12_32.1 [symbolic = %Z.facet.loc12_32.2 (constants.%Z.facet.aae)] // CHECK:STDOUT: %CC.loc12_32.1: type = class_type @CC, @CC(constants.%Z.facet.aae) [symbolic = %CC.loc12_32.2 (constants.%CC.23e)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %E.loc12_14.1: type = bind_symbolic_name E, 0 [symbolic = %E.loc12_14.2 (constants.%E)] // CHECK:STDOUT: } // CHECK:STDOUT: %Z.impl_witness_table.loc12 = impl_witness_table (), @CC.as.Z.impl [concrete] diff --git a/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon b/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon index c3fc7b4f1b98..1b8a503e3a72 100644 --- a/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon +++ b/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon @@ -56,6 +56,7 @@ fn F() { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Y.impl_witness: = impl_witness file.%Y.impl_witness_table [concrete] // CHECK:STDOUT: %W.impl_witness: = impl_witness file.%W.impl_witness_table [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %D: %Y.type = bind_symbolic_name D, 0 [symbolic] // CHECK:STDOUT: %pattern_type.667: type = pattern_type %Y.type [concrete] // CHECK:STDOUT: %CC.type: type = generic_class_type @CC [concrete] @@ -137,7 +138,10 @@ fn F() { // CHECK:STDOUT: %CC.decl: %CC.type = class_decl @CC [concrete = constants.%CC.generic] { // CHECK:STDOUT: %D.patt: %pattern_type.667 = symbolic_binding_pattern D, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] +// CHECK:STDOUT: %.loc12: type = splice_block %Y.ref [concrete = constants.%Y.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %D.loc12_10.2: %Y.type = bind_symbolic_name D, 0 [symbolic = %D.loc12_10.1 (constants.%D)] // CHECK:STDOUT: } // CHECK:STDOUT: %Z.decl: type = interface_decl @Z [concrete = constants.%Z.type] {} {} @@ -152,6 +156,7 @@ fn F() { // CHECK:STDOUT: %CC.loc19_29.1: type = class_type @CC, @CC(constants.%Y.facet.7ec) [symbolic = %CC.loc19_29.2 (constants.%CC.d02)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: %.loc19_20.1: type = splice_block %.loc19_20.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: %W.ref: type = name_ref W, file.%W.decl [concrete = constants.%W.type] // CHECK:STDOUT: %impl.elem0: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] diff --git a/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon b/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon index 595ea0f59555..9a2ee51949ef 100644 --- a/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon +++ b/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon @@ -50,6 +50,7 @@ fn B() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %Z.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.5af: type = pattern_type %Z.type [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] @@ -71,7 +72,10 @@ fn B() { // CHECK:STDOUT: %x.patt: @A.%pattern_type (%pattern_type.64f) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @A.%pattern_type (%pattern_type.64f) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] +// CHECK:STDOUT: %.loc4_10: type = splice_block %Z.ref [concrete = constants.%Z.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_6.2: %Z.type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.1 (constants.%T)] // CHECK:STDOUT: %x.param: @A.%struct_type.a.loc4_22.1 (%struct_type.a) = value_param call_param0 // CHECK:STDOUT: %.loc4_22: type = splice_block %struct_type.a.loc4_22.2 [symbolic = %struct_type.a.loc4_22.1 (constants.%struct_type.a)] { @@ -117,6 +121,7 @@ fn B() { // CHECK:STDOUT: --- fail_deduce_imported_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] // CHECK:STDOUT: %T: %Z.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.3dd: type = pattern_type %Z.type [concrete] @@ -159,6 +164,7 @@ fn B() { // CHECK:STDOUT: %x.param_patt: @A.loc4.%pattern_type (%pattern_type.ea1) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_13: type = splice_block %Z.ref [concrete = constants.%Z.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Lib.ref: = name_ref Lib, imports.%Lib [concrete = imports.%Lib] // CHECK:STDOUT: %Z.ref: type = name_ref Z, imports.%Lib.Z [concrete = constants.%Z.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/forward_decl.carbon b/toolchain/check/testdata/function/generic/forward_decl.carbon index bbfe93ba3888..8a62358680dc 100644 --- a/toolchain/check/testdata/function/generic/forward_decl.carbon +++ b/toolchain/check/testdata/function/generic/forward_decl.carbon @@ -17,6 +17,7 @@ fn F(T:! type); // CHECK:STDOUT: --- forward_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -30,6 +31,7 @@ fn F(T:! type); // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/import_specific.carbon b/toolchain/check/testdata/function/generic/import_specific.carbon index 1bedc5833162..5f30b799e5df 100644 --- a/toolchain/check/testdata/function/generic/import_specific.carbon +++ b/toolchain/check/testdata/function/generic/import_specific.carbon @@ -41,6 +41,7 @@ fn H() { // CHECK:STDOUT: --- library.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -59,11 +60,13 @@ fn H() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/indirect_generic_type.carbon b/toolchain/check/testdata/function/generic/indirect_generic_type.carbon index 274bfc17773a..eb231a54b751 100644 --- a/toolchain/check/testdata/function/generic/indirect_generic_type.carbon +++ b/toolchain/check/testdata/function/generic/indirect_generic_type.carbon @@ -19,6 +19,7 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: --- indirect_generic_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ptr.79f: type = ptr_type %T [symbolic] @@ -44,6 +45,7 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc15_27: type = name_ref T, %T.loc15_6.2 [symbolic = %T.loc15_6.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc15_28: type = ptr_type %T.ref.loc15_27 [symbolic = %ptr.loc15_20.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_6.1 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc15_21.1 (%ptr.a13) = value_param call_param0 // CHECK:STDOUT: %.loc15: type = splice_block %ptr.loc15_21.2 [symbolic = %ptr.loc15_21.1 (constants.%ptr.a13)] { diff --git a/toolchain/check/testdata/function/generic/param_in_type.carbon b/toolchain/check/testdata/function/generic/param_in_type.carbon index d2423b2d45a8..ab8917caa0de 100644 --- a/toolchain/check/testdata/function/generic/param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/param_in_type.carbon @@ -17,6 +17,7 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: --- param_in_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -71,6 +72,7 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: %a.param_patt: @F.%pattern_type (%pattern_type.c7e) = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc15_10: type = splice_block %i32.loc15_10 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc15_10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc15_10: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index 2c1a79f60586..9a612e7999dd 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -97,6 +97,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: --- redeclare.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] @@ -127,6 +128,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc4_20.2: type = ptr_type %T.ref.loc4 [symbolic = %ptr.loc4_20.1 (constants.%ptr)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.1 (constants.%T)] // CHECK:STDOUT: %return.param.loc4: ref @F.%ptr.loc4_20.1 (%ptr) = out_param call_param0 // CHECK:STDOUT: %return.loc4: ref @F.%ptr.loc4_20.1 (%ptr) = return_slot %return.param.loc4 @@ -138,6 +140,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc6 [symbolic = %T.loc4_6.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc6: type = ptr_type %T.ref.loc6 [symbolic = %ptr.loc4_20.1 (constants.%ptr)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.1 (constants.%T)] // CHECK:STDOUT: %return.param.loc6: ref @F.%ptr.loc4_20.1 (%ptr) = out_param call_param0 // CHECK:STDOUT: %return.loc6: ref @F.%ptr.loc4_20.1 (%ptr) = return_slot %return.param.loc6 @@ -178,6 +181,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: --- fail_different_return_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] @@ -213,7 +217,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc4_30.2: type = ptr_type %T.ref [symbolic = %ptr.loc4_30.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc4_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc4_16.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref @F.loc4.%ptr.loc4_30.1 (%ptr.79f) = out_param call_param0 // CHECK:STDOUT: %return: ref @F.loc4.%ptr.loc4_30.1 (%ptr.79f) = return_slot %return.param @@ -226,7 +232,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_16.2 [symbolic = %U.loc13_16.1 (constants.%U)] // CHECK:STDOUT: %ptr.loc13_30.2: type = ptr_type %U.ref [symbolic = %ptr.loc13_30.1 (constants.%ptr.b51)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc13_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc13_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc13_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc13_16.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref @F.loc13.%ptr.loc13_30.1 (%ptr.b51) = out_param call_param0 // CHECK:STDOUT: %return: ref @F.loc13.%ptr.loc13_30.1 (%ptr.b51) = return_slot %return.param @@ -276,6 +284,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: --- fail_reorder.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %U.336: type = bind_symbolic_name U, 1 [symbolic] @@ -313,7 +322,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T.8b3)] // CHECK:STDOUT: %ptr.loc4_30.2: type = ptr_type %T.ref [symbolic = %ptr.loc4_30.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.1 (constants.%T.8b3)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc4_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc4_16.1 (constants.%U.336)] // CHECK:STDOUT: %return.param: ref @F.loc4.%ptr.loc4_30.1 (%ptr.79f) = out_param call_param0 // CHECK:STDOUT: %return: ref @F.loc4.%ptr.loc4_30.1 (%ptr.79f) = return_slot %return.param @@ -326,7 +337,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc13_16.2 [symbolic = %T.loc13_16.1 (constants.%T.336)] // CHECK:STDOUT: %ptr.loc13_30.2: type = ptr_type %T.ref.loc13 [symbolic = %ptr.loc13_30.1 (constants.%ptr.b51)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc13_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc13_6.1 (constants.%U.8b3)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc13_16.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc13_16.1 (constants.%T.336)] // CHECK:STDOUT: %return.param: ref @F.loc13.%ptr.loc13_30.1 (%ptr.b51) = out_param call_param0 // CHECK:STDOUT: %return: ref @F.loc13.%ptr.loc13_30.1 (%ptr.b51) = return_slot %return.param @@ -376,6 +389,7 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: --- fail_rename.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %U.336: type = bind_symbolic_name U, 1 [symbolic] @@ -413,7 +427,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T.8b3)] // CHECK:STDOUT: %ptr.loc4_30.2: type = ptr_type %T.ref [symbolic = %ptr.loc4_30.1 (constants.%ptr.79f131.1)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_6.1 (constants.%T.8b3)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc4_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc4_16.1 (constants.%U.336)] // CHECK:STDOUT: %return.param: ref @F.loc4.%ptr.loc4_30.1 (%ptr.79f131.1) = out_param call_param0 // CHECK:STDOUT: %return: ref @F.loc4.%ptr.loc4_30.1 (%ptr.79f131.1) = return_slot %return.param @@ -426,7 +442,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_6.2 [symbolic = %U.loc13_6.1 (constants.%U.8b3)] // CHECK:STDOUT: %ptr.loc13_30.2: type = ptr_type %U.ref [symbolic = %ptr.loc13_30.1 (constants.%ptr.79f131.2)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc13_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc13_6.1 (constants.%U.8b3)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc13_16.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc13_16.1 (constants.%T.336)] // CHECK:STDOUT: %return.param: ref @F.loc13.%ptr.loc13_30.1 (%ptr.79f131.2) = out_param call_param0 // CHECK:STDOUT: %return: ref @F.loc13.%ptr.loc13_30.1 (%ptr.79f131.2) = return_slot %return.param diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index 3e663b998bfc..5cf25967642b 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -41,6 +41,7 @@ fn CallNegative() { // CHECK:STDOUT: --- fail_todo_call_monomorphization_error.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] @@ -106,6 +107,7 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_39.1: type = splice_block %.loc4_39.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Core.ref.loc4: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 5a3061616f0e..27a94debb5a3 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -27,6 +27,7 @@ fn G() { // CHECK:STDOUT: --- return_slot.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Wrap.type: type = generic_class_type @Wrap [concrete] @@ -114,6 +115,7 @@ fn G() { // CHECK:STDOUT: %Wrap.decl: %Wrap.type = class_decl @Wrap [concrete = constants.%Wrap.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc15_12.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_12.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} diff --git a/toolchain/check/testdata/function/generic/template_param.carbon b/toolchain/check/testdata/function/generic/template_param.carbon index c60cb822c0c9..c640d5c4defc 100644 --- a/toolchain/check/testdata/function/generic/template_param.carbon +++ b/toolchain/check/testdata/function/generic/template_param.carbon @@ -26,6 +26,7 @@ fn G() { // CHECK:STDOUT: --- fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -45,6 +46,7 @@ fn G() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0, template [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} diff --git a/toolchain/check/testdata/function/generic/type_param.carbon b/toolchain/check/testdata/function/generic/type_param.carbon index a3368dbe2e11..ed5fb2dd881c 100644 --- a/toolchain/check/testdata/function/generic/type_param.carbon +++ b/toolchain/check/testdata/function/generic/type_param.carbon @@ -20,6 +20,7 @@ fn F(T:! type) { // CHECK:STDOUT: --- type_param.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -59,6 +60,7 @@ fn F(T:! type) { // 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] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/type_param_scope.carbon b/toolchain/check/testdata/function/generic/type_param_scope.carbon index c23fa8032715..aec6929acfde 100644 --- a/toolchain/check/testdata/function/generic/type_param_scope.carbon +++ b/toolchain/check/testdata/function/generic/type_param_scope.carbon @@ -20,6 +20,7 @@ fn F(T:! type, n: T) -> T { // CHECK:STDOUT: --- type_param_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic] @@ -40,6 +41,7 @@ fn F(T:! type, n: T) -> T { // CHECK:STDOUT: %return.param_patt: @F.%pattern_type (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc15_25: type = name_ref T, %T.loc15_6.2 [symbolic = %T.loc15_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_6.1 (constants.%T)] // CHECK:STDOUT: %n.param: @F.%T.loc15_6.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc15_19: type = name_ref T, %T.loc15_6.2 [symbolic = %T.loc15_6.1 (constants.%T)] diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index ed279c2ac8c9..2029c5518897 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -58,6 +58,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: --- call_defined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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 [symbolic] @@ -121,6 +122,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.param_patt: @Defined.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.2 [symbolic = %T.loc4_12.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_12.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.1 (constants.%T)] // CHECK:STDOUT: %x.param: @Defined.%T.loc4_12.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.2 [symbolic = %T.loc4_12.1 (constants.%T)] @@ -189,6 +191,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: --- call_defined_late.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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 [symbolic] @@ -252,6 +255,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.param_patt: @Defined.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.2 [symbolic = %T.loc4_12.1 (constants.%T)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_12.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.1 (constants.%T)] // CHECK:STDOUT: %x.param.loc4: @Defined.%T.loc4_12.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.2 [symbolic = %T.loc4_12.1 (constants.%T)] @@ -276,6 +280,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.param_patt: @Defined.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc10_31: type = name_ref T, %T.loc10 [symbolic = %T.loc4_12.1 (constants.%T)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc10: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_12.1 (constants.%T)] // CHECK:STDOUT: %x.param.loc10: @Defined.%T.loc4_12.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10 [symbolic = %T.loc4_12.1 (constants.%T)] @@ -335,6 +340,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: --- fail_call_undefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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 [symbolic] @@ -395,6 +401,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.param_patt: @Undefined.%pattern_type (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_33: type = name_ref T, %T.loc4_14.2 [symbolic = %T.loc4_14.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: %x.param: @Undefined.%T.loc4_14.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc4_27: type = name_ref T, %T.loc4_14.2 [symbolic = %T.loc4_14.1 (constants.%T)] diff --git a/toolchain/check/testdata/generic/call_basic_depth.carbon b/toolchain/check/testdata/generic/call_basic_depth.carbon index fb7d8df43e48..fa07dd70a839 100644 --- a/toolchain/check/testdata/generic/call_basic_depth.carbon +++ b/toolchain/check/testdata/generic/call_basic_depth.carbon @@ -48,6 +48,7 @@ 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: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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 [symbolic] @@ -140,6 +141,7 @@ 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc20_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_6.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%T.loc20_6.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_6.2 [symbolic = %T.loc20_6.1 (constants.%T)] @@ -153,6 +155,7 @@ fn M() { // 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.loc23_25: type = name_ref T, %T.loc23_6.2 [symbolic = %T.loc23_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc23_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_6.1 (constants.%T)] // CHECK:STDOUT: %x.param: @H.%T.loc23_6.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc23_19: type = name_ref T, %T.loc23_6.2 [symbolic = %T.loc23_6.1 (constants.%T)] @@ -168,6 +171,7 @@ fn M() { // 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.loc29_25: type = name_ref T, %T.loc29_6.2 [symbolic = %T.loc29_6.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc29_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc29_6.1 (constants.%T)] // CHECK:STDOUT: %x.param: @G.%T.loc29_6.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc29_19: type = name_ref T, %T.loc29_6.2 [symbolic = %T.loc29_6.1 (constants.%T)] @@ -205,6 +209,7 @@ 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc16_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc16_22.1 (constants.%T)] // CHECK:STDOUT: %x.param: @C.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)] diff --git a/toolchain/check/testdata/generic/complete_type.carbon b/toolchain/check/testdata/generic/complete_type.carbon index bb0a84fff698..e7e551a97d7d 100644 --- a/toolchain/check/testdata/generic/complete_type.carbon +++ b/toolchain/check/testdata/generic/complete_type.carbon @@ -84,6 +84,7 @@ fn G() { F(B); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %A.type: type = generic_class_type @A [concrete] @@ -137,6 +138,7 @@ fn G() { F(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] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { @@ -288,6 +290,7 @@ fn G() { F(B); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -342,6 +345,7 @@ fn G() { F(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] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} @@ -443,6 +447,7 @@ fn G() { F(B); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B: type = class_type @B [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -498,6 +503,7 @@ fn G() { F(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] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} diff --git a/toolchain/check/testdata/generic/dependent_param.carbon b/toolchain/check/testdata/generic/dependent_param.carbon index 537ea352861b..8a95210ca3a3 100644 --- a/toolchain/check/testdata/generic/dependent_param.carbon +++ b/toolchain/check/testdata/generic/dependent_param.carbon @@ -27,6 +27,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: --- nested_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -112,6 +113,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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: name_binding_decl { @@ -196,7 +198,10 @@ 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.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %.loc5: type = splice_block %T.ref [symbolic = %T (constants.%T)] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc5_15.2: @Inner.%T (%T) = bind_symbolic_name U, 1 [symbolic = %U.loc5_15.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Outer.9d6 [symbolic = @Outer.as.Destroy.impl.%Outer (constants.%Outer.9d6)] diff --git a/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon b/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon index 7ea7d74e7ad9..7804f9f2dccc 100644 --- a/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon +++ b/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon @@ -135,18 +135,19 @@ fn H(T:! type) { // CHECK:STDOUT: %T.patt: @C.F.%pattern_type (%pattern_type.2e9) = symbolic_binding_pattern T, 1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc11_18.1: type = splice_block %.loc11_18.2 [symbolic = %A_where.type (constants.%A_where.type.5b404c.1)] { +// CHECK:STDOUT: // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %CC.ref.loc11_14: type = name_ref CC, @C.%CC.loc6_9.2 [symbolic = %CC (constants.%CC)] // CHECK:STDOUT: %A.type.loc11_16.2: type = facet_type <@A, @A(constants.%CC)> [symbolic = %A.type.loc11_16.1 (constants.%A.type.75a876.2)] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: @C.F.%A.type.loc11_16.1 (%A.type.75a876.2) = name_ref .Self, %.Self.2 [symbolic = %.Self.1 (constants.%.Self.fafe34.1)] +// CHECK:STDOUT: %.Self.ref: @C.F.%A.type.loc11_16.1 (%A.type.75a876.2) = name_ref .Self, %.Self.3 [symbolic = %.Self.1 (constants.%.Self.fafe34.1)] // CHECK:STDOUT: %.loc11_24.1: @C.F.%A.assoc_type (%A.assoc_type.ed3b32.2) = specific_constant @X.%assoc0, @A(constants.%CC) [symbolic = %assoc0 (constants.%assoc0.ce3509.2)] // CHECK:STDOUT: %X.ref: @C.F.%A.assoc_type (%A.assoc_type.ed3b32.2) = name_ref X, %.loc11_24.1 [symbolic = %assoc0 (constants.%assoc0.ce3509.2)] // CHECK:STDOUT: %.Self.as_type.loc11_24.2: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc11_24.1 (constants.%.Self.as_type)] // CHECK:STDOUT: %.loc11_24.2: type = converted %.Self.ref, %.Self.as_type.loc11_24.2 [symbolic = %.Self.as_type.loc11_24.1 (constants.%.Self.as_type)] // CHECK:STDOUT: %impl.elem0.loc11_24.2: type = impl_witness_access constants.%A.lookup_impl_witness.4e49fb.1, element0 [symbolic = %impl.elem0.loc11_24.1 (constants.%impl.elem0.452c56.1)] // CHECK:STDOUT: %CC.ref.loc11_29: type = name_ref CC, @C.%CC.loc6_9.2 [symbolic = %CC (constants.%CC)] -// CHECK:STDOUT: %.loc11_18.2: type = where_expr %.Self.2 [symbolic = %A_where.type (constants.%A_where.type.5b404c.1)] { +// CHECK:STDOUT: %.loc11_18.2: type = where_expr %.Self.3 [symbolic = %A_where.type (constants.%A_where.type.5b404c.1)] { // CHECK:STDOUT: requirement_base_facet_type constants.%A.type.75a876.2 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc11_24.2, %CC.ref.loc11_29 // CHECK:STDOUT: } @@ -214,8 +215,8 @@ fn H(T:! type) { // CHECK:STDOUT: %C.F.type: type = fn_type @C.F, @C(%DD) [symbolic = %C.F.type (constants.%C.F.type.704ae6.2)] // CHECK:STDOUT: %C.F: @D.G.%C.F.type (%C.F.type.704ae6.2) = struct_value () [symbolic = %C.F (constants.%C.F.2d247e.2)] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%DD)> [symbolic = %A.type (constants.%A.type.75a876.3)] -// CHECK:STDOUT: %.Self: @D.G.%A.type (%A.type.75a876.3) = bind_symbolic_name .Self [symbolic = %.Self (constants.%.Self.fafe34.2)] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %.Self, @A, @A(%DD) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness.4e49fb.2)] +// CHECK:STDOUT: %.Self.loc11: @D.G.%A.type (%A.type.75a876.3) = bind_symbolic_name .Self [symbolic = %.Self.loc11 (constants.%.Self.fafe34.2)] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %.Self.loc11, @A, @A(%DD) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness.4e49fb.2)] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0.452c56.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -291,7 +292,7 @@ fn H(T:! type) { // CHECK:STDOUT: %C.F.type => constants.%C.F.type.789 // CHECK:STDOUT: %C.F => constants.%C.F.cc7 // CHECK:STDOUT: %A.type => constants.%A.type.700 -// CHECK:STDOUT: %.Self => constants.%.Self.4e2 +// CHECK:STDOUT: %.Self.loc11 => constants.%.Self.4e2 // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.lookup_impl_witness.935 // CHECK:STDOUT: %impl.elem0 => constants.%impl.elem0.ab3 // CHECK:STDOUT: } @@ -369,13 +370,15 @@ fn H(T:! type) { // CHECK:STDOUT: %AA.ref.loc9_59: type = name_ref AA, %AA.loc9_14.1 [symbolic = %AA.loc9_14.2 (constants.%AA)] // CHECK:STDOUT: %ptr.loc9_61.1: type = ptr_type %AA.ref.loc9_59 [symbolic = %ptr.loc9_61.2 (constants.%ptr.79f131.1)] // CHECK:STDOUT: %B.type.loc9_62.1: type = facet_type <@B, @B(constants.%ptr.79f131.1)> [symbolic = %B.type.loc9_62.2 (constants.%B.type.4e3fc4.1)] +// CHECK:STDOUT: // CHECK:STDOUT: %AA.loc9_14.1: type = bind_symbolic_name AA, 0 [symbolic = %AA.loc9_14.2 (constants.%AA)] // CHECK:STDOUT: %.loc9_36.1: type = splice_block %.loc9_36.2 [symbolic = %A_where.type (constants.%A_where.type.812090.1)] { +// CHECK:STDOUT: // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %AA.ref.loc9_32: type = name_ref AA, %AA.loc9_14.1 [symbolic = %AA.loc9_14.2 (constants.%AA)] // CHECK:STDOUT: %A.type.loc9_34.1: type = facet_type <@A, @A(constants.%AA)> [symbolic = %A.type.loc9_34.2 (constants.%A.type.75a876.1)] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.75a876.1) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.fafe34.1)] +// CHECK:STDOUT: %.Self.ref: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.75a876.1) = name_ref .Self, %.Self.3 [symbolic = %.Self.4 (constants.%.Self.fafe34.1)] // CHECK:STDOUT: %.loc9_42.1: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = specific_constant @X.%assoc0, @A(constants.%AA) [symbolic = %assoc0 (constants.%assoc0)] // CHECK:STDOUT: %X.ref: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = name_ref X, %.loc9_42.1 [symbolic = %assoc0 (constants.%assoc0)] // CHECK:STDOUT: %.Self.as_type.loc9_42.1: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc9_42.2 (constants.%.Self.as_type)] @@ -383,7 +386,7 @@ fn H(T:! type) { // CHECK:STDOUT: %impl.elem0.loc9_42.1: type = impl_witness_access constants.%A.lookup_impl_witness.4e49fb.1, element0 [symbolic = %impl.elem0.loc9_42.2 (constants.%impl.elem0.452c56.1)] // CHECK:STDOUT: %.loc9_48.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_48.2: type = converted %.loc9_48.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_36.2: type = where_expr %.Self.1 [symbolic = %A_where.type (constants.%A_where.type.812090.1)] { +// CHECK:STDOUT: %.loc9_36.2: type = where_expr %.Self.3 [symbolic = %A_where.type (constants.%A_where.type.812090.1)] { // CHECK:STDOUT: requirement_base_facet_type constants.%A.type.75a876.1 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc9_42.1, %.loc9_48.2 // CHECK:STDOUT: } @@ -401,8 +404,8 @@ fn H(T:! type) { // CHECK:STDOUT: %require_complete.loc9_42: = require_complete_type %A.type.loc9_34.2 [symbolic = %require_complete.loc9_42 (constants.%require_complete.6da)] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%AA.loc9_14.2) [symbolic = %A.assoc_type (constants.%A.assoc_type)] // CHECK:STDOUT: %assoc0: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = assoc_entity element0, @A.%X [symbolic = %assoc0 (constants.%assoc0)] -// CHECK:STDOUT: %.Self.as_type.loc9_42.2: type = facet_access_type %.Self.2 [symbolic = %.Self.as_type.loc9_42.2 (constants.%.Self.as_type)] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %.Self.2, @A, @A(%AA.loc9_14.2) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness.4e49fb.1)] +// CHECK:STDOUT: %.Self.as_type.loc9_42.2: type = facet_access_type %.Self.4 [symbolic = %.Self.as_type.loc9_42.2 (constants.%.Self.as_type)] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %.Self.4, @A, @A(%AA.loc9_14.2) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness.4e49fb.1)] // CHECK:STDOUT: %impl.elem0.loc9_42.2: type = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_42.2 (constants.%impl.elem0.452c56.1)] // CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%AA.loc9_14.2) where %impl.elem0.loc9_42.2 = constants.%empty_tuple.type> [symbolic = %A_where.type (constants.%A_where.type.812090.1)] // CHECK:STDOUT: %BB.loc9_25.2: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.812090.1) = bind_symbolic_name BB, 1 [symbolic = %BB.loc9_25.2 (constants.%BB.a66)] @@ -447,8 +450,8 @@ fn H(T:! type) { // CHECK:STDOUT: %ptr.loc21_14.2: type = ptr_type %DD [symbolic = %ptr.loc21_14.2 (constants.%ptr.79f131.2)] // CHECK:STDOUT: %B.type.loc21_15.2: type = facet_type <@B, @B(%ptr.loc21_14.2)> [symbolic = %B.type.loc21_15.2 (constants.%B.type.4e3fc4.2)] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%DD)> [symbolic = %A.type (constants.%A.type.75a876.2)] -// CHECK:STDOUT: %.Self: @D.G.%A.type (%A.type.75a876.2) = bind_symbolic_name .Self [symbolic = %.Self (constants.%.Self.fafe34.2)] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %.Self, @A, @A(%DD) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness.4e49fb.2)] +// CHECK:STDOUT: %.Self.loc9: @D.G.%A.type (%A.type.75a876.2) = bind_symbolic_name .Self [symbolic = %.Self.loc9 (constants.%.Self.fafe34.2)] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %.Self.loc9, @A, @A(%DD) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness.4e49fb.2)] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0.452c56.2)] // CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.loc15_8.1, @B, @B(%ptr.loc21_14.2) [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness.8e3)] // CHECK:STDOUT: %B.facet.loc21_7.2: @D.G.%B.type.loc21_15.2 (%B.type.4e3fc4.2) = facet_value %T.loc15_8.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc21_7.2 (constants.%B.facet.44e)] @@ -469,7 +472,7 @@ fn H(T:! type) { // CHECK:STDOUT: specific @BB.as_type.as.B.impl(constants.%AA, constants.%BB.a66) { // CHECK:STDOUT: %AA.loc9_14.2 => constants.%AA // CHECK:STDOUT: %A.type.loc9_34.2 => constants.%A.type.75a876.1 -// CHECK:STDOUT: %.Self.2 => constants.%.Self.fafe34.1 +// CHECK:STDOUT: %.Self.4 => constants.%.Self.fafe34.1 // CHECK:STDOUT: %require_complete.loc9_42 => constants.%require_complete.6da // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type // CHECK:STDOUT: %assoc0 => constants.%assoc0 @@ -514,7 +517,7 @@ fn H(T:! type) { // CHECK:STDOUT: %ptr.loc21_14.2 => constants.%ptr.c28 // CHECK:STDOUT: %B.type.loc21_15.2 => constants.%B.type.973 // CHECK:STDOUT: %A.type => constants.%A.type.700 -// CHECK:STDOUT: %.Self => constants.%.Self.4e2 +// CHECK:STDOUT: %.Self.loc9 => constants.%.Self.4e2 // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.lookup_impl_witness.935 // CHECK:STDOUT: %impl.elem0 => constants.%impl.elem0.ab3 // CHECK:STDOUT: %B.lookup_impl_witness => constants.%B.lookup_impl_witness.c4b diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index 5e9c7c8091df..5ecd34d681b7 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -53,6 +53,7 @@ class C(C:! type) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -192,6 +193,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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc5_11.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_11.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: name_binding_decl { @@ -288,6 +290,7 @@ 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: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %C.8b3: type = bind_symbolic_name C, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] @@ -374,6 +377,7 @@ class C(C:! type) { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %C.patt: %pattern_type.98f = symbolic_binding_pattern C, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.loc13_11.2: type = bind_symbolic_name C, 0 [symbolic = %C.loc13_11.1 (constants.%C.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: return @@ -410,6 +414,7 @@ class C(C:! type) { // CHECK:STDOUT: --- nonlocal_param_shadows_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %C.8b3: type = bind_symbolic_name C, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] @@ -444,6 +449,7 @@ class C(C:! type) { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %C.patt: %pattern_type.98f = symbolic_binding_pattern C, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.loc4_9.2: type = bind_symbolic_name C, 0 [symbolic = %C.loc4_9.1 (constants.%C.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/generic/template/convert.carbon b/toolchain/check/testdata/generic/template/convert.carbon index 21700bb46f5a..6f0527d27369 100644 --- a/toolchain/check/testdata/generic/template/convert.carbon +++ b/toolchain/check/testdata/generic/template/convert.carbon @@ -62,6 +62,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: --- convert.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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 [template] @@ -153,6 +154,7 @@ fn Test(d: D) -> 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: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%T.loc4_15.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T)] @@ -336,6 +338,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: --- fail_cannot_convert.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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 [template] @@ -403,6 +406,7 @@ fn Test(d: D) -> 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: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%T.loc4_15.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T)] diff --git a/toolchain/check/testdata/generic/template/member_access.carbon b/toolchain/check/testdata/generic/template/member_access.carbon index 39708094b63b..644a071e797b 100644 --- a/toolchain/check/testdata/generic/template/member_access.carbon +++ b/toolchain/check/testdata/generic/template/member_access.carbon @@ -85,6 +85,7 @@ fn Test(e: E) { // CHECK:STDOUT: --- member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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.7dc: type = pattern_type %T [template] @@ -170,6 +171,7 @@ 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%T.loc4_15.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T)] @@ -307,6 +309,7 @@ fn Test(e: E) { // CHECK:STDOUT: --- fail_no_such_member.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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.7dc: type = pattern_type %T [template] @@ -372,6 +375,7 @@ 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%T.loc4_15.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T)] @@ -475,6 +479,7 @@ fn Test(e: E) { // CHECK:STDOUT: --- fail_member_wrong_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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 [template] @@ -558,6 +563,7 @@ 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.loc4.%T.loc4_15.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T)] diff --git a/toolchain/check/testdata/generic/template/unimplemented.carbon b/toolchain/check/testdata/generic/template/unimplemented.carbon index 8246fdc7b702..3dc1ac58ceb1 100644 --- a/toolchain/check/testdata/generic/template/unimplemented.carbon +++ b/toolchain/check/testdata/generic/template/unimplemented.carbon @@ -73,6 +73,7 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: --- fail_todo_unimplemented_operator.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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 [template] @@ -115,6 +116,7 @@ fn F[template T:! type](x: T) { // 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: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc6_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc6_15.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%T.loc6_15.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_15.2 [template = %T.loc6_15.1 (constants.%T)] @@ -167,6 +169,7 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.54b: = complete_type_witness %struct_type.n [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %c: %C = bind_symbolic_name c, 0, template [template] // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] @@ -205,7 +208,10 @@ fn F[template T:! type](x: T) { // 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: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc11: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %c.loc11_15.2: %C = bind_symbolic_name c, 0, template [template = %c.loc11_15.1 (constants.%c)] // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -269,6 +275,7 @@ fn F[template T:! type](x: T) { // CHECK:STDOUT: --- fail_todo_unimplemented_convert.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3d5d.1: 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] @@ -324,6 +331,7 @@ fn F[template T:! type](x: T) { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T.8b3d5d.1)] // CHECK:STDOUT: %x.param: @F.%T.loc4_15.1 (%T.8b3d5d.1) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T.8b3d5d.1)] diff --git a/toolchain/check/testdata/generic/template_dependence.carbon b/toolchain/check/testdata/generic/template_dependence.carbon index 57b26236fce6..e83b32cb3895 100644 --- a/toolchain/check/testdata/generic/template_dependence.carbon +++ b/toolchain/check/testdata/generic/template_dependence.carbon @@ -31,6 +31,7 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: --- type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ptr.79f: type = ptr_type %T [template] @@ -65,6 +66,7 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc4_36: type = name_ref T, %T.loc4_15.2 [template = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc4_37: type = ptr_type %T.ref.loc4_36 [template = %ptr.loc4_29.1 (constants.%ptr.79f)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%ptr.loc4_30.1 (%ptr.a13) = value_param call_param0 // CHECK:STDOUT: %.loc4: type = splice_block %ptr.loc4_30.2 [template = %ptr.loc4_30.1 (constants.%ptr.a13)] { @@ -109,6 +111,7 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: --- mixed.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3d5d.1: type = bind_symbolic_name T, 0, template [template] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] @@ -156,7 +159,9 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %U.ref.loc4: type = name_ref U, %U.loc4_25.2 [symbolic = %U.loc4_25.1 (constants.%U)] // CHECK:STDOUT: %.loc4_43.1: %tuple.type.24b = tuple_literal (%T.ref.loc4, %U.ref.loc4) // CHECK:STDOUT: %.loc4_43.2: type = converted %.loc4_43.1, constants.%tuple.type.30b [template = %tuple.type (constants.%tuple.type.30b)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0, template [template = %T.loc4_15.1 (constants.%T.8b3d5d.1)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc4_25.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc4_25.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref @F.%tuple.type (%tuple.type.30b) = out_param call_param0 // CHECK:STDOUT: %return: ref @F.%tuple.type (%tuple.type.30b) = return_slot %return.param 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 4b6b458d5c43..1c1e0768fa0c 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -137,7 +137,7 @@ fn F() { // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.Destroy.impl(.inst18.loc4_14: type) { +// CHECK:STDOUT: generic impl @C.as.Destroy.impl(.inst20.loc4_14: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)] @@ -166,7 +166,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(.inst18.loc4_14: type) { +// CHECK:STDOUT: generic class @C(.inst20.loc4_14: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -185,7 +185,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst23.loc4_24 [concrete = constants.%C.generic] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst25.loc4_24 [concrete = constants.%C.generic] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else // CHECK:STDOUT: complete_type_witness = invalid @@ -195,7 +195,7 @@ fn F() { // CHECK:STDOUT: .C = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(.inst18.loc4_14: type) { +// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(.inst20.loc4_14: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C)] // CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.7d2)] diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index 3aaa265d7911..5278b1dc663c 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -282,9 +282,9 @@ fn CallF() { // 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: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [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, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type [symbolic_self] // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] @@ -317,8 +317,8 @@ fn CallF() { // 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] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// 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] // CHECK:STDOUT: %.loc15_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] @@ -409,9 +409,9 @@ fn CallF() { // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert: %empty_tuple.type.as.ImplicitAs.impl.Convert.type = struct_value () [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] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [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, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %require_complete.d0c: = require_complete_type %.Self.as_type [symbolic_self] // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] @@ -456,8 +456,8 @@ fn CallF() { // CHECK:STDOUT: impl_decl @C.as.I.impl [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] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// 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] // CHECK:STDOUT: %.loc18_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] @@ -590,6 +590,7 @@ fn CallF() { // CHECK:STDOUT: --- fail_monomorphization_failure.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] @@ -649,6 +650,7 @@ fn CallF() { // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_33.1: type = splice_block %.loc4_33.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] @@ -759,17 +761,18 @@ fn CallF() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.258 [symbolic_self] // CHECK:STDOUT: %ImplicitAs.type.2a8: type = facet_type <@ImplicitAs, @ImplicitAs(%.Self.as_type)> [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.258, @I [symbolic_self] // CHECK:STDOUT: %I.facet: %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: %.Self.as_type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] @@ -805,17 +808,18 @@ fn CallF() { // CHECK:STDOUT: %T.patt: %pattern_type.189 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = constants.%I_where.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.cc7 = name_ref ImplicitAs, imports.%Core.ImplicitAs [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %.Self.ref.loc8_43: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc8_43: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %.Self.as_type.loc8_48: type = facet_access_type %.Self.ref.loc8_43 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_48: type = converted %.Self.ref.loc8_43, %.Self.as_type.loc8_48 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.as_type)> [symbolic_self = constants.%ImplicitAs.type.2a8] // CHECK:STDOUT: %.loc8_19.2: type = converted %.loc8_19.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.Self.ref.loc8_54: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc8_54: %I.type = name_ref .Self, %.Self.2 [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.loc8_54: type = facet_access_type %.Self.ref.loc8_54 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_54: type = converted %.Self.ref.loc8_54, %.Self.as_type.loc8_54 [symbolic_self = constants.%.Self.as_type] @@ -823,7 +827,7 @@ fn CallF() { // CHECK:STDOUT: %.loc8_60.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_60.2: %empty_struct_type = converted %.loc8_60.1, %empty_struct [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc8_12.2: type = where_expr %.Self [concrete = constants.%I_where.type] { +// CHECK:STDOUT: %.loc8_12.2: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_impls %.loc8_19.2, %ImplicitAs.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_60.2 diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index ad9c756a8622..6c6252c84e2c 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -123,6 +123,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: --- core.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -145,6 +146,7 @@ fn InstanceCallFail() { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Dest.loc3_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.1 (constants.%Dest)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -343,11 +345,11 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // 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, inst26 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst28 [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, inst26 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] +// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst28 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.42e)] // CHECK:STDOUT: %Core.import_ref.207 = import_ref Core//default, loc4_35, unloaded // CHECK:STDOUT: } @@ -525,11 +527,11 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // 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, inst26 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst28 [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, inst26 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] +// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst28 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.42e)] // CHECK:STDOUT: %Core.import_ref.207 = import_ref Core//default, loc4_35, unloaded // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index a677750ee606..a1f07bd4d64f 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -54,6 +54,7 @@ class X(U:! type) { // CHECK:STDOUT: --- extend_impl_generic_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -157,6 +158,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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Param.decl: type = class_decl @Param [concrete = constants.%Param] {} {} @@ -403,6 +405,7 @@ class X(U:! type) { // CHECK:STDOUT: --- extend_impl_generic_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete] @@ -465,11 +468,13 @@ class X(U:! type) { // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: %X.type = class_decl @X [concrete = constants.%X.generic] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc8_9.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc8_9.1 (constants.%U)] // 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 d68cb6599a6c..cc4cc2c7e10b 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -29,6 +29,7 @@ class C { // CHECK:STDOUT: --- fail_extend_impl_forall.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %GenericInterface.type.c92: type = generic_interface_type @GenericInterface [concrete] @@ -58,6 +59,7 @@ class C { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_28.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_28.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -129,6 +131,7 @@ class 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.loc24_23.2 [symbolic = %T.loc24_23.1 (constants.%T)] // CHECK:STDOUT: %GenericInterface.type.loc24_54.2: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc24_54.1 (constants.%GenericInterface.type.3fe)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc24_23.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc24_23.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %GenericInterface.impl_witness_table = impl_witness_table (), @C.as.GenericInterface.impl [concrete] diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index 0e3f0044b969..2a755dc89d15 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -46,6 +46,7 @@ impl i32 as I { // CHECK:STDOUT: --- fail_self_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic] @@ -127,8 +128,12 @@ 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: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc15_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_9.1 (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_9.2 [symbolic = %T.loc15_9.1 (constants.%T)] +// CHECK:STDOUT: %.loc15: type = splice_block %T.ref [symbolic = %T.loc15_9.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_9.2 [symbolic = %T.loc15_9.1 (constants.%T)] +// CHECK:STDOUT: } // CHECK:STDOUT: %X.loc15_19.2: @C.%T.loc15_9.1 (%T) = bind_symbolic_name X, 1 [symbolic = %X.loc15_19.1 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} diff --git a/toolchain/check/testdata/impl/fail_undefined_interface.carbon b/toolchain/check/testdata/impl/fail_undefined_interface.carbon index 6ef1adfba6d9..644e4712328a 100644 --- a/toolchain/check/testdata/impl/fail_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_undefined_interface.carbon @@ -210,9 +210,9 @@ impl C as J where .Self impls Incomplete and .T = (); // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%T [concrete] // CHECK:STDOUT: %Incomplete.type: type = facet_type <@Incomplete> [concrete] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %.Self.968: %J.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.968 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %.Self.968, @J [symbolic_self] // CHECK:STDOUT: %J.facet: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -231,12 +231,12 @@ impl C as J where .Self impls Incomplete and .T = (); // CHECK:STDOUT: impl_decl @C.as.J.impl [concrete] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc15_19: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.ref.loc15_19: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [concrete = constants.%Incomplete.type] // CHECK:STDOUT: %.Self.as_type.loc15_19: type = facet_access_type %.Self.ref.loc15_19 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc15_19: type = converted %.Self.ref.loc15_19, %.Self.as_type.loc15_19 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.Self.ref.loc15_46: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc15_46: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %T.ref: %J.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc15_46: type = facet_access_type %.Self.ref.loc15_46 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc15_46: type = converted %.Self.ref.loc15_46, %.Self.as_type.loc15_46 [symbolic_self = constants.%.Self.as_type] diff --git a/toolchain/check/testdata/impl/forward_decls.carbon b/toolchain/check/testdata/impl/forward_decls.carbon index 59de37d119c7..00266d71e2ef 100644 --- a/toolchain/check/testdata/impl/forward_decls.carbon +++ b/toolchain/check/testdata/impl/forward_decls.carbon @@ -492,9 +492,9 @@ interface I { // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [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: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -520,8 +520,8 @@ interface I { // CHECK:STDOUT: %.loc6_7.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc6: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc6: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc6: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %T.ref.loc6: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc6: type = facet_access_type %.Self.ref.loc6 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6, %.Self.as_type.loc6 [symbolic_self = constants.%.Self.as_type] @@ -540,8 +540,8 @@ interface I { // CHECK:STDOUT: %.loc8_7.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc8: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc8: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc8: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %T.ref.loc8: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc8: type = facet_access_type %.Self.ref.loc8 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref.loc8, %.Self.as_type.loc8 [symbolic_self = constants.%.Self.as_type] @@ -598,9 +598,9 @@ interface I { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [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, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] @@ -632,8 +632,8 @@ interface I { // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc7: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc7: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %T.ref.loc7: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc7: type = facet_access_type %.Self.ref.loc7 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_19: type = converted %.Self.ref.loc7, %.Self.as_type.loc7 [symbolic_self = constants.%.Self.as_type] @@ -665,8 +665,8 @@ interface I { // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc11: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref.loc11: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc11: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc11: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %T.ref.loc11: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_19: type = converted %.Self.ref.loc11, %.Self.as_type.loc11 [symbolic_self = constants.%.Self.as_type] @@ -761,9 +761,9 @@ interface I { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [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, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] @@ -795,8 +795,8 @@ interface I { // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc7: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc7: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %T.ref.loc7: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc7: type = facet_access_type %.Self.ref.loc7 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_19: type = converted %.Self.ref.loc7, %.Self.as_type.loc7 [symbolic_self = constants.%.Self.as_type] @@ -830,8 +830,8 @@ interface I { // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc11: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref.loc11: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc11: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc11: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %T.ref.loc11: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_19: type = converted %.Self.ref.loc11, %.Self.as_type.loc11 [symbolic_self = constants.%.Self.as_type] @@ -1184,6 +1184,7 @@ interface I { // CHECK:STDOUT: --- associated_const_of_parameterized.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete] @@ -1204,12 +1205,12 @@ interface I { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.type.e7a: type = facet_type <@I, @I(%C)> [concrete] -// CHECK:STDOUT: %.Self: %I.type.e7a = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.0dc: %I.type.e7a = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Self.b1d: %I.type.e7a = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %I.assoc_type.b3c: type = assoc_entity_type @I, @I(%C) [concrete] // CHECK:STDOUT: %assoc0.3e4: %I.assoc_type.b3c = assoc_entity element0, @I.%T [concrete] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I, @I(%C) [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.0dc [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.0dc, @I, @I(%C) [symbolic_self] // CHECK:STDOUT: %I.facet: %I.type.e7a = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I, @I(%C) where %impl.elem0 = %C> [concrete] @@ -1241,6 +1242,7 @@ interface I { // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %U.loc3_13.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc3_13.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [concrete = constants.%C] {} {} @@ -1250,8 +1252,8 @@ interface I { // CHECK:STDOUT: %I.ref.loc8: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %C.ref.loc8_13: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C] // CHECK:STDOUT: %I.type.loc8: type = facet_type <@I, @I(constants.%C)> [concrete = constants.%I.type.e7a] -// CHECK:STDOUT: %.Self.2: %I.type.e7a = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc8: %I.type.e7a = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: %I.type.e7a = bind_symbolic_name .Self [symbolic_self = constants.%.Self.0dc] +// CHECK:STDOUT: %.Self.ref.loc8: %I.type.e7a = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.0dc] // CHECK:STDOUT: %.loc8_22.1: %I.assoc_type.b3c = specific_constant @T.%assoc0, @I(constants.%C) [concrete = constants.%assoc0.3e4] // CHECK:STDOUT: %T.ref.loc8: %I.assoc_type.b3c = name_ref T, %.loc8_22.1 [concrete = constants.%assoc0.3e4] // CHECK:STDOUT: %.Self.as_type.loc8: type = facet_access_type %.Self.ref.loc8 [symbolic_self = constants.%.Self.as_type] @@ -1272,8 +1274,8 @@ interface I { // CHECK:STDOUT: %I.ref.loc11: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %C.ref.loc11_13: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C] // CHECK:STDOUT: %I.type.loc11: type = facet_type <@I, @I(constants.%C)> [concrete = constants.%I.type.e7a] -// CHECK:STDOUT: %.Self.1: %I.type.e7a = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc11: %I.type.e7a = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %I.type.e7a = bind_symbolic_name .Self [symbolic_self = constants.%.Self.0dc] +// CHECK:STDOUT: %.Self.ref.loc11: %I.type.e7a = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.0dc] // CHECK:STDOUT: %.loc11_22.1: %I.assoc_type.b3c = specific_constant @T.%assoc0, @I(constants.%C) [concrete = constants.%assoc0.3e4] // CHECK:STDOUT: %T.ref.loc11: %I.assoc_type.b3c = name_ref T, %.loc11_22.1 [concrete = constants.%assoc0.3e4] // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.as_type] @@ -1411,6 +1413,7 @@ interface I { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.2b5: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] @@ -1458,7 +1461,10 @@ interface I { // CHECK:STDOUT: %C.decl.loc6: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.2b5 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref.loc6: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc6: type = splice_block %I.ref.loc6 [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %I.ref.loc6: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_9.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc8: %F.type = fn_decl @F [concrete = constants.%F] { @@ -1483,7 +1489,10 @@ interface I { // CHECK:STDOUT: %C.decl.loc12: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.2b5 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc12: type = splice_block %I.ref.loc12 [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc14: %F.type = fn_decl @F [concrete = constants.%F] { @@ -1724,9 +1733,9 @@ interface I { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [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: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] @@ -1754,8 +1763,8 @@ interface I { // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref.loc9: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc9: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc9: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %T.ref.loc9: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc9: type = facet_access_type %.Self.ref.loc9 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_19: type = converted %.Self.ref.loc9, %.Self.as_type.loc9 [symbolic_self = constants.%.Self.as_type] @@ -1773,8 +1782,8 @@ interface I { // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc18: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref.loc18: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc18: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc18: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %T.ref.loc18: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc18: type = facet_access_type %.Self.ref.loc18 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc18_19: type = converted %.Self.ref.loc18, %.Self.as_type.loc18 [symbolic_self = constants.%.Self.as_type] @@ -1857,6 +1866,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %X.type: type = facet_type <@X> [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %U: %X.type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.08c: type = pattern_type %X.type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -1914,7 +1924,10 @@ interface I { // CHECK:STDOUT: %F.decl.loc6: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %U.patt: %pattern_type.08c = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref.loc6: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] +// CHECK:STDOUT: %.loc6: type = splice_block %X.ref.loc6 [concrete = constants.%X.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %X.ref.loc6: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc6_6.2: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc6_6.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl.loc7: %G.type = fn_decl @G [concrete = constants.%G] { @@ -1922,7 +1935,10 @@ interface I { // CHECK:STDOUT: %u.patt: @G.%pattern_type (%pattern_type.331) = binding_pattern u [concrete] // CHECK:STDOUT: %u.param_patt: @G.%pattern_type (%pattern_type.331) = value_param_pattern %u.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref.loc7: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] +// CHECK:STDOUT: %.loc7_10: type = splice_block %X.ref.loc7 [concrete = constants.%X.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %X.ref.loc7: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc7_6.2: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc7_6.1 (constants.%U)] // CHECK:STDOUT: %u.param.loc7: @G.%U.as_type.loc7_16.1 (%U.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc7_16.1: type = splice_block %.loc7_16.2 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] { @@ -1954,7 +1970,10 @@ interface I { // CHECK:STDOUT: %F.decl.loc34: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %U.patt: %pattern_type.08c = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref.loc34: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] +// CHECK:STDOUT: %.loc34: type = splice_block %X.ref.loc34 [concrete = constants.%X.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %X.ref.loc34: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc34: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc6_6.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl.loc35: %G.type = fn_decl @G [concrete = constants.%G] { @@ -1962,7 +1981,10 @@ interface I { // CHECK:STDOUT: %u.patt: @G.%pattern_type (%pattern_type.331) = binding_pattern u [concrete] // CHECK:STDOUT: %u.param_patt: @G.%pattern_type (%pattern_type.331) = value_param_pattern %u.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref.loc35: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] +// CHECK:STDOUT: %.loc35_10: type = splice_block %X.ref.loc35 [concrete = constants.%X.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %X.ref.loc35: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc35: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc7_6.1 (constants.%U)] // CHECK:STDOUT: %u.param.loc35: @G.%U.as_type.loc7_16.1 (%U.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc35_16.1: type = splice_block %.loc35_16.2 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] { @@ -2300,9 +2322,9 @@ interface I { // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [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: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %C> [symbolic] @@ -2420,8 +2442,8 @@ interface I { // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc12_10: type = name_ref C, @I.F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc12: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc12: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %U.ref.loc12: %I.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc12: type = facet_access_type %.Self.ref.loc12 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc12_23: type = converted %.Self.ref.loc12, %.Self.as_type.loc12 [symbolic_self = constants.%.Self.as_type] @@ -2438,8 +2460,8 @@ interface I { // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc21_10: type = name_ref C, @I.F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %I.ref.loc21: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc21: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc21: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %U.ref.loc21: %I.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc21: type = facet_access_type %.Self.ref.loc21 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc21_23: type = converted %.Self.ref.loc21, %.Self.as_type.loc21 [symbolic_self = constants.%.Self.as_type] diff --git a/toolchain/check/testdata/impl/generic_redeclaration.carbon b/toolchain/check/testdata/impl/generic_redeclaration.carbon index e7cbbf2ca814..30cf788de7bb 100644 --- a/toolchain/check/testdata/impl/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/generic_redeclaration.carbon @@ -131,6 +131,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %Self.09f: %K.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %L.type: type = facet_type <@L> [concrete] // CHECK:STDOUT: %Self.1d2: %L.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.826: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.2b5: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %T.as_type.b70: type = facet_access_type %T.826 [symbolic] @@ -176,9 +177,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc12: %I.type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T.826)] // CHECK:STDOUT: %T.as_type.loc12_21.1: type = facet_access_type %T.ref.loc12 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b70)] -// CHECK:STDOUT: %.loc12: type = converted %T.ref.loc12, %T.as_type.loc12_21.1 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b70)] +// CHECK:STDOUT: %.loc12_21: type = converted %T.ref.loc12, %T.as_type.loc12_21.1 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b70)] // CHECK:STDOUT: %Interface.ref.loc12: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc12_18: type = splice_block %I.ref.loc12 [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_14.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T.826)] // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.impl_witness_table.loc12 = impl_witness_table (), @T.as_type.as.Interface.impl.c3d [concrete] @@ -188,9 +192,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc13_14.1 [symbolic = %T.loc13_14.2 (constants.%T.ccd)] // CHECK:STDOUT: %T.as_type.loc13_21.1: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3df)] -// CHECK:STDOUT: %.loc13: type = converted %T.ref.loc13, %T.as_type.loc13_21.1 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3df)] +// CHECK:STDOUT: %.loc13_21: type = converted %T.ref.loc13, %T.as_type.loc13_21.1 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3df)] // CHECK:STDOUT: %Interface.ref.loc13: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %J.ref.loc13: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %.loc13_18: type = splice_block %J.ref.loc13 [concrete = constants.%J.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %J.ref.loc13: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc13_14.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc13_14.2 (constants.%T.ccd)] // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.impl_witness_table.loc13 = impl_witness_table (), @T.as_type.as.Interface.impl.793 [concrete] @@ -200,9 +207,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc14: %K.type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T.09f)] // CHECK:STDOUT: %T.as_type.loc14_21.1: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.037)] -// CHECK:STDOUT: %.loc14: type = converted %T.ref.loc14, %T.as_type.loc14_21.1 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.037)] +// CHECK:STDOUT: %.loc14_21: type = converted %T.ref.loc14, %T.as_type.loc14_21.1 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.037)] // CHECK:STDOUT: %Interface.ref.loc14: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %K.ref.loc14: type = name_ref K, file.%K.decl [concrete = constants.%K.type] +// CHECK:STDOUT: %.loc14_18: type = splice_block %K.ref.loc14 [concrete = constants.%K.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %K.ref.loc14: type = name_ref K, file.%K.decl [concrete = constants.%K.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc14_14.1: %K.type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T.09f)] // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.impl_witness_table.loc14 = impl_witness_table (), @T.as_type.as.Interface.impl.c93 [concrete] @@ -212,9 +222,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc15: %L.type = name_ref T, %T.loc15_14.1 [symbolic = %T.loc15_14.2 (constants.%T.1d2)] // CHECK:STDOUT: %T.as_type.loc15_21.1: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.0ed)] -// CHECK:STDOUT: %.loc15: type = converted %T.ref.loc15, %T.as_type.loc15_21.1 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.0ed)] +// CHECK:STDOUT: %.loc15_21: type = converted %T.ref.loc15, %T.as_type.loc15_21.1 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.0ed)] // CHECK:STDOUT: %Interface.ref.loc15: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %L.ref.loc15: type = name_ref L, file.%L.decl [concrete = constants.%L.type] +// CHECK:STDOUT: %.loc15_18: type = splice_block %L.ref.loc15 [concrete = constants.%L.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %L.ref.loc15: type = name_ref L, file.%L.decl [concrete = constants.%L.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_14.1: %L.type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.2 (constants.%T.1d2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.impl_witness_table.loc15 = impl_witness_table (), @T.as_type.as.Interface.impl.9e6 [concrete] @@ -224,9 +237,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc19: %I.type = name_ref T, %T.loc19 [symbolic = %T.loc12_14.2 (constants.%T.826)] // CHECK:STDOUT: %T.as_type.loc19: type = facet_access_type %T.ref.loc19 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b70)] -// CHECK:STDOUT: %.loc19: type = converted %T.ref.loc19, %T.as_type.loc19 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b70)] +// CHECK:STDOUT: %.loc19_21: type = converted %T.ref.loc19, %T.as_type.loc19 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b70)] // CHECK:STDOUT: %Interface.ref.loc19: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %I.ref.loc19: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc19_18: type = splice_block %I.ref.loc19 [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %I.ref.loc19: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc19: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T.826)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @T.as_type.as.Interface.impl.793 [concrete] { @@ -234,9 +250,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc27: %J.type = name_ref T, %T.loc27 [symbolic = %T.loc13_14.2 (constants.%T.ccd)] // CHECK:STDOUT: %T.as_type.loc27: type = facet_access_type %T.ref.loc27 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3df)] -// CHECK:STDOUT: %.loc27: type = converted %T.ref.loc27, %T.as_type.loc27 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3df)] +// CHECK:STDOUT: %.loc27_21: type = converted %T.ref.loc27, %T.as_type.loc27 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3df)] // CHECK:STDOUT: %Interface.ref.loc27: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %J.ref.loc27: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %.loc27_18: type = splice_block %J.ref.loc27 [concrete = constants.%J.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %J.ref.loc27: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc27: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc13_14.2 (constants.%T.ccd)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @T.as_type.as.Interface.impl.c93 [concrete] { @@ -244,9 +263,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc35: %K.type = name_ref T, %T.loc35 [symbolic = %T.loc14_14.2 (constants.%T.09f)] // CHECK:STDOUT: %T.as_type.loc35: type = facet_access_type %T.ref.loc35 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.037)] -// CHECK:STDOUT: %.loc35: type = converted %T.ref.loc35, %T.as_type.loc35 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.037)] +// CHECK:STDOUT: %.loc35_21: type = converted %T.ref.loc35, %T.as_type.loc35 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.037)] // CHECK:STDOUT: %Interface.ref.loc35: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %K.ref.loc35: type = name_ref K, file.%K.decl [concrete = constants.%K.type] +// CHECK:STDOUT: %.loc35_18: type = splice_block %K.ref.loc35 [concrete = constants.%K.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %K.ref.loc35: type = name_ref K, file.%K.decl [concrete = constants.%K.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc35: %K.type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T.09f)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @T.as_type.as.Interface.impl.9e6 [concrete] { @@ -254,9 +276,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc43: %L.type = name_ref T, %T.loc43 [symbolic = %T.loc15_14.2 (constants.%T.1d2)] // CHECK:STDOUT: %T.as_type.loc43: type = facet_access_type %T.ref.loc43 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.0ed)] -// CHECK:STDOUT: %.loc43: type = converted %T.ref.loc43, %T.as_type.loc43 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.0ed)] +// CHECK:STDOUT: %.loc43_21: type = converted %T.ref.loc43, %T.as_type.loc43 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.0ed)] // CHECK:STDOUT: %Interface.ref.loc43: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %L.ref.loc43: type = name_ref L, file.%L.decl [concrete = constants.%L.type] +// CHECK:STDOUT: %.loc43_18: type = splice_block %L.ref.loc43 [concrete = constants.%L.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %L.ref.loc43: type = name_ref L, file.%L.decl [concrete = constants.%L.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc43: %L.type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.2 (constants.%T.1d2)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -308,7 +333,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc12 as %Interface.ref.loc12 { +// CHECK:STDOUT: impl: %.loc12_21 as %Interface.ref.loc12 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%Interface.impl_witness.loc12 // CHECK:STDOUT: } @@ -321,7 +346,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc13 as %Interface.ref.loc13 { +// CHECK:STDOUT: impl: %.loc13_21 as %Interface.ref.loc13 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%Interface.impl_witness.loc13 // CHECK:STDOUT: } @@ -334,7 +359,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc14 as %Interface.ref.loc14 { +// CHECK:STDOUT: impl: %.loc14_21 as %Interface.ref.loc14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%Interface.impl_witness.loc14 // CHECK:STDOUT: } @@ -347,7 +372,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc15 as %Interface.ref.loc15 { +// CHECK:STDOUT: impl: %.loc15_21 as %Interface.ref.loc15 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%Interface.impl_witness.loc15 // CHECK:STDOUT: } @@ -384,6 +409,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] @@ -411,9 +437,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc7_14.1 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc7_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc7: type = converted %T.ref, %T.as_type.loc7_21.1 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc7_21: type = converted %T.ref, %T.as_type.loc7_21.1 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc7_18: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_14.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @T.as_type.as.J.impl.bfd509.1 [concrete] @@ -423,9 +452,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc15_14.1 [symbolic = %T.loc15_14.2 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc15_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc15: type = converted %T.ref, %T.as_type.loc15_21.1 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc15_21: type = converted %T.ref, %T.as_type.loc15_21.1 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc15_18: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_14.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -453,7 +485,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc7 as %J.ref { +// CHECK:STDOUT: impl: %.loc7_21 as %J.ref { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = file.%J.impl_witness // CHECK:STDOUT: } @@ -465,7 +497,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc15 as %J.ref { +// CHECK:STDOUT: impl: %.loc15_21 as %J.ref { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // CHECK:STDOUT: } @@ -556,6 +588,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness file.%I.impl_witness_table, @T.as.I.impl.2caff2.1(%T) [symbolic] @@ -599,6 +632,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_14.2 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @T.as.I.impl.2caff2.1 [concrete] @@ -608,6 +642,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_14.2 [symbolic = %T.loc15_14.1 (constants.%T)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/impl_assoc_const.carbon b/toolchain/check/testdata/impl/impl_assoc_const.carbon index 335e892ce8df..daea6e4a5514 100644 --- a/toolchain/check/testdata/impl/impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/impl_assoc_const.carbon @@ -404,9 +404,9 @@ fn G() { // CHECK:STDOUT: %L.assoc_type: type = assoc_entity_type @L [concrete] // CHECK:STDOUT: %assoc0: %L.assoc_type = assoc_entity element0, @L.%W [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %.Self: %L.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %L.lookup_impl_witness: = lookup_impl_witness %.Self, @L [symbolic_self] +// CHECK:STDOUT: %.Self.19e: %L.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.19e [symbolic_self] +// CHECK:STDOUT: %L.lookup_impl_witness: = lookup_impl_witness %.Self.19e, @L [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %L.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %tuple.type.2d5: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -421,7 +421,7 @@ fn G() { // CHECK:STDOUT: %.loc13_7.2: type = converted %.loc13_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [concrete = constants.%L.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc13_20: %L.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_20: %L.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.19e] // CHECK:STDOUT: %W.ref.loc13_20: %L.assoc_type = name_ref W, @W.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_20: type = facet_access_type %.Self.ref.loc13_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_20: type = converted %.Self.ref.loc13_20, %.Self.as_type.loc13_20 [symbolic_self = constants.%.Self.as_type] @@ -434,7 +434,7 @@ fn G() { // CHECK:STDOUT: %.loc13_36.3: type = converted %.loc13_31, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc13_36.4: type = converted %.loc13_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc13_36.5: type = converted %.loc13_36.1, constants.%tuple.type.2d5 [concrete = constants.%tuple.type.2d5] -// CHECK:STDOUT: %.Self.ref.loc13_42: %L.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_42: %L.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.19e] // CHECK:STDOUT: %W.ref.loc13_42: %L.assoc_type = name_ref W, @W.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_42: type = facet_access_type %.Self.ref.loc13_42 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_42: type = converted %.Self.ref.loc13_42, %.Self.as_type.loc13_42 [symbolic_self = constants.%.Self.as_type] @@ -448,7 +448,7 @@ fn G() { // CHECK:STDOUT: %.loc13_58.3: type = converted %.loc13_53, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc13_58.4: type = converted %.loc13_57, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc13_58.5: type = converted %.loc13_58.1, constants.%tuple.type.e5a [concrete = constants.%tuple.type.e5a] -// CHECK:STDOUT: %.Self.ref.loc13_64: %L.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_64: %L.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.19e] // CHECK:STDOUT: %W.ref.loc13_64: %L.assoc_type = name_ref W, @W.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_64: type = facet_access_type %.Self.ref.loc13_64 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_64: type = converted %.Self.ref.loc13_64, %.Self.as_type.loc13_64 [symbolic_self = constants.%.Self.as_type] @@ -462,7 +462,7 @@ fn G() { // CHECK:STDOUT: %.loc13_80.3: type = converted %.loc13_75, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc13_80.4: type = converted %.loc13_79, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc13_80.5: type = converted %.loc13_80.1, constants.%tuple.type.d7e [concrete = constants.%tuple.type.d7e] -// CHECK:STDOUT: %.Self.ref.loc13_86: %L.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_86: %L.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.19e] // CHECK:STDOUT: %W.ref.loc13_86: %L.assoc_type = name_ref W, @W.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_86: type = facet_access_type %.Self.ref.loc13_86 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_86: type = converted %.Self.ref.loc13_86, %.Self.as_type.loc13_86 [symbolic_self = constants.%.Self.as_type] @@ -500,9 +500,9 @@ fn G() { // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%Y [concrete] // CHECK:STDOUT: %assoc2: %M.assoc_type = assoc_entity element2, @M.%Z [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self, @M [symbolic_self] +// CHECK:STDOUT: %.Self.a61: %M.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.a61 [symbolic_self] +// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self.a61, @M [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %impl.elem1: type = impl_witness_access %M.lookup_impl_witness, element1 [symbolic_self] // CHECK:STDOUT: %impl.elem2: type = impl_witness_access %M.lookup_impl_witness, element2 [symbolic_self] @@ -514,28 +514,28 @@ fn G() { // CHECK:STDOUT: %.loc13_7.2: type = converted %.loc13_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc13_20: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_20: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %X.ref.loc13_20: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_20: type = facet_access_type %.Self.ref.loc13_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_20: type = converted %.Self.ref.loc13_20, %.Self.as_type.loc13_20 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc13_20: type = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] -// CHECK:STDOUT: %.Self.ref.loc13_25: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_25: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %Y.ref.loc13_25: %M.assoc_type = name_ref Y, @Y.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc13_25: type = facet_access_type %.Self.ref.loc13_25 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_25: type = converted %.Self.ref.loc13_25, %.Self.as_type.loc13_25 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem1.loc13_25: type = impl_witness_access constants.%M.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] -// CHECK:STDOUT: %.Self.ref.loc13_32: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_32: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %Y.ref.loc13_32: %M.assoc_type = name_ref Y, @Y.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc13_32: type = facet_access_type %.Self.ref.loc13_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_32: type = converted %.Self.ref.loc13_32, %.Self.as_type.loc13_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem1.loc13_32: type = impl_witness_access constants.%M.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] -// CHECK:STDOUT: %.Self.ref.loc13_37: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_37: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %X.ref.loc13_37: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc13_37: type = facet_access_type %.Self.ref.loc13_37 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_37: type = converted %.Self.ref.loc13_37, %.Self.as_type.loc13_37 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc13_37: type = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc13_37, %impl.elem1.loc13_25 [symbolic_self = constants.%impl.elem1] -// CHECK:STDOUT: %.Self.ref.loc13_44: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc13_44: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc2 [concrete = constants.%assoc2] // CHECK:STDOUT: %.Self.as_type.loc13_44: type = facet_access_type %.Self.ref.loc13_44 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_44: type = converted %.Self.ref.loc13_44, %.Self.as_type.loc13_44 [symbolic_self = constants.%.Self.as_type] diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index 789024cd823c..63c5cb0a1867 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -29,6 +29,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %Simple.F: %Simple.F.type = struct_value () [concrete] // CHECK:STDOUT: %Simple.assoc_type: type = assoc_entity_type @Simple [concrete] // CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, @Simple.%Simple.F.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %Simple.impl_witness: = impl_witness file.%Simple.impl_witness_table, @T.as.Simple.impl(%T) [symbolic] @@ -47,6 +48,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_14.2 [symbolic = %T.loc19_14.1 (constants.%T)] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc19_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (@T.as.Simple.impl.%T.as.Simple.impl.F.decl), @T.as.Simple.impl [concrete] diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index f2710440b08e..53daf3285219 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -700,6 +700,7 @@ impl () as I({}) { // CHECK:STDOUT: %return.param_patt: @empty_tuple.type.as.I.impl.F.loc10_29.1.%pattern_type (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref.loc10_27: type = name_ref U, %U.loc10_8.2 [symbolic = %U.loc10_8.1 (constants.%U)] +// CHECK:STDOUT: // CHECK:STDOUT: %U.loc10_8.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc10_8.1 (constants.%U)] // CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc10_29.1.%U.loc10_8.1 (%U) = value_param call_param0 // CHECK:STDOUT: %U.ref.loc10_21: type = name_ref U, %U.loc10_8.2 [symbolic = %U.loc10_8.1 (constants.%U)] @@ -808,6 +809,7 @@ impl () as I({}) { // CHECK:STDOUT: %.loc19_15.3: type = converted %.loc19_15.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: // CHECK:STDOUT: %U.loc19_18.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc19_18.1 (constants.%U)] // CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc19_39.1.%U.loc19_18.1 (%U) = value_param call_param1 // CHECK:STDOUT: %U.ref.loc19_31: type = name_ref U, %U.loc19_18.2 [symbolic = %U.loc19_18.1 (constants.%U)] diff --git a/toolchain/check/testdata/impl/import_builtin_call.carbon b/toolchain/check/testdata/impl/import_builtin_call.carbon index 71df47c99f6a..da7359d2bca6 100644 --- a/toolchain/check/testdata/impl/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/import_builtin_call.carbon @@ -97,6 +97,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete] // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete] // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %MyInt.type: type = generic_class_type @MyInt [concrete] // CHECK:STDOUT: %MyInt.generic: %MyInt.type = struct_value () [concrete] @@ -156,6 +157,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc11_28.1: type = splice_block %.loc11_28.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] // CHECK:STDOUT: %.loc11_28.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral] @@ -171,6 +173,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %MyInt.loc15_39.2: type = class_type @MyInt, @MyInt(constants.%N) [symbolic = %MyInt.loc15_39.1 (constants.%MyInt)] // CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%Add.decl [concrete = constants.%Add.type] // CHECK:STDOUT: %.loc15_29.1: type = splice_block %.loc15_29.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] // CHECK:STDOUT: %.loc15_29.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral] @@ -191,6 +194,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %N.ref.loc19_51: Core.IntLiteral = name_ref N, %N.loc19_11.2 [symbolic = %N.loc19_11.1 (constants.%N)] // CHECK:STDOUT: %MyInt.loc19_52: type = class_type @MyInt, @MyInt(constants.%N) [symbolic = %MyInt.loc19_39.1 (constants.%MyInt)] // CHECK:STDOUT: %.loc19_26.1: type = splice_block %.loc19_26.3 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral] // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral] // CHECK:STDOUT: %.loc19_26.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral] @@ -470,7 +474,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Main.Double: %Double.type = import_ref Main//generic_impl, Double, loaded [concrete = constants.%Double] // CHECK:STDOUT: %Main.import_ref.f1e294.1: Core.IntLiteral = import_ref Main//generic_impl, loc11_13, loaded [symbolic = @MyInt.%N (constants.%N)] // CHECK:STDOUT: %Main.import_ref.9e9: = import_ref Main//generic_impl, loc13_1, loaded [symbolic = @MyInt.%complete_type (constants.%complete_type.a87)] -// CHECK:STDOUT: %Main.import_ref.697 = import_ref Main//generic_impl, inst93 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.697 = import_ref Main//generic_impl, inst95 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.07c = import_ref Main//generic_impl, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f99: %Add.assoc_type = import_ref Main//generic_impl, loc5_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.Op = import_ref Main//generic_impl, Op, unloaded @@ -739,6 +743,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %ToLiteral: %ToLiteral.type = struct_value () [concrete] // CHECK:STDOUT: %FromLiteral.type: type = fn_type @FromLiteral [concrete] // CHECK:STDOUT: %FromLiteral: %FromLiteral.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %N.987: %i32.builtin = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %ToLiteral.call: init Core.IntLiteral = call %ToLiteral(%N.987) [symbolic] // CHECK:STDOUT: %iN.builtin.016: type = int_type signed, %ToLiteral.call [symbolic] @@ -856,6 +861,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.loc9_41.1: type = value_of_initializer %Int.call.loc9_41 [symbolic = %iN.builtin (constants.%iN.builtin.016)] // CHECK:STDOUT: %.loc9_41.2: type = converted %Int.call.loc9_41, %.loc9_41.1 [symbolic = %iN.builtin (constants.%iN.builtin.016)] // CHECK:STDOUT: %.loc9_19.1: type = splice_block %.loc9_19.3 [concrete = constants.%i32.builtin] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Int.ref.loc9_13: %Int.type = name_ref Int, file.%Int.decl [concrete = constants.%Int] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %Int.call.loc9_19: init type = call %Int.ref.loc9_13(%int_32) [concrete = constants.%i32.builtin] @@ -898,7 +904,10 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Int.call: init type = call %Int.ref(%.loc18_51.2) [symbolic = %iN.builtin (constants.%iN.builtin.9ef)] // CHECK:STDOUT: %.loc18_52.1: type = value_of_initializer %Int.call [symbolic = %iN.builtin (constants.%iN.builtin.9ef)] // CHECK:STDOUT: %.loc18_52.2: type = converted %Int.call, %.loc18_52.1 [symbolic = %iN.builtin (constants.%iN.builtin.9ef)] -// CHECK:STDOUT: %OtherInt.ref: type = name_ref OtherInt, file.%OtherInt.decl [concrete = constants.%OtherInt] +// CHECK:STDOUT: %.loc18_22: type = splice_block %OtherInt.ref [concrete = constants.%OtherInt] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %OtherInt.ref: type = name_ref OtherInt, file.%OtherInt.decl [concrete = constants.%OtherInt] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc18_18.2: %OtherInt = bind_symbolic_name N, 0 [symbolic = %N.loc18_18.1 (constants.%N.335)] // CHECK:STDOUT: %return.param: ref @MakeFromClass.%iN.builtin (%iN.builtin.9ef) = out_param call_param0 // CHECK:STDOUT: %return: ref @MakeFromClass.%iN.builtin (%iN.builtin.9ef) = return_slot %return.param @@ -1069,7 +1078,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Main.MakeFromClass: %MakeFromClass.type = import_ref Main//convert_symbolic, MakeFromClass, loaded [concrete = constants.%MakeFromClass] // CHECK:STDOUT: %Main.import_ref.85e: %i32.builtin = import_ref Main//convert_symbolic, loc9_9, loaded [symbolic = @Make.%N (constants.%N.987)] // CHECK:STDOUT: %Main.import_ref.b03: = import_ref Main//convert_symbolic, loc14_1, loaded [concrete = constants.%complete_type.f8a] -// CHECK:STDOUT: %Main.import_ref.d11 = import_ref Main//convert_symbolic, inst133 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.d11 = import_ref Main//convert_symbolic, inst135 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.8f7 = import_ref Main//convert_symbolic, loc13_45, unloaded // CHECK:STDOUT: %Main.import_ref.77d: %OtherInt = import_ref Main//convert_symbolic, loc18_18, loaded [symbolic = @MakeFromClass.%N (constants.%N.335)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_generic.carbon b/toolchain/check/testdata/impl/import_generic.carbon index 932bfe36824e..e1e67e8e5b8b 100644 --- a/toolchain/check/testdata/impl/import_generic.carbon +++ b/toolchain/check/testdata/impl/import_generic.carbon @@ -107,6 +107,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete] @@ -131,6 +132,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.I.impl.084 [concrete] { @@ -140,6 +142,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.ref.loc8: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.325)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table.loc8 = impl_witness_table (), @C.as.I.impl.084 [concrete] @@ -151,6 +154,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.ref.loc9: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc9 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %I.type.loc9: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.325)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc9: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.I.impl.cd2 [concrete] { @@ -161,6 +165,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc12_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc12_32.2 (constants.%ptr)] // CHECK:STDOUT: %I.type.loc12_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.0e2)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc12_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table.loc12 = impl_witness_table (), @C.as.I.impl.cd2 [concrete] @@ -269,13 +274,14 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %require_complete.0e6: = require_complete_type %I.type.0e2 [symbolic] // CHECK:STDOUT: %I.impl_witness.6ad: = impl_witness imports.%I.impl_witness_table.e14, @C.as.I.impl.cd2fdc.1(%T) [symbolic] // CHECK:STDOUT: %Self.fb4: %I.type.0e2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//import_generic, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.I: %I.type.dac = import_ref Main//import_generic, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//import_generic, loc5_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//import_generic, inst31 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//import_generic, inst33 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.cc6 = import_ref Main//import_generic, loc8_33, unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//import_generic, inst17 [no loc], unloaded @@ -304,6 +310,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.325)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.I.impl.08450a.3 [concrete] { @@ -313,6 +320,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)] // CHECK:STDOUT: %I.type.loc14_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.325)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc14_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.I.impl.cd2fdc.2 [concrete] { @@ -323,6 +331,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)] // CHECK:STDOUT: %I.type.loc20_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.0e2)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc20_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.I.impl.cd2fdc.3 [concrete] { @@ -333,6 +342,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)] // CHECK:STDOUT: %I.type.loc26_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.0e2)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc26_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -485,6 +495,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %J.type.2b8: type = generic_interface_type @J [concrete] @@ -506,6 +517,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.decl: %J.type.2b8 = interface_decl @J [concrete = constants.%J.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @D.as.J.impl.199 [concrete] { @@ -515,6 +527,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, file.%J.decl [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_14.1 [symbolic = %T.loc11_14.2 (constants.%T)] // CHECK:STDOUT: %J.type.loc11_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc11_32.2 (constants.%J.type.b72)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc11_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %J.impl_witness_table.loc11 = impl_witness_table (), @D.as.J.impl.199 [concrete] @@ -527,6 +540,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc17_14.1 [symbolic = %T.loc17_14.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc17_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc17_32.2 (constants.%ptr)] // CHECK:STDOUT: %J.type.loc17_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc17_33.2 (constants.%J.type.628)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc17_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc17_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %J.impl_witness_table.loc17 = impl_witness_table (), @D.as.J.impl.dfd [concrete] @@ -611,13 +625,14 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: %J.type.628: type = facet_type <@J, @J(%ptr)> [symbolic] // CHECK:STDOUT: %J.impl_witness.5a8: = impl_witness imports.%J.impl_witness_table.487, @D.as.J.impl.dfd2f7.1(%T) [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.D: type = import_ref Main//import_generic_decl, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %Main.J: %J.type.2b8 = import_ref Main//import_generic_decl, J, loaded [concrete = constants.%J.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//import_generic_decl, loc5_13, loaded [symbolic = @J.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.ff5 = import_ref Main//import_generic_decl, inst31 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ff5 = import_ref Main//import_generic_decl, inst33 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic_decl, loc4_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//import_generic_decl, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic_decl, loc11_14, loaded [symbolic = @D.as.J.impl.199bba.1.%T (constants.%T)] @@ -644,6 +659,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %J.type.loc8_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.b72)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @D.as.J.impl.199bba.3 [concrete] { @@ -653,6 +669,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)] // CHECK:STDOUT: %J.type.loc14_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.b72)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc14_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @D.as.J.impl.dfd2f7.2 [concrete] { @@ -663,6 +680,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)] // CHECK:STDOUT: %J.type.loc20_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.628)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc20_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @D.as.J.impl.dfd2f7.3 [concrete] { @@ -673,6 +691,7 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)] // CHECK:STDOUT: %J.type.loc26_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.628)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc26_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon index 0b451f5c5196..6cd1f3c8f9fe 100644 --- a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon +++ b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon @@ -740,7 +740,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded // CHECK:STDOUT: %Main.I3: type = import_ref Main//interface, I3, loaded [concrete = constants.%I3.type] // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.148 = import_ref Main//interface, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.148 = import_ref Main//interface, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f5f: %I3.assoc_type = import_ref Main//interface, loc6_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.import_ref.680: %I3.assoc_type = import_ref Main//interface, loc7_9, loaded [concrete = constants.%assoc1] // CHECK:STDOUT: %Main.import_ref.181: %I3.assoc_type = import_ref Main//interface, loc8_9, loaded [concrete = constants.%assoc2] @@ -749,13 +749,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.T3 = import_ref Main//interface, T3, unloaded // CHECK:STDOUT: %Main.import_ref.5fb: type = import_ref Main//interface, loc6_9, loaded [concrete = %T1] // CHECK:STDOUT: %T1: type = assoc_const_decl @T1 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.8a8474.1: %I3.type = import_ref Main//interface, inst27 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.8a8474.1: %I3.type = import_ref Main//interface, inst29 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.e26: type = import_ref Main//interface, loc7_9, loaded [concrete = %T2] // CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.8a8474.2: %I3.type = import_ref Main//interface, inst27 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.8a8474.2: %I3.type = import_ref Main//interface, inst29 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.e32: type = import_ref Main//interface, loc8_9, loaded [concrete = %T3] // CHECK:STDOUT: %T3: type = assoc_const_decl @T3 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.8a8474.3: %I3.type = import_ref Main//interface, inst27 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.8a8474.3: %I3.type = import_ref Main//interface, inst29 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1479,12 +1479,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType: type = import_ref Main//interface, NonType, loaded [concrete = constants.%NonType.type] -// CHECK:STDOUT: %Main.import_ref.8b7 = import_ref Main//interface, inst42 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.8b7 = import_ref Main//interface, inst47 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.9fa: %NonType.assoc_type = import_ref Main//interface, loc12_8, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.Y: %struct_type.a.225 = import_ref Main//interface, Y, loaded [concrete = %Y] // CHECK:STDOUT: %Main.import_ref.f3d: %struct_type.a.225 = import_ref Main//interface, loc12_8, loaded [concrete = %Y] // CHECK:STDOUT: %Y: %struct_type.a.225 = assoc_const_decl @Y [concrete] {} -// CHECK:STDOUT: %Main.import_ref.86c: %NonType.type = import_ref Main//interface, inst42 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.86c: %NonType.type = import_ref Main//interface, inst47 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 5314219b6966..77032fe46dce 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -100,6 +100,7 @@ fn G() { // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %X: %empty_tuple.type = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] @@ -175,6 +176,7 @@ fn G() { // CHECK:STDOUT: %X.patt: %pattern_type.cb1 = symbolic_binding_pattern X, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc5_14.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc5_14.3: type = converted %.loc5_14.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } @@ -188,6 +190,7 @@ fn G() { // CHECK:STDOUT: %C.loc7_25.2: type = class_type @C, @C(constants.%Y) [symbolic = %C.loc7_25.1 (constants.%C.13320f.2)] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc7_19.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } @@ -507,7 +510,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.eb1c17.1: %empty_tuple.type = import_ref Main//b, loc5_9, loaded [symbolic = @C.%X (constants.%X)] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//b, loc5_18, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Main.import_ref.572 = import_ref Main//b, inst32 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.572 = import_ref Main//b, inst34 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//a, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//a, loc5_14, loaded [concrete = constants.%assoc0.3f3] // CHECK:STDOUT: %Main.F.8b9 = import_ref Main//a, F, unloaded @@ -516,7 +519,7 @@ fn G() { // CHECK:STDOUT: %Main.import_ref.578: = import_ref Main//b, loc5_17, loaded [symbolic = @C.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.5d03b3.1)] // CHECK:STDOUT: %Main.import_ref.eb1c17.2: %empty_tuple.type = import_ref Main//b, loc5_9, loaded [symbolic = @C.%X (constants.%X)] // CHECK:STDOUT: %Main.import_ref.94a: type = import_ref Main//b, loc5_17, loaded [symbolic = @C.as.Destroy.impl.%C (constants.%C.13320f.1)] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//b, inst35 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//b, inst37 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.e21: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type.1b919a.1) = import_ref Main//b, loc5_17, loaded [symbolic = @C.as.Destroy.impl.%C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op.65ca93.1)] // CHECK:STDOUT: %Destroy.impl_witness_table.c33 = impl_witness_table (%Main.import_ref.e21), @C.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.eb1c17.3: %empty_tuple.type = import_ref Main//b, loc5_9, loaded [symbolic = @C.%X (constants.%X)] diff --git a/toolchain/check/testdata/impl/import_use_generic.carbon b/toolchain/check/testdata/impl/import_use_generic.carbon index 874d81846675..9694ea3a347f 100644 --- a/toolchain/check/testdata/impl/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/import_use_generic.carbon @@ -56,6 +56,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: --- import_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] @@ -83,6 +84,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} @@ -93,6 +95,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_14.2 [symbolic = %T.loc10_14.1 (constants.%T)] // CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.1 (constants.%C)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@C.as.I.impl.%C.as.I.impl.F.decl), @C.as.I.impl [concrete] @@ -214,12 +217,12 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %Main.I: type = import_ref Main//import_generic, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//import_generic, loc4_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//import_generic, inst25 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//import_generic, inst31 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//import_generic, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//import_generic, inst33 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//import_generic, F, unloaded // CHECK:STDOUT: %Main.import_ref.e03: %I.F.type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//import_generic, inst31 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//import_generic, inst33 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.6ac: = import_ref Main//import_generic, loc10_34, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.443)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic, loc10_14, loaded [symbolic = @C.as.I.impl.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.499: type = import_ref Main//import_generic, loc10_27, loaded [symbolic = @C.as.I.impl.%C (constants.%C.f2e)] diff --git a/toolchain/check/testdata/impl/interface_args.carbon b/toolchain/check/testdata/impl/interface_args.carbon index d4941a4c5858..94a531181467 100644 --- a/toolchain/check/testdata/impl/interface_args.carbon +++ b/toolchain/check/testdata/impl/interface_args.carbon @@ -110,6 +110,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: --- core.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -132,6 +133,7 @@ fn InstanceC(a: A) -> C { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Dest.loc3_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.1 (constants.%Dest)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -204,6 +206,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: --- action.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Action.type.29c: type = generic_interface_type @Action [concrete] @@ -277,6 +280,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.decl: %Action.type.29c = interface_decl @Action [concrete = constants.%Action.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_18.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_18.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} @@ -551,24 +555,24 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//action, loc8_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst59 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst61 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e1c: type = import_ref Main//action, loc8_9, loaded [concrete = constants.%A] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst64 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//action, loc8_9, unloaded // CHECK:STDOUT: %Main.import_ref.ae7 = import_ref Main//action, loc9_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst103 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst105 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.0e2: type = import_ref Main//action, loc9_9, loaded [concrete = constants.%B] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst64 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//action, loc9_9, unloaded // CHECK:STDOUT: %Main.import_ref.34c = import_ref Main//action, loc10_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst123 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst125 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.0ed: type = import_ref Main//action, loc10_9, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst64 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.b3d = import_ref Main//action, loc10_9, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst28 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst30 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c55: @Action.%Action.assoc_type (%Action.assoc_type.32e) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.f18741.2)] // CHECK:STDOUT: %Main.Op.ae2 = import_ref Main//action, Op, unloaded // CHECK:STDOUT: %Main.import_ref.995: = import_ref Main//action, loc12_21, loaded [concrete = constants.%Action.impl_witness] @@ -576,7 +580,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.bb2: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.cb0] // CHECK:STDOUT: %Main.import_ref.7b5 = import_ref Main//action, loc13_23, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst28 [no loc], loaded [symbolic = @Action.%Self (constants.%Self.e98)] +// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst30 [no loc], loaded [symbolic = @Action.%Self (constants.%Self.e98)] // CHECK:STDOUT: %Main.import_ref.0e3753.1 = import_ref Main//action, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.1f6: @Action.%Action.Op.type (%Action.Op.type.036) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Action.Op (constants.%Action.Op.6ed)] // CHECK:STDOUT: %Main.import_ref.0e3753.2 = import_ref Main//action, loc5_22, unloaded @@ -771,24 +775,24 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//action, loc8_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst59 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst61 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e1c: type = import_ref Main//action, loc8_9, loaded [concrete = constants.%A] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst64 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//action, loc8_9, unloaded // CHECK:STDOUT: %Main.import_ref.ae7 = import_ref Main//action, loc9_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst103 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst105 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.0e2: type = import_ref Main//action, loc9_9, loaded [concrete = constants.%B] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst64 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//action, loc9_9, unloaded // CHECK:STDOUT: %Main.import_ref.34c = import_ref Main//action, loc10_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst123 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst125 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.0ed: type = import_ref Main//action, loc10_9, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst64 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.b3d = import_ref Main//action, loc10_9, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst28 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst30 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c55: @Action.%Action.assoc_type (%Action.assoc_type.32e) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.f18)] // CHECK:STDOUT: %Main.Op.ae2 = import_ref Main//action, Op, unloaded // CHECK:STDOUT: %Main.import_ref.19c = import_ref Main//action, loc12_21, unloaded @@ -796,7 +800,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.bb2: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.cb0] // CHECK:STDOUT: %Main.import_ref.7b5 = import_ref Main//action, loc13_23, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst28 [no loc], loaded [symbolic = @Action.%Self (constants.%Self.e98)] +// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst30 [no loc], loaded [symbolic = @Action.%Self (constants.%Self.e98)] // CHECK:STDOUT: %Main.import_ref.1f6: @Action.%Action.Op.type (%Action.Op.type.036) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Action.Op (constants.%Action.Op.6ed)] // CHECK:STDOUT: %Main.import_ref.0e3753.1 = import_ref Main//action, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.0e3753.2 = import_ref Main//action, loc5_22, unloaded @@ -949,6 +953,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: --- factory.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Factory.type.1a8: type = generic_interface_type @Factory [concrete] @@ -1020,6 +1025,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.decl: %Factory.type.1a8 = interface_decl @Factory [concrete = constants.%Factory.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_19.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} @@ -1313,18 +1319,18 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//factory, loc11_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst81 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst83 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e1c: type = import_ref Main//factory, loc11_9, loaded [concrete = constants.%A] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst84 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst86 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//factory, loc11_9, unloaded // CHECK:STDOUT: %Main.import_ref.6c7: = import_ref Main//factory, loc12_9, loaded [concrete = constants.%Destroy.impl_witness.5cf] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst125 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst127 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.0e2: type = import_ref Main//factory, loc12_9, loaded [concrete = constants.%B] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst84 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst86 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//factory, loc12_9, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst28 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst30 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.46c: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.46d25f.2)] // CHECK:STDOUT: %Main.import_ref.2e4: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.16541d.2)] // CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded @@ -1335,10 +1341,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.a27 = import_ref Main//factory, loc15_17, unloaded // CHECK:STDOUT: %Main.import_ref.163 = import_ref Main//factory, loc16_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst28 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] +// CHECK:STDOUT: %Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst30 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] // CHECK:STDOUT: %Main.import_ref.21018a.1 = import_ref Main//factory, loc6_17, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.91b53a.2: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst28 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] +// CHECK:STDOUT: %Main.import_ref.91b53a.2: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst30 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] // CHECK:STDOUT: %Main.import_ref.46fc3c.1 = import_ref Main//factory, loc8_31, unloaded // CHECK:STDOUT: %Main.import_ref.1aa: @Factory.%Factory.Make.type (%Factory.Make.type.598) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%Factory.Make (constants.%Factory.Make.737)] // CHECK:STDOUT: %Main.import_ref.5be: @Factory.%Factory.Method.type (%Factory.Method.type.7ee) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Factory.Method (constants.%Factory.Method.a71)] @@ -1607,18 +1613,18 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//factory, loc11_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst81 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst83 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e1c: type = import_ref Main//factory, loc11_9, loaded [concrete = constants.%A] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst84 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst86 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//factory, loc11_9, unloaded // CHECK:STDOUT: %Main.import_ref.ae7 = import_ref Main//factory, loc12_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst125 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst127 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.0e2: type = import_ref Main//factory, loc12_9, loaded [concrete = constants.%B] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst84 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst86 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//factory, loc12_9, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst28 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst30 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.46c: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.46d)] // CHECK:STDOUT: %Main.import_ref.2e4: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.165)] // CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded @@ -1629,10 +1635,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.a27 = import_ref Main//factory, loc15_17, unloaded // CHECK:STDOUT: %Main.import_ref.163 = import_ref Main//factory, loc16_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst28 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] +// CHECK:STDOUT: %Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst30 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] // CHECK:STDOUT: %Main.import_ref.1aa: @Factory.%Factory.Make.type (%Factory.Make.type.598) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%Factory.Make (constants.%Factory.Make.737)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.91b53a.2: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst28 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] +// CHECK:STDOUT: %Main.import_ref.91b53a.2: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst30 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] // CHECK:STDOUT: %Main.import_ref.5be: @Factory.%Factory.Method.type (%Factory.Method.type.7ee) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Factory.Method (constants.%Factory.Method.a71)] // CHECK:STDOUT: %Main.import_ref.21018a.1 = import_ref Main//factory, loc6_17, unloaded // CHECK:STDOUT: %Main.import_ref.46fc3c.1 = import_ref Main//factory, loc8_31, unloaded diff --git a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon index 78243d00cfbd..33ca4614082f 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -66,6 +66,7 @@ fn G() { // CHECK:STDOUT: %J.JJ: %J.JJ.type = struct_value () [concrete] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.78c: %J.assoc_type = assoc_entity element0, @J.%J.JJ.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.e8c: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] @@ -148,6 +149,7 @@ fn G() { // CHECK:STDOUT: %t.param_patt: @F.%pattern_type (%pattern_type.a4f) = value_param_pattern %t.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc22_12.1: type = splice_block %.loc22_12.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %I.ref.loc22: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %J.ref.loc22: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %impl.elem0.loc22: %.2af = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index 772a32368f2c..e90f7cf9be13 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -139,6 +139,7 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %HasF.impl_witness.ec7: = impl_witness file.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic] @@ -180,6 +181,7 @@ fn G(x: A) { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@T.as.HasF.impl.%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete] @@ -332,6 +334,7 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] // CHECK:STDOUT: %assoc0.97a: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %HasF.impl_witness.ec7: = impl_witness file.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic] @@ -381,6 +384,7 @@ fn G(x: A) { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@T.as.HasF.impl.%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete] @@ -562,6 +566,7 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -615,6 +620,7 @@ fn G(x: A) { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.HasF.impl [concrete] { @@ -624,6 +630,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_14.2 [symbolic = %T.loc10_14.1 (constants.%T)] // CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.1 (constants.%C.f2e)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@C.as.HasF.impl.%C.as.HasF.impl.F.decl), @C.as.HasF.impl [concrete] @@ -858,6 +865,7 @@ fn G(x: A) { // CHECK:STDOUT: --- deduced_interface_argument.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -912,6 +920,7 @@ fn G(x: A) { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @empty_struct_type.as.HasF.impl [concrete] { @@ -922,6 +931,7 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.ref: %HasF.type.fe3 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)] // CHECK:STDOUT: %HasF.type.loc8_36.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.901)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.decl), @empty_struct_type.as.HasF.impl [concrete] @@ -1115,6 +1125,7 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] @@ -1150,7 +1161,9 @@ fn G(x: A) { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_14.2 [symbolic = %T.loc12_14.1 (constants.%T)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc12_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.1 (constants.%T)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc12_24.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc12_24.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (), @T.as.HasF.impl [concrete] @@ -1268,6 +1281,7 @@ fn G(x: A) { // CHECK:STDOUT: --- fail_inconsistent_deduction.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -1335,6 +1349,7 @@ fn G(x: A) { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] { @@ -1344,6 +1359,7 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.ref: %HasF.type.fe3 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic] // CHECK:STDOUT: %T.ref.loc8_34: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)] // CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.901)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@T.as.HasF.impl.%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete] diff --git a/toolchain/check/testdata/impl/lookup/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/impl_forall.carbon index 41e9d1a1376b..1b6dca9d5945 100644 --- a/toolchain/check/testdata/impl/lookup/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_forall.carbon @@ -40,6 +40,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: --- impl_forall.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %A.type: type = generic_class_type @A [concrete] @@ -166,11 +167,13 @@ fn TestSpecific(a: A({})) -> {} { // 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] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc3_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc7_13.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_13.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @A.as.I.impl [concrete] { @@ -182,6 +185,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %V.ref.loc11_34: type = name_ref V, %V.loc11_14.2 [symbolic = %V.loc11_14.1 (constants.%V)] // CHECK:STDOUT: %I.type.loc11_35.2: type = facet_type <@I, @I(constants.%V)> [symbolic = %I.type.loc11_35.1 (constants.%I.type.325e65.2)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %V.loc11_14.2: type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@A.as.I.impl.%A.as.I.impl.F.decl), @A.as.I.impl [concrete] @@ -194,6 +198,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %return.param_patt: @TestGeneric.%pattern_type.loc17_35 (%pattern_type.7dcd0a.3) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %W.ref.loc17_38: type = name_ref W, %W.loc17_16.2 [symbolic = %W.loc17_16.1 (constants.%W)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %W.loc17_16.2: type = bind_symbolic_name W, 0 [symbolic = %W.loc17_16.1 (constants.%W)] // CHECK:STDOUT: %a.param: @TestGeneric.%A.loc17_32.1 (%A.13025a.3) = value_param call_param0 // CHECK:STDOUT: %.loc17: type = splice_block %A.loc17_32.2 [symbolic = %A.loc17_32.1 (constants.%A.13025a.3)] { diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index 2070d46e3f65..ea56b734b381 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -1509,6 +1509,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: --- has_param.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic] @@ -1557,8 +1558,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %X.patt: @AnyParam.%pattern_type (%pattern_type.7dc) = symbolic_binding_pattern X, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.2 [symbolic = %T.loc4_16.1 (constants.%T)] +// CHECK:STDOUT: %.loc4: type = splice_block %T.ref [symbolic = %T.loc4_16.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.2 [symbolic = %T.loc4_16.1 (constants.%T)] +// CHECK:STDOUT: } // CHECK:STDOUT: %X.loc4_26.2: @AnyParam.%T.loc4_16.1 (%T) = bind_symbolic_name X, 1 [symbolic = %X.loc4_26.1 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %Y.decl: type = interface_decl @Y [concrete = constants.%Y.type] {} {} @@ -1693,6 +1698,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: --- has_generic_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %GenericInterface.type.c92: type = generic_interface_type @GenericInterface [concrete] @@ -1759,18 +1765,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.1: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.1: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst34 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst38 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst95 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst99 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494] // CHECK:STDOUT: %PackageHasParam.K: %Y.K.type = import_ref PackageHasParam//default, K, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst95 [no loc], loaded [symbolic = constants.%Self.f64] +// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst99 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] // CHECK:STDOUT: %PackageHasParam.import_ref.60d: = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.ee6)] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.2: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.2: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.cdc: type = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%AnyParam (constants.%AnyParam.560)] -// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst37 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst41 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageHasParam.import_ref.aa2: @AnyParam.as.Destroy.impl.%AnyParam.as.Destroy.impl.Op.type (%AnyParam.as.Destroy.impl.Op.type.5e7) = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%AnyParam.as.Destroy.impl.Op (constants.%AnyParam.as.Destroy.impl.Op.e78)] // CHECK:STDOUT: %Destroy.impl_witness_table.279 = impl_witness_table (%PackageHasParam.import_ref.aa2), @AnyParam.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.3: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] @@ -1790,6 +1796,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.c92 = interface_decl @GenericInterface [concrete = constants.%GenericInterface.generic] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc6_28.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc6_28.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @AnyParam.as.Y.impl [concrete] {} { @@ -2074,21 +2081,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.1: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.1: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst34 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst38 [no loc], unloaded // CHECK:STDOUT: %PackageGenericInterface.GenericInterface: %GenericInterface.type.0da = import_ref PackageGenericInterface//default, GenericInterface, loaded [concrete = constants.%GenericInterface.generic] // CHECK:STDOUT: %PackageGenericInterface.import_ref.5ab: type = import_ref PackageGenericInterface//default, loc6_28, loaded [symbolic = @GenericInterface.%U (constants.%U)] -// CHECK:STDOUT: %PackageGenericInterface.import_ref.c3b = import_ref PackageGenericInterface//default, inst30 [no loc], unloaded +// CHECK:STDOUT: %PackageGenericInterface.import_ref.c3b = import_ref PackageGenericInterface//default, inst32 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst95 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst99 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494] // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst95 [no loc], loaded [symbolic = constants.%Self.f64] +// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst99 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.60d: = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.ee6)] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.2: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.2: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.cdc: type = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%AnyParam (constants.%AnyParam.560)] -// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst37 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst41 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageHasParam.import_ref.aa2: @AnyParam.as.Destroy.impl.%AnyParam.as.Destroy.impl.Op.type (%AnyParam.as.Destroy.impl.Op.type.5e7) = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%AnyParam.as.Destroy.impl.Op (constants.%AnyParam.as.Destroy.impl.Op.e78)] // CHECK:STDOUT: %Destroy.impl_witness_table.279 = impl_witness_table (%PackageHasParam.import_ref.aa2), @AnyParam.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.3: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] @@ -2294,6 +2301,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: --- has_generic_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %GenericClass.type: type = generic_class_type @GenericClass [concrete] @@ -2366,18 +2374,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.1: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.1: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst34 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst38 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst95 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst99 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494] // CHECK:STDOUT: %PackageHasParam.K: %Y.K.type = import_ref PackageHasParam//default, K, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst95 [no loc], loaded [symbolic = constants.%Self.f64] +// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst99 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] // CHECK:STDOUT: %PackageHasParam.import_ref.60d: = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.138)] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.2: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.2: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.cdc: type = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%AnyParam (constants.%AnyParam.560)] -// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst37 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst41 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageHasParam.import_ref.b79: @AnyParam.as.Destroy.impl.%AnyParam.as.Destroy.impl.Op.type (%AnyParam.as.Destroy.impl.Op.type.f10) = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%AnyParam.as.Destroy.impl.Op (constants.%AnyParam.as.Destroy.impl.Op.bef)] // CHECK:STDOUT: %Destroy.impl_witness_table.a5f = impl_witness_table (%PackageHasParam.import_ref.b79), @AnyParam.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.3: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] @@ -2396,6 +2404,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %GenericClass.decl: %GenericClass.type = class_decl @GenericClass [concrete = constants.%GenericClass.generic] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc6_20.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc6_20.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @AnyParam.as.Y.impl [concrete] {} { @@ -2739,22 +2748,22 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.1: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.1: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst34 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst38 [no loc], unloaded // CHECK:STDOUT: %PackageGenericClass.GenericClass: %GenericClass.type = import_ref PackageGenericClass//default, GenericClass, loaded [concrete = constants.%GenericClass.generic] // CHECK:STDOUT: %PackageGenericClass.import_ref.5ab3ec.1: type = import_ref PackageGenericClass//default, loc6_20, loaded [symbolic = @GenericClass.%U (constants.%U)] // CHECK:STDOUT: %PackageGenericClass.import_ref.8f2: = import_ref PackageGenericClass//default, loc6_31, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageGenericClass.import_ref.065 = import_ref PackageGenericClass//default, inst29 [no loc], unloaded +// CHECK:STDOUT: %PackageGenericClass.import_ref.065 = import_ref PackageGenericClass//default, inst31 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst95 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst99 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494] // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst95 [no loc], loaded [symbolic = constants.%Self.f64] +// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst99 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.60d: = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.ee6)] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.2: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.2: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.cdc: type = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%AnyParam (constants.%AnyParam.560)] -// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst37 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst41 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageHasParam.import_ref.aa2: @AnyParam.as.Destroy.impl.%AnyParam.as.Destroy.impl.Op.type (%AnyParam.as.Destroy.impl.Op.type.5e7) = import_ref PackageHasParam//default, loc4_33, loaded [symbolic = @AnyParam.as.Destroy.impl.%AnyParam.as.Destroy.impl.Op (constants.%AnyParam.as.Destroy.impl.Op.e78)] // CHECK:STDOUT: %Destroy.impl_witness_table.279 = impl_witness_table (%PackageHasParam.import_ref.aa2), @AnyParam.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.3: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] @@ -2762,7 +2771,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageGenericClass.import_ref.877 = import_ref PackageGenericClass//default, loc6_30, unloaded // CHECK:STDOUT: %PackageGenericClass.import_ref.5ab3ec.2: type = import_ref PackageGenericClass//default, loc6_20, loaded [symbolic = @GenericClass.%U (constants.%U)] // CHECK:STDOUT: %PackageGenericClass.import_ref.5a9: type = import_ref PackageGenericClass//default, loc6_30, loaded [symbolic = @GenericClass.as.Destroy.impl.%GenericClass (constants.%GenericClass)] -// CHECK:STDOUT: %PackageGenericClass.import_ref.cb9: type = import_ref PackageGenericClass//default, inst32 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageGenericClass.import_ref.cb9: type = import_ref PackageGenericClass//default, inst34 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageGenericClass.import_ref.5f2 = import_ref PackageGenericClass//default, loc6_30, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.c53 = impl_witness_table (%PackageGenericClass.import_ref.5f2), @GenericClass.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageGenericClass.import_ref.5ab3ec.3: type = import_ref PackageGenericClass//default, loc6_20, loaded [symbolic = @GenericClass.%U (constants.%U)] @@ -3021,6 +3030,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self.b7e: %Extra7.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Extra8.type: type = facet_type <@Extra8> [concrete] // CHECK:STDOUT: %Self.f90: %Extra8.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -3088,6 +3098,7 @@ fn Test(c: HasExtraInterfaces.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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc13_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc13_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} @@ -3369,17 +3380,17 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %HasExtraInterfaces.C: %C.type = import_ref HasExtraInterfaces//default, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.5ab3ec.1: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.8f2: = import_ref HasExtraInterfaces//default, loc13_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.4c0 = import_ref HasExtraInterfaces//default, inst67 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.4c0 = import_ref HasExtraInterfaces//default, inst69 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.I: type = import_ref HasExtraInterfaces//default, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst123 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst125 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.be9: %I.assoc_type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %HasExtraInterfaces.F = import_ref HasExtraInterfaces//default, F, unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.d54: %I.F.type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst123 [no loc], loaded [symbolic = constants.%Self.013] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst125 [no loc], loaded [symbolic = constants.%Self.013] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.21a = import_ref HasExtraInterfaces//default, loc13_19, unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.5ab3ec.2: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.db0: type = import_ref HasExtraInterfaces//default, loc13_19, loaded [symbolic = @C.as.Destroy.impl.%C (constants.%C.c77)] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.cb9: type = import_ref HasExtraInterfaces//default, inst70 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.cb9: type = import_ref HasExtraInterfaces//default, inst72 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.251 = import_ref HasExtraInterfaces//default, loc13_19, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%HasExtraInterfaces.import_ref.251), @C.as.Destroy.impl [concrete] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.5ab3ec.3: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)] 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 89d6fe1398fb..362503d12d07 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 @@ -103,6 +103,7 @@ fn F() { // CHECK:STDOUT: --- lookup_interface_with_encenclosing_specific_is_concrete_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %OuterParam: type = bind_symbolic_name OuterParam, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [concrete] @@ -176,6 +177,7 @@ fn F() { // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %OuterParam.patt: %pattern_type.98f = symbolic_binding_pattern OuterParam, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %OuterParam.loc49_13.2: type = bind_symbolic_name OuterParam, 0 [symbolic = %OuterParam.loc49_13.1 (constants.%OuterParam)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -280,10 +282,11 @@ fn F() { // CHECK:STDOUT: %H.patt: @Outer.G.%pattern_type (%pattern_type.f71) = symbolic_binding_pattern H, 1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc54_14.1: type = splice_block %.loc54_14.2 [symbolic = %Y_where.type (constants.%Y_where.type.324)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %.loc54_12: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.49b)] // CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc54_12 [symbolic = %Y.type (constants.%Y.type.49b)] -// CHECK:STDOUT: %.Self.2: @Outer.G.%Y.type (%Y.type.49b) = bind_symbolic_name .Self [symbolic = %.Self.1 (constants.%.Self.c19)] -// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.49b) = name_ref .Self, %.Self.2 [symbolic = %.Self.1 (constants.%.Self.c19)] +// CHECK:STDOUT: %.Self.3: @Outer.G.%Y.type (%Y.type.49b) = bind_symbolic_name .Self [symbolic = %.Self.1 (constants.%.Self.c19)] +// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.49b) = name_ref .Self, %.Self.3 [symbolic = %.Self.1 (constants.%.Self.c19)] // CHECK:STDOUT: %.loc54_20.1: @Outer.G.%Y.assoc_type (%Y.assoc_type.56e) = specific_constant @T.%assoc0, @Y(constants.%OuterParam) [symbolic = %assoc0 (constants.%assoc0.044)] // CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.56e) = name_ref T, %.loc54_20.1 [symbolic = %assoc0 (constants.%assoc0.044)] // CHECK:STDOUT: %.Self.as_type.loc54_20.2: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc54_20.1 (constants.%.Self.as_type.4b2)] @@ -291,7 +294,7 @@ fn F() { // CHECK:STDOUT: %impl.elem0.loc54_20.2: type = impl_witness_access constants.%Y.lookup_impl_witness.369, element0 [symbolic = %impl.elem0.loc54_20.1 (constants.%impl.elem0.409)] // CHECK:STDOUT: %.loc54_26.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc54_26.2: type = converted %.loc54_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc54_14.2: type = where_expr %.Self.2 [symbolic = %Y_where.type (constants.%Y_where.type.324)] { +// CHECK:STDOUT: %.loc54_14.2: type = where_expr %.Self.3 [symbolic = %Y_where.type (constants.%Y_where.type.324)] { // CHECK:STDOUT: requirement_base_facet_type constants.%Y.type.49b // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc54_20.2, %.loc54_26.2 // CHECK:STDOUT: } @@ -457,6 +460,7 @@ fn F() { // CHECK:STDOUT: %Self.875: %Z1.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Z2.type: type = facet_type <@Z2> [concrete] // CHECK:STDOUT: %Self.14e: %Z2.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %OuterParam: %Z1.type = bind_symbolic_name OuterParam, 0 [symbolic] // CHECK:STDOUT: %pattern_type.79b: type = pattern_type %Z1.type [concrete] // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [concrete] @@ -555,7 +559,10 @@ fn F() { // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %OuterParam.patt: %pattern_type.79b = symbolic_binding_pattern OuterParam, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Z1.ref: type = name_ref Z1, file.%Z1.decl [concrete = constants.%Z1.type] +// CHECK:STDOUT: %.loc6: type = splice_block %Z1.ref [concrete = constants.%Z1.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %Z1.ref: type = name_ref Z1, file.%Z1.decl [concrete = constants.%Z1.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %OuterParam.loc6_13.2: %Z1.type = bind_symbolic_name OuterParam, 0 [symbolic = %OuterParam.loc6_13.1 (constants.%OuterParam)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @empty_tuple.type.as.Z1.impl [concrete] {} { @@ -693,10 +700,11 @@ fn F() { // CHECK:STDOUT: %H.patt: @Outer.G.%pattern_type (%pattern_type.b86) = symbolic_binding_pattern H, 1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc11_14.1: type = splice_block %.loc11_14.2 [symbolic = %Y_where.type (constants.%Y_where.type.fee)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %.loc11_12: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.5e4)] // CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc11_12 [symbolic = %Y.type (constants.%Y.type.5e4)] -// CHECK:STDOUT: %.Self.2: @Outer.G.%Y.type (%Y.type.5e4) = bind_symbolic_name .Self [symbolic = %.Self.1 (constants.%.Self.99e)] -// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.5e4) = name_ref .Self, %.Self.2 [symbolic = %.Self.1 (constants.%.Self.99e)] +// CHECK:STDOUT: %.Self.3: @Outer.G.%Y.type (%Y.type.5e4) = bind_symbolic_name .Self [symbolic = %.Self.1 (constants.%.Self.99e)] +// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.5e4) = name_ref .Self, %.Self.3 [symbolic = %.Self.1 (constants.%.Self.99e)] // CHECK:STDOUT: %.loc11_20.1: @Outer.G.%Y.assoc_type (%Y.assoc_type.2a6) = specific_constant @T.%assoc0, @Y(constants.%OuterParam) [symbolic = %assoc0 (constants.%assoc0.603)] // CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.2a6) = name_ref T, %.loc11_20.1 [symbolic = %assoc0 (constants.%assoc0.603)] // CHECK:STDOUT: %.Self.as_type.loc11_20.2: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc11_20.1 (constants.%.Self.as_type.3b9)] @@ -704,7 +712,7 @@ fn F() { // CHECK:STDOUT: %impl.elem0.loc11_20.2: type = impl_witness_access constants.%Y.lookup_impl_witness.c65, element0 [symbolic = %impl.elem0.loc11_20.1 (constants.%impl.elem0.23d)] // CHECK:STDOUT: %.loc11_26.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_26.2: type = converted %.loc11_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_14.2: type = where_expr %.Self.2 [symbolic = %Y_where.type (constants.%Y_where.type.fee)] { +// CHECK:STDOUT: %.loc11_14.2: type = where_expr %.Self.3 [symbolic = %Y_where.type (constants.%Y_where.type.fee)] { // CHECK:STDOUT: requirement_base_facet_type constants.%Y.type.5e4 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc11_20.2, %.loc11_26.2 // CHECK:STDOUT: } 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 f9bbc41ccd8d..2db09a4ecd24 100644 --- a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon @@ -97,6 +97,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: --- final_specialized_symbolic_rewrite.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Z.type.9fb: type = generic_interface_type @Z [concrete] @@ -175,6 +176,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.decl: %Z.type.9fb = interface_decl @Z [concrete = constants.%Z.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc3_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_13.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -186,8 +188,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.ref: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc9_24.1 [symbolic = %S.loc9_24.2 (constants.%S)] // CHECK:STDOUT: %Z.type.loc9_42.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc9_42.2 (constants.%Z.type.8e9)] -// CHECK:STDOUT: %.Self.1: @T.as.Z.impl.119.%Z.type.loc9_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] -// CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.119.%Z.type.loc9_42.2 (%Z.type.8e9) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.1: @T.as.Z.impl.119.%Z.type.loc9_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.4 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.119.%Z.type.loc9_42.2 (%Z.type.8e9) = name_ref .Self, %.Self.1 [symbolic = %.Self.4 (constants.%.Self.eb1)] // CHECK:STDOUT: %.loc9_50.1: @T.as.Z.impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = specific_constant @X.%assoc0, @Z(constants.%S) [symbolic = %assoc0 (constants.%assoc0.abb)] // CHECK:STDOUT: %X.ref: @T.as.Z.impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = name_ref X, %.loc9_50.1 [symbolic = %assoc0 (constants.%assoc0.abb)] // CHECK:STDOUT: %.Self.as_type.loc9_50.1: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc9_50.2 (constants.%.Self.as_type.ffd)] @@ -199,7 +201,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: requirement_base_facet_type constants.%Z.type.8e9 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc9_50.1, %.loc9_56.2 // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc9_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T.8b3)] +// CHECK:STDOUT: %.Self.3: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %S.loc9_24.1: type = bind_symbolic_name S, 1 [symbolic = %S.loc9_24.2 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: %Z.impl_witness_table.loc9 = impl_witness_table (%impl_witness_assoc_constant.loc9), @T.as.Z.impl.119 [concrete] @@ -212,18 +216,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.ref: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.049] -// CHECK:STDOUT: %.Self: %Z.type.049 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.3c5] -// CHECK:STDOUT: %.Self.ref: %Z.type.049 = name_ref .Self, %.Self [symbolic_self = constants.%.Self.3c5] +// CHECK:STDOUT: %.Self.1: %Z.type.049 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.3c5] +// CHECK:STDOUT: %.Self.ref: %Z.type.049 = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.3c5] // CHECK:STDOUT: %.loc11_46.1: %Z.assoc_type.252 = specific_constant @X.%assoc0, @Z(constants.%C) [concrete = constants.%assoc0.ea4] // CHECK:STDOUT: %X.ref: %Z.assoc_type.252 = name_ref X, %.loc11_46.1 [concrete = constants.%assoc0.ea4] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.c3c] // CHECK:STDOUT: %.loc11_46.2: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.c3c] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness.9cc, element0 [symbolic_self = constants.%impl.elem0.e29] // CHECK:STDOUT: %T.ref.loc11_51: type = name_ref T, %T.loc11_20.1 [symbolic = %T.loc11_20.2 (constants.%T.8b3)] -// CHECK:STDOUT: %.loc11_40: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.692)] { +// CHECK:STDOUT: %.loc11_40: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.692)] { // CHECK:STDOUT: requirement_base_facet_type constants.%Z.type.049 // CHECK:STDOUT: requirement_rewrite %impl.elem0, %T.ref.loc11_51 // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc11_20.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_20.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %Z.impl_witness_table.loc11 = impl_witness_table (%impl_witness_assoc_constant.loc11), @T.as.Z.impl.62c [concrete] @@ -235,6 +240,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %t.param_patt: @F.%pattern_type (%pattern_type.d8b) = value_param_pattern %t.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc13_13: type = splice_block %Z.type [concrete = constants.%Z.type.049] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Z.ref: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.049] @@ -296,12 +302,12 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc9_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T.8b3)] // CHECK:STDOUT: %S.loc9_24.2: type = bind_symbolic_name S, 1 [symbolic = %S.loc9_24.2 (constants.%S)] // CHECK:STDOUT: %Z.type.loc9_42.2: type = facet_type <@Z, @Z(%S.loc9_24.2)> [symbolic = %Z.type.loc9_42.2 (constants.%Z.type.8e9)] -// CHECK:STDOUT: %.Self.2: @T.as.Z.impl.119.%Z.type.loc9_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.4: @T.as.Z.impl.119.%Z.type.loc9_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.4 (constants.%.Self.eb1)] // CHECK:STDOUT: %require_complete.loc9_50: = require_complete_type %Z.type.loc9_42.2 [symbolic = %require_complete.loc9_50 (constants.%require_complete.b87)] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc9_24.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.0e7)] // CHECK:STDOUT: %assoc0: @T.as.Z.impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.abb)] -// CHECK:STDOUT: %.Self.as_type.loc9_50.2: type = facet_access_type %.Self.2 [symbolic = %.Self.as_type.loc9_50.2 (constants.%.Self.as_type.ffd)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.2, @Z, @Z(%S.loc9_24.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.597)] +// CHECK:STDOUT: %.Self.as_type.loc9_50.2: type = facet_access_type %.Self.4 [symbolic = %.Self.as_type.loc9_50.2 (constants.%.Self.as_type.ffd)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.4, @Z, @Z(%S.loc9_24.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.597)] // CHECK:STDOUT: %impl.elem0.loc9_50.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_50.2 (constants.%impl.elem0.240)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc9_24.2) where %impl.elem0.loc9_50.2 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.80d)] // CHECK:STDOUT: %require_complete.loc9_44: = require_complete_type %Z_where.type [symbolic = %require_complete.loc9_44 (constants.%require_complete.9ea)] @@ -395,7 +401,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc9_14.2 => constants.%T.8b3 // CHECK:STDOUT: %S.loc9_24.2 => constants.%S // CHECK:STDOUT: %Z.type.loc9_42.2 => constants.%Z.type.8e9 -// CHECK:STDOUT: %.Self.2 => constants.%.Self.eb1 +// CHECK:STDOUT: %.Self.4 => constants.%.Self.eb1 // CHECK:STDOUT: %require_complete.loc9_50 => constants.%require_complete.b87 // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.0e7 // CHECK:STDOUT: %assoc0 => constants.%assoc0.abb @@ -446,6 +452,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: --- fail_nonfinal_specialized_symbolic_rewrite.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Z.type.9fb: type = generic_interface_type @Z [concrete] @@ -544,6 +551,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.decl: %Z.type.9fb = interface_decl @Z [concrete = constants.%Z.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc3_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_13.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %Y.decl: type = interface_decl @Y [concrete = constants.%Y.type] {} {} @@ -556,8 +564,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.ref: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc10_24.1 [symbolic = %S.loc10_24.2 (constants.%S)] // CHECK:STDOUT: %Z.type.loc10_42.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc10_42.2 (constants.%Z.type.8e9)] -// CHECK:STDOUT: %.Self.1: @T.as.Z.impl.119.%Z.type.loc10_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] -// CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.119.%Z.type.loc10_42.2 (%Z.type.8e9) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.1: @T.as.Z.impl.119.%Z.type.loc10_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.4 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.119.%Z.type.loc10_42.2 (%Z.type.8e9) = name_ref .Self, %.Self.1 [symbolic = %.Self.4 (constants.%.Self.eb1)] // CHECK:STDOUT: %.loc10_50.1: @T.as.Z.impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = specific_constant @X.%assoc0, @Z(constants.%S) [symbolic = %assoc0 (constants.%assoc0.abb)] // CHECK:STDOUT: %X.ref: @T.as.Z.impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = name_ref X, %.loc10_50.1 [symbolic = %assoc0 (constants.%assoc0.abb)] // CHECK:STDOUT: %.Self.as_type.loc10_50.1: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc10_50.2 (constants.%.Self.as_type.ffd)] @@ -569,7 +577,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: requirement_base_facet_type constants.%Z.type.8e9 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_50.1, %.loc10_56.2 // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc10_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T.8b3)] +// CHECK:STDOUT: %.Self.3: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %S.loc10_24.1: type = bind_symbolic_name S, 1 [symbolic = %S.loc10_24.2 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: %Z.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10), @T.as.Z.impl.119 [concrete] @@ -582,18 +592,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.ref: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.049] -// CHECK:STDOUT: %.Self: %Z.type.049 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.3c5] -// CHECK:STDOUT: %.Self.ref: %Z.type.049 = name_ref .Self, %.Self [symbolic_self = constants.%.Self.3c5] +// CHECK:STDOUT: %.Self.1: %Z.type.049 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.3c5] +// CHECK:STDOUT: %.Self.ref: %Z.type.049 = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.3c5] // CHECK:STDOUT: %.loc12_40.1: %Z.assoc_type.252 = specific_constant @X.%assoc0, @Z(constants.%C) [concrete = constants.%assoc0.ea4] // CHECK:STDOUT: %X.ref: %Z.assoc_type.252 = name_ref X, %.loc12_40.1 [concrete = constants.%assoc0.ea4] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.c3c] // CHECK:STDOUT: %.loc12_40.2: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.c3c] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness.9cc, element0 [symbolic_self = constants.%impl.elem0.e29] // CHECK:STDOUT: %T.ref.loc12_45: type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T.8b3)] -// CHECK:STDOUT: %.loc12_34: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.692)] { +// CHECK:STDOUT: %.loc12_34: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.692)] { // CHECK:STDOUT: requirement_base_facet_type constants.%Z.type.049 // CHECK:STDOUT: requirement_rewrite %impl.elem0, %T.ref.loc12_45 // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc12_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %Z.impl_witness_table.loc12 = impl_witness_table (%impl_witness_assoc_constant.loc12), @T.as.Z.impl.62c [concrete] @@ -605,6 +616,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %t.param_patt: @F.%pattern_type.loc14 (%pattern_type.d8b) = value_param_pattern %t.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc14_13: type = splice_block %Z.type [concrete = constants.%Z.type.049] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Z.ref: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.049] @@ -674,12 +686,12 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T.8b3)] // CHECK:STDOUT: %S.loc10_24.2: type = bind_symbolic_name S, 1 [symbolic = %S.loc10_24.2 (constants.%S)] // CHECK:STDOUT: %Z.type.loc10_42.2: type = facet_type <@Z, @Z(%S.loc10_24.2)> [symbolic = %Z.type.loc10_42.2 (constants.%Z.type.8e9)] -// CHECK:STDOUT: %.Self.2: @T.as.Z.impl.119.%Z.type.loc10_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.eb1)] +// CHECK:STDOUT: %.Self.4: @T.as.Z.impl.119.%Z.type.loc10_42.2 (%Z.type.8e9) = bind_symbolic_name .Self [symbolic = %.Self.4 (constants.%.Self.eb1)] // CHECK:STDOUT: %require_complete.loc10_50: = require_complete_type %Z.type.loc10_42.2 [symbolic = %require_complete.loc10_50 (constants.%require_complete.b87)] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc10_24.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.0e7)] // CHECK:STDOUT: %assoc0: @T.as.Z.impl.119.%Z.assoc_type (%Z.assoc_type.0e7) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.abb)] -// CHECK:STDOUT: %.Self.as_type.loc10_50.2: type = facet_access_type %.Self.2 [symbolic = %.Self.as_type.loc10_50.2 (constants.%.Self.as_type.ffd)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.2, @Z, @Z(%S.loc10_24.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.597)] +// CHECK:STDOUT: %.Self.as_type.loc10_50.2: type = facet_access_type %.Self.4 [symbolic = %.Self.as_type.loc10_50.2 (constants.%.Self.as_type.ffd)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.4, @Z, @Z(%S.loc10_24.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.597)] // CHECK:STDOUT: %impl.elem0.loc10_50.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_50.2 (constants.%impl.elem0.240)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc10_24.2) where %impl.elem0.loc10_50.2 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.80d)] // CHECK:STDOUT: %require_complete.loc10_44: = require_complete_type %Z_where.type [symbolic = %require_complete.loc10_44 (constants.%require_complete.9ea)] @@ -782,7 +794,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T.8b3 // CHECK:STDOUT: %S.loc10_24.2 => constants.%S // CHECK:STDOUT: %Z.type.loc10_42.2 => constants.%Z.type.8e9 -// CHECK:STDOUT: %.Self.2 => constants.%.Self.eb1 +// CHECK:STDOUT: %.Self.4 => constants.%.Self.eb1 // CHECK:STDOUT: %require_complete.loc10_50 => constants.%require_complete.b87 // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.0e7 // CHECK:STDOUT: %assoc0 => constants.%assoc0.abb @@ -826,13 +838,14 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete] // CHECK:STDOUT: %Self: %Ptr.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete] // CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %.Self: %Ptr.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %Ptr.lookup_impl_witness: = lookup_impl_witness %.Self, @Ptr [symbolic_self] +// CHECK:STDOUT: %.Self.8b4: %Ptr.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.8b4 [symbolic_self] +// CHECK:STDOUT: %Ptr.lookup_impl_witness: = lookup_impl_witness %.Self.8b4, @Ptr [symbolic_self] // CHECK:STDOUT: %Ptr.facet.b6e: %Ptr.type = facet_value %.Self.as_type, (%Ptr.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Ptr.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %U [symbolic] @@ -873,18 +886,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] -// CHECK:STDOUT: %.Self: %Ptr.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %Ptr.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.8b4] +// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.8b4] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.79f131.1)] -// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd48cc.1)] { +// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self.1 [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd48cc.1)] { // CHECK:STDOUT: requirement_base_facet_type constants.%Ptr.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr.loc7_54.1 // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %U.loc7_20.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @U.as.Ptr.impl [concrete] @@ -904,6 +918,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.facet.loc9_30.2: %Ptr.type = facet_value constants.%T, (constants.%Ptr.impl_witness.e8ce81.2) [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.bbf)] // CHECK:STDOUT: %.loc9: %Ptr.type = converted %T.ref.loc9_29, %Ptr.facet.loc9_30.2 [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.bbf)] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.impl_witness.e8ce81.2, element0 [symbolic = %ptr (constants.%ptr.79f131.2)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc9_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.1 (constants.%T)] // CHECK:STDOUT: %t.param: ref @F.%T.loc9_6.1 (%T) = ref_param call_param0 // CHECK:STDOUT: %T.ref.loc9_23: type = name_ref T, %T.loc9_6.2 [symbolic = %T.loc9_6.1 (constants.%T)] @@ -1002,13 +1017,14 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete] // CHECK:STDOUT: %Self: %Ptr.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete] // CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %.Self: %Ptr.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %Ptr.lookup_impl_witness: = lookup_impl_witness %.Self, @Ptr [symbolic_self] +// CHECK:STDOUT: %.Self.8b4: %Ptr.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.8b4 [symbolic_self] +// CHECK:STDOUT: %Ptr.lookup_impl_witness: = lookup_impl_witness %.Self.8b4, @Ptr [symbolic_self] // CHECK:STDOUT: %Ptr.facet.b6e: %Ptr.type = facet_value %.Self.as_type, (%Ptr.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Ptr.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %ptr.79f: type = ptr_type %U [symbolic] @@ -1051,18 +1067,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] -// CHECK:STDOUT: %.Self: %Ptr.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %Ptr.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.8b4] +// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.8b4] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.79f)] -// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd4)] { +// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self.1 [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd4)] { // CHECK:STDOUT: requirement_base_facet_type constants.%Ptr.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr.loc7_54.1 // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %U.loc7_20.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @U.as.Ptr.impl [concrete] @@ -1083,7 +1100,10 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.as_type.loc9_29.2: type = facet_access_type constants.%T [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_29.2: type = converted constants.%T, %T.as_type.loc9_29.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.impl_witness.5aa, element0 [symbolic = %ptr (constants.%ptr.900)] -// CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] +// CHECK:STDOUT: %.loc9_10: type = splice_block %Ptr.ref [concrete = constants.%Ptr.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_6.2: %Ptr.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.1 (constants.%T)] // CHECK:STDOUT: %t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type) = ref_param call_param0 // CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] { @@ -1186,13 +1206,14 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete] // CHECK:STDOUT: %Self: %Ptr.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete] // CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %.Self: %Ptr.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %Ptr.lookup_impl_witness: = lookup_impl_witness %.Self, @Ptr [symbolic_self] +// CHECK:STDOUT: %.Self.8b4: %Ptr.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.8b4 [symbolic_self] +// CHECK:STDOUT: %Ptr.lookup_impl_witness: = lookup_impl_witness %.Self.8b4, @Ptr [symbolic_self] // CHECK:STDOUT: %Ptr.facet.b6e: %Ptr.type = facet_value %.Self.as_type, (%Ptr.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Ptr.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %ptr.79f: type = ptr_type %U [symbolic] @@ -1235,18 +1256,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] -// CHECK:STDOUT: %.Self: %Ptr.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %Ptr.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.8b4] +// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.8b4] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.79f)] -// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd4)] { +// CHECK:STDOUT: %.loc7_39: type = where_expr %.Self.1 [symbolic = %Ptr_where.type (constants.%Ptr_where.type.bd4)] { // CHECK:STDOUT: requirement_base_facet_type constants.%Ptr.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr.loc7_54.1 // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %U.loc7_20.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc7_20.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @U.as.Ptr.impl [concrete] @@ -1266,7 +1288,10 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.as_type.loc9_29: type = facet_access_type constants.%T [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_29: type = converted constants.%T, %T.as_type.loc9_29 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.impl_witness.5aa, element0 [symbolic = %ptr (constants.%ptr.900)] -// CHECK:STDOUT: %Ptr.ref.loc9_10: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] +// CHECK:STDOUT: %.loc9_10: type = splice_block %Ptr.ref.loc9_10 [concrete = constants.%Ptr.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %Ptr.ref.loc9_10: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_6.2: %Ptr.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_6.1 (constants.%T)] // CHECK:STDOUT: %t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type) = ref_param call_param0 // CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] { diff --git a/toolchain/check/testdata/impl/lookup/specific_args.carbon b/toolchain/check/testdata/impl/lookup/specific_args.carbon index ed4b2a6e3e41..75fcc9a66bbc 100644 --- a/toolchain/check/testdata/impl/lookup/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/specific_args.carbon @@ -58,6 +58,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: --- types.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete] @@ -87,11 +88,13 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: } // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc5_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} @@ -216,13 +219,13 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.C = import_ref Main//types, C, unloaded // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst67 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst70 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.2bb = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.F: @I.%I.F.type (%I.F.type.2ae) = import_ref Main//types, F, loaded [symbolic = @I.%I.F (constants.%I.F.bb2)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst26 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] +// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst28 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] // CHECK:STDOUT: %Main.import_ref.479 = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -383,13 +386,13 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.InInterfaceArgs: type = import_ref Main//impl_in_interface_args, InInterfaceArgs, loaded [concrete = constants.%InInterfaceArgs] // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst67 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst70 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.474: @I.%I.assoc_type (%I.assoc_type.1e5) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.688)] // CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst26 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] +// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst28 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] // CHECK:STDOUT: %Main.import_ref.e54: @I.%I.F.type (%I.F.type.2ae) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%I.F (constants.%I.F.bb2)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//impl_in_interface_args, loc5_24, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.bf8 = import_ref Main//impl_in_interface_args, inst21 [no loc], unloaded @@ -548,16 +551,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//types, loc5_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc5_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//types, inst62 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//types, inst65 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.2bb = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.F: @I.%I.F.type (%I.F.type.2ae) = import_ref Main//types, F, loaded [symbolic = @I.%I.F (constants.%I.F.bb2)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst26 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] +// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst28 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] // CHECK:STDOUT: %Main.import_ref.479 = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst67 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst70 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -746,18 +749,18 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.InClassArgs: type = import_ref Main//impl_in_class_args, InClassArgs, loaded [concrete = constants.%InClassArgs] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//types, loc5_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc5_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//types, inst62 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//types, inst65 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//impl_in_class_args, loc5_20, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.683 = import_ref Main//impl_in_class_args, inst21 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.474: @I.%I.assoc_type (%I.assoc_type.1e5) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.688)] // CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst26 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] +// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst28 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] // CHECK:STDOUT: %Main.import_ref.e54: @I.%I.F.type (%I.F.type.2ae) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%I.F (constants.%I.F.bb2)] // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst67 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst70 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.479 = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.import_ref.a72: = import_ref Main//impl_in_class_args, loc7_29, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.d6e: type = import_ref Main//impl_in_class_args, loc7_19, loaded [concrete = constants.%C.23b] diff --git a/toolchain/check/testdata/impl/use_assoc_const.carbon b/toolchain/check/testdata/impl/use_assoc_const.carbon index 6d0419c1bcfc..75cc4b858bf7 100644 --- a/toolchain/check/testdata/impl/use_assoc_const.carbon +++ b/toolchain/check/testdata/impl/use_assoc_const.carbon @@ -961,6 +961,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] @@ -1127,7 +1128,10 @@ fn F() { // CHECK:STDOUT: %T.as_type.loc28_42: type = facet_access_type %T.ref.loc28_41 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc28_42: type = converted %T.ref.loc28_41, %T.as_type.loc28_42 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem0.loc28_42: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc28_34.1 (constants.%impl.elem0.11fef0.2)] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %.loc28_21: type = splice_block %J.ref [concrete = constants.%J.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc28_17.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc28_17.1 (constants.%T)] // CHECK:STDOUT: %t.param: @GenericCallF.%T.as_type.loc28_27.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc28_27.1: type = splice_block %.loc28_27.2 [symbolic = %T.as_type.loc28_27.1 (constants.%T.as_type)] { @@ -1634,6 +1638,7 @@ fn F() { // CHECK:STDOUT: %assoc0.ea8: %I.assoc_type = assoc_entity element0, @I.%I.Op.decl [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.5be: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] @@ -1701,7 +1706,10 @@ fn F() { // CHECK:STDOUT: %impl.elem0.loc12_43: %I.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.5205fd.2)] // CHECK:STDOUT: %as_type.loc12_43: type = facet_access_type %impl.elem0.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.f5d8f3.2)] // CHECK:STDOUT: %.loc12_43.2: type = converted %impl.elem0.loc12_43, %as_type.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.f5d8f3.2)] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %.loc12_22: type = splice_block %J.ref [concrete = constants.%J.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_18.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_18.1 (constants.%T)] // CHECK:STDOUT: %t.param: @GenericResult.%T.as_type.loc12_28.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc12_28.1: type = splice_block %.loc12_28.2 [symbolic = %T.as_type.loc12_28.1 (constants.%T.as_type)] { @@ -1934,6 +1942,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] @@ -1991,7 +2000,10 @@ fn F() { // CHECK:STDOUT: %T.as_type.loc8_59: type = facet_access_type %T.ref.loc8_58 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc8_59: type = converted %T.ref.loc8_58, %T.as_type.loc8_59 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] // CHECK:STDOUT: %impl.elem0.loc8_59: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_51.1 (constants.%impl.elem0.11fef0.2)] -// CHECK:STDOUT: %J.ref.loc8: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %.loc8_38: type = splice_block %J.ref.loc8 [concrete = constants.%J.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %J.ref.loc8: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_34.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_34.1 (constants.%T)] // CHECK:STDOUT: %t.param: @GenericCallInterfaceQualified.%T.as_type.loc8_44.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc8_44.1: type = splice_block %.loc8_44.2 [symbolic = %T.as_type.loc8_44.1 (constants.%T.as_type)] { @@ -2140,6 +2152,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic] @@ -2223,16 +2236,17 @@ fn F() { // CHECK:STDOUT: %int_32.loc8_51: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc8_51: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc8_26.1: type = splice_block %.loc8_26.2 [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.968] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.2: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc8_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f] // CHECK:STDOUT: %int_32.loc8_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc8_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc8_26.2: type = where_expr %.Self [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %.loc8_26.2: type = where_expr %.Self.2 [concrete = constants.%J_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%J.type // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8, %i32.loc8_37 // CHECK:STDOUT: } @@ -2372,9 +2386,9 @@ fn F() { // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %.Self.968: %J.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.968 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness.25c: = lookup_impl_witness %.Self.968, @J [symbolic_self] // CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self] // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -2517,8 +2531,8 @@ fn F() { // CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] @@ -2606,9 +2620,9 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %J2.F: %J2.F.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, @J2.%J2.F.decl [concrete] -// CHECK:STDOUT: %.Self: %J2.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J2.lookup_impl_witness: = lookup_impl_witness %.Self, @J2 [symbolic_self] +// CHECK:STDOUT: %.Self.3d9: %J2.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.3d9 [symbolic_self] +// CHECK:STDOUT: %J2.lookup_impl_witness: = lookup_impl_witness %.Self.3d9, @J2 [symbolic_self] // CHECK:STDOUT: %J2.facet.e30: %J2.type = facet_value %.Self.as_type, (%J2.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J2.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -2661,8 +2675,8 @@ fn F() { // CHECK:STDOUT: %.loc22_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc22_7.2: type = converted %.loc22_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type] -// CHECK:STDOUT: %.Self: %J2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %J2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.3d9] +// CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.3d9] // CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc22_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] @@ -2681,8 +2695,8 @@ fn F() { // CHECK:STDOUT: impl_decl @C2.as.J2.impl [concrete] {} { // CHECK:STDOUT: %C2.ref.loc38_6: type = name_ref C2, file.%C2.decl [concrete = constants.%C2] // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type] -// CHECK:STDOUT: %.Self: %J2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %J2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.3d9] +// CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.3d9] // CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc38_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] @@ -2931,9 +2945,9 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %K.F: %K.F.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, @K.%K.F.decl [concrete] -// CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %K.lookup_impl_witness.eb2: = lookup_impl_witness %.Self, @K [symbolic_self] +// CHECK:STDOUT: %.Self.02e: %K.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.02e [symbolic_self] +// CHECK:STDOUT: %K.lookup_impl_witness.eb2: = lookup_impl_witness %.Self.02e, @K [symbolic_self] // CHECK:STDOUT: %K.facet.b09: %K.type = facet_value %.Self.as_type, (%K.lookup_impl_witness.eb2) [symbolic_self] // CHECK:STDOUT: %impl.elem0.52c: type = impl_witness_access %K.lookup_impl_witness.eb2, element0 [symbolic_self] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete] @@ -2968,8 +2982,8 @@ fn F() { // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [concrete = constants.%K.type] -// CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.02e] +// CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.02e] // CHECK:STDOUT: %V.ref: %K.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0] // 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] @@ -3141,9 +3155,9 @@ fn F() { // CHECK:STDOUT: %M.G.type: type = fn_type @M.G [concrete] // CHECK:STDOUT: %M.G: %M.G.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%M.G.decl [concrete] -// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self, @M [symbolic_self] +// CHECK:STDOUT: %.Self.a61: %M.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.a61 [symbolic_self] +// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self.a61, @M [symbolic_self] // CHECK:STDOUT: %M.facet.caa: %M.type = facet_value %.Self.as_type, (%M.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -3173,8 +3187,8 @@ fn F() { // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.a61] +// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // 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] @@ -3270,6 +3284,7 @@ fn F() { // CHECK:STDOUT: --- self_as_uses_correct_rewrite_constraint.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -3294,9 +3309,9 @@ fn F() { // CHECK:STDOUT: %M.G: %M.G.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%M.G.decl [concrete] // CHECK:STDOUT: %C.7a7: type = class_type @C, @C(%empty_struct_type) [concrete] -// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self, @M [symbolic_self] +// CHECK:STDOUT: %.Self.a61: %M.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.a61 [symbolic_self] +// CHECK:STDOUT: %M.lookup_impl_witness: = lookup_impl_witness %.Self.a61, @M [symbolic_self] // CHECK:STDOUT: %M.facet.caa: %M.type = facet_value %.Self.as_type, (%M.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete] @@ -3335,6 +3350,7 @@ fn F() { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc3_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {} @@ -3344,8 +3360,8 @@ fn F() { // CHECK:STDOUT: %.loc10_10: type = converted %.loc10_9, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [concrete = constants.%C.7a7] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.a61] +// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] @@ -3369,8 +3385,8 @@ fn F() { // CHECK:STDOUT: %.loc16_10: type = converted %.loc16_9, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_tuple.type) [concrete = constants.%C.3a0] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.a61] +// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.a61] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc16_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] @@ -3843,6 +3859,7 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] // CHECK:STDOUT: %Self.6e6: %Z.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete] // CHECK:STDOUT: %assoc0.659: %Z.assoc_type = assoc_entity element0, @Z.%X [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] @@ -3866,9 +3883,9 @@ fn F() { // CHECK:STDOUT: %pattern_type.a94: type = pattern_type %ptr.19c [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op.type: type = fn_type @D.as.Destroy.impl.Op [concrete] // CHECK:STDOUT: %D.as.Destroy.impl.Op: %D.as.Destroy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %.Self: %Z.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self, @Z [symbolic_self] +// CHECK:STDOUT: %.Self.ad0: %Z.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ad0 [symbolic_self] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.ad0, @Z [symbolic_self] // CHECK:STDOUT: %Z.facet.2a2: %Z.type = facet_value %.Self.as_type, (%Z.lookup_impl_witness) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %Z_where.type.585: type = facet_type <@Z where %impl.elem0 = %C.f2e> [symbolic] @@ -3913,6 +3930,7 @@ fn F() { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc6_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} @@ -3921,8 +3939,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc9_24: type = name_ref T, %T.loc9_14.1 [symbolic = %T.loc9_14.2 (constants.%T)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %.Self: %Z.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %Z.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %Z.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.ad0] +// CHECK:STDOUT: %.Self.ref: %Z.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.ad0] // CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.659] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] @@ -3930,10 +3948,11 @@ fn F() { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %T.ref.loc9_44: type = name_ref T, %T.loc9_14.1 [symbolic = %T.loc9_14.2 (constants.%T)] // CHECK:STDOUT: %C.loc9_45.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc9_45.2 (constants.%C.f2e)] -// CHECK:STDOUT: %.loc9_31: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.585)] { +// CHECK:STDOUT: %.loc9_31: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.585)] { // CHECK:STDOUT: requirement_base_facet_type constants.%Z.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.loc9_45.1 // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc9_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl [concrete] diff --git a/toolchain/check/testdata/interface/as_type_of_type.carbon b/toolchain/check/testdata/interface/as_type_of_type.carbon index 4362fb289dc1..a27b8aa65a0a 100644 --- a/toolchain/check/testdata/interface/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/as_type_of_type.carbon @@ -23,6 +23,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty> [concrete] // CHECK:STDOUT: %Self.193: %Empty.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.193: %Empty.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.6c3: type = pattern_type %Empty.type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -62,7 +63,10 @@ fn F(T:! Empty) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.6c3 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] +// CHECK:STDOUT: %.loc17: type = splice_block %Empty.ref [concrete = constants.%Empty.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc17_6.2: %Empty.type = bind_symbolic_name T, 0 [symbolic = %T.loc17_6.1 (constants.%T.193)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/assoc_const_in_generic.carbon b/toolchain/check/testdata/interface/assoc_const_in_generic.carbon index 568bb44eb855..5575d9e7be08 100644 --- a/toolchain/check/testdata/interface/assoc_const_in_generic.carbon +++ b/toolchain/check/testdata/interface/assoc_const_in_generic.carbon @@ -30,6 +30,7 @@ fn H() { // CHECK:STDOUT: --- assoc_const_in_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete] @@ -70,11 +71,13 @@ fn H() { // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] // 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] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc19_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {} @@ -99,6 +102,7 @@ fn H() { // CHECK:STDOUT: %return.param_patt: @I.F.%pattern_type (%pattern_type.20f) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc16_8.2: type = bind_symbolic_name U, 2 [symbolic = %U.loc16_8.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref @I.F.%U.loc16_8.1 (%U) = out_param call_param0 // CHECK:STDOUT: %return: ref @I.F.%U.loc16_8.1 (%U) = return_slot %return.param diff --git a/toolchain/check/testdata/interface/compound_member_access.carbon b/toolchain/check/testdata/interface/compound_member_access.carbon index c8a743ee3198..2fc52798b1db 100644 --- a/toolchain/check/testdata/interface/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/compound_member_access.carbon @@ -196,6 +196,7 @@ fn Works() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic] @@ -239,9 +240,13 @@ fn Works() { // CHECK:STDOUT: %T.patt: %pattern_type.28e = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %S.patt: @Simple1.%pattern_type (%pattern_type.b984e7.1) = symbolic_binding_pattern S, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %.loc8_16: type = splice_block %J.ref [concrete = constants.%J.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_12.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.1 (constants.%T)] // CHECK:STDOUT: %.loc8_24.1: type = splice_block %impl.elem0.loc8_24.2 [symbolic = %impl.elem0.loc8_24.1 (constants.%impl.elem0.11fef0.1)] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc8_12.2 [symbolic = %T.loc8_12.1 (constants.%T)] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc8_24.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_24.1 (constants.%T.as_type)] @@ -254,9 +259,13 @@ fn Works() { // CHECK:STDOUT: %V.patt: %pattern_type.28e = symbolic_binding_pattern V, 0 [concrete] // CHECK:STDOUT: %W.patt: @Compound1.%pattern_type (%pattern_type.b984e7.2) = symbolic_binding_pattern W, 1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref.loc11_18: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %.loc11_18: type = splice_block %J.ref.loc11_18 [concrete = constants.%J.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %J.ref.loc11_18: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %V.loc11_14.2: %J.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.1 (constants.%V)] -// CHECK:STDOUT: %.loc11: type = splice_block %impl.elem0.loc11_26.2 [symbolic = %impl.elem0.loc11_26.1 (constants.%impl.elem0.11fef0.2)] { +// CHECK:STDOUT: %.loc11_26: type = splice_block %impl.elem0.loc11_26.2 [symbolic = %impl.elem0.loc11_26.1 (constants.%impl.elem0.11fef0.2)] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %V.ref: %J.type = name_ref V, %V.loc11_14.2 [symbolic = %V.loc11_14.1 (constants.%V)] // CHECK:STDOUT: %J.ref.loc11_28: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] @@ -346,6 +355,7 @@ fn Works() { // CHECK:STDOUT: %K1.Q1: %K1.Q1.type = struct_value () [concrete] // CHECK:STDOUT: %K1.assoc_type: type = assoc_entity_type @K1 [concrete] // CHECK:STDOUT: %assoc0: %K1.assoc_type = assoc_entity element0, @K1.%K1.Q1.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %K1.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %K1.type [concrete] // CHECK:STDOUT: %Simple2.type: type = fn_type @Simple2 [concrete] @@ -386,13 +396,19 @@ fn Works() { // CHECK:STDOUT: %Simple2.decl: %Simple2.type = fn_decl @Simple2 [concrete = constants.%Simple2] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %K1.ref: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] +// CHECK:STDOUT: %.loc8: type = splice_block %K1.ref [concrete = constants.%K1.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %K1.ref: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_12.2: %K1.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Compound2.decl: %Compound2.type = fn_decl @Compound2 [concrete = constants.%Compound2] { // CHECK:STDOUT: %V.patt: %pattern_type = symbolic_binding_pattern V, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %K1.ref.loc13: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] +// CHECK:STDOUT: %.loc13: type = splice_block %K1.ref.loc13 [concrete = constants.%K1.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %K1.ref.loc13: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %V.loc13_14.2: %K1.type = bind_symbolic_name V, 0 [symbolic = %V.loc13_14.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -483,6 +499,7 @@ fn Works() { // CHECK:STDOUT: %K2.Q2: %K2.Q2.type = struct_value () [concrete] // CHECK:STDOUT: %K2.assoc_type: type = assoc_entity_type @K2 [concrete] // CHECK:STDOUT: %assoc0.d67: %K2.assoc_type = assoc_entity element0, @K2.%K2.Q2.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %K2.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.fda: type = pattern_type %K2.type [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] @@ -528,7 +545,10 @@ fn Works() { // CHECK:STDOUT: %x.patt: @Simple3.%pattern_type (%pattern_type.466ee6.1) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @Simple3.%pattern_type (%pattern_type.466ee6.1) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %K2.ref: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type] +// CHECK:STDOUT: %.loc8_16: type = splice_block %K2.ref [concrete = constants.%K2.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %K2.ref: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_12.2: %K2.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.1 (constants.%T)] // CHECK:STDOUT: %x.param: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc8_23.1: type = splice_block %.loc8_23.2 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)] { @@ -543,7 +563,10 @@ fn Works() { // CHECK:STDOUT: %y.patt: @Compound3.%pattern_type (%pattern_type.466ee6.2) = binding_pattern y [concrete] // CHECK:STDOUT: %y.param_patt: @Compound3.%pattern_type (%pattern_type.466ee6.2) = value_param_pattern %y.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %K2.ref.loc14: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type] +// CHECK:STDOUT: %.loc14_18: type = splice_block %K2.ref.loc14 [concrete = constants.%K2.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %K2.ref.loc14: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %V.loc14_14.2: %K2.type = bind_symbolic_name V, 0 [symbolic = %V.loc14_14.1 (constants.%V)] // CHECK:STDOUT: %y.param: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc14_25.1: type = splice_block %.loc14_25.2 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)] { @@ -648,6 +671,7 @@ fn Works() { // CHECK:STDOUT: %L1.S1.type: type = fn_type @L1.S1 [concrete] // CHECK:STDOUT: %L1.S1: %L1.S1.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, @L1.%L1.S1.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.04c: %L1.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.5da: type = pattern_type %L1.type [concrete] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.04c [symbolic] @@ -720,7 +744,10 @@ fn Works() { // CHECK:STDOUT: %x.patt: @Simple4.%pattern_type (%pattern_type.ad3e89.2) = binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: @Simple4.%pattern_type (%pattern_type.ad3e89.2) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %L1.ref: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] +// CHECK:STDOUT: %.loc9_16: type = splice_block %L1.ref [concrete = constants.%L1.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %L1.ref: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_12.2: %L1.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_12.1 (constants.%T.04c)] // CHECK:STDOUT: %x.param: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] { @@ -735,7 +762,10 @@ fn Works() { // CHECK:STDOUT: %y.patt: @Compound4.%pattern_type (%pattern_type.ad3e89.3) = binding_pattern y [concrete] // CHECK:STDOUT: %y.param_patt: @Compound4.%pattern_type (%pattern_type.ad3e89.3) = value_param_pattern %y.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %L1.ref.loc16: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] +// CHECK:STDOUT: %.loc16_18: type = splice_block %L1.ref.loc16 [concrete = constants.%L1.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %L1.ref.loc16: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %V.loc16_14.2: %L1.type = bind_symbolic_name V, 0 [symbolic = %V.loc16_14.1 (constants.%V)] // CHECK:STDOUT: %y.param: @Compound4.%V.as_type.loc16_25.1 (%V.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc16_25.1: type = splice_block %.loc16_25.2 [symbolic = %V.as_type.loc16_25.1 (constants.%V.as_type)] { @@ -1007,6 +1037,7 @@ fn Works() { // CHECK:STDOUT: %L2.S2.type: type = fn_type @L2.S2 [concrete] // CHECK:STDOUT: %L2.S2: %L2.S2.type = struct_value () [concrete] // CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, @L2.%L2.S2.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %L2.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.1c0: type = pattern_type %L2.type [concrete] // CHECK:STDOUT: %Simple5.type: type = fn_type @Simple5 [concrete] @@ -1047,13 +1078,19 @@ fn Works() { // CHECK:STDOUT: %Simple5.decl: %Simple5.type = fn_decl @Simple5 [concrete = constants.%Simple5] { // CHECK:STDOUT: %T.patt: %pattern_type.1c0 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %L2.ref: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type] +// CHECK:STDOUT: %.loc10: type = splice_block %L2.ref [concrete = constants.%L2.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %L2.ref: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc10_12.2: %L2.type = bind_symbolic_name T, 0 [symbolic = %T.loc10_12.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Compound5.decl: %Compound5.type = fn_decl @Compound5 [concrete = constants.%Compound5] { // CHECK:STDOUT: %V.patt: %pattern_type.1c0 = symbolic_binding_pattern V, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %L2.ref.loc30: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type] +// CHECK:STDOUT: %.loc30: type = splice_block %L2.ref.loc30 [concrete = constants.%L2.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %L2.ref.loc30: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %V.loc30_14.2: %L2.type = bind_symbolic_name V, 0 [symbolic = %V.loc30_14.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon index 7f8bb2bf44c0..71e8bc7b3532 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon @@ -89,6 +89,7 @@ interface C { // CHECK:STDOUT: --- core.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // 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] @@ -111,6 +112,7 @@ interface C { // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Dest.loc3_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.1 (constants.%Dest)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -264,15 +266,16 @@ interface C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I2.type: type = facet_type <@I2> [concrete] // CHECK:STDOUT: %Self.c7b: %I2.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %I2.assoc_type: type = assoc_entity_type @I2 [concrete] // CHECK:STDOUT: %assoc0.25f: %I2.assoc_type = assoc_entity element0, @I2.%T2 [concrete] // CHECK:STDOUT: %J2.type: type = facet_type <@J2> [concrete] // CHECK:STDOUT: %V: %J2.type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f47: type = pattern_type %J2.type [concrete] // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic] -// CHECK:STDOUT: %.Self: %I2.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I2.lookup_impl_witness.ebe: = lookup_impl_witness %.Self, @I2 [symbolic_self] +// CHECK:STDOUT: %.Self.04c: %I2.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.04c [symbolic_self] +// CHECK:STDOUT: %I2.lookup_impl_witness.ebe: = lookup_impl_witness %.Self.04c, @I2 [symbolic_self] // CHECK:STDOUT: %I2.facet.708: %I2.type = facet_value %.Self.as_type, (%I2.lookup_impl_witness.ebe) [symbolic_self] // CHECK:STDOUT: %impl.elem0.dde: type = impl_witness_access %I2.lookup_impl_witness.ebe, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -313,19 +316,22 @@ interface C { // CHECK:STDOUT: %V.as_type.loc11_22.1: type = facet_access_type %V.ref [symbolic = %V.as_type.loc11_22.2 (constants.%V.as_type)] // CHECK:STDOUT: %.loc11_22: type = converted %V.ref, %V.as_type.loc11_22.1 [symbolic = %V.as_type.loc11_22.2 (constants.%V.as_type)] // CHECK:STDOUT: %I2.ref: type = name_ref I2, file.%I2.decl [concrete = constants.%I2.type] -// CHECK:STDOUT: %.Self: %I2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.1: %I2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.04c] +// CHECK:STDOUT: %.Self.ref: %I2.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.04c] // CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.25f] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I2.lookup_impl_witness.ebe, element0 [symbolic_self = constants.%impl.elem0.dde] // CHECK:STDOUT: %.loc11_43.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_43.2: type = converted %.loc11_43.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_30: type = where_expr %.Self [concrete = constants.%I2_where.type] { +// CHECK:STDOUT: %.loc11_30: type = where_expr %.Self.1 [concrete = constants.%I2_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%I2.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc11_43.2 // CHECK:STDOUT: } -// CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl.loc9 [concrete = constants.%J2.type] +// CHECK:STDOUT: %.loc11_18: type = splice_block %J2.ref [concrete = constants.%J2.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl.loc9 [concrete = constants.%J2.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %V.loc11_14.1: %J2.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %I2.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @V.as_type.as.I2.impl [concrete] diff --git a/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon b/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon index 3a461746e0eb..538599c6c219 100644 --- a/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon @@ -39,6 +39,7 @@ fn Use(T:! I) { // CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.2b5: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] @@ -60,7 +61,10 @@ fn Use(T:! I) { // CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [concrete = constants.%Use] { // CHECK:STDOUT: %T.patt: %pattern_type.2b5 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: %.loc8: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_8.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_8.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon index e501345e5b18..2a3a3aa54b0f 100644 --- a/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon @@ -46,6 +46,7 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %NotGeneric.type.10e: type = facet_type <@NotGeneric.loc15> [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %NotGeneric.type.93b: type = generic_interface_type @NotGeneric.loc23 [concrete] @@ -77,23 +78,27 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %NotGeneric.decl.loc23: %NotGeneric.type.93b = interface_decl @NotGeneric.loc23 [concrete = constants.%NotGeneric.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc23_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_22.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %Generic.decl.loc25: %Generic.type.c21 = interface_decl @Generic.loc25 [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc25_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc25_19.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %Generic.decl.loc33: type = interface_decl @Generic.loc33 [concrete = constants.%Generic.type.c99] {} {} // CHECK:STDOUT: %DifferentParams.decl.loc35: %DifferentParams.type.d40e5c.1 = interface_decl @DifferentParams.loc35 [concrete = constants.%DifferentParams.generic.d33670.1] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc35_27.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc35_27.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %DifferentParams.decl.loc43: %DifferentParams.type.d40e5c.2 = interface_decl @DifferentParams.loc43 [concrete = constants.%DifferentParams.generic.d33670.2] { // CHECK:STDOUT: %T.patt: %pattern_type.cb1 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc43_32.1: type = splice_block %.loc43_32.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc43_32.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc43_32.3: type = converted %.loc43_32.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/fail_member_lookup.carbon b/toolchain/check/testdata/interface/fail_member_lookup.carbon index a69639b01188..0aaaed58b3ab 100644 --- a/toolchain/check/testdata/interface/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/fail_member_lookup.carbon @@ -55,6 +55,7 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %Interface.F: %Interface.F.type = struct_value () [concrete] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface [concrete] // CHECK:STDOUT: %assoc0.b4c: %Interface.assoc_type = assoc_entity element0, @Interface.%Interface.F.decl [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, @Interface.%T [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -100,7 +101,10 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %U.ref: %Different.type = name_ref U, %U.loc32_6.2 [symbolic = %U.loc32_6.1 (constants.%U)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] // CHECK:STDOUT: %T.ref: %Interface.assoc_type = name_ref T, @T.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %Different.ref: type = name_ref Different, file.%Different.decl [concrete = constants.%Different.type] +// CHECK:STDOUT: %.loc32: type = splice_block %Different.ref [concrete = constants.%Different.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %Different.ref: type = name_ref Different, file.%Different.decl [concrete = constants.%Different.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc32_6.2: %Different.type = bind_symbolic_name U, 0 [symbolic = %U.loc32_6.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref = out_param call_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index 074dc98950ce..52b581b3ba92 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -211,6 +211,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %Self.719: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self.719) [symbolic] // CHECK:STDOUT: %pattern_type.68b: type = pattern_type %C [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %pattern_type.a32: type = pattern_type %U [symbolic] @@ -261,6 +262,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, %.loc20_24.2 [symbolic = %C (constants.%C)] // CHECK:STDOUT: } // CHECK:STDOUT: %self.loc20: @C.F.%C (%C) = bind_name self, %self.param.loc20 +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc20: type = bind_symbolic_name U, 1 [symbolic = %U.loc14_22.1 (constants.%U)] // CHECK:STDOUT: %u.param.loc20: @C.F.%U.loc14_22.1 (%U) = value_param call_param1 // CHECK:STDOUT: %U.ref.loc20_43: type = name_ref U, %U.loc20 [symbolic = %U.loc14_22.1 (constants.%U)] @@ -332,6 +334,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14_16.2 [symbolic = %C (constants.%C)] // CHECK:STDOUT: } // CHECK:STDOUT: %self.loc14: @C.F.%C (%C) = bind_name self, %self.param.loc14 +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc14_22.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc14_22.1 (constants.%U)] // CHECK:STDOUT: %u.param.loc14: @C.F.%U.loc14_22.1 (%U) = value_param call_param1 // CHECK:STDOUT: %U.ref.loc14_35: type = name_ref U, %U.loc14_22.2 [symbolic = %U.loc14_22.1 (constants.%U)] diff --git a/toolchain/check/testdata/interface/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/fail_todo_generic_default_fn.carbon index 141d54e00180..0a2b37d9f3b5 100644 --- a/toolchain/check/testdata/interface/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/fail_todo_generic_default_fn.carbon @@ -29,6 +29,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: --- fail_todo_generic_default_fn.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete] @@ -53,6 +54,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc15_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.F.decl: %I.F.type.2aef59.2 = fn_decl @I.F.loc27 [symbolic = constants.%I.F.bb2dd4.2] { @@ -61,6 +63,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %return.patt: @I.F.loc27.%pattern_type (%pattern_type.4be) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @I.F.loc27.%pattern_type (%pattern_type.4be) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc27_6: type = bind_symbolic_name T, 0 [symbolic = @I.%T.loc15_13.1 (constants.%T)] // CHECK:STDOUT: %.loc27_35.1: @I.F.loc27.%I.type (%I.type.325) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc27_35: @I.F.loc27.%I.type (%I.type.325) = name_ref Self, %.loc27_35.1 [symbolic = %Self (constants.%Self)] diff --git a/toolchain/check/testdata/interface/generic.carbon b/toolchain/check/testdata/interface/generic.carbon index cf73e3396a92..c63103052c1c 100644 --- a/toolchain/check/testdata/interface/generic.carbon +++ b/toolchain/check/testdata/interface/generic.carbon @@ -65,6 +65,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: --- generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Simple.type.3b3: type = generic_interface_type @Simple [concrete] @@ -125,12 +126,14 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %Simple.decl: %Simple.type.3b3 = interface_decl @Simple [concrete = constants.%Simple.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_18.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_18.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} // CHECK:STDOUT: %WithAssocFn.decl: %WithAssocFn.type.509 = interface_decl @WithAssocFn [concrete = constants.%WithAssocFn.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_23.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_23.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} @@ -138,14 +141,19 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: %N.patt: @WithImplicitArgs.%pattern_type (%pattern_type.7dc) = symbolic_binding_pattern N, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc22_28.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_28.1 (constants.%T.8b3)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc22_28.2 [symbolic = %T.loc22_28.1 (constants.%T.8b3)] +// CHECK:STDOUT: %.loc22: type = splice_block %T.ref [symbolic = %T.loc22_28.1 (constants.%T.8b3)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc22_28.2 [symbolic = %T.loc22_28.1 (constants.%T.8b3)] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc22_38.2: @WithImplicitArgs.%T.loc22_28.1 (%T.8b3) = bind_symbolic_name N, 1 [symbolic = %N.loc22_38.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Receive.decl: %Receive.type = fn_decl @Receive [concrete = constants.%Receive] { // CHECK:STDOUT: %T.patt: %pattern_type.353 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc24: type = splice_block %Simple.type [concrete = constants.%Simple.type.51f] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Simple.ref: %Simple.type.3b3 = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [concrete = constants.%Simple.type.51f] @@ -156,6 +164,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt: %pattern_type.353 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc25: type = splice_block %Simple.type [concrete = constants.%Simple.type.51f] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Simple.ref: %Simple.type.3b3 = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [concrete = constants.%Simple.type.51f] @@ -366,6 +375,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: --- fail_mismatched_args.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Generic.type.c21: type = generic_interface_type @Generic [concrete] @@ -399,6 +409,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %Generic.decl: %Generic.type.c21 = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_19.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} @@ -407,6 +418,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt: %pattern_type.6ea = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9: type = splice_block %Generic.type [concrete = constants.%Generic.type.c7c] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%A)> [concrete = constants.%Generic.type.c7c] @@ -417,6 +429,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt: %pattern_type.f4a = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc10: type = splice_block %Generic.type [concrete = constants.%Generic.type.4ce] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%B)> [concrete = constants.%Generic.type.4ce] diff --git a/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon b/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon index d37e9dc2e6fd..74e33f57263f 100644 --- a/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon +++ b/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon @@ -25,6 +25,7 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 1 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] @@ -49,6 +50,7 @@ interface I { // CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc16_8.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc16_8.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] @@ -58,6 +60,7 @@ interface I { // CHECK:STDOUT: %I.G.decl: %I.G.type = fn_decl @I.G [concrete = constants.%I.G] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc20_8.2: type = bind_symbolic_name T, 1 [symbolic = %T.loc20_8.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, %I.G.decl [concrete = constants.%assoc2] diff --git a/toolchain/check/testdata/interface/generic_import.carbon b/toolchain/check/testdata/interface/generic_import.carbon index 0830dfac454c..e76b6158ca11 100644 --- a/toolchain/check/testdata/interface/generic_import.carbon +++ b/toolchain/check/testdata/interface/generic_import.carbon @@ -34,6 +34,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %AddWith.type.b35: type = generic_interface_type @AddWith [concrete] @@ -53,6 +54,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: %AddWith.decl: %AddWith.type.b35 = interface_decl @AddWith [concrete = constants.%AddWith.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_19.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -120,11 +122,11 @@ impl C as AddWith(C) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.AddWith: %AddWith.type.b35 = import_ref Main//a, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//a, loc4_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.476 = import_ref Main//a, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.476 = import_ref Main//a, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c77 = import_ref Main//a, loc5_9, unloaded // CHECK:STDOUT: %Main.F: @AddWith.%AddWith.F.type (%AddWith.F.type.fbc) = import_ref Main//a, F, loaded [symbolic = @AddWith.%AddWith.F (constants.%AddWith.F.be3)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//a, loc4_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.5a4: @AddWith.%AddWith.type (%AddWith.type.bc7) = import_ref Main//a, inst26 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.deb)] +// CHECK:STDOUT: %Main.import_ref.5a4: @AddWith.%AddWith.type (%AddWith.type.bc7) = import_ref Main//a, inst28 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.deb)] // CHECK:STDOUT: %Main.import_ref.0c5 = import_ref Main//a, loc5_9, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index 9d553376f9c6..4873a7bda325 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -84,6 +84,7 @@ fn CallIndirect() { // CHECK:STDOUT: --- generic_method_fewer_params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %A.type.495: type = generic_interface_type @A [concrete] @@ -216,6 +217,7 @@ fn CallIndirect() { // CHECK:STDOUT: %A.decl: %A.type.495 = interface_decl @A [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} @@ -234,6 +236,7 @@ fn CallIndirect() { // CHECK:STDOUT: %T.patt: %pattern_type.817 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc25: type = splice_block %A.type [concrete = constants.%A.type.91f] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.91f] @@ -271,6 +274,7 @@ fn CallIndirect() { // CHECK:STDOUT: %Self.as_type.loc6_38.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.81d)] // CHECK:STDOUT: %.loc6_38.2: type = converted %Self.ref, %Self.as_type.loc6_38.2 [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.81d)] // CHECK:STDOUT: %.loc6_38.3: type = converted %.loc6_38.1, constants.%tuple.type.bd2 [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.bd2)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc6_8.2: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)] // CHECK:STDOUT: %u.param: @A.F.%U.loc6_8.1 (%U.2cb) = value_param call_param0 // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)] @@ -349,6 +353,7 @@ fn CallIndirect() { // CHECK:STDOUT: %U.ref.loc16_34: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U.8b3)] // CHECK:STDOUT: %.loc16_35.1: %tuple.type.ff9 = tuple_literal (%X.ref, %Y.ref, %U.ref.loc16_34) // CHECK:STDOUT: %.loc16_35.2: type = converted %.loc16_35.1, constants.%tuple.type.765 [symbolic = %tuple.type.loc16 (constants.%tuple.type.765)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc16_8.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc16_8.1 (constants.%U.8b3)] // CHECK:STDOUT: %u.param: @Y.as.A.impl.F.%U.loc16_8.1 (%U.8b3) = value_param call_param0 // CHECK:STDOUT: %U.ref.loc16_21: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U.8b3)] @@ -660,6 +665,7 @@ fn CallIndirect() { // CHECK:STDOUT: --- generic_method_more_params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %A.type.495: type = generic_interface_type @A [concrete] @@ -822,6 +828,7 @@ fn CallIndirect() { // CHECK:STDOUT: %A.decl: %A.type.495 = interface_decl @A [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} @@ -840,8 +847,11 @@ fn CallIndirect() { // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %W.ref: type = name_ref W, %W.loc14_36.2 [symbolic = %W.loc14_36.1 (constants.%W)] // CHECK:STDOUT: %A.type.loc14_61.2: type = facet_type <@A, @A(constants.%W)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.f21)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %V1.loc14_14.2: type = bind_symbolic_name V1, 0 [symbolic = %V1.loc14_14.1 (constants.%V1)] +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %V2.loc14_25.2: type = bind_symbolic_name V2, 1 [symbolic = %V2.loc14_25.1 (constants.%V2)] +// CHECK:STDOUT: %.Self.3: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %W.loc14_36.2: type = bind_symbolic_name W, 2 [symbolic = %W.loc14_36.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@tuple.type.as.A.impl.%tuple.type.as.A.impl.F.decl), @tuple.type.as.A.impl [concrete] @@ -851,6 +861,7 @@ fn CallIndirect() { // CHECK:STDOUT: %T.patt: %pattern_type.817 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc27: type = splice_block %A.type [concrete = constants.%A.type.91f] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.91f] @@ -888,6 +899,7 @@ fn CallIndirect() { // CHECK:STDOUT: %Self.as_type.loc6_38.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.81d)] // CHECK:STDOUT: %.loc6_38.2: type = converted %Self.ref, %Self.as_type.loc6_38.2 [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.81d)] // CHECK:STDOUT: %.loc6_38.3: type = converted %.loc6_38.1, constants.%tuple.type.bd2 [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.bd2)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc6_8.2: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)] // CHECK:STDOUT: %u.param: @A.F.%U.loc6_8.1 (%U.2cb) = value_param call_param0 // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)] @@ -998,6 +1010,7 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc17_42.1: %tuple.type.11f = tuple_literal (%W.ref, %.loc17_38, %U.ref.loc17_41) // CHECK:STDOUT: %.loc17_42.2: type = converted %.loc17_38, constants.%tuple.type.30b [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.30b)] // CHECK:STDOUT: %.loc17_42.3: type = converted %.loc17_42.1, constants.%tuple.type.8ae [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.8ae)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc17_8.2: type = bind_symbolic_name U, 3 [symbolic = %U.loc17_8.1 (constants.%U.753)] // CHECK:STDOUT: %u.param: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.753) = value_param call_param0 // CHECK:STDOUT: %U.ref.loc17_21: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.753)] diff --git a/toolchain/check/testdata/interface/generic_vs_params.carbon b/toolchain/check/testdata/interface/generic_vs_params.carbon index c307c0227f55..241b2307e883 100644 --- a/toolchain/check/testdata/interface/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/generic_vs_params.carbon @@ -81,6 +81,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %NotGenericButParams.generic: %NotGenericButParams.type.f26 = struct_value () [concrete] // CHECK:STDOUT: %NotGenericButParams.type.014: type = facet_type <@NotGenericButParams> [concrete] // CHECK:STDOUT: %Self.43b: %NotGenericButParams.type.014 = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %GenericAndParams.type.cde: type = generic_interface_type @GenericAndParams.loc6 [concrete] @@ -129,11 +130,13 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.cde = interface_decl @GenericAndParams.loc6 [concrete = constants.%GenericAndParams.generic.827] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc6_28.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_28.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_9.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} @@ -284,6 +287,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.597) = interface_decl @GenericAndParams.loc10 [symbolic = @C.%GenericAndParams.generic (constants.%GenericAndParams.generic.2ec)] { // CHECK:STDOUT: %U.patt: %pattern_type = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc10_30.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc10_30.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] @@ -426,6 +430,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: --- fail_implicit_params_only.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %Bar.type.982: type = generic_interface_type @Bar [concrete] @@ -441,6 +446,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %Bar.decl: %Bar.type.982 = interface_decl @Bar [concrete = constants.%Bar.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/import.carbon b/toolchain/check/testdata/interface/import.carbon index 86f54f429130..d5d16af12a36 100644 --- a/toolchain/check/testdata/interface/import.carbon +++ b/toolchain/check/testdata/interface/import.carbon @@ -199,7 +199,7 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Main.import_ref.760: %Basic.assoc_type = import_ref Main//a, loc9_9, loaded [concrete = constants.%assoc1.4ea] // CHECK:STDOUT: %Main.T.44f = import_ref Main//a, T, unloaded // CHECK:STDOUT: %Main.F.eea = import_ref Main//a, F, unloaded -// CHECK:STDOUT: %Main.import_ref.52b = import_ref Main//a, inst38 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.52b = import_ref Main//a, inst40 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.ad1: %ForwardDeclared.assoc_type = import_ref Main//a, loc16_8, loaded [concrete = constants.%assoc0.d40] // CHECK:STDOUT: %Main.import_ref.339: %ForwardDeclared.assoc_type = import_ref Main//a, loc17_9, loaded [concrete = constants.%assoc1.e3d] // CHECK:STDOUT: %Main.T.6ee = import_ref Main//a, T, unloaded diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index c659cc80c479..644b71c90fe9 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -55,6 +55,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: --- member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Interface.type.e32: type = generic_interface_type @Interface [concrete] @@ -115,6 +116,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.decl: %Interface.type.e32 = interface_decl @Interface [concrete = constants.%Interface.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %AccessGeneric.decl: %AccessGeneric.type = fn_decl @AccessGeneric [concrete = constants.%AccessGeneric] { @@ -124,8 +126,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %return.param_patt: @AccessGeneric.%pattern_type.loc8_46 (%pattern_type.7dcd0a.1) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_18.2 [symbolic = %T.loc8_18.1 (constants.%T)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc8_18.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_18.1 (constants.%T)] // CHECK:STDOUT: %.loc8: type = splice_block %Interface.type.loc8_43.2 [symbolic = %Interface.type.loc8_43.1 (constants.%Interface.type.d32)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Interface.ref: %Interface.type.e32 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] // CHECK:STDOUT: %T.ref.loc8_42: type = name_ref T, %T.loc8_18.2 [symbolic = %T.loc8_18.1 (constants.%T)] // CHECK:STDOUT: %Interface.type.loc8_43.2: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_43.1 (constants.%Interface.type.d32)] @@ -142,6 +146,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %int_32.loc12_42: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc12_42: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc12: type = splice_block %Interface.type [concrete = constants.%Interface.type.981] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %Interface.ref: %Interface.type.e32 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] // CHECK:STDOUT: %int_32.loc12_33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc12_33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -281,6 +286,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: --- fail_no_member.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Interface.type.e32: type = generic_interface_type @Interface [concrete] @@ -331,6 +337,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.decl: %Interface.type.e32 = interface_decl @Interface [concrete = constants.%Interface.generic] { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_21.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMissingGeneric.decl: %AccessMissingGeneric.type = fn_decl @AccessMissingGeneric [concrete = constants.%AccessMissingGeneric] { @@ -340,8 +347,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %return.param_patt: @AccessMissingGeneric.%pattern_type.loc8_53 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc8_56: type = name_ref T, %T.loc8_25.2 [symbolic = %T.loc8_25.1 (constants.%T)] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_25.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_25.1 (constants.%T)] // CHECK:STDOUT: %.loc8: type = splice_block %Interface.type.loc8_50.2 [symbolic = %Interface.type.loc8_50.1 (constants.%Interface.type.d32)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Interface.ref: %Interface.type.e32 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] // CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_25.2 [symbolic = %T.loc8_25.1 (constants.%T)] // CHECK:STDOUT: %Interface.type.loc8_50.2: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_50.1 (constants.%Interface.type.d32)] @@ -358,6 +367,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // 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: %.loc16: type = splice_block %Interface.type [concrete = constants.%Interface.type.981] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Interface.ref: %Interface.type.e32 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] // CHECK:STDOUT: %int_32.loc16_40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc16_40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] diff --git a/toolchain/check/testdata/interface/syntactic_merge.carbon b/toolchain/check/testdata/interface/syntactic_merge.carbon index 8a1c9eb505e5..8d68473b1360 100644 --- a/toolchain/check/testdata/interface/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/syntactic_merge.carbon @@ -196,6 +196,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.538: type = generic_interface_type @Foo [concrete] @@ -221,25 +222,37 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.538 = interface_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref.loc7 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type.538 = interface_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc8: type = splice_block %C.ref.loc8 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc8: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type.982 = interface_decl @Bar [concrete = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc10: type = splice_block %D.ref.loc10 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc10_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc10_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type.982 = interface_decl @Bar [concrete = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc11: type = splice_block %D.ref.loc11 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc11: %C = bind_symbolic_name a, 0 [symbolic = %a.loc10_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -298,6 +311,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.538: type = generic_interface_type @Foo [concrete] @@ -315,13 +329,19 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.538 = interface_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: type = splice_block %C.ref.loc6 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_21.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_21.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.538 = interface_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref.loc7 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_21.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -360,6 +380,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.5380b8.1: type = generic_interface_type @Foo.loc6 [concrete] @@ -379,13 +400,19 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.5380b8.1 = interface_decl @Foo.loc6 [concrete = constants.%Foo.generic.ec3175.1] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc14: %Foo.type.5380b8.2 = interface_decl @Foo.loc14 [concrete = constants.%Foo.generic.ec3175.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc14: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc14_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc14_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -434,6 +461,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.538: type = generic_interface_type @Foo [concrete] @@ -451,13 +479,19 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl.loc6: %Foo.type.538 = interface_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: type = splice_block %C.ref.loc6 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.538 = interface_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref.loc7 [concrete = constants.%C] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -496,6 +530,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [concrete] @@ -517,13 +552,19 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = interface_decl @Bar [concrete = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc8: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc8_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc8_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -559,6 +600,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: --- fail_todo_two_file.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -601,13 +643,19 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl: %Foo.type.5380b8.2 = interface_decl @Foo.loc12 [concrete = constants.%Foo.generic.ec3175.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] +// CHECK:STDOUT: %.loc12: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc12_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc12_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type.982aac.2 = interface_decl @Bar.loc21 [concrete = constants.%Bar.generic.4bda5e.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%C] +// CHECK:STDOUT: %.loc21: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc21_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc21_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -685,6 +733,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.5380b8.1: type = generic_interface_type @Foo.loc7 [concrete] @@ -708,13 +757,19 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.5380b8.1 = interface_decl @Foo.loc7 [concrete = constants.%Foo.generic.ec3175.1] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc15: %Foo.type.5380b8.2 = interface_decl @Foo.loc15 [concrete = constants.%Foo.generic.ec3175.2] { // CHECK:STDOUT: %b.patt: %pattern_type = symbolic_binding_pattern b, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc15: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %b.loc15_15.2: %C = bind_symbolic_name b, 0 [symbolic = %b.loc15_15.1 (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -763,6 +818,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.5380b8.1: type = generic_interface_type @Foo.loc7 [concrete] @@ -785,13 +841,19 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.5380b8.1 = interface_decl @Foo.loc7 [concrete = constants.%Foo.generic.ec3175.1] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc15: %Foo.type.5380b8.2 = interface_decl @Foo.loc15 [concrete = constants.%Foo.generic.ec3175.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc15: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc15_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc15_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -840,6 +902,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.5380b8.1: type = generic_interface_type @Foo.loc7 [concrete] @@ -862,13 +925,19 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.5380b8.1 = interface_decl @Foo.loc7 [concrete = constants.%Foo.generic.ec3175.1] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc7_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc7_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc15: %Foo.type.5380b8.2 = interface_decl @Foo.loc15 [concrete = constants.%Foo.generic.ec3175.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc15: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc15_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc15_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -917,6 +986,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type: type = generic_interface_type @Foo [concrete] @@ -932,7 +1002,10 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl: %Foo.type = interface_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc6_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -961,6 +1034,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %a: %C = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %Foo.type.5380b8.1: type = generic_interface_type @Foo.1 [concrete] @@ -992,7 +1066,10 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl: %Foo.type.5380b8.2 = interface_decl @Foo.loc17 [concrete = constants.%Foo.generic.ec3175.2] { // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: %.loc17: type = splice_block %D.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [concrete = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc17_15.2: %C = bind_symbolic_name a, 0 [symbolic = %a.loc17_15.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1040,6 +1117,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %const: type = const_type %C [concrete] // CHECK:STDOUT: %a: %const = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %const [concrete] @@ -1061,6 +1139,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6: type = splice_block %const [concrete = constants.%const] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %const: type = const_type %C.ref [concrete = constants.%const] // CHECK:STDOUT: } @@ -1070,6 +1149,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt: %pattern_type = symbolic_binding_pattern a, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_19 [concrete = constants.%const] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %const.loc18_26: type = const_type %C.ref [concrete = constants.%const] // CHECK:STDOUT: %const.loc18_19: type = const_type %const.loc18_26 [concrete = constants.%const] diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index e72f38e89a85..5d0332ba85a1 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -168,6 +168,7 @@ impl i32 as Empty { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %C.F.type: type = fn_type @C.F [concrete] // CHECK:STDOUT: %C.F: %C.F.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete] @@ -229,6 +230,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %.loc10_17.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_12.1: type = splice_block %.loc10_12.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc10_12.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_12.3: type = converted %.loc10_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } @@ -260,6 +262,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] @@ -316,6 +319,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %.loc9_17.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_12.1: type = splice_block %.loc9_12.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc9_12.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_12.3: type = converted %.loc9_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } @@ -356,6 +360,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] @@ -442,6 +447,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %.loc9_17.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_12.1: type = splice_block %.loc9_12.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc9_12.2: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_12.3: type = converted %.loc9_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } @@ -452,6 +458,7 @@ impl i32 as Empty { // CHECK:STDOUT: %b.patt: %pattern_type.559 = symbolic_binding_pattern b, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc10_16.1: type = splice_block %.loc10_16.4 [concrete = constants.%tuple.type.9fb] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc10_14: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_16.2: %tuple.type.9fb = tuple_literal (%.loc10_14) // CHECK:STDOUT: %.loc10_16.3: type = converted %.loc10_14, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -467,6 +474,7 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc22_36: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc22_37.1: %tuple.type.2d5 = tuple_literal (%.loc22_28, %.loc22_32, %.loc22_36) // CHECK:STDOUT: %.loc22_22.1: type = splice_block %.loc22_22.6 [concrete = constants.%tuple.type.2d5] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc22_13: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc22_17: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc22_21: %empty_tuple.type = tuple_literal () @@ -517,6 +525,7 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc11_30: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_31.1: %tuple.type.bcd = tuple_literal (%.loc11_26, %.loc11_30) // CHECK:STDOUT: %.loc11_20.1: type = splice_block %.loc11_20.5 [concrete = constants.%tuple.type.bcd] { +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.loc11_15: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_19: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_20.2: %tuple.type.bcd = tuple_literal (%.loc11_15, %.loc11_19) @@ -729,12 +738,12 @@ impl i32 as Empty { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %C.F.decl -// CHECK:STDOUT: .x = .inst33.loc14_7 +// CHECK:STDOUT: .x = .inst35.loc14_7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.F() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, .inst33.loc14_7 +// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, .inst35.loc14_7 // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -750,6 +759,7 @@ impl i32 as Empty { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] @@ -807,6 +817,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc5_14: type = splice_block %i32.loc5 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } @@ -833,6 +844,7 @@ impl i32 as Empty { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] @@ -898,6 +910,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc6_16: type = splice_block %i32.loc6 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } @@ -1018,6 +1031,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I: type = class_type @I [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -1078,6 +1092,7 @@ impl i32 as Empty { // 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: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T: type = bind_name T, %i32 // CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { // CHECK:STDOUT: %return.patt: = return_slot_pattern [concrete] @@ -1107,6 +1122,7 @@ impl i32 as Empty { // CHECK:STDOUT: --- fail_return_in_package_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -1135,6 +1151,7 @@ impl i32 as Empty { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %T.patt: %pattern_type.98f = binding_pattern T [concrete] // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T: type = bind_name T, @__global_init.%i32 // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %return.patt: = return_slot_pattern [concrete] @@ -1165,6 +1182,7 @@ impl i32 as Empty { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %Empty.impl_witness: = impl_witness file.%Empty.impl_witness_table [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] @@ -1228,6 +1246,7 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc11_14: type = splice_block %i32.loc11 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index 2a08ff8c67e5..ec054cd2cf20 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -43,6 +43,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // 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 [symbolic] @@ -105,6 +106,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: } // 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: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %i32.loc17 [symbolic = constants.%T] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type.7dcd0a.1 = binding_pattern x [concrete] diff --git a/toolchain/check/testdata/let/fail_generic_import.carbon b/toolchain/check/testdata/let/fail_generic_import.carbon index 04c8c812c1d7..09513a32731a 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -36,6 +36,7 @@ let a: T = 0; // CHECK:STDOUT: --- fail_implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -61,6 +62,7 @@ let a: T = 0; // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %T.patt: %pattern_type.98f = binding_pattern T [concrete] // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T: type = bind_name T, @__global_init.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/generic.carbon b/toolchain/check/testdata/let/generic.carbon index 9ee7b18447cf..20962f3ff8cf 100644 --- a/toolchain/check/testdata/let/generic.carbon +++ b/toolchain/check/testdata/let/generic.carbon @@ -24,6 +24,7 @@ fn F() { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -75,6 +76,7 @@ fn F() { // 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: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %i32 [symbolic = constants.%T] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %p.patt: %pattern_type.afe = binding_pattern p [concrete] diff --git a/toolchain/check/testdata/let/generic_import.carbon b/toolchain/check/testdata/let/generic_import.carbon index 211b50ce2fca..feb3f602aaeb 100644 --- a/toolchain/check/testdata/let/generic_import.carbon +++ b/toolchain/check/testdata/let/generic_import.carbon @@ -40,6 +40,7 @@ var b: T = *a; // CHECK:STDOUT: --- fail_implicit.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -65,6 +66,7 @@ var b: T = *a; // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %T.patt: %pattern_type.98f = binding_pattern T [concrete] // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T: type = bind_name T, @__global_init.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index b65a0608e8aa..2d790349649e 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -53,6 +53,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %F.type.bd7: type = fn_type @F.loc22 [concrete] // CHECK:STDOUT: %F.199: %F.type.bd7 = struct_value () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %F.type.b25: type = fn_type @F.loc48 [concrete] // CHECK:STDOUT: %F.c41: %F.type.b25 = struct_value () [concrete] @@ -83,6 +84,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %n: = bind_name n, %n.param // CHECK:STDOUT: %B: = namespace [concrete] {} +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = constants.%T] // CHECK:STDOUT: %x.param: %T = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] @@ -90,6 +92,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %C: = namespace [concrete] {} // CHECK:STDOUT: %D: = namespace [concrete] {} // CHECK:STDOUT: %F.decl.loc48: %F.type.b25 = fn_decl @F.loc48 [concrete = constants.%F.c41] {} { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc48_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc48_6.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index a85e45e1ab0a..ea4f15755bad 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -176,7 +176,7 @@ fn F() { // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.Destroy.impl(.inst28.loc4_14: bool) { +// CHECK:STDOUT: generic impl @C.as.Destroy.impl(.inst30.loc4_14: bool) { // CHECK:STDOUT: %B: bool = bind_symbolic_name B, 0 [symbolic = %B (constants.%B.7dd)] // CHECK:STDOUT: %C: type = class_type @C, @C(%B) [symbolic = %C (constants.%C)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%B) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)] @@ -205,7 +205,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(.inst28.loc4_14: bool) { +// CHECK:STDOUT: generic class @C(.inst30.loc4_14: bool) { // CHECK:STDOUT: %B: bool = bind_symbolic_name B, 0 [symbolic = %B (constants.%B.7dd)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -224,7 +224,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst34.loc4_24 [concrete = constants.%C.generic] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst36.loc4_24 [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc12_20: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %.loc12: bool = not %true.loc12_20 [concrete = constants.%false] // CHECK:STDOUT: %true.loc12_25: bool = bool_literal true [concrete = constants.%true] @@ -236,7 +236,7 @@ fn F() { // CHECK:STDOUT: .C = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(.inst28.loc4_14: bool) { +// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(.inst30.loc4_14: bool) { // CHECK:STDOUT: %B: bool = bind_symbolic_name B, 0 [symbolic = %B (constants.%B.7dd)] // CHECK:STDOUT: %C: type = class_type @C, @C(%B) [symbolic = %C (constants.%C)] // CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.1a8)] diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index 50c16eb465e1..e07a8244e762 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -77,6 +77,7 @@ fn Test() { // CHECK:STDOUT: %Sink_i32: %Sink_i32.type = struct_value () [concrete] // CHECK:STDOUT: %Sink_X.type: type = fn_type @Sink_X [concrete] // CHECK:STDOUT: %Sink_X: %Sink_X.type = struct_value () [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.7dcd0a.2: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Source.type: type = fn_type @Source [concrete] @@ -160,6 +161,7 @@ fn Test() { // CHECK:STDOUT: %return.param_patt: @Source.%pattern_type (%pattern_type.7dcd0a.2) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc31_24: type = name_ref T, %T.loc31_11.2 [symbolic = %T.loc31_11.1 (constants.%T)] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %T.loc31_11.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc31_11.1 (constants.%T)] // CHECK:STDOUT: %return.param: ref @Source.%T.loc31_11.1 (%T) = out_param call_param0 // CHECK:STDOUT: %return: ref @Source.%T.loc31_11.1 (%T) = return_slot %return.param diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index a0423d5e1efb..5da40e3dca38 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -160,6 +160,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: --- core_wrong_arg_count.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %SubscriptType: type = bind_symbolic_name SubscriptType, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %IndexWith.type.68b: type = generic_interface_type @IndexWith [concrete] @@ -184,6 +185,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: %IndexWith.decl: %IndexWith.type.68b = interface_decl @IndexWith [concrete = constants.%IndexWith.generic] { // CHECK:STDOUT: %SubscriptType.patt: %pattern_type.98f = symbolic_binding_pattern SubscriptType, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %SubscriptType.loc4_21.2: type = bind_symbolic_name SubscriptType, 0 [symbolic = %SubscriptType.loc4_21.1 (constants.%SubscriptType)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -301,11 +303,11 @@ fn F() { ()[()]; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IndexWith: %IndexWith.type.504 = import_ref Core//core_wrong_arg_count, IndexWith, loaded [concrete = constants.%IndexWith.generic] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//core_wrong_arg_count, loc4_21, loaded [symbolic = @IndexWith.%SubscriptType (constants.%SubscriptType)] -// CHECK:STDOUT: %Core.import_ref.68a = import_ref Core//core_wrong_arg_count, inst26 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.68a = import_ref Core//core_wrong_arg_count, inst28 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.613: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type.290) = import_ref Core//core_wrong_arg_count, loc5_52, loaded [symbolic = @IndexWith.%assoc0 (constants.%assoc0.e1e)] // CHECK:STDOUT: %Core.At: @IndexWith.%IndexWith.At.type (%IndexWith.At.type.cf4) = import_ref Core//core_wrong_arg_count, At, loaded [symbolic = @IndexWith.%IndexWith.At (constants.%IndexWith.At.281)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//core_wrong_arg_count, loc4_21, loaded [symbolic = @IndexWith.%SubscriptType (constants.%SubscriptType)] -// CHECK:STDOUT: %Core.import_ref.fb5: @IndexWith.%IndexWith.type (%IndexWith.type.bd2) = import_ref Core//core_wrong_arg_count, inst26 [no loc], loaded [symbolic = @IndexWith.%Self (constants.%Self.30a)] +// CHECK:STDOUT: %Core.import_ref.fb5: @IndexWith.%IndexWith.type (%IndexWith.type.bd2) = import_ref Core//core_wrong_arg_count, inst28 [no loc], loaded [symbolic = @IndexWith.%Self (constants.%Self.30a)] // CHECK:STDOUT: %Core.import_ref.e99: @IndexWith.%IndexWith.At.type (%IndexWith.At.type.cf4) = import_ref Core//core_wrong_arg_count, loc5_52, loaded [symbolic = @IndexWith.%IndexWith.At (constants.%IndexWith.At.281)] // CHECK:STDOUT: %Core.import_ref.981 = import_ref Core//core_wrong_arg_count, loc5_52, unloaded // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/fail_export_name_params.carbon b/toolchain/check/testdata/packages/fail_export_name_params.carbon index 7c9b09e18654..0a15ff516db9 100644 --- a/toolchain/check/testdata/packages/fail_export_name_params.carbon +++ b/toolchain/check/testdata/packages/fail_export_name_params.carbon @@ -36,6 +36,7 @@ export C2(T:! type); // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [concrete] @@ -52,11 +53,13 @@ export C2(T:! type); // CHECK:STDOUT: %C1.decl: %C1.type = class_decl @C1 [concrete = constants.%C1.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_10.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_10.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C2.decl: %C2.type = class_decl @C2 [concrete = constants.%C2.generic] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc5_10.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_10.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -87,6 +90,7 @@ export C2(T:! type); // CHECK:STDOUT: %C1.type: type = generic_class_type @C1 [concrete] // CHECK:STDOUT: %C1.generic: %C1.type = struct_value () [concrete] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %C2.type: type = generic_class_type @C2 [concrete] // CHECK:STDOUT: %C2.generic: %C2.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -105,6 +109,7 @@ export C2(T:! type); // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %C1: %C1.type = export C1, imports.%Foo.C1 [concrete = constants.%C1.generic] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = constants.%T] // CHECK:STDOUT: %C2: %C2.type = export C2, imports.%Foo.C2 [concrete = constants.%C2.generic] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/missing_prelude.carbon b/toolchain/check/testdata/packages/missing_prelude.carbon index a7db88b6d2f4..16589298b283 100644 --- a/toolchain/check/testdata/packages/missing_prelude.carbon +++ b/toolchain/check/testdata/packages/missing_prelude.carbon @@ -160,6 +160,7 @@ var n: {} = i32; // CHECK:STDOUT: --- prelude_fake_int.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %N: %T = bind_symbolic_name N, 1 [symbolic] @@ -183,8 +184,12 @@ var n: {} = i32; // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_29.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc4_29.2: type = converted %.loc4_29.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc4_8.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_8.1 (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_8.2 [symbolic = %T.loc4_8.1 (constants.%T)] +// CHECK:STDOUT: %.loc4_22: type = splice_block %T.ref [symbolic = %T.loc4_8.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_8.2 [symbolic = %T.loc4_8.1 (constants.%T)] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc4_18.2: @Int.%T.loc4_8.1 (%T) = bind_symbolic_name N, 1 [symbolic = %N.loc4_18.1 (constants.%N)] // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param @@ -292,6 +297,7 @@ var n: {} = i32; // CHECK:STDOUT: --- prelude_use_in_prelude.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %N: %T = bind_symbolic_name N, 1 [symbolic] @@ -319,8 +325,12 @@ var n: {} = i32; // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8_29.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_29.2: type = converted %.loc8_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc8_8.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_8.1 (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_8.2 [symbolic = %T.loc8_8.1 (constants.%T)] +// CHECK:STDOUT: %.loc8_22: type = splice_block %T.ref [symbolic = %T.loc8_8.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_8.2 [symbolic = %T.loc8_8.1 (constants.%T)] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc8_18.2: @Int.%T.loc8_8.1 (%T) = bind_symbolic_name N, 1 [symbolic = %N.loc8_18.1 (constants.%N)] // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param diff --git a/toolchain/check/testdata/patterns/underscore.carbon b/toolchain/check/testdata/patterns/underscore.carbon index fad00af3c833..d975ea4a1787 100644 --- a/toolchain/check/testdata/patterns/underscore.carbon +++ b/toolchain/check/testdata/patterns/underscore.carbon @@ -295,6 +295,7 @@ fn F() -> {} { // CHECK:STDOUT: --- function_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %_: type = bind_symbolic_name _, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -323,6 +324,7 @@ fn F() -> {} { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %_.patt: %pattern_type = symbolic_binding_pattern _, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %_.loc4_6.2: type = bind_symbolic_name _, 0 [symbolic = %_.loc4_6.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} @@ -362,6 +364,7 @@ fn F() -> {} { // CHECK:STDOUT: --- fail_function_generic_undefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %_: type = bind_symbolic_name _, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -390,6 +393,7 @@ fn F() -> {} { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %_.patt: %pattern_type = symbolic_binding_pattern _, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %_.loc4_6.2: type = bind_symbolic_name _, 0 [symbolic = %_.loc4_6.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} @@ -422,6 +426,7 @@ fn F() -> {} { // CHECK:STDOUT: --- function_implict.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %_: type = bind_symbolic_name _, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -447,11 +452,13 @@ fn F() -> {} { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %_.patt: %pattern_type = symbolic_binding_pattern _, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %_.loc4_6.2: type = bind_symbolic_name _, 0 [symbolic = %_.loc4_6.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %_.patt: %pattern_type = symbolic_binding_pattern _, 0 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %_.loc6_6.2: type = bind_symbolic_name _, 0 [symbolic = %_.loc6_6.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_let_in_type.carbon b/toolchain/check/testdata/return/fail_let_in_type.carbon index bc2ef7942d25..887b837470e0 100644 --- a/toolchain/check/testdata/return/fail_let_in_type.carbon +++ b/toolchain/check/testdata/return/fail_let_in_type.carbon @@ -54,6 +54,7 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: %Six.type: type = fn_type @Six [concrete] // CHECK:STDOUT: %Six: %Six.type = struct_value () [concrete] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete] +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %HalfDozen.type: type = fn_type @HalfDozen [concrete] // CHECK:STDOUT: %HalfDozen: %HalfDozen.type = struct_value () [concrete] // CHECK:STDOUT: %FirstPerfectNumber.type: type = fn_type @FirstPerfectNumber [concrete] @@ -95,6 +96,7 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %y.patt: %pattern_type.98f = binding_pattern y [concrete] // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %y: type = bind_name y, @__global_init.%i32.loc27 // CHECK:STDOUT: %HalfDozen.decl: %HalfDozen.type = fn_decl @HalfDozen [concrete = constants.%HalfDozen] { // CHECK:STDOUT: %return.patt: = return_slot_pattern [concrete] @@ -107,6 +109,7 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %z.patt: %pattern_type.98f = binding_pattern z [concrete] // CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %z: type = bind_name z, @__global_init.%i32.loc39 // CHECK:STDOUT: %FirstPerfectNumber.decl: %FirstPerfectNumber.type = fn_decl @FirstPerfectNumber [concrete = constants.%FirstPerfectNumber] { // CHECK:STDOUT: %return.patt: = return_slot_pattern [concrete] diff --git a/toolchain/check/testdata/return/import_convert_function.carbon b/toolchain/check/testdata/return/import_convert_function.carbon index a51d10804d65..bab0d9c17577 100644 --- a/toolchain/check/testdata/return/import_convert_function.carbon +++ b/toolchain/check/testdata/return/import_convert_function.carbon @@ -50,6 +50,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: --- library.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -198,6 +199,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // 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: } @@ -1013,26 +1015,26 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %P.D: type = import_ref P//library, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %P.import_ref.a7d: = import_ref P//library, loc5_35, loaded [concrete = constants.%complete_type.ea0] -// CHECK:STDOUT: %P.import_ref.cab = import_ref P//library, inst109 [no loc], unloaded +// CHECK:STDOUT: %P.import_ref.cab = import_ref P//library, inst111 [no loc], unloaded // CHECK:STDOUT: %P.import_ref.a52 = import_ref P//library, loc5_16, unloaded // CHECK:STDOUT: %P.import_ref.b4a = import_ref P//library, loc5_28, unloaded // CHECK:STDOUT: %P.C: %C.type = import_ref P//library, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %P.import_ref.1b7f13.1: %i32 = import_ref P//library, loc4_9, loaded [symbolic = @C.%N (constants.%N.51e)] // CHECK:STDOUT: %P.import_ref.8f2: = import_ref P//library, loc4_19, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %P.import_ref.f65 = import_ref P//library, inst52 [no loc], unloaded +// CHECK:STDOUT: %P.import_ref.f65 = import_ref P//library, inst54 [no loc], unloaded // 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: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %P.import_ref.5a7: = import_ref P//library, loc4_18, loaded [symbolic = @C.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.1b1)] // CHECK:STDOUT: %P.import_ref.1b7f13.2: %i32 = import_ref P//library, loc4_9, loaded [symbolic = @C.%N (constants.%N.51e)] // CHECK:STDOUT: %P.import_ref.8b3: type = import_ref P//library, loc4_18, loaded [symbolic = @C.as.Destroy.impl.%C (constants.%C.17a)] -// CHECK:STDOUT: %P.import_ref.cb9298.1: type = import_ref P//library, inst55 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %P.import_ref.cb9298.1: type = import_ref P//library, inst57 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %P.import_ref.20a: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type.564) = import_ref P//library, loc4_18, loaded [symbolic = @C.as.Destroy.impl.%C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op.e88)] // CHECK:STDOUT: %Destroy.impl_witness_table.bb0 = impl_witness_table (%P.import_ref.20a), @C.as.Destroy.impl [concrete] // CHECK:STDOUT: %P.import_ref.1b7f13.3: %i32 = import_ref P//library, loc4_9, loaded [symbolic = @C.%N (constants.%N.51e)] // CHECK:STDOUT: %P.import_ref.7ba: = import_ref P//library, loc5_9, loaded [concrete = constants.%Destroy.impl_witness.d5a] // CHECK:STDOUT: %P.import_ref.130: type = import_ref P//library, loc5_9, loaded [concrete = constants.%D] -// CHECK:STDOUT: %P.import_ref.cb9298.2: type = import_ref P//library, inst55 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %P.import_ref.cb9298.2: type = import_ref P//library, inst57 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %P.import_ref.708: = import_ref P//library, loc8_33, loaded [concrete = constants.%ImplicitAs.impl_witness.f53] // CHECK:STDOUT: %P.import_ref.d2c: type = import_ref P//library, loc8_9, loaded [concrete = constants.%C.b00] // CHECK:STDOUT: %P.import_ref.b769fa.1: type = import_ref P//library, loc8_31, loaded [concrete = constants.%ImplicitAs.type.5f9] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index bb8cc92f9420..031f8909d155 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -101,6 +101,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %struct.381: %struct_type.b.c.929 = struct_value (%int_0.6a9, %tuple) [concrete] // CHECK:STDOUT: %.c6b: ref %i32 = struct_access file.%b_ref.var, element1 [concrete] // CHECK:STDOUT: %struct.20d: %struct_type.a.d.3d9 = struct_value (%struct.381, %int_0.6a9) [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %struct_type.a.b.501: type = struct_type {.a: %i32, .b: %i32} [concrete] // CHECK:STDOUT: %S: %struct_type.a.b.501 = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %pattern_type.851: type = pattern_type %struct_type.a.b.501 [concrete] @@ -187,6 +188,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %S.patt: %pattern_type.851 = symbolic_binding_pattern S, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.501] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %int_32.loc8_18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc8_18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -442,7 +444,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import_ref.48d = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.1: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst490 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst492 [no loc], unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.2: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.ba3: type = import_ref Implicit//default, loc8_33, loaded [symbolic = @C.as.Destroy.impl.%C (constants.%C.720)] // CHECK:STDOUT: %Implicit.import_ref.cb9: type = import_ref Implicit//default, inst109 [no loc], loaded [concrete = constants.%Destroy.type] @@ -678,7 +680,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import_ref.48d = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.1: %struct_type.a.b = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst490 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst492 [no loc], unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.2: %struct_type.a.b = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.ba3: type = import_ref Implicit//default, loc8_33, loaded [symbolic = @C.as.Destroy.impl.%C (constants.%C.720)] // CHECK:STDOUT: %Implicit.import_ref.cb9: type = import_ref Implicit//default, inst109 [no loc], loaded [concrete = constants.%Destroy.type] @@ -854,7 +856,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import_ref.48d = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.1: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst490 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst492 [no loc], unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.2: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.ba3: type = import_ref Implicit//default, loc8_33, loaded [symbolic = @C.as.Destroy.impl.%C (constants.%C.720)] // CHECK:STDOUT: %Implicit.import_ref.cb9: type = import_ref Implicit//default, inst109 [no loc], loaded [concrete = constants.%Destroy.type] diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 316401fb29f5..a7349e1f1940 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -188,8 +188,8 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.258 [symbolic_self] // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -206,12 +206,13 @@ fn F() { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc7_12.1: type = splice_block %.loc7_12.2 [concrete = constants.%I.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc7_18: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc7_12.2: type = where_expr %.Self [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc7_12.2: type = where_expr %.Self.2 [concrete = constants.%I.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_impls %.loc7_18, type // CHECK:STDOUT: } @@ -222,13 +223,14 @@ fn F() { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc13_12.1: type = splice_block %.loc13_12.2 [concrete = constants.%I.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %Type.ref: type = name_ref Type, file.%Type [concrete = type] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc13_18: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc13_12.2: type = where_expr %.Self [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc13_12.2: type = where_expr %.Self.2 [concrete = constants.%I.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_impls %.loc13_18, %Type.ref // CHECK:STDOUT: } @@ -261,8 +263,8 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.258 [symbolic_self] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -275,13 +277,14 @@ fn F() { // CHECK:STDOUT: %T.patt: = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc14_12.1: type = splice_block %.loc14_12.2 [concrete = ] { +// CHECK:STDOUT: // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %J.ref: = name_ref J, [concrete = ] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc14_18: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc14_12.2: type = where_expr %.Self [concrete = ] { +// CHECK:STDOUT: %.loc14_12.2: type = where_expr %.Self.2 [concrete = ] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_impls %.loc14_18, // CHECK:STDOUT: } @@ -335,11 +338,12 @@ fn F() { // CHECK:STDOUT: %U.patt: %pattern_type.f03 = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc12_21.1: type = splice_block %.loc12_21.2 [concrete = constants.%I_where.type.cad] { +// CHECK:STDOUT: // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %.loc12_37: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_21.2: type = where_expr %.Self [concrete = constants.%I_where.type.cad] { +// CHECK:STDOUT: %.loc12_21.2: type = where_expr %.Self.2 [concrete = constants.%I_where.type.cad] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc12_37 // CHECK:STDOUT: } @@ -350,13 +354,14 @@ fn F() { // CHECK:STDOUT: %V.patt: %pattern_type.d2b = symbolic_binding_pattern V, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc14_16.1: type = splice_block %.loc14_16.2 [concrete = constants.%J_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.968] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.78d] // CHECK:STDOUT: %.loc14_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.78d] -// CHECK:STDOUT: %.loc14_16.2: type = where_expr %.Self [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %.loc14_16.2: type = where_expr %.Self.2 [concrete = constants.%J_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%J.type // CHECK:STDOUT: requirement_impls %.loc14_22, %I.ref // CHECK:STDOUT: } @@ -367,19 +372,20 @@ fn F() { // CHECK:STDOUT: %W.patt: %pattern_type.127 = symbolic_binding_pattern W, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [concrete = constants.%I_where.type.427] { +// CHECK:STDOUT: // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc16_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc16_20: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %.Self.as_type.loc16_20: type = facet_access_type %.Self.ref.loc16_20 [symbolic_self = constants.%.Self.as_type.541] // CHECK:STDOUT: %.loc16_20: type = converted %.Self.ref.loc16_20, %.Self.as_type.loc16_20 [symbolic_self = constants.%.Self.as_type.541] -// CHECK:STDOUT: %.Self.ref.loc16_38: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref.loc16_38: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %Member.ref: %I.assoc_type = name_ref Member, @Member.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc16_38: type = facet_access_type %.Self.ref.loc16_38 [symbolic_self = constants.%.Self.as_type.541] // CHECK:STDOUT: %.loc16_38: type = converted %.Self.ref.loc16_38, %.Self.as_type.loc16_38 [symbolic_self = constants.%.Self.as_type.541] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc16_50: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc16_14.2: type = where_expr %.Self [concrete = constants.%I_where.type.427] { +// CHECK:STDOUT: %.loc16_14.2: type = where_expr %.Self.2 [concrete = constants.%I_where.type.427] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_impls %.loc16_20, %J.ref // CHECK:STDOUT: requirement_equivalent %impl.elem0, %.loc16_50 @@ -427,9 +433,9 @@ fn F() { // CHECK:STDOUT: %K.type: type = facet_type <@K> [concrete] // CHECK:STDOUT: %K.assoc_type: type = assoc_entity_type @K [concrete] // CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @K.%Associated [concrete] -// CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %K.lookup_impl_witness: = lookup_impl_witness %.Self, @K [symbolic_self] +// CHECK:STDOUT: %.Self.02e: %K.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.02e [symbolic_self] +// CHECK:STDOUT: %K.lookup_impl_witness: = lookup_impl_witness %.Self.02e, @K [symbolic_self] // CHECK:STDOUT: %impl.elem0: %L.type = impl_witness_access %K.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic_self] // CHECK:STDOUT: %K_where.type: type = facet_type <@K where TODO> [concrete] @@ -447,9 +453,10 @@ fn F() { // CHECK:STDOUT: %W.patt: %pattern_type = symbolic_binding_pattern W, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc12_30.1: type = splice_block %.loc12_30.2 [concrete = constants.%K_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [concrete = constants.%K.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.02e] // CHECK:STDOUT: %Associated.ref: %K.assoc_type = name_ref Associated, @Associated.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc12_36.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] @@ -457,7 +464,7 @@ fn F() { // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] // CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic_self = constants.%as_type] // CHECK:STDOUT: %.loc12_36.2: type = converted %impl.elem0, %as_type [symbolic_self = constants.%as_type] -// CHECK:STDOUT: %.loc12_30.2: type = where_expr %.Self [concrete = constants.%K_where.type] { +// CHECK:STDOUT: %.loc12_30.2: type = where_expr %.Self.2 [concrete = constants.%K_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%K.type // CHECK:STDOUT: requirement_impls %.loc12_36.2, %M.ref // CHECK:STDOUT: } @@ -493,9 +500,9 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [concrete = ] { // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] // CHECK:STDOUT: %I.ref: = name_ref I, [concrete = ] -// CHECK:STDOUT: %.loc9_23.2: type = where_expr %.Self [concrete = ] { +// CHECK:STDOUT: %.loc9_23.2: type = where_expr %.Self.2 [concrete = ] { // CHECK:STDOUT: requirement_base_facet_type type // CHECK:STDOUT: requirement_impls %.Self.ref, // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/where_expr/designator.carbon b/toolchain/check/testdata/where_expr/designator.carbon index fe3a3717a6c9..4ef83e3d4468 100644 --- a/toolchain/check/testdata/where_expr/designator.carbon +++ b/toolchain/check/testdata/where_expr/designator.carbon @@ -137,6 +137,7 @@ fn G(T:! type where C(()) impls I(.Self)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] +// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%Member [concrete] // CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [symbolic_self] @@ -152,7 +153,6 @@ fn G(T:! type where C(()) impls I(.Self)) {} // CHECK:STDOUT: %U: %I_where.type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %PeriodMember.type: type = fn_type @PeriodMember [concrete] // CHECK:STDOUT: %PeriodMember: %PeriodMember.type = struct_value () [concrete] -// CHECK:STDOUT: %.Self.644: type = bind_symbolic_name .Self [symbolic_self] // CHECK:STDOUT: %type_where: type = facet_type [concrete] // CHECK:STDOUT: %V: %type_where = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %pattern_type.2b5: type = pattern_type %type_where [concrete] @@ -168,11 +168,12 @@ fn G(T:! type where C(()) impls I(.Self)) {} // CHECK:STDOUT: %T.patt: %pattern_type.f03 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_21.1: type = splice_block %.loc9_21.2 [concrete = constants.%I_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %.loc9_37: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_21.2: type = where_expr %.Self [concrete = constants.%I_where.type] { +// CHECK:STDOUT: %.loc9_21.2: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc9_37 // CHECK:STDOUT: } @@ -183,15 +184,16 @@ fn G(T:! type where C(()) impls I(.Self)) {} // CHECK:STDOUT: %U.patt: %pattern_type.f03 = symbolic_binding_pattern U, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc11_23.1: type = splice_block %.loc11_23.2 [concrete = constants.%I_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %Member.ref: %I.assoc_type = name_ref Member, @Member.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_29: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc11_41: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_23.2: type = where_expr %.Self [concrete = constants.%I_where.type] { +// CHECK:STDOUT: %.loc11_23.2: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_equivalent %impl.elem0, %.loc11_41 // CHECK:STDOUT: } @@ -203,9 +205,9 @@ fn G(T:! type where C(()) impls I(.Self)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc13_27.1: type = splice_block %.loc13_27.2 [concrete = constants.%type_where] { // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.644] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.644] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.loc13_27.2: type = where_expr %.Self [concrete = constants.%type_where] { +// CHECK:STDOUT: %.loc13_27.2: type = where_expr %.Self.2 [concrete = constants.%type_where] { // CHECK:STDOUT: requirement_base_facet_type type // CHECK:STDOUT: requirement_impls %.Self.ref, %I.ref // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/where_expr/dot_self_index.carbon b/toolchain/check/testdata/where_expr/dot_self_index.carbon index c36b640d6611..b5f626d5d897 100644 --- a/toolchain/check/testdata/where_expr/dot_self_index.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_index.carbon @@ -73,6 +73,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %U.param_patt: @H.%pattern_type (%pattern_type.668) = value_param_pattern %U.patt, call_param0 [concrete] // CHECK:STDOUT: %V.patt: %pattern_type.98f = symbolic_binding_pattern V, 1 [concrete] // CHECK:STDOUT: } { +// CHECK:STDOUT: // CHECK:STDOUT: %T.loc21_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_6.1 (constants.%T)] // CHECK:STDOUT: %U.param: @H.%Empty_where.type (%Empty_where.type.b73) = value_param call_param0 // CHECK:STDOUT: %.loc21_28.1: type = splice_block %.loc21_28.2 [symbolic = %Empty_where.type (constants.%Empty_where.type.b73)] { @@ -80,7 +81,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %T.ref.loc21_25: type = name_ref T, %T.loc21_6.2 [symbolic = %T.loc21_6.1 (constants.%T)] // CHECK:STDOUT: %Empty.type.loc21_26.2: type = facet_type <@Empty, @Empty(constants.%T)> [symbolic = %Empty.type.loc21_26.1 (constants.%Empty.type.3e5fde.2)] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: @H.%Empty.type.loc21_26.1 (%Empty.type.3e5fde.2) = name_ref .Self, %.Self.2 [symbolic = %.Self.1 (constants.%.Self.c95)] +// CHECK:STDOUT: %.Self.ref: @H.%Empty.type.loc21_26.1 (%Empty.type.3e5fde.2) = name_ref .Self, %.Self.4 [symbolic = %.Self.1 (constants.%.Self.c95)] // CHECK:STDOUT: %.loc21_34.1: @H.%Empty.assoc_type (%Empty.assoc_type.3cf698.2) = specific_constant @A.%assoc0, @Empty(constants.%T) [symbolic = %assoc0 (constants.%assoc0.3715ce.2)] // CHECK:STDOUT: %A.ref: @H.%Empty.assoc_type (%Empty.assoc_type.3cf698.2) = name_ref A, %.loc21_34.1 [symbolic = %assoc0 (constants.%assoc0.3715ce.2)] // CHECK:STDOUT: %.Self.as_type.loc21_34.2: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc21_34.1 (constants.%.Self.as_type.a75)] @@ -88,12 +89,13 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %impl.elem0.loc21_34.2: type = impl_witness_access constants.%Empty.lookup_impl_witness.b1d, element0 [symbolic = %impl.elem0.loc21_34.1 (constants.%impl.elem0.c6e)] // CHECK:STDOUT: %T.ref.loc21_39: type = name_ref T, %T.loc21_6.2 [symbolic = %T.loc21_6.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc21_40.2: type = ptr_type %T.ref.loc21_39 [symbolic = %ptr.loc21_40.1 (constants.%ptr.79f)] -// CHECK:STDOUT: %.loc21_28.2: type = where_expr %.Self.2 [symbolic = %Empty_where.type (constants.%Empty_where.type.b73)] { +// CHECK:STDOUT: %.loc21_28.2: type = where_expr %.Self.4 [symbolic = %Empty_where.type (constants.%Empty_where.type.b73)] { // CHECK:STDOUT: requirement_base_facet_type constants.%Empty.type.3e5fde.2 // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc21_34.2, %ptr.loc21_40.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %U: @H.%Empty_where.type (%Empty_where.type.b73) = bind_name U, %U.param +// CHECK:STDOUT: // CHECK:STDOUT: %V.loc21_43.2: type = bind_symbolic_name V, 1 [symbolic = %V.loc21_43.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/where_expr/equal_rewrite.carbon b/toolchain/check/testdata/where_expr/equal_rewrite.carbon index 04a17843a962..094118ecfe17 100644 --- a/toolchain/check/testdata/where_expr/equal_rewrite.carbon +++ b/toolchain/check/testdata/where_expr/equal_rewrite.carbon @@ -225,9 +225,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %N.type: type = facet_type <@N> [concrete] // CHECK:STDOUT: %N.assoc_type: type = assoc_entity_type @N [concrete] // CHECK:STDOUT: %assoc0: %N.assoc_type = assoc_entity element0, @N.%P [concrete] -// CHECK:STDOUT: %.Self: %N.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %N.lookup_impl_witness: = lookup_impl_witness %.Self, @N [symbolic_self] +// CHECK:STDOUT: %.Self.9aa: %N.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.9aa [symbolic_self] +// CHECK:STDOUT: %N.lookup_impl_witness: = lookup_impl_witness %.Self.9aa, @N [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %N.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %N_where.type: type = facet_type <@N where %impl.elem0 = %empty_struct_type> [concrete] @@ -245,16 +245,17 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [concrete = constants.%N_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %N.ref: type = name_ref N, file.%N.decl [concrete = constants.%N.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %N.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %N.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.9aa] // CHECK:STDOUT: %P.ref: %N.assoc_type = name_ref P, @P.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%N.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_28.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc9_28.2: type = converted %.loc9_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc9_16.2: type = where_expr %.Self [concrete = constants.%N_where.type] { +// CHECK:STDOUT: %.loc9_16.2: type = where_expr %.Self.2 [concrete = constants.%N_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%N.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_28.2 // CHECK:STDOUT: } @@ -280,9 +281,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] // CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%B [concrete] // CHECK:STDOUT: %assoc1: %A.assoc_type = assoc_entity element1, @A.%C [concrete] -// CHECK:STDOUT: %.Self: %A.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %.Self, @A [symbolic_self] +// CHECK:STDOUT: %.Self.3ca: %A.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.3ca [symbolic_self] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %.Self.3ca, @A [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %A.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] @@ -304,9 +305,10 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %D.patt: %pattern_type.e7b = symbolic_binding_pattern D, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc10_42.1: type = splice_block %.loc10_42.2 [concrete = constants.%A_where.type.7c3] { +// CHECK:STDOUT: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc10_31: %A.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc10_31: %A.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.3ca] // CHECK:STDOUT: %B.ref: %A.assoc_type = name_ref B, @B.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_31: type = facet_access_type %.Self.ref.loc10_31 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_31: type = converted %.Self.ref.loc10_31, %.Self.as_type.loc10_31 [symbolic_self = constants.%.Self.as_type] @@ -314,19 +316,19 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Bool.call: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc10_36.1: type = value_of_initializer %Bool.call [concrete = bool] // CHECK:STDOUT: %.loc10_36.2: type = converted %Bool.call, %.loc10_36.1 [concrete = bool] -// CHECK:STDOUT: %.loc10_25: type = where_expr %.Self.1 [concrete = constants.%A_where.type.ef7] { +// CHECK:STDOUT: %.loc10_25: type = where_expr %.Self.2 [concrete = constants.%A_where.type.ef7] { // CHECK:STDOUT: requirement_base_facet_type constants.%A.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_36.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc10_48: %A.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc10_48: %A.type = name_ref .Self, %.Self.3 [symbolic_self = constants.%.Self.3ca] // CHECK:STDOUT: %C.ref: %A.assoc_type = name_ref C, @C.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc10_48: type = facet_access_type %.Self.ref.loc10_48 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_48: type = converted %.Self.ref.loc10_48, %.Self.as_type.loc10_48 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%A.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %.loc10_54.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_54.2: type = converted %.loc10_54.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_42.2: type = where_expr %.Self.2 [concrete = constants.%A_where.type.7c3] { +// CHECK:STDOUT: %.loc10_42.2: type = where_expr %.Self.3 [concrete = constants.%A_where.type.7c3] { // CHECK:STDOUT: requirement_base_facet_type constants.%A_where.type.ef7 // CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc10_54.2 // CHECK:STDOUT: } @@ -351,9 +353,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %E.type: type = facet_type <@E> [concrete] // CHECK:STDOUT: %E.assoc_type: type = assoc_entity_type @E [concrete] // CHECK:STDOUT: %assoc0: %E.assoc_type = assoc_entity element0, @E.%F [concrete] -// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %E.lookup_impl_witness: = lookup_impl_witness %.Self, @E [symbolic_self] +// CHECK:STDOUT: %.Self.da5: %E.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.da5 [symbolic_self] +// CHECK:STDOUT: %E.lookup_impl_witness: = lookup_impl_witness %.Self.da5, @E [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %E.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] @@ -377,16 +379,17 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %G.patt: %pattern_type.c64 = symbolic_binding_pattern G, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_21.1: type = splice_block %.loc9_21.2 [concrete = constants.%E_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %F.ref: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc9_27: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // 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: %.loc9_21.2: type = where_expr %.Self [concrete = constants.%E_where.type] { +// CHECK:STDOUT: %.loc9_21.2: type = where_expr %.Self.2 [concrete = constants.%E_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%E.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } @@ -397,16 +400,17 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %H.patt: %pattern_type.c64 = symbolic_binding_pattern H, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc11_26.1: type = splice_block %.loc11_26.2 [concrete = constants.%E_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc11_32: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc11_32: %E.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %F.ref.loc11_32: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc11_32: type = facet_access_type %.Self.ref.loc11_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_32: type = converted %.Self.ref.loc11_32, %.Self.as_type.loc11_32 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0.loc11_32: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_32.loc11_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc11_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.Self.ref.loc11_45: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc11_45: %E.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.da5] // CHECK:STDOUT: %F.ref.loc11_45: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc11_45: type = facet_access_type %.Self.ref.loc11_45 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc11_45: type = converted %.Self.ref.loc11_45, %.Self.as_type.loc11_45 [symbolic_self = constants.%.Self.as_type] @@ -414,7 +418,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc11_45, %i32.loc11_37 [concrete = constants.%i32] // CHECK:STDOUT: %int_32.loc11_50: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc11_50: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc11_26.2: type = where_expr %.Self [concrete = constants.%E_where.type] { +// CHECK:STDOUT: %.loc11_26.2: type = where_expr %.Self.2 [concrete = constants.%E_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%E.type // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc11_32, %i32.loc11_37 // CHECK:STDOUT: requirement_rewrite %impl.elem0.subst, %i32.loc11_50 @@ -481,9 +485,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%K [concrete] // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%L [concrete] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %.Self, @J [symbolic_self] +// CHECK:STDOUT: %.Self.968: %J.type = bind_symbolic_name .Self [symbolic_self] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.968 [symbolic_self] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %.Self.968, @J [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %impl.elem1: type = impl_witness_access %J.lookup_impl_witness, element1 [symbolic_self] @@ -507,16 +511,17 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %M.patt: %pattern_type.49f = symbolic_binding_pattern M, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc10_23.1: type = splice_block %.loc10_23.2 [concrete = constants.%J_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc10_29: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc10_29: %J.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %K.ref: %J.assoc_type = name_ref K, @K.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc10_29: type = facet_access_type %.Self.ref.loc10_29 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_29: type = converted %.Self.ref.loc10_29, %.Self.as_type.loc10_29 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_35.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_35.2: type = converted %.loc10_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.Self.ref.loc10_41: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc10_41: %J.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %L.ref: %J.assoc_type = name_ref L, @L.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc10_41: type = facet_access_type %.Self.ref.loc10_41 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc10_41: type = converted %.Self.ref.loc10_41, %.Self.as_type.loc10_41 [symbolic_self = constants.%.Self.as_type] @@ -524,7 +529,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Bool.call: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc10_46.1: type = value_of_initializer %Bool.call [concrete = bool] // CHECK:STDOUT: %.loc10_46.2: type = converted %Bool.call, %.loc10_46.1 [concrete = bool] -// CHECK:STDOUT: %.loc10_23.2: type = where_expr %.Self [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %.loc10_23.2: type = where_expr %.Self.2 [concrete = constants.%J_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%J.type // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_35.2 // CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc10_46.2 @@ -536,9 +541,10 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %N.patt: %pattern_type.49f = symbolic_binding_pattern N, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc12_19.1: type = splice_block %.loc12_19.2 [concrete = constants.%J_where.type] { +// CHECK:STDOUT: // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref.loc12_25: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc12_25: %J.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %L.ref: %J.assoc_type = name_ref L, @L.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.Self.as_type.loc12_25: type = facet_access_type %.Self.ref.loc12_25 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc12_25: type = converted %.Self.ref.loc12_25, %.Self.as_type.loc12_25 [symbolic_self = constants.%.Self.as_type] @@ -546,14 +552,14 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Bool.call: init type = call constants.%Bool() [concrete = bool] // CHECK:STDOUT: %.loc12_30.1: type = value_of_initializer %Bool.call [concrete = bool] // CHECK:STDOUT: %.loc12_30.2: type = converted %Bool.call, %.loc12_30.1 [concrete = bool] -// CHECK:STDOUT: %.Self.ref.loc12_39: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc12_39: %J.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.968] // CHECK:STDOUT: %K.ref: %J.assoc_type = name_ref K, @K.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type.loc12_39: type = facet_access_type %.Self.ref.loc12_39 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc12_39: type = converted %.Self.ref.loc12_39, %.Self.as_type.loc12_39 [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc12_45.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc12_45.2: type = converted %.loc12_45.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc12_19.2: type = where_expr %.Self [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %.loc12_19.2: type = where_expr %.Self.2 [concrete = constants.%J_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%J.type // CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc12_30.2 // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc12_45.2 diff --git a/toolchain/check/testdata/where_expr/non_generic.carbon b/toolchain/check/testdata/where_expr/non_generic.carbon index 26f129e74890..54a73547c8d5 100644 --- a/toolchain/check/testdata/where_expr/non_generic.carbon +++ b/toolchain/check/testdata/where_expr/non_generic.carbon @@ -23,9 +23,9 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] +// CHECK:STDOUT: %.Self.258: %I.type = bind_symbolic_name .Self [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: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] @@ -47,7 +47,7 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %.loc17_21.1: type = splice_block %.loc17_21.2 [concrete = constants.%I_where.type] { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.258] // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type] // CHECK:STDOUT: %.loc17_27: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type] diff --git a/toolchain/lex/token_kind.def b/toolchain/lex/token_kind.def index 8e25d0e52b2b..be0c18f665c0 100644 --- a/toolchain/lex/token_kind.def +++ b/toolchain/lex/token_kind.def @@ -63,7 +63,8 @@ CARBON_SYMBOL_TOKEN(LessLessEqual, "<<=") CARBON_SYMBOL_TOKEN(AmpEqual, "&=") CARBON_SYMBOL_TOKEN(CaretEqual, "^=") CARBON_SYMBOL_TOKEN(ColonEqual, ":=") -CARBON_SYMBOL_TOKEN(ColonExclaim, ":!") +CARBON_TOKEN_WITH_VIRTUAL_NODE( + CARBON_SYMBOL_TOKEN(ColonExclaim, ":!")) CARBON_SYMBOL_TOKEN(EqualEqual, "==") CARBON_SYMBOL_TOKEN(EqualGreater, "=>") CARBON_SYMBOL_TOKEN(ExclaimEqual, "!=") diff --git a/toolchain/parse/handle_binding_pattern.cpp b/toolchain/parse/handle_binding_pattern.cpp index aeb68eecc6f7..7a6aa1609034 100644 --- a/toolchain/parse/handle_binding_pattern.cpp +++ b/toolchain/parse/handle_binding_pattern.cpp @@ -35,27 +35,23 @@ auto HandleBindingPattern(Context& context) -> void { // A `template` keyword may precede the name. auto template_token = context.ConsumeIf(Lex::TokenKind::Template); - // The first item should be an identifier or `self`. - bool has_name = false; + // The first item should be an identifier, the placeholder `_`, or `self`. if (auto identifier = context.ConsumeIf(Lex::TokenKind::Identifier)) { context.AddLeafNode(NodeKind::IdentifierNameNotBeforeParams, *identifier); - has_name = true; } else if (auto self = context.ConsumeIf(Lex::TokenKind::SelfValueIdentifier)) { // Checking will validate the `self` is only declared in the implicit // parameter list of a function. context.AddLeafNode(NodeKind::SelfValueName, *self); - has_name = true; } else if (auto underscore = context.ConsumeIf(Lex::TokenKind::Underscore)) { context.AddLeafNode(NodeKind::UnderscoreName, *underscore); - has_name = true; - } - if (!has_name) { + } else { // Add a placeholder for the name. context.AddLeafNode(NodeKind::IdentifierNameNotBeforeParams, *context.position(), /*has_error=*/true); on_error(/*expected_name=*/true); } + if (auto token_kind = context.PositionKind(); token_kind == Lex::TokenKind::Colon || token_kind == Lex::TokenKind::ColonExclaim) { @@ -77,6 +73,14 @@ auto HandleBindingPattern(Context& context) -> void { : StateKind::BindingPatternFinishAsGeneric; // Use the `:` or `:!` for the root node. state.token = context.Consume(); + + if (token_kind == Lex::TokenKind::ColonExclaim) { + // Add a virtual node before the compile time binding's type + // expression. + context.AddNode(NodeKind::CompileTimeBindingPatternStart, state.token, + state.has_error); + } + context.PushState(state); context.PushStateForExpr(PrecedenceGroup::ForType()); } else { diff --git a/toolchain/parse/node_kind.def b/toolchain/parse/node_kind.def index a956287ec600..9ecaa3395e99 100644 --- a/toolchain/parse/node_kind.def +++ b/toolchain/parse/node_kind.def @@ -175,6 +175,7 @@ CARBON_PARSE_NODE_KIND(ArrayExpr) CARBON_PARSE_NODE_KIND(LetBindingPattern) CARBON_PARSE_NODE_KIND(VarBindingPattern) CARBON_PARSE_NODE_KIND(TemplateBindingName) +CARBON_PARSE_NODE_KIND(CompileTimeBindingPatternStart) CARBON_PARSE_NODE_KIND(CompileTimeBindingPattern) CARBON_PARSE_NODE_KIND(Addr) diff --git a/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon b/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon index d1ad0688a32e..8a1315f7388c 100644 --- a/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon +++ b/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon @@ -20,11 +20,12 @@ choice MissingDefinition(T:! type); // CHECK:STDOUT: {kind: 'ChoiceIntroducer', text: 'choice'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'MissingDefinition'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ChoiceDefinitionStart', text: ';', has_error: yes, subtree_size: 8}, -// CHECK:STDOUT: {kind: 'ChoiceDefinition', text: ';', has_error: yes, subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ChoiceDefinitionStart', text: ';', has_error: yes, subtree_size: 9}, +// CHECK:STDOUT: {kind: 'ChoiceDefinition', text: ';', has_error: yes, subtree_size: 10}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/choice/parameterized.carbon b/toolchain/parse/testdata/choice/parameterized.carbon index 017e8ae611dd..d5206fca1646 100644 --- a/toolchain/parse/testdata/choice/parameterized.carbon +++ b/toolchain/parse/testdata/choice/parameterized.carbon @@ -19,11 +19,12 @@ choice OptionalElement(T:! type) { // CHECK:STDOUT: {kind: 'ChoiceIntroducer', text: 'choice'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'OptionalElement'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ChoiceDefinitionStart', text: '{', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ChoiceDefinitionStart', text: '{', subtree_size: 9}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'Element'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'value'}, @@ -33,6 +34,6 @@ choice OptionalElement(T:! type) { // CHECK:STDOUT: {kind: 'ChoiceAlternativeListComma', text: ','}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'None'}, // CHECK:STDOUT: {kind: 'ChoiceAlternativeListComma', text: ','}, -// CHECK:STDOUT: {kind: 'ChoiceDefinition', text: '}', subtree_size: 18}, +// CHECK:STDOUT: {kind: 'ChoiceDefinition', text: '}', subtree_size: 19}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/generic_params/basic.carbon b/toolchain/parse/testdata/generics/generic_params/basic.carbon index fa5452943c83..efad5bc12a6d 100644 --- a/toolchain/parse/testdata/generics/generic_params/basic.carbon +++ b/toolchain/parse/testdata/generics/generic_params/basic.carbon @@ -16,10 +16,11 @@ fn foo(a:! i32); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 9}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/generic_params/fail_template_no_param.carbon b/toolchain/parse/testdata/generics/generic_params/fail_template_no_param.carbon index 66cd6caff0fa..05119b8cc7e9 100644 --- a/toolchain/parse/testdata/generics/generic_params/fail_template_no_param.carbon +++ b/toolchain/parse/testdata/generics/generic_params/fail_template_no_param.carbon @@ -69,20 +69,22 @@ fn E(template:! i32); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'D'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: ':!', has_error: yes}, -// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', has_error: yes, subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: ':!', has_error: yes}, +// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', has_error: yes, subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 4}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 6}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'E'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: ':!', has_error: yes}, -// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', has_error: yes, subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: ':!', has_error: yes}, +// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', has_error: yes, subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 4}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 6}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/generic_params/template.carbon b/toolchain/parse/testdata/generics/generic_params/template.carbon index 046d42cccfe2..f248350dbd2c 100644 --- a/toolchain/parse/testdata/generics/generic_params/template.carbon +++ b/toolchain/parse/testdata/generics/generic_params/template.carbon @@ -16,11 +16,12 @@ fn foo(template a:! i32); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'a'}, -// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'a'}, +// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 3}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 7}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/generic_params/template_addr.carbon b/toolchain/parse/testdata/generics/generic_params/template_addr.carbon index f8c8783cc868..791fecf524b8 100644 --- a/toolchain/parse/testdata/generics/generic_params/template_addr.carbon +++ b/toolchain/parse/testdata/generics/generic_params/template_addr.carbon @@ -39,12 +39,13 @@ fn bar(addr template b:! i32); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'bar'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'b'}, -// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'b'}, +// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 3}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, -// CHECK:STDOUT: {kind: 'Addr', text: 'addr', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 7}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'Addr', text: 'addr', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 11}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/impl/fail_impl.carbon b/toolchain/parse/testdata/generics/impl/fail_impl.carbon index 7e07fb5315ca..ebc270f2c026 100644 --- a/toolchain/parse/testdata/generics/impl/fail_impl.carbon +++ b/toolchain/parse/testdata/generics/impl/fail_impl.carbon @@ -96,7 +96,7 @@ impl; impl -// CHECK:STDERR: fail_impl.carbon:[[@LINE+89]]:21: error: expected expression [ExpectedExpr] +// CHECK:STDERR: fail_impl.carbon:[[@LINE+92]]:21: error: expected expression [ExpectedExpr] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDERR: @@ -152,32 +152,35 @@ impl // CHECK:STDOUT: {kind: 'ImplIntroducer', text: 'impl'}, // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'StringTypeLiteral', text: 'String'}, -// CHECK:STDOUT: {kind: 'ImplDecl', text: ';', has_error: yes, subtree_size: 9}, +// CHECK:STDOUT: {kind: 'ImplDecl', text: ';', has_error: yes, subtree_size: 10}, // CHECK:STDOUT: {kind: 'ImplIntroducer', text: 'impl'}, // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, -// CHECK:STDOUT: {kind: 'ImplDecl', text: ';', has_error: yes, subtree_size: 9}, +// CHECK:STDOUT: {kind: 'ImplDecl', text: ';', has_error: yes, subtree_size: 10}, // CHECK:STDOUT: {kind: 'ImplIntroducer', text: 'impl'}, // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'TypeImplAs', text: 'as', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Interface'}, -// CHECK:STDOUT: {kind: 'ImplDecl', text: ';', has_error: yes, subtree_size: 11}, +// CHECK:STDOUT: {kind: 'ImplDecl', text: ';', has_error: yes, subtree_size: 12}, // CHECK:STDOUT: {kind: 'ImplIntroducer', text: 'impl'}, // CHECK:STDOUT: {kind: 'InvalidParse', text: ';', has_error: yes}, // CHECK:STDOUT: {kind: 'ImplDecl', text: ';', has_error: yes, subtree_size: 3}, diff --git a/toolchain/parse/testdata/generics/impl/forall.carbon b/toolchain/parse/testdata/generics/impl/forall.carbon index 22997582f06c..d8dbb3877bdb 100644 --- a/toolchain/parse/testdata/generics/impl/forall.carbon +++ b/toolchain/parse/testdata/generics/impl/forall.carbon @@ -19,32 +19,35 @@ impl forall [T:! type, U:! Interface] U as Interface(T) { // CHECK:STDOUT: {kind: 'ImplIntroducer', text: 'impl'}, // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'TypeImplAs', text: 'as', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Interface'}, -// CHECK:STDOUT: {kind: 'ImplDecl', text: ';', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'ImplDecl', text: ';', subtree_size: 12}, // CHECK:STDOUT: {kind: 'ImplIntroducer', text: 'impl'}, // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Interface'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 11}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'U'}, // CHECK:STDOUT: {kind: 'TypeImplAs', text: 'as', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Interface'}, // CHECK:STDOUT: {kind: 'CallExprStart', text: '(', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'CallExpr', text: ')', subtree_size: 4}, -// CHECK:STDOUT: {kind: 'ImplDefinitionStart', text: '{', subtree_size: 18}, -// CHECK:STDOUT: {kind: 'ImplDefinition', text: '}', subtree_size: 19}, +// CHECK:STDOUT: {kind: 'ImplDefinitionStart', text: '{', subtree_size: 20}, +// CHECK:STDOUT: {kind: 'ImplDefinition', text: '}', subtree_size: 21}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/params/name_qualifier.carbon b/toolchain/parse/testdata/generics/params/name_qualifier.carbon index 1d31b287ec6b..d2d07a0a841e 100644 --- a/toolchain/parse/testdata/generics/params/name_qualifier.carbon +++ b/toolchain/parse/testdata/generics/params/name_qualifier.carbon @@ -36,99 +36,109 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'GenericClass1'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 9}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'F'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 14}, +// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 15}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'GenericClass1'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 7}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 8}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'F'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 12}, -// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 13}, +// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 13}, +// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 14}, // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'GenericClass2'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'X'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'X'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 13}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 15}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'F'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 19}, +// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 21}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'GenericClass2'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'X'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'X'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 14}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'F'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 17}, -// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 18}, +// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 19}, +// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 20}, // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'OuterGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 9}, // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'InnerGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 17}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 19}, // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'OuterGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 7}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 8}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'InnerGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'F'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, @@ -141,22 +151,24 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 9}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 12}, -// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 28}, +// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 30}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'OuterGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 7}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 8}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'InnerGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 7}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 8}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'F'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'x'}, @@ -167,7 +179,7 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'U'}, // CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 9}, -// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 26}, -// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 27}, +// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 28}, +// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 29}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/let/fail_missing_name.carbon b/toolchain/parse/testdata/let/fail_missing_name.carbon index c7f4559bd881..a94b3c8391b1 100644 --- a/toolchain/parse/testdata/let/fail_missing_name.carbon +++ b/toolchain/parse/testdata/let/fail_missing_name.carbon @@ -40,11 +40,12 @@ let :! bool = true; // CHECK:STDOUT: parse_tree: [ // CHECK:STDOUT: {kind: 'FileStart', text: ''}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: ':!', has_error: yes}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: ':!', has_error: yes}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'BoolTypeLiteral', text: 'bool'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 4}, // CHECK:STDOUT: {kind: 'LetInitializer', text: '='}, // CHECK:STDOUT: {kind: 'BoolLiteralTrue', text: 'true'}, -// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 7}, +// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 8}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/let/missing_value.carbon b/toolchain/parse/testdata/let/missing_value.carbon index 5d6ff3ff215e..f5eae659051d 100644 --- a/toolchain/parse/testdata/let/missing_value.carbon +++ b/toolchain/parse/testdata/let/missing_value.carbon @@ -41,10 +41,11 @@ interface I { // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'I'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/operators/precedence_where.carbon b/toolchain/parse/testdata/operators/precedence_where.carbon index 8f6142b40fa2..be18f49fb52f 100644 --- a/toolchain/parse/testdata/operators/precedence_where.carbon +++ b/toolchain/parse/testdata/operators/precedence_where.carbon @@ -22,7 +22,8 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'PostfixStar'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, // CHECK:STDOUT: {kind: 'PostfixOperatorStar', text: '*', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 3}, @@ -34,13 +35,14 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'PostfixOperatorStar', text: '*', subtree_size: 3}, // CHECK:STDOUT: {kind: 'RequirementEqualEqual', text: '==', subtree_size: 7}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 11}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 13}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 15}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 18}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 14}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 16}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 19}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'Ampersand'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'J'}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'K'}, // CHECK:STDOUT: {kind: 'InfixOperatorAmp', text: '&', subtree_size: 3}, @@ -53,13 +55,14 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'InfixOperatorAmp', text: '&', subtree_size: 3}, // CHECK:STDOUT: {kind: 'RequirementImpls', text: 'impls', subtree_size: 7}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 12}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 14}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 16}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 19}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 17}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 20}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'BinaryPlus'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'V'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'V'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'L'}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'M'}, // CHECK:STDOUT: {kind: 'InfixOperatorPlus', text: '+', subtree_size: 3}, @@ -72,13 +75,14 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'InfixOperatorAmp', text: '&', subtree_size: 3}, // CHECK:STDOUT: {kind: 'RequirementImpls', text: 'impls', subtree_size: 7}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 12}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 14}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 16}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 19}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 17}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 20}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'UnaryMinus'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'W'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'W'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'P'}, // CHECK:STDOUT: {kind: 'PrefixOperatorMinus', text: '-', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 3}, @@ -88,8 +92,8 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'PrefixOperatorMinus', text: '-', subtree_size: 2}, // CHECK:STDOUT: {kind: 'RequirementImpls', text: 'impls', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 9}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 11}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 13}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 16}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 14}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/where_expr/basic.carbon b/toolchain/parse/testdata/where_expr/basic.carbon index ef4906e05b24..a2d79fcf6a13 100644 --- a/toolchain/parse/testdata/where_expr/basic.carbon +++ b/toolchain/parse/testdata/where_expr/basic.carbon @@ -41,7 +41,8 @@ fn F() { // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'I'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Foo'}, @@ -49,11 +50,12 @@ fn F() { // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Bar'}, // CHECK:STDOUT: {kind: 'RequirementImpls', text: 'impls', subtree_size: 4}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 7}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 9}, -// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 11}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 16}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, @@ -62,15 +64,16 @@ fn F() { // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'RequirementEqual', text: '=', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 10}, -// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'F'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'W'}, @@ -79,8 +82,8 @@ fn F() { // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'RequirementEqualEqual', text: '==', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 10}, -// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 12}, -// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 18}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 13}, +// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 19}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/where_expr/fail_rewrite.carbon b/toolchain/parse/testdata/where_expr/fail_rewrite.carbon index e4be56efbbc5..e2bac754f8bc 100644 --- a/toolchain/parse/testdata/where_expr/fail_rewrite.carbon +++ b/toolchain/parse/testdata/where_expr/fail_rewrite.carbon @@ -73,14 +73,15 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'NotDesignator'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 4}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 6}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 8}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 9}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 12}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_designator_in_parens.carbon @@ -89,7 +90,8 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'DesignatorInParens'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'V'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'V'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ParenExprStart', text: '('}, @@ -97,9 +99,9 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ParenExpr', text: ')', subtree_size: 4}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 7}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 9}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 11}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 14}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 10}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 12}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 15}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_dot_self.carbon @@ -108,15 +110,16 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'DotSelf'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'W'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'W'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'K'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'SelfTypeName', text: 'Self'}, // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 5}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 7}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 9}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 8}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 10}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_dot_keyword.carbon @@ -125,15 +128,16 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'DotKeyword'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'W'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'W'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'K'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'and', has_error: yes}, // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 5}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 7}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 9}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 8}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 10}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_postfix_after_designator.carbon @@ -142,16 +146,17 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'PostfixAfterDesignator'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'X'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'X'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'L'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'M'}, // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'PostfixOperatorStar', text: '*', subtree_size: 3}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 6}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 8}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 10}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 13}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 9}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 11}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 14}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_binary_op_after_designator.carbon @@ -160,7 +165,8 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'BinaryOpAfterDesignator'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Y'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Y'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'N'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'O'}, @@ -169,9 +175,9 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'InfixOperatorPlus', text: '+', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 8}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 10}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 12}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 11}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 13}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 16}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_after_and.carbon @@ -180,7 +186,8 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'AfterAnd'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Z'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Z'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Q'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'R'}, @@ -191,8 +198,8 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'TupleLiteralStart', text: '('}, // CHECK:STDOUT: {kind: 'TupleLiteral', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 10}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 12}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 14}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 17}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 13}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 15}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 18}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/where_expr/impl_where.carbon b/toolchain/parse/testdata/where_expr/impl_where.carbon index b4f76fa95d52..5c930ed3ab50 100644 --- a/toolchain/parse/testdata/where_expr/impl_where.carbon +++ b/toolchain/parse/testdata/where_expr/impl_where.carbon @@ -31,11 +31,12 @@ impl f64 as Interface where .T = (type where .Self impls type) { // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Interface'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 10}, // CHECK:STDOUT: {kind: 'ImplIntroducer', text: 'impl'}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, // CHECK:STDOUT: {kind: 'TypeImplAs', text: 'as', subtree_size: 2}, diff --git a/toolchain/parse/testdata/where_expr/where_and.carbon b/toolchain/parse/testdata/where_expr/where_and.carbon index 36f2b537feb1..2708e775099e 100644 --- a/toolchain/parse/testdata/where_expr/where_and.carbon +++ b/toolchain/parse/testdata/where_expr/where_and.carbon @@ -44,7 +44,8 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'OneAnd'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'U'}, @@ -58,13 +59,14 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'RequirementEqualEqual', text: '==', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 13}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 15}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 17}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 20}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 16}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 18}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 21}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'TwoAnd'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Y'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Y'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'J'}, @@ -83,9 +85,9 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'BoolTypeLiteral', text: 'bool'}, // CHECK:STDOUT: {kind: 'RequirementEqual', text: '=', subtree_size: 4}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 18}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 20}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 22}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 25}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 21}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 23}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 26}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_and_prefix.carbon @@ -94,14 +96,15 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'AndPrefix'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'InvalidParse', text: 'and', has_error: yes}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 4}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 6}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 8}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 9}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 12}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_and_suffix.carbon @@ -110,7 +113,8 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'AndSuffix'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Y'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Y'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'J'}, @@ -120,9 +124,9 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'RequirementAnd', text: 'and'}, // CHECK:STDOUT: {kind: 'InvalidParse', text: ')', has_error: yes}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 9}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 11}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 13}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 16}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 12}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 14}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_and_early.carbon @@ -131,14 +135,15 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'AndEarly'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Z'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Z'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'L'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'M'}, // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 5}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 7}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 9}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 8}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 10}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/typed_nodes.h b/toolchain/parse/typed_nodes.h index 148bbbc0cd80..d4411c349dcd 100644 --- a/toolchain/parse/typed_nodes.h +++ b/toolchain/parse/typed_nodes.h @@ -375,15 +375,24 @@ struct TemplateBindingName { AnyRuntimeBindingPatternName name; }; +struct CompileTimeBindingPatternStart { + static constexpr auto Kind = + NodeKind::CompileTimeBindingPatternStart.Define({.child_count = 1}); + // TODO: is there some way to reuse AnyRuntimeBindingPatternName here? + NodeIdOneOf + name; + // This is a virtual token. The `:!` token is owned by the + // CompileTimeBindingPattern node. + Lex::ColonExclaimTokenIndex token; +}; + // `name:! Type` struct CompileTimeBindingPattern { static constexpr auto Kind = NodeKind::CompileTimeBindingPattern.Define( {.category = NodeCategory::Pattern, .child_count = 2}); - // TODO: is there some way to reuse AnyRuntimeBindingPatternName here? - NodeIdOneOf - name; + CompileTimeBindingPatternStartId introducer; Lex::ColonExclaimTokenIndex token; AnyExprId type; };