Use specific_constant when referring to name in enclosing generic (#7936)

When unqualified lookup finds a name from an enclosing generic, create a
`specific_constant` if it's a constant, or a `specific_inst` otherwise,
to refer to that name from the inner generic. This allows consumers of
generic instructions to always use a specific of the current scope's
generic when accessing the constant value or type of a dependent
instruction.

Fixes crashes in dominance and in `GetExprCategory` caused by using
specifics for the wrong generic.

Assisted-by: Gemini via Antigravity
This commit is contained in:
Richard Smith authored and GitHub committed 2026-10-15 02:00:24 +00:00
1 parent 893cce070f
commit e1c8c1f855
46 files changed
+1229 -551

No files matched your search

+1 -1
View File
@@ -80,7 +80,7 @@ auto Context::VerifyOnFinish() const -> void {
#ifndef NDEBUG
if (auto verify = sem_ir_->Verify(); !verify.ok()) {
CARBON_FATAL("Built invalid SemIR: {1}\n", verify.error());
CARBON_FATAL("Built invalid SemIR: {0}\n", verify.error());
}
#endif
}
+13 -6
View File
@@ -278,13 +278,20 @@ auto WrapInstForSpecific(Context& context, SemIR::LocId loc_id,
CARBON_CHECK(type_id.has_value(), "Missing type for {0}",
context.insts().Get(inst_id));
// If `inst_id` has a constant value that depends on its specific, store the
// specific too.
// If `inst_id` has a constant value or type that depends on its specific,
// store the specific too.
if (specific_id.has_value() &&
context.constant_values().Get(inst_id).is_symbolic()) {
inst_id = AddInst<SemIR::SpecificConstant>(
context, loc_id,
{.type_id = type_id, .inst_id = inst_id, .specific_id = specific_id});
(context.constant_values().Get(inst_id).is_symbolic() ||
context.insts().Get(inst_id).type_id().is_symbolic())) {
if (context.constant_values().Get(inst_id).is_constant()) {
inst_id = AddInst<SemIR::SpecificConstant>(
context, loc_id,
{.type_id = type_id, .inst_id = inst_id, .specific_id = specific_id});
} else {
inst_id = AddInst<SemIR::SpecificInst>(
context, loc_id,
{.type_id = type_id, .inst_id = inst_id, .specific_id = specific_id});
}
}
return {.inst_id = inst_id, .type_id = type_id};
}
+5 -4
View File
@@ -200,10 +200,11 @@ struct WrapInstForSpecificResult {
};
// Given a potentially generic instruction `inst_id`, this returns an inst ID
// whose constant value is the same as the substituted constant value of
// `inst_id` in `specific_id`. If the result is not `inst_id` itself, it will be
// a newly created inst whose location is `loc_id`. If `specific_id` is `None`,
// it is treated as the self-specific, so `inst_id` is passed through unchanged.
// whose type and constant value are the same as the substituted type and
// constant value of `inst_id` in `specific_id`. If the result is not `inst_id`
// itself, it will be a newly created inst whose location is `loc_id`. If
// `specific_id` is `None`, it is treated as the self-specific, so `inst_id` is
// passed through unchanged.
//
// This also returns the type ID of the result, as a convenience for the caller.
auto WrapInstForSpecific(Context& context, SemIR::LocId loc_id,
+32 -4
View File
@@ -96,6 +96,26 @@ auto LookupNameInDecl(Context& context, SemIR::LocId loc_id,
}
}
// Returns the generic that `inst_id` is attached to, if any.
static auto GetGenericForInst(Context& context, SemIR::InstId inst_id)
-> SemIR::GenericId {
auto const_id = context.constant_values().GetAttached(inst_id);
if (const_id.has_value() && const_id.is_symbolic()) {
if (auto generic_id =
context.constant_values().GetSymbolicConstant(const_id).generic_id;
generic_id.has_value()) {
return generic_id;
}
}
auto type_id = context.insts().GetAttachedType(inst_id);
if (type_id.has_value() && type_id.is_symbolic()) {
return context.constant_values()
.GetSymbolicConstant(context.types().GetConstantId(type_id))
.generic_id;
}
return SemIR::GenericId::None;
}
auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id,
SemIR::NameId name_id, bool required)
-> LookupResult {
@@ -156,10 +176,18 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id,
}
if (lexical_result.has_value()) {
// A lexical scope never needs an associated specific. If there's a
// lexically enclosing generic, then it also encloses the point of use of
// the name.
return {.specific_id = SemIR::SpecificId::None,
// If the instruction belongs to an enclosing generic rather than the
// current generic, pair it with the enclosing generic's self-specific.
auto specific_id = SemIR::SpecificId::None;
auto decl_generic_id = GetGenericForInst(context, lexical_result);
auto current_generic_id =
context.generic_region_stack().Empty()
? SemIR::GenericId::None
: context.generic_region_stack().PeekPendingGeneric().generic_id;
if (decl_generic_id.has_value() && decl_generic_id != current_generic_id) {
specific_id = context.generics().GetSelfSpecific(decl_generic_id);
}
return {.specific_id = specific_id,
.scope_result = SemIR::ScopeLookupResult::MakeFound(
lexical_result, SemIR::AccessKind::Public)};
}
+2 -2
View File
@@ -151,8 +151,8 @@ var b: array(1, 39999999999999999993);
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core.import_ref.d9c7: @Core.IntLiteral.as.As.impl.d83.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.16e) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.d83.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.81c)]
// CHECK:STDOUT: %As.impl_witness_table.43c = impl_witness_table (%Core.import_ref.d9c7), @Core.IntLiteral.as.As.impl.d83 [concrete]
// CHECK:STDOUT: %Core.import_ref.b7af0: @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert.type (%UInt.as.ImplicitAs.impl.Convert.type.802) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert (constants.%UInt.as.ImplicitAs.impl.Convert.7a2)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.7eb = impl_witness_table (%Core.import_ref.b7af0), @UInt.as.ImplicitAs.impl.d6a [concrete]
// CHECK:STDOUT: %Core.import_ref.b7af: @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert.type (%UInt.as.ImplicitAs.impl.Convert.type.802) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert (constants.%UInt.as.ImplicitAs.impl.Convert.7a2)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.7eb = impl_witness_table (%Core.import_ref.b7af), @UInt.as.ImplicitAs.impl.d6a [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
+216 -216
View File
@@ -65,35 +65,35 @@ fn Foo[T: type](p: T*) -> (T*, ()) {
// CHECK:STDOUT: import_ir_inst17: {ir_id: import_ir78000004, inst_id: inst7000003B}
// CHECK:STDOUT: import_ir_inst18: {ir_id: import_ir78000004, inst_id: inst70000094}
// CHECK:STDOUT: import_ir_inst19: {ir_id: import_ir78000004, inst_id: inst7000008F}
// CHECK:STDOUT: import_ir_inst1A: {ir_id: import_ir78000004, inst_id: inst700000B3}
// CHECK:STDOUT: import_ir_inst1A: {ir_id: import_ir78000004, inst_id: inst700000B6}
// CHECK:STDOUT: import_ir_inst1B: {ir_id: import_ir78000004, inst_id: inst70000093}
// CHECK:STDOUT: import_ir_inst1C: {ir_id: import_ir78000004, inst_id: inst700000AB}
// CHECK:STDOUT: import_ir_inst1D: {ir_id: import_ir78000004, inst_id: inst7000009F}
// CHECK:STDOUT: import_ir_inst1E: {ir_id: import_ir78000004, inst_id: inst7000009E}
// CHECK:STDOUT: import_ir_inst1F: {ir_id: import_ir78000004, inst_id: inst700000AA}
// CHECK:STDOUT: import_ir_inst20: {ir_id: import_ir78000004, inst_id: inst700000A2}
// CHECK:STDOUT: import_ir_inst21: {ir_id: import_ir78000004, inst_id: inst700000A6}
// CHECK:STDOUT: import_ir_inst22: {ir_id: import_ir78000004, inst_id: inst700000A7}
// CHECK:STDOUT: import_ir_inst23: {ir_id: import_ir78000004, inst_id: inst700000AD}
// CHECK:STDOUT: import_ir_inst1C: {ir_id: import_ir78000004, inst_id: inst700000AD}
// CHECK:STDOUT: import_ir_inst1D: {ir_id: import_ir78000004, inst_id: inst700000A0}
// CHECK:STDOUT: import_ir_inst1E: {ir_id: import_ir78000004, inst_id: inst7000009F}
// CHECK:STDOUT: import_ir_inst1F: {ir_id: import_ir78000004, inst_id: inst700000AC}
// CHECK:STDOUT: import_ir_inst20: {ir_id: import_ir78000004, inst_id: inst700000A3}
// CHECK:STDOUT: import_ir_inst21: {ir_id: import_ir78000004, inst_id: inst700000A8}
// CHECK:STDOUT: import_ir_inst22: {ir_id: import_ir78000004, inst_id: inst700000A9}
// CHECK:STDOUT: import_ir_inst23: {ir_id: import_ir78000004, inst_id: inst700000AF}
// CHECK:STDOUT: import_ir_inst24: {ir_id: import_ir78000004, inst_id: inst70000082}
// CHECK:STDOUT: import_ir_inst25: {ir_id: import_ir78000004, inst_id: inst7000009A}
// CHECK:STDOUT: import_ir_inst26: {ir_id: import_ir78000004, inst_id: inst7000009B}
// CHECK:STDOUT: import_ir_inst27: {ir_id: import_ir78000004, inst_id: inst7000009C}
// CHECK:STDOUT: import_ir_inst28: {ir_id: import_ir78000004, inst_id: inst700000A0}
// CHECK:STDOUT: import_ir_inst29: {ir_id: import_ir78000004, inst_id: inst700000A1}
// CHECK:STDOUT: import_ir_inst2A: {ir_id: import_ir78000004, inst_id: inst700000A4}
// CHECK:STDOUT: import_ir_inst2B: {ir_id: import_ir78000004, inst_id: inst700000A9}
// CHECK:STDOUT: import_ir_inst2C: {ir_id: import_ir78000004, inst_id: inst700000AC}
// CHECK:STDOUT: import_ir_inst2D: {ir_id: import_ir78000004, inst_id: inst700000AF}
// CHECK:STDOUT: import_ir_inst2E: {ir_id: import_ir78000004, inst_id: inst700000DB}
// CHECK:STDOUT: import_ir_inst2F: {ir_id: import_ir78000004, inst_id: inst700000D8}
// CHECK:STDOUT: import_ir_inst30: {ir_id: import_ir78000004, inst_id: inst700000BD}
// CHECK:STDOUT: import_ir_inst31: {ir_id: import_ir78000004, inst_id: inst700000C4}
// CHECK:STDOUT: import_ir_inst32: {ir_id: import_ir78000004, inst_id: inst700000D0}
// CHECK:STDOUT: import_ir_inst33: {ir_id: import_ir78000004, inst_id: inst700000D1}
// CHECK:STDOUT: import_ir_inst34: {ir_id: import_ir78000004, inst_id: inst700000D2}
// CHECK:STDOUT: import_ir_inst35: {ir_id: import_ir78000004, inst_id: inst700000D3}
// CHECK:STDOUT: import_ir_inst36: {ir_id: import_ir78000004, inst_id: inst700000DF}
// CHECK:STDOUT: import_ir_inst28: {ir_id: import_ir78000004, inst_id: inst700000A1}
// CHECK:STDOUT: import_ir_inst29: {ir_id: import_ir78000004, inst_id: inst700000A2}
// CHECK:STDOUT: import_ir_inst2A: {ir_id: import_ir78000004, inst_id: inst700000A5}
// CHECK:STDOUT: import_ir_inst2B: {ir_id: import_ir78000004, inst_id: inst700000AB}
// CHECK:STDOUT: import_ir_inst2C: {ir_id: import_ir78000004, inst_id: inst700000AE}
// CHECK:STDOUT: import_ir_inst2D: {ir_id: import_ir78000004, inst_id: inst700000B1}
// CHECK:STDOUT: import_ir_inst2E: {ir_id: import_ir78000004, inst_id: inst700000DF}
// CHECK:STDOUT: import_ir_inst2F: {ir_id: import_ir78000004, inst_id: inst700000DC}
// CHECK:STDOUT: import_ir_inst30: {ir_id: import_ir78000004, inst_id: inst700000C0}
// CHECK:STDOUT: import_ir_inst31: {ir_id: import_ir78000004, inst_id: inst700000C8}
// CHECK:STDOUT: import_ir_inst32: {ir_id: import_ir78000004, inst_id: inst700000D4}
// CHECK:STDOUT: import_ir_inst33: {ir_id: import_ir78000004, inst_id: inst700000D5}
// CHECK:STDOUT: import_ir_inst34: {ir_id: import_ir78000004, inst_id: inst700000D6}
// CHECK:STDOUT: import_ir_inst35: {ir_id: import_ir78000004, inst_id: inst700000D7}
// CHECK:STDOUT: import_ir_inst36: {ir_id: import_ir78000004, inst_id: inst700000E3}
// CHECK:STDOUT: import_ir_inst37: {ir_id: import_ir78000004, inst_id: inst7000007F}
// CHECK:STDOUT: import_ir_inst38: {ir_id: import_ir78000004, inst_id: inst7000008A}
// CHECK:STDOUT: import_ir_inst39: {ir_id: import_ir78000004, inst_id: inst7000008D}
@@ -104,198 +104,198 @@ fn Foo[T: type](p: T*) -> (T*, ()) {
// CHECK:STDOUT: import_ir_inst3E: {ir_id: import_ir78000004, inst_id: inst7000008C}
// CHECK:STDOUT: import_ir_inst3F: {ir_id: import_ir78000004, inst_id: inst70000092}
// CHECK:STDOUT: import_ir_inst40: {ir_id: import_ir78000004, inst_id: inst70000096}
// CHECK:STDOUT: import_ir_inst41: {ir_id: import_ir78000004, inst_id: inst700000B6}
// CHECK:STDOUT: import_ir_inst42: {ir_id: import_ir78000004, inst_id: inst700000B7}
// CHECK:STDOUT: import_ir_inst43: {ir_id: import_ir78000004, inst_id: inst700000F1}
// CHECK:STDOUT: import_ir_inst44: {ir_id: import_ir78000004, inst_id: inst700000ED}
// CHECK:STDOUT: import_ir_inst45: {ir_id: import_ir78000004, inst_id: inst700000EB}
// CHECK:STDOUT: import_ir_inst46: {ir_id: import_ir78000004, inst_id: inst700000EC}
// CHECK:STDOUT: import_ir_inst47: {ir_id: import_ir78000004, inst_id: inst700000EE}
// CHECK:STDOUT: import_ir_inst48: {ir_id: import_ir78000004, inst_id: inst70000110}
// CHECK:STDOUT: import_ir_inst49: {ir_id: import_ir78000004, inst_id: inst7000010C}
// CHECK:STDOUT: import_ir_inst4A: {ir_id: import_ir78000004, inst_id: inst7000010A}
// CHECK:STDOUT: import_ir_inst4B: {ir_id: import_ir78000004, inst_id: inst7000010B}
// CHECK:STDOUT: import_ir_inst4C: {ir_id: import_ir78000004, inst_id: inst7000010D}
// CHECK:STDOUT: import_ir_inst4D: {ir_id: import_ir78000004, inst_id: inst7000012F}
// CHECK:STDOUT: import_ir_inst4E: {ir_id: import_ir78000004, inst_id: inst7000012B}
// CHECK:STDOUT: import_ir_inst4F: {ir_id: import_ir78000004, inst_id: inst70000129}
// CHECK:STDOUT: import_ir_inst50: {ir_id: import_ir78000004, inst_id: inst7000012A}
// CHECK:STDOUT: import_ir_inst51: {ir_id: import_ir78000004, inst_id: inst7000012C}
// CHECK:STDOUT: import_ir_inst52: {ir_id: import_ir78000004, inst_id: inst7000014E}
// CHECK:STDOUT: import_ir_inst53: {ir_id: import_ir78000004, inst_id: inst7000014A}
// CHECK:STDOUT: import_ir_inst54: {ir_id: import_ir78000004, inst_id: inst70000148}
// CHECK:STDOUT: import_ir_inst55: {ir_id: import_ir78000004, inst_id: inst70000149}
// CHECK:STDOUT: import_ir_inst56: {ir_id: import_ir78000004, inst_id: inst7000014B}
// CHECK:STDOUT: import_ir_inst57: {ir_id: import_ir78000004, inst_id: inst7000017A}
// CHECK:STDOUT: import_ir_inst58: {ir_id: import_ir78000004, inst_id: inst70000175}
// CHECK:STDOUT: import_ir_inst59: {ir_id: import_ir78000004, inst_id: inst70000196}
// CHECK:STDOUT: import_ir_inst5A: {ir_id: import_ir78000004, inst_id: inst70000179}
// CHECK:STDOUT: import_ir_inst5B: {ir_id: import_ir78000004, inst_id: inst70000169}
// CHECK:STDOUT: import_ir_inst5C: {ir_id: import_ir78000004, inst_id: inst70000170}
// CHECK:STDOUT: import_ir_inst5D: {ir_id: import_ir78000004, inst_id: inst70000173}
// CHECK:STDOUT: import_ir_inst5E: {ir_id: import_ir78000004, inst_id: inst70000176}
// CHECK:STDOUT: import_ir_inst5F: {ir_id: import_ir78000004, inst_id: inst7000016C}
// CHECK:STDOUT: import_ir_inst60: {ir_id: import_ir78000004, inst_id: inst7000016B}
// CHECK:STDOUT: import_ir_inst61: {ir_id: import_ir78000004, inst_id: inst7000016E}
// CHECK:STDOUT: import_ir_inst62: {ir_id: import_ir78000004, inst_id: inst70000172}
// CHECK:STDOUT: import_ir_inst63: {ir_id: import_ir78000004, inst_id: inst70000178}
// CHECK:STDOUT: import_ir_inst64: {ir_id: import_ir78000004, inst_id: inst7000017C}
// CHECK:STDOUT: import_ir_inst65: {ir_id: import_ir78000004, inst_id: inst7000018E}
// CHECK:STDOUT: import_ir_inst66: {ir_id: import_ir78000004, inst_id: inst70000182}
// CHECK:STDOUT: import_ir_inst67: {ir_id: import_ir78000004, inst_id: inst70000181}
// CHECK:STDOUT: import_ir_inst68: {ir_id: import_ir78000004, inst_id: inst7000018D}
// CHECK:STDOUT: import_ir_inst69: {ir_id: import_ir78000004, inst_id: inst70000185}
// CHECK:STDOUT: import_ir_inst6A: {ir_id: import_ir78000004, inst_id: inst70000189}
// CHECK:STDOUT: import_ir_inst6B: {ir_id: import_ir78000004, inst_id: inst7000018A}
// CHECK:STDOUT: import_ir_inst6C: {ir_id: import_ir78000004, inst_id: inst70000190}
// CHECK:STDOUT: import_ir_inst6D: {ir_id: import_ir78000004, inst_id: inst7000017E}
// CHECK:STDOUT: import_ir_inst6E: {ir_id: import_ir78000004, inst_id: inst7000017F}
// CHECK:STDOUT: import_ir_inst6F: {ir_id: import_ir78000004, inst_id: inst70000183}
// CHECK:STDOUT: import_ir_inst70: {ir_id: import_ir78000004, inst_id: inst70000184}
// CHECK:STDOUT: import_ir_inst71: {ir_id: import_ir78000004, inst_id: inst70000187}
// CHECK:STDOUT: import_ir_inst72: {ir_id: import_ir78000004, inst_id: inst7000018C}
// CHECK:STDOUT: import_ir_inst73: {ir_id: import_ir78000004, inst_id: inst7000018F}
// CHECK:STDOUT: import_ir_inst74: {ir_id: import_ir78000004, inst_id: inst70000192}
// CHECK:STDOUT: import_ir_inst75: {ir_id: import_ir78000004, inst_id: inst70000199}
// CHECK:STDOUT: import_ir_inst76: {ir_id: import_ir78000004, inst_id: inst7000019A}
// CHECK:STDOUT: import_ir_inst77: {ir_id: import_ir78000004, inst_id: inst7000019D}
// CHECK:STDOUT: import_ir_inst78: {ir_id: import_ir78000004, inst_id: inst700001A7}
// CHECK:STDOUT: import_ir_inst79: {ir_id: import_ir78000004, inst_id: inst700001A3}
// CHECK:STDOUT: import_ir_inst7A: {ir_id: import_ir78000004, inst_id: inst700001A1}
// CHECK:STDOUT: import_ir_inst7B: {ir_id: import_ir78000004, inst_id: inst700001A2}
// CHECK:STDOUT: import_ir_inst7C: {ir_id: import_ir78000004, inst_id: inst700001A4}
// CHECK:STDOUT: import_ir_inst7D: {ir_id: import_ir78000004, inst_id: inst700001C4}
// CHECK:STDOUT: import_ir_inst7E: {ir_id: import_ir78000004, inst_id: inst700001C0}
// CHECK:STDOUT: import_ir_inst7F: {ir_id: import_ir78000004, inst_id: inst700001BE}
// CHECK:STDOUT: import_ir_inst80: {ir_id: import_ir78000004, inst_id: inst700001BF}
// CHECK:STDOUT: import_ir_inst81: {ir_id: import_ir78000004, inst_id: inst700001C1}
// CHECK:STDOUT: import_ir_inst82: {ir_id: import_ir78000004, inst_id: inst70000204}
// CHECK:STDOUT: import_ir_inst83: {ir_id: import_ir78000004, inst_id: inst700001FF}
// CHECK:STDOUT: import_ir_inst84: {ir_id: import_ir78000004, inst_id: inst70000227}
// CHECK:STDOUT: import_ir_inst85: {ir_id: import_ir78000004, inst_id: inst70000203}
// CHECK:STDOUT: import_ir_inst86: {ir_id: import_ir78000004, inst_id: inst7000021F}
// CHECK:STDOUT: import_ir_inst87: {ir_id: import_ir78000004, inst_id: inst70000213}
// CHECK:STDOUT: import_ir_inst88: {ir_id: import_ir78000004, inst_id: inst70000212}
// CHECK:STDOUT: import_ir_inst89: {ir_id: import_ir78000004, inst_id: inst7000021E}
// CHECK:STDOUT: import_ir_inst8A: {ir_id: import_ir78000004, inst_id: inst70000216}
// CHECK:STDOUT: import_ir_inst8B: {ir_id: import_ir78000004, inst_id: inst7000021A}
// CHECK:STDOUT: import_ir_inst8C: {ir_id: import_ir78000004, inst_id: inst7000021B}
// CHECK:STDOUT: import_ir_inst8D: {ir_id: import_ir78000004, inst_id: inst70000221}
// CHECK:STDOUT: import_ir_inst8E: {ir_id: import_ir78000004, inst_id: inst700001E1}
// CHECK:STDOUT: import_ir_inst8F: {ir_id: import_ir78000004, inst_id: inst700001E8}
// CHECK:STDOUT: import_ir_inst90: {ir_id: import_ir78000004, inst_id: inst7000020C}
// CHECK:STDOUT: import_ir_inst91: {ir_id: import_ir78000004, inst_id: inst7000020D}
// CHECK:STDOUT: import_ir_inst92: {ir_id: import_ir78000004, inst_id: inst7000020E}
// CHECK:STDOUT: import_ir_inst93: {ir_id: import_ir78000004, inst_id: inst7000020F}
// CHECK:STDOUT: import_ir_inst94: {ir_id: import_ir78000004, inst_id: inst70000210}
// CHECK:STDOUT: import_ir_inst95: {ir_id: import_ir78000004, inst_id: inst70000214}
// CHECK:STDOUT: import_ir_inst96: {ir_id: import_ir78000004, inst_id: inst70000215}
// CHECK:STDOUT: import_ir_inst97: {ir_id: import_ir78000004, inst_id: inst70000218}
// CHECK:STDOUT: import_ir_inst98: {ir_id: import_ir78000004, inst_id: inst7000021D}
// CHECK:STDOUT: import_ir_inst99: {ir_id: import_ir78000004, inst_id: inst70000220}
// CHECK:STDOUT: import_ir_inst9A: {ir_id: import_ir78000004, inst_id: inst70000223}
// CHECK:STDOUT: import_ir_inst9B: {ir_id: import_ir78000004, inst_id: inst70000262}
// CHECK:STDOUT: import_ir_inst9C: {ir_id: import_ir78000004, inst_id: inst7000025F}
// CHECK:STDOUT: import_ir_inst9D: {ir_id: import_ir78000004, inst_id: inst70000232}
// CHECK:STDOUT: import_ir_inst9E: {ir_id: import_ir78000004, inst_id: inst70000238}
// CHECK:STDOUT: import_ir_inst9F: {ir_id: import_ir78000004, inst_id: inst7000023C}
// CHECK:STDOUT: import_ir_instA0: {ir_id: import_ir78000004, inst_id: inst7000023D}
// CHECK:STDOUT: import_ir_instA1: {ir_id: import_ir78000004, inst_id: inst7000023E}
// CHECK:STDOUT: import_ir_instA2: {ir_id: import_ir78000004, inst_id: inst7000023F}
// CHECK:STDOUT: import_ir_instA3: {ir_id: import_ir78000004, inst_id: inst70000244}
// CHECK:STDOUT: import_ir_instA4: {ir_id: import_ir78000004, inst_id: inst7000024E}
// CHECK:STDOUT: import_ir_instA5: {ir_id: import_ir78000004, inst_id: inst70000257}
// CHECK:STDOUT: import_ir_instA6: {ir_id: import_ir78000004, inst_id: inst70000258}
// CHECK:STDOUT: import_ir_instA7: {ir_id: import_ir78000004, inst_id: inst70000259}
// CHECK:STDOUT: import_ir_instA8: {ir_id: import_ir78000004, inst_id: inst7000025A}
// CHECK:STDOUT: import_ir_instA9: {ir_id: import_ir78000004, inst_id: inst70000266}
// CHECK:STDOUT: import_ir_instAA: {ir_id: import_ir78000004, inst_id: inst700001DF}
// CHECK:STDOUT: import_ir_instAB: {ir_id: import_ir78000004, inst_id: inst700001E5}
// CHECK:STDOUT: import_ir_instAC: {ir_id: import_ir78000004, inst_id: inst700001FA}
// CHECK:STDOUT: import_ir_instAD: {ir_id: import_ir78000004, inst_id: inst700001FC}
// CHECK:STDOUT: import_ir_instAE: {ir_id: import_ir78000004, inst_id: inst70000200}
// CHECK:STDOUT: import_ir_instAF: {ir_id: import_ir78000004, inst_id: inst700001E0}
// CHECK:STDOUT: import_ir_instB0: {ir_id: import_ir78000004, inst_id: inst700001E2}
// CHECK:STDOUT: import_ir_instB1: {ir_id: import_ir78000004, inst_id: inst700001E7}
// CHECK:STDOUT: import_ir_instB2: {ir_id: import_ir78000004, inst_id: inst700001EA}
// CHECK:STDOUT: import_ir_instB3: {ir_id: import_ir78000004, inst_id: inst700001F0}
// CHECK:STDOUT: import_ir_instB4: {ir_id: import_ir78000004, inst_id: inst700001F3}
// CHECK:STDOUT: import_ir_instB5: {ir_id: import_ir78000004, inst_id: inst700001F7}
// CHECK:STDOUT: import_ir_instB6: {ir_id: import_ir78000004, inst_id: inst700001FB}
// CHECK:STDOUT: import_ir_instB7: {ir_id: import_ir78000004, inst_id: inst70000202}
// CHECK:STDOUT: import_ir_instB8: {ir_id: import_ir78000004, inst_id: inst70000206}
// CHECK:STDOUT: import_ir_instB9: {ir_id: import_ir78000004, inst_id: inst7000022A}
// CHECK:STDOUT: import_ir_instBA: {ir_id: import_ir78000004, inst_id: inst7000022B}
// CHECK:STDOUT: import_ir_instBB: {ir_id: import_ir78000004, inst_id: inst700002A7}
// CHECK:STDOUT: import_ir_instBC: {ir_id: import_ir78000004, inst_id: inst700002A2}
// CHECK:STDOUT: import_ir_instBD: {ir_id: import_ir78000004, inst_id: inst700002CE}
// CHECK:STDOUT: import_ir_instBE: {ir_id: import_ir78000004, inst_id: inst700002A6}
// CHECK:STDOUT: import_ir_instBF: {ir_id: import_ir78000004, inst_id: inst700002C6}
// CHECK:STDOUT: import_ir_instC0: {ir_id: import_ir78000004, inst_id: inst700002BA}
// CHECK:STDOUT: import_ir_instC1: {ir_id: import_ir78000004, inst_id: inst700002B9}
// CHECK:STDOUT: import_ir_instC2: {ir_id: import_ir78000004, inst_id: inst700002C5}
// CHECK:STDOUT: import_ir_instC3: {ir_id: import_ir78000004, inst_id: inst700002BD}
// CHECK:STDOUT: import_ir_instC4: {ir_id: import_ir78000004, inst_id: inst700002C1}
// CHECK:STDOUT: import_ir_instC5: {ir_id: import_ir78000004, inst_id: inst700002C2}
// CHECK:STDOUT: import_ir_instC6: {ir_id: import_ir78000004, inst_id: inst700002C8}
// CHECK:STDOUT: import_ir_instC7: {ir_id: import_ir78000004, inst_id: inst70000279}
// CHECK:STDOUT: import_ir_instC8: {ir_id: import_ir78000004, inst_id: inst7000027F}
// CHECK:STDOUT: import_ir_instC9: {ir_id: import_ir78000004, inst_id: inst70000286}
// CHECK:STDOUT: import_ir_instCA: {ir_id: import_ir78000004, inst_id: inst700002B1}
// CHECK:STDOUT: import_ir_instCB: {ir_id: import_ir78000004, inst_id: inst700002B2}
// CHECK:STDOUT: import_ir_instCC: {ir_id: import_ir78000004, inst_id: inst700002B3}
// CHECK:STDOUT: import_ir_instCD: {ir_id: import_ir78000004, inst_id: inst700002B4}
// CHECK:STDOUT: import_ir_instCE: {ir_id: import_ir78000004, inst_id: inst700002B5}
// CHECK:STDOUT: import_ir_instCF: {ir_id: import_ir78000004, inst_id: inst700002B6}
// CHECK:STDOUT: import_ir_instD0: {ir_id: import_ir78000004, inst_id: inst700002B7}
// CHECK:STDOUT: import_ir_instD1: {ir_id: import_ir78000004, inst_id: inst700002BB}
// CHECK:STDOUT: import_ir_instD2: {ir_id: import_ir78000004, inst_id: inst700002BC}
// CHECK:STDOUT: import_ir_instD3: {ir_id: import_ir78000004, inst_id: inst700002BF}
// CHECK:STDOUT: import_ir_instD4: {ir_id: import_ir78000004, inst_id: inst700002C4}
// CHECK:STDOUT: import_ir_instD5: {ir_id: import_ir78000004, inst_id: inst700002C7}
// CHECK:STDOUT: import_ir_instD6: {ir_id: import_ir78000004, inst_id: inst700002CA}
// CHECK:STDOUT: import_ir_instD7: {ir_id: import_ir78000004, inst_id: inst7000031C}
// CHECK:STDOUT: import_ir_instD8: {ir_id: import_ir78000004, inst_id: inst70000319}
// CHECK:STDOUT: import_ir_instD9: {ir_id: import_ir78000004, inst_id: inst700002D9}
// CHECK:STDOUT: import_ir_instDA: {ir_id: import_ir78000004, inst_id: inst700002DE}
// CHECK:STDOUT: import_ir_instDB: {ir_id: import_ir78000004, inst_id: inst700002E2}
// CHECK:STDOUT: import_ir_instDC: {ir_id: import_ir78000004, inst_id: inst700002E3}
// CHECK:STDOUT: import_ir_instDD: {ir_id: import_ir78000004, inst_id: inst700002E4}
// CHECK:STDOUT: import_ir_instDE: {ir_id: import_ir78000004, inst_id: inst700002E5}
// CHECK:STDOUT: import_ir_instDF: {ir_id: import_ir78000004, inst_id: inst700002EA}
// CHECK:STDOUT: import_ir_instE0: {ir_id: import_ir78000004, inst_id: inst700002F2}
// CHECK:STDOUT: import_ir_instE1: {ir_id: import_ir78000004, inst_id: inst700002F6}
// CHECK:STDOUT: import_ir_instE2: {ir_id: import_ir78000004, inst_id: inst700002F7}
// CHECK:STDOUT: import_ir_instE3: {ir_id: import_ir78000004, inst_id: inst700002F8}
// CHECK:STDOUT: import_ir_instE4: {ir_id: import_ir78000004, inst_id: inst700002F9}
// CHECK:STDOUT: import_ir_instE5: {ir_id: import_ir78000004, inst_id: inst700002FE}
// CHECK:STDOUT: import_ir_instE6: {ir_id: import_ir78000004, inst_id: inst70000308}
// CHECK:STDOUT: import_ir_instE7: {ir_id: import_ir78000004, inst_id: inst70000311}
// CHECK:STDOUT: import_ir_instE8: {ir_id: import_ir78000004, inst_id: inst70000312}
// CHECK:STDOUT: import_ir_instE9: {ir_id: import_ir78000004, inst_id: inst70000313}
// CHECK:STDOUT: import_ir_instEA: {ir_id: import_ir78000004, inst_id: inst70000314}
// CHECK:STDOUT: import_ir_instEB: {ir_id: import_ir78000004, inst_id: inst70000320}
// CHECK:STDOUT: import_ir_instEC: {ir_id: import_ir78000004, inst_id: inst70000277}
// CHECK:STDOUT: import_ir_instED: {ir_id: import_ir78000004, inst_id: inst7000027D}
// CHECK:STDOUT: import_ir_instEE: {ir_id: import_ir78000004, inst_id: inst70000283}
// CHECK:STDOUT: import_ir_instEF: {ir_id: import_ir78000004, inst_id: inst7000029C}
// CHECK:STDOUT: import_ir_instF0: {ir_id: import_ir78000004, inst_id: inst7000029E}
// CHECK:STDOUT: import_ir_instF1: {ir_id: import_ir78000004, inst_id: inst700002A3}
// CHECK:STDOUT: import_ir_instF2: {ir_id: import_ir78000004, inst_id: inst70000278}
// CHECK:STDOUT: import_ir_instF3: {ir_id: import_ir78000004, inst_id: inst7000027A}
// CHECK:STDOUT: import_ir_instF4: {ir_id: import_ir78000004, inst_id: inst7000027E}
// CHECK:STDOUT: import_ir_instF5: {ir_id: import_ir78000004, inst_id: inst70000280}
// CHECK:STDOUT: import_ir_instF6: {ir_id: import_ir78000004, inst_id: inst70000285}
// CHECK:STDOUT: import_ir_instF7: {ir_id: import_ir78000004, inst_id: inst70000288}
// CHECK:STDOUT: import_ir_instF8: {ir_id: import_ir78000004, inst_id: inst7000028F}
// CHECK:STDOUT: import_ir_instF9: {ir_id: import_ir78000004, inst_id: inst70000292}
// CHECK:STDOUT: import_ir_instFA: {ir_id: import_ir78000004, inst_id: inst70000295}
// CHECK:STDOUT: import_ir_instFB: {ir_id: import_ir78000004, inst_id: inst70000299}
// CHECK:STDOUT: import_ir_instFC: {ir_id: import_ir78000004, inst_id: inst7000029D}
// CHECK:STDOUT: import_ir_instFD: {ir_id: import_ir78000004, inst_id: inst700002A5}
// CHECK:STDOUT: import_ir_instFE: {ir_id: import_ir78000004, inst_id: inst700002A9}
// CHECK:STDOUT: import_ir_instFF: {ir_id: import_ir78000004, inst_id: inst700002D1}
// CHECK:STDOUT: import_ir_inst100: {ir_id: import_ir78000004, inst_id: inst700002D2}
// CHECK:STDOUT: import_ir_inst41: {ir_id: import_ir78000004, inst_id: inst700000B9}
// CHECK:STDOUT: import_ir_inst42: {ir_id: import_ir78000004, inst_id: inst700000BA}
// CHECK:STDOUT: import_ir_inst43: {ir_id: import_ir78000004, inst_id: inst700000F6}
// CHECK:STDOUT: import_ir_inst44: {ir_id: import_ir78000004, inst_id: inst700000F2}
// CHECK:STDOUT: import_ir_inst45: {ir_id: import_ir78000004, inst_id: inst700000F0}
// CHECK:STDOUT: import_ir_inst46: {ir_id: import_ir78000004, inst_id: inst700000F1}
// CHECK:STDOUT: import_ir_inst47: {ir_id: import_ir78000004, inst_id: inst700000F3}
// CHECK:STDOUT: import_ir_inst48: {ir_id: import_ir78000004, inst_id: inst70000115}
// CHECK:STDOUT: import_ir_inst49: {ir_id: import_ir78000004, inst_id: inst70000111}
// CHECK:STDOUT: import_ir_inst4A: {ir_id: import_ir78000004, inst_id: inst7000010F}
// CHECK:STDOUT: import_ir_inst4B: {ir_id: import_ir78000004, inst_id: inst70000110}
// CHECK:STDOUT: import_ir_inst4C: {ir_id: import_ir78000004, inst_id: inst70000112}
// CHECK:STDOUT: import_ir_inst4D: {ir_id: import_ir78000004, inst_id: inst70000134}
// CHECK:STDOUT: import_ir_inst4E: {ir_id: import_ir78000004, inst_id: inst70000130}
// CHECK:STDOUT: import_ir_inst4F: {ir_id: import_ir78000004, inst_id: inst7000012E}
// CHECK:STDOUT: import_ir_inst50: {ir_id: import_ir78000004, inst_id: inst7000012F}
// CHECK:STDOUT: import_ir_inst51: {ir_id: import_ir78000004, inst_id: inst70000131}
// CHECK:STDOUT: import_ir_inst52: {ir_id: import_ir78000004, inst_id: inst70000153}
// CHECK:STDOUT: import_ir_inst53: {ir_id: import_ir78000004, inst_id: inst7000014F}
// CHECK:STDOUT: import_ir_inst54: {ir_id: import_ir78000004, inst_id: inst7000014D}
// CHECK:STDOUT: import_ir_inst55: {ir_id: import_ir78000004, inst_id: inst7000014E}
// CHECK:STDOUT: import_ir_inst56: {ir_id: import_ir78000004, inst_id: inst70000150}
// CHECK:STDOUT: import_ir_inst57: {ir_id: import_ir78000004, inst_id: inst7000017F}
// CHECK:STDOUT: import_ir_inst58: {ir_id: import_ir78000004, inst_id: inst7000017A}
// CHECK:STDOUT: import_ir_inst59: {ir_id: import_ir78000004, inst_id: inst7000019E}
// CHECK:STDOUT: import_ir_inst5A: {ir_id: import_ir78000004, inst_id: inst7000017E}
// CHECK:STDOUT: import_ir_inst5B: {ir_id: import_ir78000004, inst_id: inst7000016E}
// CHECK:STDOUT: import_ir_inst5C: {ir_id: import_ir78000004, inst_id: inst70000175}
// CHECK:STDOUT: import_ir_inst5D: {ir_id: import_ir78000004, inst_id: inst70000178}
// CHECK:STDOUT: import_ir_inst5E: {ir_id: import_ir78000004, inst_id: inst7000017B}
// CHECK:STDOUT: import_ir_inst5F: {ir_id: import_ir78000004, inst_id: inst70000171}
// CHECK:STDOUT: import_ir_inst60: {ir_id: import_ir78000004, inst_id: inst70000170}
// CHECK:STDOUT: import_ir_inst61: {ir_id: import_ir78000004, inst_id: inst70000173}
// CHECK:STDOUT: import_ir_inst62: {ir_id: import_ir78000004, inst_id: inst70000177}
// CHECK:STDOUT: import_ir_inst63: {ir_id: import_ir78000004, inst_id: inst7000017D}
// CHECK:STDOUT: import_ir_inst64: {ir_id: import_ir78000004, inst_id: inst70000181}
// CHECK:STDOUT: import_ir_inst65: {ir_id: import_ir78000004, inst_id: inst70000195}
// CHECK:STDOUT: import_ir_inst66: {ir_id: import_ir78000004, inst_id: inst70000188}
// CHECK:STDOUT: import_ir_inst67: {ir_id: import_ir78000004, inst_id: inst70000187}
// CHECK:STDOUT: import_ir_inst68: {ir_id: import_ir78000004, inst_id: inst70000194}
// CHECK:STDOUT: import_ir_inst69: {ir_id: import_ir78000004, inst_id: inst7000018B}
// CHECK:STDOUT: import_ir_inst6A: {ir_id: import_ir78000004, inst_id: inst70000190}
// CHECK:STDOUT: import_ir_inst6B: {ir_id: import_ir78000004, inst_id: inst70000191}
// CHECK:STDOUT: import_ir_inst6C: {ir_id: import_ir78000004, inst_id: inst70000197}
// CHECK:STDOUT: import_ir_inst6D: {ir_id: import_ir78000004, inst_id: inst70000183}
// CHECK:STDOUT: import_ir_inst6E: {ir_id: import_ir78000004, inst_id: inst70000184}
// CHECK:STDOUT: import_ir_inst6F: {ir_id: import_ir78000004, inst_id: inst70000189}
// CHECK:STDOUT: import_ir_inst70: {ir_id: import_ir78000004, inst_id: inst7000018A}
// CHECK:STDOUT: import_ir_inst71: {ir_id: import_ir78000004, inst_id: inst7000018D}
// CHECK:STDOUT: import_ir_inst72: {ir_id: import_ir78000004, inst_id: inst70000193}
// CHECK:STDOUT: import_ir_inst73: {ir_id: import_ir78000004, inst_id: inst70000196}
// CHECK:STDOUT: import_ir_inst74: {ir_id: import_ir78000004, inst_id: inst70000199}
// CHECK:STDOUT: import_ir_inst75: {ir_id: import_ir78000004, inst_id: inst700001A1}
// CHECK:STDOUT: import_ir_inst76: {ir_id: import_ir78000004, inst_id: inst700001A2}
// CHECK:STDOUT: import_ir_inst77: {ir_id: import_ir78000004, inst_id: inst700001A5}
// CHECK:STDOUT: import_ir_inst78: {ir_id: import_ir78000004, inst_id: inst700001AF}
// CHECK:STDOUT: import_ir_inst79: {ir_id: import_ir78000004, inst_id: inst700001AB}
// CHECK:STDOUT: import_ir_inst7A: {ir_id: import_ir78000004, inst_id: inst700001A9}
// CHECK:STDOUT: import_ir_inst7B: {ir_id: import_ir78000004, inst_id: inst700001AA}
// CHECK:STDOUT: import_ir_inst7C: {ir_id: import_ir78000004, inst_id: inst700001AC}
// CHECK:STDOUT: import_ir_inst7D: {ir_id: import_ir78000004, inst_id: inst700001CC}
// CHECK:STDOUT: import_ir_inst7E: {ir_id: import_ir78000004, inst_id: inst700001C8}
// CHECK:STDOUT: import_ir_inst7F: {ir_id: import_ir78000004, inst_id: inst700001C6}
// CHECK:STDOUT: import_ir_inst80: {ir_id: import_ir78000004, inst_id: inst700001C7}
// CHECK:STDOUT: import_ir_inst81: {ir_id: import_ir78000004, inst_id: inst700001C9}
// CHECK:STDOUT: import_ir_inst82: {ir_id: import_ir78000004, inst_id: inst7000020C}
// CHECK:STDOUT: import_ir_inst83: {ir_id: import_ir78000004, inst_id: inst70000207}
// CHECK:STDOUT: import_ir_inst84: {ir_id: import_ir78000004, inst_id: inst70000232}
// CHECK:STDOUT: import_ir_inst85: {ir_id: import_ir78000004, inst_id: inst7000020B}
// CHECK:STDOUT: import_ir_inst86: {ir_id: import_ir78000004, inst_id: inst70000229}
// CHECK:STDOUT: import_ir_inst87: {ir_id: import_ir78000004, inst_id: inst7000021C}
// CHECK:STDOUT: import_ir_inst88: {ir_id: import_ir78000004, inst_id: inst7000021B}
// CHECK:STDOUT: import_ir_inst89: {ir_id: import_ir78000004, inst_id: inst70000228}
// CHECK:STDOUT: import_ir_inst8A: {ir_id: import_ir78000004, inst_id: inst7000021F}
// CHECK:STDOUT: import_ir_inst8B: {ir_id: import_ir78000004, inst_id: inst70000224}
// CHECK:STDOUT: import_ir_inst8C: {ir_id: import_ir78000004, inst_id: inst70000225}
// CHECK:STDOUT: import_ir_inst8D: {ir_id: import_ir78000004, inst_id: inst7000022B}
// CHECK:STDOUT: import_ir_inst8E: {ir_id: import_ir78000004, inst_id: inst700001E9}
// CHECK:STDOUT: import_ir_inst8F: {ir_id: import_ir78000004, inst_id: inst700001F0}
// CHECK:STDOUT: import_ir_inst90: {ir_id: import_ir78000004, inst_id: inst70000214}
// CHECK:STDOUT: import_ir_inst91: {ir_id: import_ir78000004, inst_id: inst70000215}
// CHECK:STDOUT: import_ir_inst92: {ir_id: import_ir78000004, inst_id: inst70000216}
// CHECK:STDOUT: import_ir_inst93: {ir_id: import_ir78000004, inst_id: inst70000217}
// CHECK:STDOUT: import_ir_inst94: {ir_id: import_ir78000004, inst_id: inst70000218}
// CHECK:STDOUT: import_ir_inst95: {ir_id: import_ir78000004, inst_id: inst7000021D}
// CHECK:STDOUT: import_ir_inst96: {ir_id: import_ir78000004, inst_id: inst7000021E}
// CHECK:STDOUT: import_ir_inst97: {ir_id: import_ir78000004, inst_id: inst70000221}
// CHECK:STDOUT: import_ir_inst98: {ir_id: import_ir78000004, inst_id: inst70000227}
// CHECK:STDOUT: import_ir_inst99: {ir_id: import_ir78000004, inst_id: inst7000022A}
// CHECK:STDOUT: import_ir_inst9A: {ir_id: import_ir78000004, inst_id: inst7000022D}
// CHECK:STDOUT: import_ir_inst9B: {ir_id: import_ir78000004, inst_id: inst7000026D}
// CHECK:STDOUT: import_ir_inst9C: {ir_id: import_ir78000004, inst_id: inst7000026A}
// CHECK:STDOUT: import_ir_inst9D: {ir_id: import_ir78000004, inst_id: inst7000023D}
// CHECK:STDOUT: import_ir_inst9E: {ir_id: import_ir78000004, inst_id: inst70000243}
// CHECK:STDOUT: import_ir_inst9F: {ir_id: import_ir78000004, inst_id: inst70000247}
// CHECK:STDOUT: import_ir_instA0: {ir_id: import_ir78000004, inst_id: inst70000248}
// CHECK:STDOUT: import_ir_instA1: {ir_id: import_ir78000004, inst_id: inst70000249}
// CHECK:STDOUT: import_ir_instA2: {ir_id: import_ir78000004, inst_id: inst7000024A}
// CHECK:STDOUT: import_ir_instA3: {ir_id: import_ir78000004, inst_id: inst7000024F}
// CHECK:STDOUT: import_ir_instA4: {ir_id: import_ir78000004, inst_id: inst70000259}
// CHECK:STDOUT: import_ir_instA5: {ir_id: import_ir78000004, inst_id: inst70000262}
// CHECK:STDOUT: import_ir_instA6: {ir_id: import_ir78000004, inst_id: inst70000263}
// CHECK:STDOUT: import_ir_instA7: {ir_id: import_ir78000004, inst_id: inst70000264}
// CHECK:STDOUT: import_ir_instA8: {ir_id: import_ir78000004, inst_id: inst70000265}
// CHECK:STDOUT: import_ir_instA9: {ir_id: import_ir78000004, inst_id: inst70000271}
// CHECK:STDOUT: import_ir_instAA: {ir_id: import_ir78000004, inst_id: inst700001E7}
// CHECK:STDOUT: import_ir_instAB: {ir_id: import_ir78000004, inst_id: inst700001ED}
// CHECK:STDOUT: import_ir_instAC: {ir_id: import_ir78000004, inst_id: inst70000202}
// CHECK:STDOUT: import_ir_instAD: {ir_id: import_ir78000004, inst_id: inst70000204}
// CHECK:STDOUT: import_ir_instAE: {ir_id: import_ir78000004, inst_id: inst70000208}
// CHECK:STDOUT: import_ir_instAF: {ir_id: import_ir78000004, inst_id: inst700001E8}
// CHECK:STDOUT: import_ir_instB0: {ir_id: import_ir78000004, inst_id: inst700001EA}
// CHECK:STDOUT: import_ir_instB1: {ir_id: import_ir78000004, inst_id: inst700001EF}
// CHECK:STDOUT: import_ir_instB2: {ir_id: import_ir78000004, inst_id: inst700001F2}
// CHECK:STDOUT: import_ir_instB3: {ir_id: import_ir78000004, inst_id: inst700001F8}
// CHECK:STDOUT: import_ir_instB4: {ir_id: import_ir78000004, inst_id: inst700001FB}
// CHECK:STDOUT: import_ir_instB5: {ir_id: import_ir78000004, inst_id: inst700001FF}
// CHECK:STDOUT: import_ir_instB6: {ir_id: import_ir78000004, inst_id: inst70000203}
// CHECK:STDOUT: import_ir_instB7: {ir_id: import_ir78000004, inst_id: inst7000020A}
// CHECK:STDOUT: import_ir_instB8: {ir_id: import_ir78000004, inst_id: inst7000020E}
// CHECK:STDOUT: import_ir_instB9: {ir_id: import_ir78000004, inst_id: inst70000235}
// CHECK:STDOUT: import_ir_instBA: {ir_id: import_ir78000004, inst_id: inst70000236}
// CHECK:STDOUT: import_ir_instBB: {ir_id: import_ir78000004, inst_id: inst700002B2}
// CHECK:STDOUT: import_ir_instBC: {ir_id: import_ir78000004, inst_id: inst700002AD}
// CHECK:STDOUT: import_ir_instBD: {ir_id: import_ir78000004, inst_id: inst700002DC}
// CHECK:STDOUT: import_ir_instBE: {ir_id: import_ir78000004, inst_id: inst700002B1}
// CHECK:STDOUT: import_ir_instBF: {ir_id: import_ir78000004, inst_id: inst700002D3}
// CHECK:STDOUT: import_ir_instC0: {ir_id: import_ir78000004, inst_id: inst700002C6}
// CHECK:STDOUT: import_ir_instC1: {ir_id: import_ir78000004, inst_id: inst700002C5}
// CHECK:STDOUT: import_ir_instC2: {ir_id: import_ir78000004, inst_id: inst700002D2}
// CHECK:STDOUT: import_ir_instC3: {ir_id: import_ir78000004, inst_id: inst700002C9}
// CHECK:STDOUT: import_ir_instC4: {ir_id: import_ir78000004, inst_id: inst700002CE}
// CHECK:STDOUT: import_ir_instC5: {ir_id: import_ir78000004, inst_id: inst700002CF}
// CHECK:STDOUT: import_ir_instC6: {ir_id: import_ir78000004, inst_id: inst700002D5}
// CHECK:STDOUT: import_ir_instC7: {ir_id: import_ir78000004, inst_id: inst70000284}
// CHECK:STDOUT: import_ir_instC8: {ir_id: import_ir78000004, inst_id: inst7000028A}
// CHECK:STDOUT: import_ir_instC9: {ir_id: import_ir78000004, inst_id: inst70000291}
// CHECK:STDOUT: import_ir_instCA: {ir_id: import_ir78000004, inst_id: inst700002BC}
// CHECK:STDOUT: import_ir_instCB: {ir_id: import_ir78000004, inst_id: inst700002BD}
// CHECK:STDOUT: import_ir_instCC: {ir_id: import_ir78000004, inst_id: inst700002BE}
// CHECK:STDOUT: import_ir_instCD: {ir_id: import_ir78000004, inst_id: inst700002BF}
// CHECK:STDOUT: import_ir_instCE: {ir_id: import_ir78000004, inst_id: inst700002C0}
// CHECK:STDOUT: import_ir_instCF: {ir_id: import_ir78000004, inst_id: inst700002C1}
// CHECK:STDOUT: import_ir_instD0: {ir_id: import_ir78000004, inst_id: inst700002C2}
// CHECK:STDOUT: import_ir_instD1: {ir_id: import_ir78000004, inst_id: inst700002C7}
// CHECK:STDOUT: import_ir_instD2: {ir_id: import_ir78000004, inst_id: inst700002C8}
// CHECK:STDOUT: import_ir_instD3: {ir_id: import_ir78000004, inst_id: inst700002CB}
// CHECK:STDOUT: import_ir_instD4: {ir_id: import_ir78000004, inst_id: inst700002D1}
// CHECK:STDOUT: import_ir_instD5: {ir_id: import_ir78000004, inst_id: inst700002D4}
// CHECK:STDOUT: import_ir_instD6: {ir_id: import_ir78000004, inst_id: inst700002D7}
// CHECK:STDOUT: import_ir_instD7: {ir_id: import_ir78000004, inst_id: inst7000032A}
// CHECK:STDOUT: import_ir_instD8: {ir_id: import_ir78000004, inst_id: inst70000327}
// CHECK:STDOUT: import_ir_instD9: {ir_id: import_ir78000004, inst_id: inst700002E7}
// CHECK:STDOUT: import_ir_instDA: {ir_id: import_ir78000004, inst_id: inst700002EC}
// CHECK:STDOUT: import_ir_instDB: {ir_id: import_ir78000004, inst_id: inst700002F0}
// CHECK:STDOUT: import_ir_instDC: {ir_id: import_ir78000004, inst_id: inst700002F1}
// CHECK:STDOUT: import_ir_instDD: {ir_id: import_ir78000004, inst_id: inst700002F2}
// CHECK:STDOUT: import_ir_instDE: {ir_id: import_ir78000004, inst_id: inst700002F3}
// CHECK:STDOUT: import_ir_instDF: {ir_id: import_ir78000004, inst_id: inst700002F8}
// CHECK:STDOUT: import_ir_instE0: {ir_id: import_ir78000004, inst_id: inst70000300}
// CHECK:STDOUT: import_ir_instE1: {ir_id: import_ir78000004, inst_id: inst70000304}
// CHECK:STDOUT: import_ir_instE2: {ir_id: import_ir78000004, inst_id: inst70000305}
// CHECK:STDOUT: import_ir_instE3: {ir_id: import_ir78000004, inst_id: inst70000306}
// CHECK:STDOUT: import_ir_instE4: {ir_id: import_ir78000004, inst_id: inst70000307}
// CHECK:STDOUT: import_ir_instE5: {ir_id: import_ir78000004, inst_id: inst7000030C}
// CHECK:STDOUT: import_ir_instE6: {ir_id: import_ir78000004, inst_id: inst70000316}
// CHECK:STDOUT: import_ir_instE7: {ir_id: import_ir78000004, inst_id: inst7000031F}
// CHECK:STDOUT: import_ir_instE8: {ir_id: import_ir78000004, inst_id: inst70000320}
// CHECK:STDOUT: import_ir_instE9: {ir_id: import_ir78000004, inst_id: inst70000321}
// CHECK:STDOUT: import_ir_instEA: {ir_id: import_ir78000004, inst_id: inst70000322}
// CHECK:STDOUT: import_ir_instEB: {ir_id: import_ir78000004, inst_id: inst7000032E}
// CHECK:STDOUT: import_ir_instEC: {ir_id: import_ir78000004, inst_id: inst70000282}
// CHECK:STDOUT: import_ir_instED: {ir_id: import_ir78000004, inst_id: inst70000288}
// CHECK:STDOUT: import_ir_instEE: {ir_id: import_ir78000004, inst_id: inst7000028E}
// CHECK:STDOUT: import_ir_instEF: {ir_id: import_ir78000004, inst_id: inst700002A7}
// CHECK:STDOUT: import_ir_instF0: {ir_id: import_ir78000004, inst_id: inst700002A9}
// CHECK:STDOUT: import_ir_instF1: {ir_id: import_ir78000004, inst_id: inst700002AE}
// CHECK:STDOUT: import_ir_instF2: {ir_id: import_ir78000004, inst_id: inst70000283}
// CHECK:STDOUT: import_ir_instF3: {ir_id: import_ir78000004, inst_id: inst70000285}
// CHECK:STDOUT: import_ir_instF4: {ir_id: import_ir78000004, inst_id: inst70000289}
// CHECK:STDOUT: import_ir_instF5: {ir_id: import_ir78000004, inst_id: inst7000028B}
// CHECK:STDOUT: import_ir_instF6: {ir_id: import_ir78000004, inst_id: inst70000290}
// CHECK:STDOUT: import_ir_instF7: {ir_id: import_ir78000004, inst_id: inst70000293}
// CHECK:STDOUT: import_ir_instF8: {ir_id: import_ir78000004, inst_id: inst7000029A}
// CHECK:STDOUT: import_ir_instF9: {ir_id: import_ir78000004, inst_id: inst7000029D}
// CHECK:STDOUT: import_ir_instFA: {ir_id: import_ir78000004, inst_id: inst700002A0}
// CHECK:STDOUT: import_ir_instFB: {ir_id: import_ir78000004, inst_id: inst700002A4}
// CHECK:STDOUT: import_ir_instFC: {ir_id: import_ir78000004, inst_id: inst700002A8}
// CHECK:STDOUT: import_ir_instFD: {ir_id: import_ir78000004, inst_id: inst700002B0}
// CHECK:STDOUT: import_ir_instFE: {ir_id: import_ir78000004, inst_id: inst700002B4}
// CHECK:STDOUT: import_ir_instFF: {ir_id: import_ir78000004, inst_id: inst700002DF}
// CHECK:STDOUT: import_ir_inst100: {ir_id: import_ir78000004, inst_id: inst700002E0}
// CHECK:STDOUT: clang_decls: {}
// CHECK:STDOUT: clang_decl_signatures: {}
// CHECK:STDOUT: name_scopes:
@@ -677,8 +677,9 @@ fn H() {
// CHECK:STDOUT: %return.param_patt.loc5_13.1: @X.G.%pattern_type (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc5_13.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc5_10.1: @X.G.%pattern_type (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc5_13.1, %U.ref [symbolic = %return.patt.loc5_10.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc4_15.2 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %.loc5_13.3: Core.Form = init_form %U.ref [symbolic = %.loc5_13.2 (constants.%.184)]
// CHECK:STDOUT: %.loc5_13.3: type = specific_constant @X.%U.loc4_15.2, @X(constants.%U) [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %U.ref: type = name_ref U, %.loc5_13.3 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %.loc5_13.4: Core.Form = init_form %U.ref [symbolic = %.loc5_13.2 (constants.%.184)]
// CHECK:STDOUT: %return.param: ref @X.G.%U (%U) = out_param call_param0
// CHECK:STDOUT: %return: ref @X.G.%U (%U) = return_slot %return.param
// CHECK:STDOUT: }
+7 -5
View File
@@ -141,7 +141,8 @@ class Declaration(T: type);
// CHECK:STDOUT: %return.param_patt.loc6_28.1: @Class.GetAddr.%pattern_type.loc6_28 (%pattern_type.d5b) = out_param_pattern [symbolic = %return.param_patt.loc6_28.2 (constants.%return.param_patt.4df)]
// CHECK:STDOUT: %return.patt.loc6_24.1: @Class.GetAddr.%pattern_type.loc6_28 (%pattern_type.d5b) = return_slot_pattern %return.param_patt.loc6_28.1, %ptr.loc6_28.2 [symbolic = %return.patt.loc6_24.2 (constants.%return.patt.c21)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc6_27: %Copy.type = specific_constant @Class.%T.loc5_14.2, @Class(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, %.loc6_27 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc6_28.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_28.2: type = converted %T.ref, %T.as_type.loc6_28.2 [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)]
// CHECK:STDOUT: %ptr.loc6_28.2: type = ptr_type %.loc6_28.2 [symbolic = %ptr.loc6_28.1 (constants.%ptr.215)]
@@ -159,12 +160,13 @@ class Declaration(T: type);
// CHECK:STDOUT: %self.param_patt.loc10_15.1: @Class.GetValue.%pattern_type.loc10_15 (%pattern_type.f62) = value_param_pattern [symbolic = %self.param_patt.loc10_15.2 (constants.%self.param_patt.4c1)]
// CHECK:STDOUT: %self.patt.loc10_15.1: @Class.GetValue.%pattern_type.loc10_15 (%pattern_type.f62) = wrapper_binding_pattern self, %self.param_patt.loc10_15.1 [symbolic = %self.patt.loc10_15.2 (constants.%self.patt.f3a)]
// CHECK:STDOUT: %return.param_patt.loc10_24.1: @Class.GetValue.%pattern_type.loc10_24 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_24.2 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc10_21.1: @Class.GetValue.%pattern_type.loc10_24 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_24.1, %.loc10_24.3 [symbolic = %return.patt.loc10_21.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc10_21.1: @Class.GetValue.%pattern_type.loc10_24 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_24.1, %.loc10_24.4 [symbolic = %return.patt.loc10_21.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc10_24.3: %Copy.type = specific_constant @Class.%T.loc5_14.2, @Class(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, %.loc10_24.3 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc10_24.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_24.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc10_24.3: type = converted %T.ref, %T.as_type.loc10_24.2 [symbolic = %T.as_type.loc10_24.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc10_24.4: Core.Form = init_form %.loc10_24.3 [symbolic = %.loc10_24.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc10_24.4: type = converted %T.ref, %T.as_type.loc10_24.2 [symbolic = %T.as_type.loc10_24.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc10_24.5: Core.Form = init_form %.loc10_24.4 [symbolic = %.loc10_24.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %self.param: @Class.GetValue.%Class (%Class) = value_param call_param0
// CHECK:STDOUT: %.loc10_15.1: type = splice_block %Self.ref [symbolic = %Class (constants.%Class)] {
// CHECK:STDOUT: %.loc10_15.2: type = specific_constant constants.%Class, @Class(constants.%T.f84) [symbolic = %Class (constants.%Class)]
+8 -4
View File
@@ -743,7 +743,8 @@ class Outer(T: type) {
// CHECK:STDOUT: %return.patt.loc4_12.1: @Inner.A.%pattern_type (%pattern_type.fc0) = return_slot_pattern %return.param_patt.loc4_22.1, %Outer.loc4_22.2 [symbolic = %return.patt.loc4_12.2 (constants.%return.patt.3d6)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc2_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc4_21: type = specific_constant @Outer.%T.loc2_14.2, @Outer(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc4_21 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Outer.loc4_22.2: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc4_22.1 (constants.%Outer.651)]
// CHECK:STDOUT: %.loc4_22.2: Core.Form = init_form %Outer.loc4_22.2 [symbolic = %.loc4_22.1 (constants.%.a0c)]
// CHECK:STDOUT: %return.param: ref @Inner.A.%Outer.loc4_22.1 (%Outer.651) = out_param call_param0
@@ -754,7 +755,8 @@ class Outer(T: type) {
// CHECK:STDOUT: %return.patt.loc7_12.1: @Inner.B.%pattern_type (%pattern_type.673) = return_slot_pattern %return.param_patt.loc7_22.1, %Outer.loc7_22.2 [symbolic = %return.patt.loc7_12.2 (constants.%return.patt.2eb)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer.generic]
// CHECK:STDOUT: %U.ref: type = name_ref U, @Inner.%U.loc3_16.2 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %.loc7_21: type = specific_constant @Inner.%U.loc3_16.2, @Inner(constants.%T, constants.%U) [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %U.ref: type = name_ref U, %.loc7_21 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %Outer.loc7_22.2: type = class_type @Outer, @Outer(constants.%U) [symbolic = %Outer.loc7_22.1 (constants.%Outer.004)]
// CHECK:STDOUT: %.loc7_22.2: Core.Form = init_form %Outer.loc7_22.2 [symbolic = %.loc7_22.1 (constants.%.38b)]
// CHECK:STDOUT: %return.param: ref @Inner.B.%Outer.loc7_22.1 (%Outer.004) = out_param call_param0
@@ -766,7 +768,8 @@ class Outer(T: type) {
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc10_15: @Inner.C.%Inner.type (%Inner.type.19b) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.282)]
// CHECK:STDOUT: %Inner.ref: @Inner.C.%Inner.type (%Inner.type.19b) = name_ref Inner, %.loc10_15 [symbolic = %Inner.generic (constants.%Inner.generic.282)]
// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc2_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc10_21: type = specific_constant @Outer.%T.loc2_14.2, @Outer(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc10_21 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Inner.loc10_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%T) [symbolic = %Inner.loc10_22.1 (constants.%Inner.002)]
// CHECK:STDOUT: %.loc10_22.2: Core.Form = init_form %Inner.loc10_22.2 [symbolic = %.loc10_22.1 (constants.%.f2f)]
// CHECK:STDOUT: %return.param: ref @Inner.C.%Inner.loc10_22.1 (%Inner.002) = out_param call_param0
@@ -778,7 +781,8 @@ class Outer(T: type) {
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc13_15: @Inner.D.%Inner.type (%Inner.type.19b) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.282)]
// CHECK:STDOUT: %Inner.ref: @Inner.D.%Inner.type (%Inner.type.19b) = name_ref Inner, %.loc13_15 [symbolic = %Inner.generic (constants.%Inner.generic.282)]
// CHECK:STDOUT: %U.ref: type = name_ref U, @Inner.%U.loc3_16.2 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %.loc13_21: type = specific_constant @Inner.%U.loc3_16.2, @Inner(constants.%T, constants.%U) [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %U.ref: type = name_ref U, %.loc13_21 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %Inner.loc13_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_22.1 (constants.%Inner.b8a)]
// CHECK:STDOUT: %.loc13_22.2: Core.Form = init_form %Inner.loc13_22.2 [symbolic = %.loc13_22.1 (constants.%.f1f)]
// CHECK:STDOUT: %return.param: ref @Inner.D.%Inner.loc13_22.1 (%Inner.b8a) = out_param call_param0
+16 -12
View File
@@ -127,17 +127,19 @@ class C(T: Core.Copy) {
// CHECK:STDOUT: %n.param_patt.loc6_9.1: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %n.param_patt.loc6_9.2 (constants.%n.param_patt)]
// CHECK:STDOUT: %n.patt.loc6_9.1: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = wrapper_binding_pattern n, %n.param_patt.loc6_9.1 [symbolic = %n.patt.loc6_9.2 (constants.%n.patt)]
// CHECK:STDOUT: %return.param_patt.loc6_17.1: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc6_17.2 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc6_14.1: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc6_17.1, %.loc6_17.3 [symbolic = %return.patt.loc6_14.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc6_14.1: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc6_17.1, %.loc6_17.4 [symbolic = %return.patt.loc6_14.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc6_17: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc6_17.3: %Copy.type = specific_constant @Class.%T.loc5_14.2, @Class(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc6_17: %Copy.type = name_ref T, %.loc6_17.3 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc6_17: type = facet_access_type %T.ref.loc6_17 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_17.3: type = converted %T.ref.loc6_17, %T.as_type.loc6_17 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_17.4: Core.Form = init_form %.loc6_17.3 [symbolic = %.loc6_17.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc6_17.4: type = converted %T.ref.loc6_17, %T.as_type.loc6_17 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_17.5: Core.Form = init_form %.loc6_17.4 [symbolic = %.loc6_17.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %n.param: @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc6_11.1: type = splice_block %.loc6_11.2 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref.loc6_11: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc6_11.1: type = splice_block %.loc6_11.3 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %.loc6_11.2: %Copy.type = specific_constant @Class.%T.loc5_14.2, @Class(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc6_11: %Copy.type = name_ref T, %.loc6_11.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc6_11.2: type = facet_access_type %T.ref.loc6_11 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_11.2: type = converted %T.ref.loc6_11, %T.as_type.loc6_11.2 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_11.3: type = converted %T.ref.loc6_11, %T.as_type.loc6_11.2 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n: @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = wrapper_binding n, %n.param
// CHECK:STDOUT: %return.param: ref @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = out_param call_param1
@@ -147,12 +149,13 @@ class C(T: Core.Copy) {
// CHECK:STDOUT: %self.param_patt.loc10_8.1: @Class.G.%pattern_type.loc10_8 (%pattern_type.f62) = value_param_pattern [symbolic = %self.param_patt.loc10_8.2 (constants.%self.param_patt.4c1)]
// CHECK:STDOUT: %self.patt.loc10_8.1: @Class.G.%pattern_type.loc10_8 (%pattern_type.f62) = wrapper_binding_pattern self, %self.param_patt.loc10_8.1 [symbolic = %self.patt.loc10_8.2 (constants.%self.patt.f3a)]
// CHECK:STDOUT: %return.param_patt.loc10_17.1: @Class.G.%pattern_type.loc10_17 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_17.2 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc10_14.1: @Class.G.%pattern_type.loc10_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_17.1, %.loc10_17.3 [symbolic = %return.patt.loc10_14.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc10_14.1: @Class.G.%pattern_type.loc10_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_17.1, %.loc10_17.4 [symbolic = %return.patt.loc10_14.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc10_17.3: %Copy.type = specific_constant @Class.%T.loc5_14.2, @Class(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, %.loc10_17.3 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc10_17.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc10_17.3: type = converted %T.ref, %T.as_type.loc10_17.2 [symbolic = %T.as_type.loc10_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc10_17.4: Core.Form = init_form %.loc10_17.3 [symbolic = %.loc10_17.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc10_17.4: type = converted %T.ref, %T.as_type.loc10_17.2 [symbolic = %T.as_type.loc10_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc10_17.5: Core.Form = init_form %.loc10_17.4 [symbolic = %.loc10_17.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %self.param: @Class.G.%Class (%Class) = value_param call_param0
// CHECK:STDOUT: %.loc10_8.1: type = splice_block %Self.ref [symbolic = %Class (constants.%Class)] {
// CHECK:STDOUT: %.loc10_8.2: type = specific_constant constants.%Class, @Class(constants.%T.f84) [symbolic = %Class (constants.%Class)]
@@ -370,7 +373,8 @@ class C(T: Core.Copy) {
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %data.ref: @C.F.%C.elem (%C.elem) = name_ref data, @C.%field_decl [concrete = @C.%field_decl]
// CHECK:STDOUT: %.loc11: @C.F.%C.elem (%C.elem) = specific_constant @C.%field_decl, @C(constants.%T) [concrete = @C.%field_decl]
// CHECK:STDOUT: %data.ref: @C.F.%C.elem (%C.elem) = name_ref data, %.loc11 [concrete = @C.%field_decl]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -175,7 +175,7 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: %n.param_patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %n.param_patt.loc6 (constants.%n.param_patt)]
// CHECK:STDOUT: %n.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = wrapper_binding_pattern n, %n.param_patt.loc11 [symbolic = %n.patt.loc6 (constants.%n.patt)]
// CHECK:STDOUT: %return.param_patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc6 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc11, %.loc11_35.2 [symbolic = %return.patt.loc6 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc11, %.loc11_35.3 [symbolic = %return.patt.loc6 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc11_17: type = splice_block %Copy.ref [concrete = constants.%Copy.type] {
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
@@ -183,15 +183,17 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc11: %Copy.type = symbolic_binding T, 0 [symbolic = @Class.%T.loc5_14.1 (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc11_35: %Copy.type = name_ref T, %T.loc11 [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %.loc11_35.2: %Copy.type = specific_constant %T.loc11, @Class(constants.%T.f84) [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc11_35: %Copy.type = name_ref T, %.loc11_35.2 [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc11_35: type = facet_access_type %T.ref.loc11_35 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc11_35.2: type = converted %T.ref.loc11_35, %T.as_type.loc11_35 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc11_35.3: Core.Form = init_form %.loc11_35.2 [symbolic = %.loc6_17.1 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc11_35.3: type = converted %T.ref.loc11_35, %T.as_type.loc11_35 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc11_35.4: Core.Form = init_form %.loc11_35.3 [symbolic = %.loc6_17.1 (constants.%.1ce700.2)]
// CHECK:STDOUT: %n.param.loc11: @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc11_29.1: type = splice_block %.loc11_29.2 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref.loc11_29: %Copy.type = name_ref T, %T.loc11 [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %.loc11_29.1: type = splice_block %.loc11_29.3 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %.loc11_29.2: %Copy.type = specific_constant %T.loc11, @Class(constants.%T.f84) [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc11_29: %Copy.type = name_ref T, %.loc11_29.2 [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc11_29: type = facet_access_type %T.ref.loc11_29 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc11_29.2: type = converted %T.ref.loc11_29, %T.as_type.loc11_29 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc11_29.3: type = converted %T.ref.loc11_29, %T.as_type.loc11_29 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc11: @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = wrapper_binding n, %n.param.loc11
// CHECK:STDOUT: %return.param.loc11: ref @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = out_param call_param1
@@ -201,7 +203,7 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: %self.param_patt.loc15: @Class.G.%pattern_type.loc7_8 (%pattern_type.f62) = value_param_pattern [symbolic = %self.param_patt.loc7 (constants.%self.param_patt.4c1)]
// CHECK:STDOUT: %self.patt.loc15: @Class.G.%pattern_type.loc7_8 (%pattern_type.f62) = wrapper_binding_pattern self, %self.param_patt.loc15 [symbolic = %self.patt.loc7 (constants.%self.patt.f3a)]
// CHECK:STDOUT: %return.param_patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc7 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc15, %.loc15_35.2 [symbolic = %return.patt.loc7 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc15, %.loc15_35.3 [symbolic = %return.patt.loc7 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc15_17: type = splice_block %Copy.ref [concrete = constants.%Copy.type] {
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
@@ -209,10 +211,11 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc15: %Copy.type = symbolic_binding T, 0 [symbolic = @Class.%T.loc5_14.1 (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc15: %Copy.type = name_ref T, %T.loc15 [symbolic = %T.loc7 (constants.%T.f84)]
// CHECK:STDOUT: %.loc15_35.2: %Copy.type = specific_constant %T.loc15, @Class(constants.%T.f84) [symbolic = %T.loc7 (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc15: %Copy.type = name_ref T, %.loc15_35.2 [symbolic = %T.loc7 (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc15_35.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc15_35.3: Core.Form = init_form %.loc15_35.2 [symbolic = %.loc7_17.1 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc15_35.3: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc15_35.4: Core.Form = init_form %.loc15_35.3 [symbolic = %.loc7_17.1 (constants.%.1ce700.2)]
// CHECK:STDOUT: %self.param.loc15: @Class.G.%Class (%Class) = value_param call_param0
// CHECK:STDOUT: %.loc15_26.1: type = splice_block %Self.ref.loc15 [symbolic = %Class (constants.%Class)] {
// CHECK:STDOUT: %.loc15_26.2: type = specific_constant constants.%Class, @Class(constants.%T.f84) [symbolic = %Class (constants.%Class)]
@@ -245,17 +248,19 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: %n.param_patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %n.param_patt.loc6 (constants.%n.param_patt)]
// CHECK:STDOUT: %n.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = wrapper_binding_pattern n, %n.param_patt.loc11 [symbolic = %n.patt.loc6 (constants.%n.patt)]
// CHECK:STDOUT: %return.param_patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc6 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc11, %.loc11_35.2 [symbolic = %return.patt.loc6 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc11, %.loc11_35.3 [symbolic = %return.patt.loc6 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc6_17: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %.loc6_17.2: %Copy.type = specific_constant @Class.%T.loc5_14.2, @Class(constants.%T.f84) [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc6_17: %Copy.type = name_ref T, %.loc6_17.2 [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc6_17: type = facet_access_type %T.ref.loc6_17 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_17.2: type = converted %T.ref.loc6_17, %T.as_type.loc6_17 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_17.3: Core.Form = init_form %.loc6_17.2 [symbolic = %.loc6_17.1 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc6_17.3: type = converted %T.ref.loc6_17, %T.as_type.loc6_17 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_17.4: Core.Form = init_form %.loc6_17.3 [symbolic = %.loc6_17.1 (constants.%.1ce700.2)]
// CHECK:STDOUT: %n.param.loc6: @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc6_11.1: type = splice_block %.loc6_11.2 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref.loc6_11: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %.loc6_11.1: type = splice_block %.loc6_11.3 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %.loc6_11.2: %Copy.type = specific_constant @Class.%T.loc5_14.2, @Class(constants.%T.f84) [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc6_11: %Copy.type = name_ref T, %.loc6_11.2 [symbolic = %T.loc6 (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc6_11.2: type = facet_access_type %T.ref.loc6_11 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_11.2: type = converted %T.ref.loc6_11, %T.as_type.loc6_11.2 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_11.3: type = converted %T.ref.loc6_11, %T.as_type.loc6_11.2 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc6: @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = wrapper_binding n, %n.param.loc6
// CHECK:STDOUT: %return.param.loc6: ref @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = out_param call_param1
@@ -265,12 +270,13 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: %self.param_patt.loc15: @Class.G.%pattern_type.loc7_8 (%pattern_type.f62) = value_param_pattern [symbolic = %self.param_patt.loc7 (constants.%self.param_patt.4c1)]
// CHECK:STDOUT: %self.patt.loc15: @Class.G.%pattern_type.loc7_8 (%pattern_type.f62) = wrapper_binding_pattern self, %self.param_patt.loc15 [symbolic = %self.patt.loc7 (constants.%self.patt.f3a)]
// CHECK:STDOUT: %return.param_patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc7 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc15, %.loc15_35.2 [symbolic = %return.patt.loc7 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc15, %.loc15_35.3 [symbolic = %return.patt.loc7 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc7: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T.loc7 (constants.%T.f84)]
// CHECK:STDOUT: %.loc7_17.2: %Copy.type = specific_constant @Class.%T.loc5_14.2, @Class(constants.%T.f84) [symbolic = %T.loc7 (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc7: %Copy.type = name_ref T, %.loc7_17.2 [symbolic = %T.loc7 (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc7_17.2: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_17.2: type = converted %T.ref.loc7, %T.as_type.loc7_17.2 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_17.3: Core.Form = init_form %.loc7_17.2 [symbolic = %.loc7_17.1 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc7_17.3: type = converted %T.ref.loc7, %T.as_type.loc7_17.2 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_17.4: Core.Form = init_form %.loc7_17.3 [symbolic = %.loc7_17.1 (constants.%.1ce700.2)]
// CHECK:STDOUT: %self.param.loc7: @Class.G.%Class (%Class) = value_param call_param0
// CHECK:STDOUT: %.loc7_8.1: type = splice_block %Self.ref.loc7 [symbolic = %Class (constants.%Class)] {
// CHECK:STDOUT: %.loc7_8.2: type = specific_constant constants.%Class, @Class(constants.%T.f84) [symbolic = %Class (constants.%Class)]
@@ -462,9 +468,10 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: %.loc11_9.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc11: type = symbolic_binding T, 0 [symbolic = @A.%T.loc5_10.1 (constants.%T)]
// CHECK:STDOUT: %.loc11_20: type = splice_block %T.ref.loc11_20 [symbolic = @B.%T (constants.%T)] {
// CHECK:STDOUT: %.loc11_20.1: type = splice_block %T.ref.loc11_20 [symbolic = @B.%T (constants.%T)] {
// CHECK:STDOUT: %.Self.frozen.loc11_18: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %T.ref.loc11_20: type = name_ref T, %T.loc11 [symbolic = @B.%T (constants.%T)]
// CHECK:STDOUT: %.loc11_20.2: type = specific_constant %T.loc11, @A(constants.%T) [symbolic = @B.%T (constants.%T)]
// CHECK:STDOUT: %T.ref.loc11_20: type = name_ref T, %.loc11_20.2 [symbolic = @B.%T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %_.loc11: @B.%T (%T) = symbolic_binding _, 1 [symbolic = @B.%_.loc6_12.1 (constants.%_)]
// CHECK:STDOUT: %self.param.loc11: @B.F.%B (%B) = value_param call_param0
@@ -474,7 +481,10 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %self.loc11: @B.F.%B (%B) = wrapper_binding self, %self.param.loc11
// CHECK:STDOUT: %a.param.loc11: @B.F.%T.loc7 (%T) = value_param call_param1
// CHECK:STDOUT: %T.ref.loc11_48: type = name_ref T, %T.loc11 [symbolic = %T.loc7 (constants.%T)]
// CHECK:STDOUT: %.loc11_48.1: type = splice_block %T.ref.loc11_48 [symbolic = %T.loc7 (constants.%T)] {
// CHECK:STDOUT: %.loc11_48.2: type = specific_constant %T.loc11, @A(constants.%T) [symbolic = %T.loc7 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc11_48: type = name_ref T, %.loc11_48.2 [symbolic = %T.loc7 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.loc11: @B.F.%T.loc7 (%T) = wrapper_binding a, %a.param.loc11
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -491,9 +501,10 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: %B.decl: @A.%B.type (%B.type) = class_decl @B [symbolic = @A.%B.generic (constants.%B.generic)] {
// CHECK:STDOUT: %_.patt.loc6_12.1: @B.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern _, 1 [symbolic = %_.patt.loc6_12.2 (constants.%_.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc6: type = splice_block %T.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc6_14.1: type = splice_block %T.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_10.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc6_14.2: type = specific_constant @A.%T.loc5_10.2, @A(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc6_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %_.loc6_12.2: @B.%T (%T) = symbolic_binding _, 1 [symbolic = %_.loc6_12.1 (constants.%_)]
// CHECK:STDOUT: }
@@ -531,7 +542,10 @@ fn Generic(unused T: ()).WrongType() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %self.loc7: @B.F.%B (%B) = wrapper_binding self, %self.param.loc7
// CHECK:STDOUT: %a.param.loc7: @B.F.%T.loc7 (%T) = value_param call_param1
// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, @A.%T.loc5_10.2 [symbolic = %T.loc7 (constants.%T)]
// CHECK:STDOUT: %.loc7_19.1: type = splice_block %T.ref.loc7 [symbolic = %T.loc7 (constants.%T)] {
// CHECK:STDOUT: %.loc7_19.2: type = specific_constant @A.%T.loc5_10.2, @A(constants.%T) [symbolic = %T.loc7 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %.loc7_19.2 [symbolic = %T.loc7 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.loc7: @B.F.%T.loc7 (%T) = wrapper_binding a, %a.param.loc7
// CHECK:STDOUT: }
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
+14 -10
View File
@@ -291,10 +291,11 @@ fn Test() -> i32 {
// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc9_17.2 [symbolic = %Inner (constants.%Inner.056)]
// CHECK:STDOUT: %.loc9_17.3: Core.Form = init_form %Inner.ref [symbolic = %.loc9_17.1 (constants.%.22d)]
// CHECK:STDOUT: %n.param: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.2 [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, @Outer.%T.loc4_14.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.3 [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %.loc9_11.2: %Copy.type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, %.loc9_11.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc9_11.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc9_11.2: type = converted %T.ref, %T.as_type.loc9_11.2 [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc9_11.3: type = converted %T.ref, %T.as_type.loc9_11.2 [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type) = wrapper_binding n, %n.param
// CHECK:STDOUT: %return.param: ref @Outer.F.%Inner (%Inner.056) = out_param call_param1
@@ -322,10 +323,11 @@ fn Test() -> i32 {
// CHECK:STDOUT: %complete_type.loc7_3.2: <witness> = complete_type_witness %struct_type.n [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.22c)]
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: %field_decl: @Inner.%Inner.elem (%Inner.elem.649) = field_decl n, element0, %.loc6 in [concrete] {
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, @Outer.%T.loc4_14.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %field_decl: @Inner.%Inner.elem (%Inner.elem.649) = field_decl n, element0, %.loc6_12.2 in [concrete] {
// CHECK:STDOUT: %.loc6_12.1: %Copy.type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, %.loc6_12.1 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc6_12.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_12.2 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6: type = converted %T.ref, %T.as_type.loc6_12.1 [symbolic = %T.as_type.loc6_12.2 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_12.2: type = converted %T.ref, %T.as_type.loc6_12.1 [symbolic = %T.as_type.loc6_12.2 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %complete_type.loc7_3.1: <witness> = complete_type_witness constants.%struct_type.n.797 [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.22c)]
// CHECK:STDOUT: complete_type_witness = %complete_type.loc7_3.1
@@ -761,8 +763,9 @@ fn Test() -> i32 {
// CHECK:STDOUT: %return.param_patt.loc6_19.1: @Inner.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_19.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc6_16.1: @Inner.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_19.1, %T.ref [symbolic = %return.patt.loc6_16.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc6_19.2: Core.Form = init_form %T.ref [symbolic = %.loc6_19.1 (constants.%.184)]
// CHECK:STDOUT: %.loc6_19.2: type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc6_19.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc6_19.3: Core.Form = init_form %T.ref [symbolic = %.loc6_19.1 (constants.%.184)]
// CHECK:STDOUT: %self.param: @Inner.WithSelf.F.%Self.as_type.loc6_10.1 (%Self.as_type.ef4) = value_param call_param0
// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.3 [symbolic = %Self.as_type.loc6_10.1 (constants.%Self.as_type.ef4)] {
// CHECK:STDOUT: %.loc6_10.2: @Inner.WithSelf.F.%Inner.type (%Inner.type.ebc) = specific_constant @Inner.%Self.loc5_19.1, @Inner(constants.%T) [symbolic = %Self (constants.%Self.6a1)]
@@ -809,8 +812,9 @@ fn Test() -> i32 {
// CHECK:STDOUT: %return.param_patt.loc11_24.1: @C.as.Inner.impl.F.%pattern_type.loc11_24 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc11_24.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc11_21.1: @C.as.Inner.impl.F.%pattern_type.loc11_24 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc11_24.1, %T.ref [symbolic = %return.patt.loc11_21.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc11_24.3: Core.Form = init_form %T.ref [symbolic = %.loc11_24.2 (constants.%.184)]
// CHECK:STDOUT: %.loc11_24.3: type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc11_24.3 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc11_24.4: Core.Form = init_form %T.ref [symbolic = %.loc11_24.2 (constants.%.184)]
// CHECK:STDOUT: %self.param: @C.as.Inner.impl.F.%C (%C.128) = value_param call_param0
// CHECK:STDOUT: %.loc11_18.1: type = splice_block %C.ref [symbolic = %C (constants.%C.128)] {
// CHECK:STDOUT: %.loc11_18.2: type = specific_constant @Outer.%C.decl, @Outer(constants.%T) [symbolic = %C (constants.%C.128)]
@@ -302,7 +302,8 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A {
// CHECK:STDOUT: %return.param_patt.loc19_35.1: @Class.Get.%pattern_type (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc19_35.2 (constants.%return.param_patt.a41)]
// CHECK:STDOUT: %return.patt.loc19_27.1: @Class.Get.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc19_35.1, %.loc19_35.4 [symbolic = %return.patt.loc19_27.2 (constants.%return.patt.453)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc18_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc19_31: type = specific_constant @Class.%T.loc18_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc19_31 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %U.ref.loc19_34: type = name_ref U, %U.loc19_19.2 [symbolic = %U.loc19_19.1 (constants.%U)]
// CHECK:STDOUT: %.loc19_35.3: %tuple.type.693 = tuple_literal (%T.ref, %U.ref.loc19_34) [symbolic = %tuple (constants.%tuple.fa2)]
// CHECK:STDOUT: %.loc19_35.4: type = converted %.loc19_35.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)]
@@ -322,13 +323,17 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A {
// CHECK:STDOUT: %return.param_patt.loc20_49.1: @Class.GetNoDeduce.%pattern_type.loc20_49 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc20_49.2 (constants.%return.param_patt.a41)]
// CHECK:STDOUT: %return.patt.loc20_41.1: @Class.GetNoDeduce.%pattern_type.loc20_49 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc20_49.1, %.loc20_49.4 [symbolic = %return.patt.loc20_41.2 (constants.%return.patt.453)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc20_45: type = name_ref T, @Class.%T.loc18_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc20_45: type = specific_constant @Class.%T.loc18_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref.loc20_45: type = name_ref T, %.loc20_45 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %U.ref.loc20_48: type = name_ref U, %U.loc20_33.2 [symbolic = %U.loc20_33.1 (constants.%U)]
// CHECK:STDOUT: %.loc20_49.3: %tuple.type.693 = tuple_literal (%T.ref.loc20_45, %U.ref.loc20_48) [symbolic = %tuple (constants.%tuple.fa2)]
// CHECK:STDOUT: %.loc20_49.4: type = converted %.loc20_49.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)]
// CHECK:STDOUT: %.loc20_49.5: Core.Form = init_form %.loc20_49.4 [symbolic = %.loc20_49.2 (constants.%.f18)]
// 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_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc20_21.1: type = splice_block %T.ref.loc20_21 [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc20_21.2: type = specific_constant @Class.%T.loc18_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref.loc20_21: type = name_ref T, %.loc20_21.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @Class.GetNoDeduce.%T (%T) = wrapper_binding x, %x.param
// CHECK:STDOUT: %.loc20_35.1: type = splice_block %.loc20_35.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
+4 -2
View File
@@ -144,7 +144,8 @@ class Class(T: type) {
// CHECK:STDOUT: %return.patt.loc19_18.1: @Class.MakeClass.%pattern_type (%pattern_type.28f) = return_slot_pattern %return.param_patt.loc19_28.1, %Class.loc19_28.2 [symbolic = %return.patt.loc19_18.2 (constants.%return.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc15_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc19_27: type = specific_constant @Class.%T.loc15_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc19_27 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Class.loc19_28.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_28.1 (constants.%Class)]
// CHECK:STDOUT: %.loc19_28.2: Core.Form = init_form %Class.loc19_28.2 [symbolic = %.loc19_28.1 (constants.%.917)]
// CHECK:STDOUT: %return.param: ref @Class.MakeClass.%Class.loc19_28.1 (%Class) = out_param call_param0
@@ -240,7 +241,8 @@ class Class(T: type) {
// CHECK:STDOUT: assign %c.var, %Class.MakeSelf.call
// CHECK:STDOUT: %.loc21_26: type = splice_block %Class.loc21_26.1 [symbolic = %Class.loc21_26.2 (constants.%Class)] {
// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc15_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc21_25: type = specific_constant @Class.%T.loc15_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc21_25 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Class.loc21_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc21_26.2 (constants.%Class)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: ref @Class.F.%Class.loc21_26.2 (%Class) = wrapper_binding c, %c.var
@@ -86,7 +86,10 @@ fn Class(T: type).F(unused self, unused n: T) {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %self.loc20: @Class.F.%Class (%Class) = wrapper_binding self, %self.param.loc20
// CHECK:STDOUT: %n.param.loc20: @Class.F.%T.loc17 (%T) = value_param call_param1
// CHECK:STDOUT: %T.ref.loc20: type = name_ref T, %T.loc20 [symbolic = %T.loc17 (constants.%T)]
// CHECK:STDOUT: %.loc20_44.1: type = splice_block %T.ref.loc20 [symbolic = %T.loc17 (constants.%T)] {
// CHECK:STDOUT: %.loc20_44.2: type = specific_constant %T.loc20, @Class(constants.%T) [symbolic = %T.loc17 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc20: type = name_ref T, %.loc20_44.2 [symbolic = %T.loc17 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc20: @Class.F.%T.loc17 (%T) = wrapper_binding n, %n.param.loc20
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -121,7 +124,10 @@ fn Class(T: type).F(unused self, unused n: T) {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %self.loc17: @Class.F.%Class (%Class) = wrapper_binding self, %self.param.loc17
// CHECK:STDOUT: %n.param.loc17: @Class.F.%T.loc17 (%T) = value_param call_param1
// CHECK:STDOUT: %T.ref.loc17: type = name_ref T, @Class.%T.loc15_14.2 [symbolic = %T.loc17 (constants.%T)]
// CHECK:STDOUT: %.loc17_17.1: type = splice_block %T.ref.loc17 [symbolic = %T.loc17 (constants.%T)] {
// CHECK:STDOUT: %.loc17_17.2: type = specific_constant @Class.%T.loc15_14.2, @Class(constants.%T) [symbolic = %T.loc17 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc17: type = name_ref T, %.loc17_17.2 [symbolic = %T.loc17 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n.loc17: @Class.F.%T.loc17 (%T) = wrapper_binding n, %n.param.loc17
// CHECK:STDOUT: }
// CHECK:STDOUT: %complete_type.loc18_1.1: <witness> = complete_type_witness constants.%struct_type.a [symbolic = %complete_type.loc18_1.2 (constants.%complete_type)]
+6 -2
View File
@@ -1848,7 +1848,10 @@ class T2(G2: type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @T1.F.%T1 (%T1) = wrapper_binding self, %self.param
// CHECK:STDOUT: %t.param: @T1.F.%T (%T) = value_param call_param1
// CHECK:STDOUT: %T.ref: type = name_ref T, @T1.%T.loc4_16.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc6_39.1: type = splice_block %T.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc6_39.2: type = specific_constant @T1.%T.loc4_16.2, @T1(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc6_39.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %t: @T1.F.%T (%T) = wrapper_binding t, %t.param
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
@@ -2059,7 +2062,8 @@ class T2(G2: type) {
// CHECK:STDOUT: %self: @Derived.F.loc10_44.1.%Derived (%Derived) = wrapper_binding self, %self.param
// CHECK:STDOUT: %t.param: @Derived.F.loc10_44.1.%ptr.loc10_41.1 (%ptr.e8f) = value_param call_param1
// CHECK:STDOUT: %.loc10_41: type = splice_block %ptr.loc10_41.2 [symbolic = %ptr.loc10_41.1 (constants.%ptr.e8f)] {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Derived.%T.loc7_16.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc10_40: type = specific_constant @Derived.%T.loc7_16.2, @Derived(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc10_40 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %ptr.loc10_41.2: type = ptr_type %T.ref [symbolic = %ptr.loc10_41.1 (constants.%ptr.e8f)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %t: @Derived.F.loc10_44.1.%ptr.loc10_41.1 (%ptr.e8f) = wrapper_binding t, %t.param
+20 -10
View File
@@ -341,7 +341,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc10_36: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %.loc10_36 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc10_37.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc10_37.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: %.loc10_37.2: Core.Form = init_form %Int.loc10_37.2 [symbolic = %.loc10_37.1 (constants.%.c504e9.1)]
// CHECK:STDOUT: %self.param: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.0bb) = value_param call_param0
@@ -365,7 +366,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: %Optional.ref.loc11: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
// CHECK:STDOUT: %Core.ref.loc11_61: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc11_65: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc11_70: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc11_70: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref.loc11_70: Core.IntLiteral = name_ref N, %.loc11_70 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc11_71: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_41.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: %OptionalStorage.facet.loc11_72.2: %OptionalStorage.type = facet_value %Int.loc11_71, (constants.%OptionalStorage.lookup_impl_witness.f1f) [symbolic = %OptionalStorage.facet.loc11_72.1 (constants.%OptionalStorage.facet.b7c)]
// CHECK:STDOUT: %.loc11_72.5: %OptionalStorage.type = converted %Int.loc11_71, %OptionalStorage.facet.loc11_72.2 [symbolic = %OptionalStorage.facet.loc11_72.1 (constants.%OptionalStorage.facet.b7c)]
@@ -381,7 +383,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: %.loc11_41: type = splice_block %Int.loc11_41.2 [symbolic = %Int.loc11_41.1 (constants.%Int.d4bbe0.1)] {
// CHECK:STDOUT: %Core.ref.loc11_31: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc11_35: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc11_40: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc11_40: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref.loc11_40: Core.IntLiteral = name_ref N, %.loc11_40 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc11_41.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_41.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %cursor: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_41.1 (%Int.d4bbe0.1) = wrapper_binding cursor, %cursor.param
@@ -432,7 +435,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: %.loc5_28: type = splice_block %Int.loc5_28.2 [symbolic = %Int.loc5_28.1 (constants.%Int.d4bbe0.1)] {
// CHECK:STDOUT: %Core.ref.loc5_18: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc5_22: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc5_27: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc5_27: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref.loc5_27: Core.IntLiteral = name_ref N, %.loc5_27 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc5_28.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc5_28.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %start: @IntRange.Make.%Int.loc5_28.1 (%Int.d4bbe0.1) = wrapper_binding start, %start.param
@@ -440,7 +444,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: %.loc5_46: type = splice_block %Int.loc5_46 [symbolic = %Int.loc5_28.1 (constants.%Int.d4bbe0.1)] {
// CHECK:STDOUT: %Core.ref.loc5_36: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc5_40: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc5_45: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc5_45: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref.loc5_45: Core.IntLiteral = name_ref N, %.loc5_45 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc5_46: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc5_28.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %end: @IntRange.Make.%Int.loc5_28.1 (%Int.d4bbe0.1) = wrapper_binding end, %end.param
@@ -460,7 +465,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: %impl.elem1.loc9_30.1: %Destroy.type = impl_witness_access constants.%.052, element1 [symbolic_self = constants.%impl.elem1.a93]
// CHECK:STDOUT: %Core.ref.loc9_44: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc9_48: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc9_53: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc9_53: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref.loc9_53: Core.IntLiteral = name_ref N, %.loc9_53 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc9_54.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_54.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: %Destroy.facet.loc9_54.2: %Destroy.type = facet_value %Int.loc9_54.2, (constants.%Destroy.lookup_impl_witness.053) [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.e3e)]
// CHECK:STDOUT: %.loc9_54: %Destroy.type = converted %Int.loc9_54.2, %Destroy.facet.loc9_54.2 [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.e3e)]
@@ -472,7 +478,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: %impl.elem0.loc9_60.1: %facet_type.f48 = impl_witness_access constants.%.052, element0 [symbolic_self = constants.%impl.elem0.3b7]
// CHECK:STDOUT: %Core.ref.loc9_75: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc9_79: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc9_84: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc9_84: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref.loc9_84: Core.IntLiteral = name_ref N, %.loc9_84 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc9_85: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_54.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: %facet_value.loc9_85.2: %facet_type.f48 = facet_value %Int.loc9_85, (constants.%Destroy.lookup_impl_witness.053, constants.%Copy.lookup_impl_witness.923) [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)]
// CHECK:STDOUT: %.loc9_85.2: %facet_type.f48 = converted %Int.loc9_85, %facet_value.loc9_85.2 [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)]
@@ -698,7 +705,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: %.loc12_28: type = splice_block %Int.loc12 [symbolic = %Int.loc11_41.1 (constants.%Int.d4bbe0.1)] {
// CHECK:STDOUT: %Core.ref.loc12: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc12: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc12: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc12_27: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref.loc12: Core.IntLiteral = name_ref N, %.loc12_27 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc12: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_41.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %value: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_41.1 (%Int.d4bbe0.1) = wrapper_binding value, %value.var
@@ -739,7 +747,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: %Optional.ref.loc15: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
// CHECK:STDOUT: %Core.ref.loc15_30: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc15: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc15: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc15_39: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref.loc15: Core.IntLiteral = name_ref N, %.loc15_39 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc15: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_41.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: %OptionalStorage.facet.loc15_41: %OptionalStorage.type = facet_value %Int.loc15, (constants.%OptionalStorage.lookup_impl_witness.f1f) [symbolic = %OptionalStorage.facet.loc11_72.1 (constants.%OptionalStorage.facet.b7c)]
// CHECK:STDOUT: %.loc15_41: %OptionalStorage.type = converted %Int.loc15, %OptionalStorage.facet.loc15_41 [symbolic = %OptionalStorage.facet.loc11_72.1 (constants.%OptionalStorage.facet.b7c)]
@@ -771,7 +780,8 @@ fn Read(generic y: Core.IntLiteral) {
// CHECK:STDOUT: %Optional.ref.loc17: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
// CHECK:STDOUT: %Core.ref.loc17_30: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc17: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc17: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %.loc17_39: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N.ref.loc17: Core.IntLiteral = name_ref N, %.loc17_39 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc17: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_41.1 (constants.%Int.d4bbe0.1)]
// CHECK:STDOUT: %OptionalStorage.facet.loc17: %OptionalStorage.type = facet_value %Int.loc17, (constants.%OptionalStorage.lookup_impl_witness.f1f) [symbolic = %OptionalStorage.facet.loc11_72.1 (constants.%OptionalStorage.facet.b7c)]
// CHECK:STDOUT: %.loc17_41: %OptionalStorage.type = converted %Int.loc17, %OptionalStorage.facet.loc17 [symbolic = %OptionalStorage.facet.loc11_72.1 (constants.%OptionalStorage.facet.b7c)]
@@ -381,8 +381,9 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.param_patt.loc14_23.1: @As.WithSelf.Convert.%pattern_type.loc14_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc14_23.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc14_20.1: @As.WithSelf.Convert.%pattern_type.loc14_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc14_23.1, %T.ref [symbolic = %return.patt.loc14_20.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc13_15.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc14_23.2: Core.Form = init_form %T.ref [symbolic = %.loc14_23.1 (constants.%.184)]
// CHECK:STDOUT: %.loc14_23.2: type = specific_constant @As.%T.loc13_15.2, @As(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc14_23.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc14_23.3: Core.Form = init_form %T.ref [symbolic = %.loc14_23.1 (constants.%.184)]
// CHECK:STDOUT: %self.param: @As.WithSelf.Convert.%Self.as_type.loc14_14.1 (%Self.as_type.5c1) = value_param call_param0
// CHECK:STDOUT: %.loc14_14.1: type = splice_block %.loc14_14.3 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type.5c1)] {
// CHECK:STDOUT: %.loc14_14.2: @As.WithSelf.Convert.%As.type (%As.type.12c) = specific_constant @As.%Self.loc13_23.1, @As(constants.%T) [symbolic = %Self (constants.%Self.b18)]
@@ -426,8 +427,9 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: %return.param_patt.loc18_23.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc18_23.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc18_20.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc18_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc18_23.1, %T.ref [symbolic = %return.patt.loc18_20.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc17_23.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc18_23.2: Core.Form = init_form %T.ref [symbolic = %.loc18_23.1 (constants.%.184)]
// CHECK:STDOUT: %.loc18_23.2: type = specific_constant @ImplicitAs.%T.loc17_23.2, @ImplicitAs(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc18_23.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc18_23.3: Core.Form = init_form %T.ref [symbolic = %.loc18_23.1 (constants.%.184)]
// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc18_14.1 (%Self.as_type.0dd) = value_param call_param0
// CHECK:STDOUT: %.loc18_14.1: type = splice_block %.loc18_14.3 [symbolic = %Self.as_type.loc18_14.1 (constants.%Self.as_type.0dd)] {
// CHECK:STDOUT: %.loc18_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.b02) = specific_constant @ImplicitAs.%Self.loc17_31.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.757)]
@@ -356,8 +356,9 @@ fn G() {
// CHECK:STDOUT: %return.param_patt.loc16_16.1: @Wrap.Make.%pattern_type (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc16_16.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc16_13.1: @Wrap.Make.%pattern_type (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc16_16.1, %T.ref [symbolic = %return.patt.loc16_13.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Wrap.%T.loc15_13.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc16_16.3: Core.Form = init_form %T.ref [symbolic = %.loc16_16.2 (constants.%.184)]
// CHECK:STDOUT: %.loc16_16.3: type = specific_constant @Wrap.%T.loc15_13.2, @Wrap(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc16_16.3 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc16_16.4: Core.Form = init_form %T.ref [symbolic = %.loc16_16.2 (constants.%.184)]
// CHECK:STDOUT: %return.param: ref @Wrap.Make.%T (%T) = out_param call_param0
// CHECK:STDOUT: %return: ref @Wrap.Make.%T (%T) = return_slot %return.param
// CHECK:STDOUT: }
+12 -10
View File
@@ -153,12 +153,13 @@ var n: i32 = Outer(i32).Inner(42).Get();
// CHECK:STDOUT: class {
// CHECK:STDOUT: %Inner.Get.decl: @Inner.%Inner.Get.type (%Inner.Get.type.76e) = fn_decl @Inner.Get [symbolic = @Inner.%Inner.Get (constants.%Inner.Get.2e2)] {
// CHECK:STDOUT: %return.param_patt.loc7_17.1: @Inner.Get.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc7_17.2 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc7_14.1: @Inner.Get.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc7_17.1, %.loc7_17.3 [symbolic = %return.patt.loc7_14.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc7_14.1: @Inner.Get.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc7_17.1, %.loc7_17.4 [symbolic = %return.patt.loc7_14.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, @Outer.%T.loc4_14.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc7_17.3: %Copy.type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, %.loc7_17.3 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc7_17.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_17.3: type = converted %T.ref, %T.as_type.loc7_17.2 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_17.4: Core.Form = init_form %.loc7_17.3 [symbolic = %.loc7_17.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc7_17.4: type = converted %T.ref, %T.as_type.loc7_17.2 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_17.5: Core.Form = init_form %.loc7_17.4 [symbolic = %.loc7_17.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %return.param: ref @Inner.Get.%T.as_type.loc7_17.1 (%T.as_type) = out_param call_param0
// CHECK:STDOUT: %return: ref @Inner.Get.%T.as_type.loc7_17.1 (%T.as_type) = return_slot %return.param
// CHECK:STDOUT: }
@@ -185,20 +186,21 @@ var n: i32 = Outer(i32).Inner(42).Get();
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc7_17.1 [symbolic = %require_complete (constants.%require_complete.d83)]
// CHECK:STDOUT: %U: @Inner.Get.%T.as_type.loc7_17.1 (%T.as_type) = symbolic_binding U, 1 [symbolic = %U (constants.%U.7e5)]
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d2f9c3.2)]
// CHECK:STDOUT: %.loc7_28.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T [symbolic = %.loc7_28.3 (constants.%.8bf)]
// CHECK:STDOUT: %.loc7_28.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T [symbolic = %.loc7_28.4 (constants.%.8bf)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c)]
// CHECK:STDOUT: %impl.elem0.loc7_28.2: @Inner.Get.%.loc7_28.3 (%.8bf) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.bb5)]
// CHECK:STDOUT: %impl.elem0.loc7_28.2: @Inner.Get.%.loc7_28.4 (%.8bf) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.bb5)]
// CHECK:STDOUT: %bound_method.loc7_28.3: <bound method> = bound_method %U, %impl.elem0.loc7_28.2 [symbolic = %bound_method.loc7_28.3 (constants.%bound_method.fb3)]
// CHECK:STDOUT: %specific_impl_fn.loc7_28.2: <specific function> = specific_impl_function %impl.elem0.loc7_28.2, @Copy.WithSelf.Op(%T) [symbolic = %specific_impl_fn.loc7_28.2 (constants.%specific_impl_fn.2ac)]
// CHECK:STDOUT: %bound_method.loc7_28.4: <bound method> = bound_method %U, %specific_impl_fn.loc7_28.2 [symbolic = %bound_method.loc7_28.4 (constants.%bound_method.ecc)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> out %return.param: @Inner.Get.%T.as_type.loc7_17.1 (%T.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %U.ref: @Inner.Get.%T.as_type.loc7_17.1 (%T.as_type) = name_ref U, @Inner.%U.loc5_16.2 [symbolic = %U (constants.%U.7e5)]
// CHECK:STDOUT: %impl.elem0.loc7_28.1: @Inner.Get.%.loc7_28.3 (%.8bf) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.bb5)]
// CHECK:STDOUT: %.loc7_28.1: @Inner.Get.%T.as_type.loc7_17.1 (%T.as_type) = specific_constant @Inner.%U.loc5_16.2, @Inner(constants.%T.f84, constants.%U.7e5) [symbolic = %U (constants.%U.7e5)]
// CHECK:STDOUT: %U.ref: @Inner.Get.%T.as_type.loc7_17.1 (%T.as_type) = name_ref U, %.loc7_28.1 [symbolic = %U (constants.%U.7e5)]
// CHECK:STDOUT: %impl.elem0.loc7_28.1: @Inner.Get.%.loc7_28.4 (%.8bf) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.bb5)]
// CHECK:STDOUT: %bound_method.loc7_28.1: <bound method> = bound_method %U.ref, %impl.elem0.loc7_28.1 [symbolic = %bound_method.loc7_28.3 (constants.%bound_method.fb3)]
// CHECK:STDOUT: %.loc7_28.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc7_28.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc7_28.3: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %specific_impl_fn.loc7_28.1: <specific function> = specific_impl_function %impl.elem0.loc7_28.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc7_28.2 (constants.%specific_impl_fn.2ac)]
// CHECK:STDOUT: %bound_method.loc7_28.2: <bound method> = bound_method %U.ref, %specific_impl_fn.loc7_28.1 [symbolic = %bound_method.loc7_28.4 (constants.%bound_method.ecc)]
// CHECK:STDOUT: %.loc7_17.1: ref @Inner.Get.%T.as_type.loc7_17.1 (%T.as_type) = splice_block %return.param {}
@@ -298,7 +300,7 @@ var n: i32 = Outer(i32).Inner(42).Get();
// CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
// CHECK:STDOUT: %U => constants.%int_42.db5
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.f76
// CHECK:STDOUT: %.loc7_28.3 => constants.%.2b9
// CHECK:STDOUT: %.loc7_28.4 => constants.%.2b9
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.8af
// CHECK:STDOUT: %impl.elem0.loc7_28.2 => constants.%Int.as.Copy.impl.Op.cae
// CHECK:STDOUT: %bound_method.loc7_28.3 => constants.%Int.as.Copy.impl.Op.bound
@@ -139,7 +139,8 @@ fn H(generic T: type) {
// CHECK:STDOUT: %.loc11_32.1: type = splice_block %.loc11_32.2 [symbolic = %A_where.type (constants.%A_where.type.ff151a.1)] {
// CHECK:STDOUT: %.Self.frozen.loc11_24: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.e58]
// CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic]
// CHECK:STDOUT: %CC.ref.loc11_28: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)]
// CHECK:STDOUT: %.loc11_28: type = specific_constant @C.%CC.loc6_11.2, @C(constants.%CC) [symbolic = %CC (constants.%CC)]
// CHECK:STDOUT: %CC.ref.loc11_28: type = name_ref CC, %.loc11_28 [symbolic = %CC (constants.%CC)]
// CHECK:STDOUT: %A.type.loc11_30.2: type = facet_type <@A, @A(constants.%CC)> [symbolic = %A.type.loc11_30.1 (constants.%A.type.fa003b.2)]
// CHECK:STDOUT: %.Self.frozen.loc11_32.2: @C.F.%A.type.loc11_30.1 (%A.type.fa003b.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_32.1 (constants.%.Self.frozen.b15)]
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc11_30.2 [concrete]
@@ -149,7 +150,8 @@ fn H(generic T: type) {
// CHECK:STDOUT: %.loc11_38.2: @C.F.%A.assoc_type (%A.assoc_type.3230b8.2) = specific_constant @X.%assoc0, @A.WithSelf(constants.%CC, constants.%.Self.frozen.b15) [symbolic = %assoc0 (constants.%assoc0.4c905d.2)]
// CHECK:STDOUT: %X.ref: @C.F.%A.assoc_type (%A.assoc_type.3230b8.2) = name_ref X, %.loc11_38.2 [symbolic = %assoc0 (constants.%assoc0.4c905d.2)]
// CHECK:STDOUT: %impl.elem0.loc11_38.3: type = impl_witness_access constants.%A.lookup_impl_witness.030, element0 [symbolic = %impl.elem0.loc11_38.1 (constants.%impl.elem0.fba)]
// CHECK:STDOUT: %CC.ref.loc11_43: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)]
// CHECK:STDOUT: %.loc11_43: type = specific_constant @C.%CC.loc6_11.2, @C(constants.%CC) [symbolic = %CC (constants.%CC)]
// CHECK:STDOUT: %CC.ref.loc11_43: type = name_ref CC, %.loc11_43 [symbolic = %CC (constants.%CC)]
// CHECK:STDOUT: %rewrite.loc11_41.1 = requirement_rewrite %impl.elem0.loc11_38.3, %CC.ref.loc11_43 [concrete]
// CHECK:STDOUT: %impl.elem0.loc11_38.4: type = impl_witness_access constants.%A.lookup_impl_witness.9e772d.1, element0 [symbolic = %impl.elem0.loc11_38.2 (constants.%impl.elem0.7f79de.1)]
// CHECK:STDOUT: %rewrite.loc11_41.2 = requirement_rewrite %impl.elem0.loc11_38.4, %CC.ref.loc11_43 [concrete]
@@ -228,10 +230,11 @@ fn H(generic T: type) {
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
// CHECK:STDOUT: %DD.ref: type = name_ref DD, @D.%DD.loc15_11.2 [symbolic = %DD (constants.%DD)]
// CHECK:STDOUT: %.loc25_7: type = specific_constant @D.%DD.loc15_11.2, @D(constants.%DD) [symbolic = %DD (constants.%DD)]
// CHECK:STDOUT: %DD.ref: type = name_ref DD, %.loc25_7 [symbolic = %DD (constants.%DD)]
// CHECK:STDOUT: %C.loc25_9.1: type = class_type @C, @C(constants.%DD) [symbolic = %C.loc25_9.2 (constants.%C.04ad3b.2)]
// CHECK:STDOUT: %.loc25: @D.G.%C.F.type (%C.F.type.8772f5.2) = specific_constant @C.%C.F.decl, @C(constants.%DD) [symbolic = %C.F (constants.%C.F.889ece.2)]
// CHECK:STDOUT: %F.ref: @D.G.%C.F.type (%C.F.type.8772f5.2) = name_ref F, %.loc25 [symbolic = %C.F (constants.%C.F.889ece.2)]
// CHECK:STDOUT: %.loc25_10: @D.G.%C.F.type (%C.F.type.8772f5.2) = specific_constant @C.%C.F.decl, @C(constants.%DD) [symbolic = %C.F (constants.%C.F.889ece.2)]
// CHECK:STDOUT: %F.ref: @D.G.%C.F.type (%C.F.type.8772f5.2) = name_ref F, %.loc25_10 [symbolic = %C.F (constants.%C.F.889ece.2)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc16_17.2 [symbolic = %T.loc16_17.1 (constants.%T.091)]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
@@ -491,7 +494,8 @@ fn H(generic T: type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_17.2 [symbolic = %T.loc15_17.1 (constants.%T.091)]
// CHECK:STDOUT: %B.ref: %B.type.d1b = name_ref B, file.%B.decl [concrete = constants.%B.generic]
// CHECK:STDOUT: %DD.ref: type = name_ref DD, @D.%DD.loc14_11.2 [symbolic = %DD (constants.%DD)]
// CHECK:STDOUT: %.loc21_12: type = specific_constant @D.%DD.loc14_11.2, @D(constants.%DD) [symbolic = %DD (constants.%DD)]
// CHECK:STDOUT: %DD.ref: type = name_ref DD, %.loc21_12 [symbolic = %DD (constants.%DD)]
// CHECK:STDOUT: %ptr.loc21_14.1: type = ptr_type %DD.ref [symbolic = %ptr.loc21_14.2 (constants.%ptr.e8f8f9.2)]
// CHECK:STDOUT: %B.type.loc21_15.1: type = facet_type <@B, @B(constants.%ptr.e8f8f9.2)> [symbolic = %B.type.loc21_15.2 (constants.%B.type.904f2f.2)]
// CHECK:STDOUT: %B.facet.loc21_7.1: @D.G.%B.type.loc21_15.2 (%B.type.904f2f.2) = facet_value %T.ref, (constants.%B.lookup_impl_witness.ab0) [symbolic = %B.facet.loc21_7.2 (constants.%B.facet.ed9)]
+388 -38
View File
@@ -3,8 +3,6 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
//
// AUTOUPDATE
// TIP: To test this file alone, run:
@@ -12,72 +10,98 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/generic/local_function.carbon
fn Test[unused T: type]() {
// --- basic.carbon
library "[[@TEST_NAME]]";
//@dump-sem-ir-begin
fn Test(unused generic T: type) {
fn Local() {
}
Local();
}
//@dump-sem-ir-end
// CHECK:STDOUT: --- local_function.carbon
fn CallTest() {
Test(i32);
}
// --- use_enclosing_local.carbon
library "[[@TEST_NAME]]";
class S {
fn Make() -> S { return {.n = 42}; }
var n: i32;
}
fn EnclosingTemplate(template T: type) -> i32 {
let a: T = T.Make();
// We can refer to `a.n` here even though that's a template-dependent value in
// an enclosing generic.
//@dump-sem-ir-begin
fn Local(_: T, y: typeof(a.n)) -> typeof(a.n) {
return y;
}
//@dump-sem-ir-end
return Local(T.Make(), a.n);
}
fn CallEnclosingTemplate() -> i32 {
return EnclosingTemplate(S);
}
// CHECK:STDOUT: --- basic.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %Test.type: type = fn_type @Test [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete]
// CHECK:STDOUT: %Local.type: type = fn_type @Local, @Test(%T) [symbolic]
// CHECK:STDOUT: %Local: %Local.type = struct_value () [symbolic]
// CHECK:STDOUT: %Local.specific_fn: <specific function> = specific_function %Local, @Local(%T) [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
// CHECK:STDOUT: import Core//prelude
// CHECK:STDOUT: import Core//prelude/...
// CHECK:STDOUT: }
// CHECK:STDOUT: %Local.type.8c4: type = fn_type @Local, @Test(%T) [symbolic]
// CHECK:STDOUT: %Local.217: %Local.type.8c4 = struct_value () [symbolic]
// CHECK:STDOUT: %Local.specific_fn.697: <specific function> = specific_function %Local.217, @Local(%T) [symbolic]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %Local.type.b3e: type = fn_type @Local, @Test(%i32) [concrete]
// CHECK:STDOUT: %Local.e92: %Local.type.b3e = struct_value () [concrete]
// CHECK:STDOUT: %Local.specific_fn.10f: <specific function> = specific_function %Local.e92, @Local(%i32) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .Core = imports.%Core
// CHECK:STDOUT: .Test = %Test.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] {
// CHECK:STDOUT: %T.patt.loc15_17.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_17.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc4_25.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc15_19.1: type = splice_block %.loc15_19.2 [concrete = type] {
// CHECK:STDOUT: %.loc4_27.1: type = splice_block %.loc4_27.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc15_19.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc4_27.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc15_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_17.1 (constants.%T)]
// CHECK:STDOUT: %T.loc4_25.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_25.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Test(%T.loc15_17.2: type) {
// CHECK:STDOUT: %T.patt.loc15_17.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_17.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc15_17.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_17.1 (constants.%T)]
// CHECK:STDOUT: generic fn @Test(%T.loc4_25.2: type) {
// CHECK:STDOUT: %T.patt.loc4_25.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc4_25.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_25.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Local.type: type = fn_type @Local, @Test(%T.loc15_17.1) [symbolic = %Local.type (constants.%Local.type)]
// CHECK:STDOUT: %Local: @Test.%Local.type (%Local.type) = struct_value () [symbolic = %Local (constants.%Local)]
// CHECK:STDOUT: %Local.specific_fn.loc18_3.2: <specific function> = specific_function %Local, @Local(%T.loc15_17.1) [symbolic = %Local.specific_fn.loc18_3.2 (constants.%Local.specific_fn)]
// CHECK:STDOUT: %Local.type: type = fn_type @Local, @Test(%T.loc4_25.1) [symbolic = %Local.type (constants.%Local.type.8c4)]
// CHECK:STDOUT: %Local: @Test.%Local.type (%Local.type.8c4) = struct_value () [symbolic = %Local (constants.%Local.217)]
// CHECK:STDOUT: %Local.specific_fn.loc7_3.2: <specific function> = specific_function %Local, @Local(%T.loc4_25.1) [symbolic = %Local.specific_fn.loc7_3.2 (constants.%Local.specific_fn.697)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Local.decl: @Test.%Local.type (%Local.type) = fn_decl @Local [symbolic = @Test.%Local (constants.%Local)] {} {}
// CHECK:STDOUT: %Local.ref: @Test.%Local.type (%Local.type) = name_ref Local, %Local.decl [symbolic = %Local (constants.%Local)]
// CHECK:STDOUT: %Local.specific_fn.loc18_3.1: <specific function> = specific_function %Local.ref, @Local(constants.%T) [symbolic = %Local.specific_fn.loc18_3.2 (constants.%Local.specific_fn)]
// CHECK:STDOUT: %Local.call: init %empty_tuple.type = call %Local.specific_fn.loc18_3.1()
// CHECK:STDOUT: %Local.decl: @Test.%Local.type (%Local.type.8c4) = fn_decl @Local [symbolic = @Test.%Local (constants.%Local.217)] {} {}
// CHECK:STDOUT: %Local.ref: @Test.%Local.type (%Local.type.8c4) = name_ref Local, %Local.decl [symbolic = %Local (constants.%Local.217)]
// CHECK:STDOUT: %Local.specific_fn.loc7_3.1: <specific function> = specific_function %Local.ref, @Local(constants.%T) [symbolic = %Local.specific_fn.loc7_3.2 (constants.%Local.specific_fn.697)]
// CHECK:STDOUT: %Local.call: init %empty_tuple.type = call %Local.specific_fn.loc7_3.1()
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Local(@Test.%T.loc15_17.2: type) {
// CHECK:STDOUT: generic fn @Local(@Test.%T.loc4_25.2: type) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
@@ -87,11 +111,337 @@ fn Test[unused T: type]() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Test(constants.%T) {
// CHECK:STDOUT: %T.patt.loc15_17.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc15_17.1 => constants.%T
// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc4_25.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Local(constants.%T) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Test(constants.%i32) {
// CHECK:STDOUT: %T.patt.loc4_25.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc4_25.1 => constants.%i32
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Local.type => constants.%Local.type.b3e
// CHECK:STDOUT: %Local => constants.%Local.e92
// CHECK:STDOUT: %Local.specific_fn.loc7_3.2 => constants.%Local.specific_fn.10f
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Local(constants.%i32) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- use_enclosing_local.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %S: type = class_type @S [concrete]
// CHECK:STDOUT: %pattern_type.a55: type = pattern_type %S [concrete]
// CHECK:STDOUT: %S.Make.type: type = fn_type @S.Make [concrete]
// CHECK:STDOUT: %S.Make: %S.Make.type = struct_value () [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
// CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [concrete]
// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete]
// CHECK:STDOUT: %S.elem: type = unbound_element_type %S, %i32 [concrete]
// CHECK:STDOUT: %struct_type.n.4d4: type = struct_type {.n: %i32} [concrete]
// CHECK:STDOUT: %complete_type.31e: <witness> = complete_type_witness %struct_type.n.4d4 [concrete]
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
// CHECK:STDOUT: %.0b3: Core.Form = init_form %i32 [concrete]
// CHECK:STDOUT: %return.param_patt.299: %pattern_type.d94 = out_param_pattern [concrete]
// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template]
// CHECK:STDOUT: %T.67db0b.1: type = symbolic_binding T, 0, template [template]
// CHECK:STDOUT: %return.patt.6fa: %pattern_type.d94 = return_slot_pattern %return.param_patt.299, %i32 [concrete]
// CHECK:STDOUT: %require_complete.944: <witness> = require_complete_type %T.67db0b.1 [template]
// CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %T.67db0b.1 [template]
// CHECK:STDOUT: %_.param_patt.339: %pattern_type.51d1c4.2 = value_param_pattern [template]
// CHECK:STDOUT: %_.patt.ace: %pattern_type.51d1c4.2 = wrapper_binding_pattern _, %_.param_patt.339 [template]
// CHECK:STDOUT: %.237907.1: type = type_of_inst @Local.%.loc13_29.1 [template]
// CHECK:STDOUT: %.f9658d.1: %.237907.1 = splice_inst @Local.%.loc13_29.1 [template]
// CHECK:STDOUT: %pattern_type.940805.1: type = pattern_type %.237907.1 [template]
// CHECK:STDOUT: %y.param_patt.8246e7.1: %pattern_type.940805.1 = value_param_pattern [template]
// CHECK:STDOUT: %y.patt.d967f4.1: %pattern_type.940805.1 = wrapper_binding_pattern y, %y.param_patt.8246e7.1 [template]
// CHECK:STDOUT: %.237907.2: type = type_of_inst @Local.%.loc13_45.1 [template]
// CHECK:STDOUT: %.f9658d.2: %.237907.2 = splice_inst @Local.%.loc13_45.1 [template]
// CHECK:STDOUT: %.6c4209.1: Core.Form = init_form %.237907.2 [template]
// CHECK:STDOUT: %pattern_type.940805.2: type = pattern_type %.237907.2 [template]
// CHECK:STDOUT: %return.param_patt.bcf038.1: %pattern_type.940805.2 = out_param_pattern [template]
// CHECK:STDOUT: %return.patt.690db9.1: %pattern_type.940805.2 = return_slot_pattern %return.param_patt.bcf038.1, %.237907.2 [template]
// CHECK:STDOUT: %.e9daaa.1: <instruction> = access_member_action @Local.%a.ref.loc13_28, n [template]
// CHECK:STDOUT: %.237907.3: type = type_of_inst %.e9daaa.1 [template]
// CHECK:STDOUT: %.f9658d.3: %.237907.3 = splice_inst %.e9daaa.1 [template]
// CHECK:STDOUT: %pattern_type.940805.3: type = pattern_type %.237907.3 [template]
// CHECK:STDOUT: %y.param_patt.8246e7.2: %pattern_type.940805.3 = value_param_pattern [template]
// CHECK:STDOUT: %y.patt.d967f4.2: %pattern_type.940805.3 = wrapper_binding_pattern y, %y.param_patt.8246e7.2 [template]
// CHECK:STDOUT: %.e9daaa.2: <instruction> = access_member_action @Local.%a.ref.loc13_44, n [template]
// CHECK:STDOUT: %.237907.4: type = type_of_inst %.e9daaa.2 [template]
// CHECK:STDOUT: %.f9658d.4: %.237907.4 = splice_inst %.e9daaa.2 [template]
// CHECK:STDOUT: %.6c4209.2: Core.Form = init_form %.237907.4 [template]
// CHECK:STDOUT: %pattern_type.940805.4: type = pattern_type %.237907.4 [template]
// CHECK:STDOUT: %return.param_patt.bcf038.2: %pattern_type.940805.4 = out_param_pattern [template]
// CHECK:STDOUT: %return.patt.690db9.2: %pattern_type.940805.4 = return_slot_pattern %return.param_patt.bcf038.2, %.237907.4 [template]
// CHECK:STDOUT: %Local.type.3e4: type = fn_type @Local, @EnclosingTemplate(%T.67db0b.1) [template]
// CHECK:STDOUT: %Local.667: %Local.type.3e4 = struct_value () [template]
// CHECK:STDOUT: %require_complete.b43ae1.1: <witness> = require_complete_type %.237907.1 [template]
// CHECK:STDOUT: %require_complete.b43ae1.2: <witness> = require_complete_type %.237907.2 [template]
// CHECK:STDOUT: %tuple.type.f7a: type = tuple_type (<instruction>) [concrete]
// CHECK:STDOUT: %.26b: %.237907.2 = splice_inst @Local.%tuple.elem0 [template]
// CHECK:STDOUT: %a.patt.2a2: %pattern_type.a55 = value_binding_pattern a [concrete]
// CHECK:STDOUT: %inst.name_ref.426619.1: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %Make.ref.b85793.1: %S.Make.type = name_ref Make, @S.%S.Make.decl [concrete = %S.Make]
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.426619.1: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.058268.1: init %S = splice_block %S.Make.call.2c2051.2 {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.426619.2: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.349: %S = splice_block %.ff4281.2 {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %Local.type.9c3: type = fn_type @Local, @EnclosingTemplate(%S) [concrete]
// CHECK:STDOUT: %Local.688: %Local.type.9c3 = struct_value () [concrete]
// CHECK:STDOUT: %inst.name_ref.426619.2: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %Make.ref.b85793.2: %S.Make.type = name_ref Make, @S.%S.Make.decl [concrete = %S.Make]
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.426619.3: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.058268.2: init %S = splice_block %S.Make.call.2c2051.1 {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.426619.4: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.9eb: %i32 = splice_block %.1c7 {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %_.param_patt.230: %pattern_type.a55 = value_param_pattern [concrete]
// CHECK:STDOUT: %_.patt.e4c: %pattern_type.a55 = wrapper_binding_pattern _, %_.param_patt.230 [concrete]
// CHECK:STDOUT: %inst.splice_block.426619.5: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.386342.1: %i32 = splice_block %.102f12.2 {
// CHECK:STDOUT: %.db6f3b.2: %S = specific_inst @Local.%a.ref.loc13_28, @Local(%S)
// CHECK:STDOUT: %n.ref.23e2f2.2: %S.elem = name_ref n, @S.%field_decl [concrete = @S.%field_decl]
// CHECK:STDOUT: %.7fc843.2: ref %i32 = class_element_access %.db6f3b.2, element0
// CHECK:STDOUT: %.102f12.2: %i32 = acquire_value %.7fc843.2
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %y.param_patt.665: %pattern_type.d94 = value_param_pattern [concrete]
// CHECK:STDOUT: %y.patt.e18: %pattern_type.d94 = wrapper_binding_pattern y, %y.param_patt.665 [concrete]
// CHECK:STDOUT: %inst.splice_block.426619.6: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.386342.2: %i32 = splice_block %.102f12.1 {
// CHECK:STDOUT: %.db6f3b.1: %S = specific_inst @Local.%a.ref.loc13_44, @Local(%S)
// CHECK:STDOUT: %n.ref.23e2f2.1: %S.elem = name_ref n, @S.%field_decl [concrete = @S.%field_decl]
// CHECK:STDOUT: %.7fc843.1: ref %i32 = class_element_access %.db6f3b.1, element0
// CHECK:STDOUT: %.102f12.1: %i32 = acquire_value %.7fc843.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.426619.7: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.bd1: init %i32 = splice_block %Local.call {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %inst.splice_block.426619.8: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.d0c: init %i32 = splice_block %.bd1 {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic]
// CHECK:STDOUT: %Copy.impl_witness.8af: <witness> = impl_witness imports.%Copy.impl_witness_table.f44, @Int.as.Copy.impl(%int_32) [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.648: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.cae: %Int.as.Copy.impl.Op.type.648 = struct_value () [concrete]
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.8af) [concrete]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete]
// CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete]
// CHECK:STDOUT: %inst.splice_block.426619.9: <instruction> = inst_value [concrete] {
// CHECK:STDOUT: %.724: init %i32 = splice_block %Int.as.Copy.impl.Op.call {
// CHECK:STDOUT: %.7d2: %i32 = specific_inst @Local.%y.ref, @Local(%S)
// CHECK:STDOUT: %impl.elem0.5a8: %.2b9 = impl_witness_access %Copy.impl_witness.8af, element0 [concrete = %Int.as.Copy.impl.Op.cae]
// CHECK:STDOUT: %bound_method.99b: <bound method> = bound_method %.7d2, %impl.elem0.5a8
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.5a8, @Int.as.Copy.impl.Op(%int_32) [concrete = %Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.cbe: <bound method> = bound_method %.7d2, %specific_fn
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.cbe(%.7d2)
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT: %tuple.242: %tuple.type.f7a = tuple_value (%inst.splice_block.426619.9) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)]
// CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @EnclosingTemplate(%T.loc8_32.2: type) {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Local.type: type = fn_type @Local, @EnclosingTemplate(%T.loc8_32.1) [template = %Local.type (constants.%Local.type.3e4)]
// CHECK:STDOUT: %Local: @EnclosingTemplate.%Local.type (%Local.type.3e4) = struct_value () [template = %Local (constants.%Local.667)]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> out %return.param: %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Local.decl: @EnclosingTemplate.%Local.type (%Local.type.3e4) = fn_decl @Local [template = @EnclosingTemplate.%Local (constants.%Local.667)] {
// CHECK:STDOUT: %_.param_patt.loc13_13.1: @Local.%pattern_type.loc13_13 (%pattern_type.51d1c4.2) = value_param_pattern [template = %_.param_patt.loc13_13.2 (constants.%_.param_patt.339)]
// CHECK:STDOUT: %_.patt.loc13_13.1: @Local.%pattern_type.loc13_13 (%pattern_type.51d1c4.2) = wrapper_binding_pattern _, %_.param_patt.loc13_13.1 [template = %_.patt.loc13_13.2 (constants.%_.patt.ace)]
// CHECK:STDOUT: %y.param_patt.loc13_19.1: @Local.%pattern_type.loc13_19 (%pattern_type.940805.1) = value_param_pattern [template = %y.param_patt.loc13_19.2 (constants.%y.param_patt.8246e7.1)]
// CHECK:STDOUT: %y.patt.loc13_19.1: @Local.%pattern_type.loc13_19 (%pattern_type.940805.1) = wrapper_binding_pattern y, %y.param_patt.loc13_19.1 [template = %y.patt.loc13_19.2 (constants.%y.patt.d967f4.1)]
// CHECK:STDOUT: %return.param_patt.loc13_47.1: @Local.%pattern_type.loc13_47 (%pattern_type.940805.2) = out_param_pattern [template = %return.param_patt.loc13_47.2 (constants.%return.param_patt.bcf038.1)]
// CHECK:STDOUT: %return.patt.loc13_34.1: @Local.%pattern_type.loc13_47 (%pattern_type.940805.2) = return_slot_pattern %return.param_patt.loc13_47.1, %.loc13_47.2 [template = %return.patt.loc13_34.2 (constants.%return.patt.690db9.1)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc13_47.2: type = type_of %.loc13_45.5 in [template = %.loc13_45.2 (constants.%.237907.2)] {
// CHECK:STDOUT: %.loc13_44: @Local.%T (%T.67db0b.1) = specific_inst @EnclosingTemplate.%a, @EnclosingTemplate(constants.%T.67db0b.1)
// CHECK:STDOUT: %a.ref.loc13_44: @Local.%T (%T.67db0b.1) = name_ref a, %.loc13_44
// CHECK:STDOUT: %.loc13_45.4: type = type_of_inst %.loc13_45.1 [template = %.loc13_45.2 (constants.%.237907.2)]
// CHECK:STDOUT: %.loc13_45.5: @Local.%.loc13_45.2 (%.237907.2) = splice_inst %.loc13_45.1 [template = %.loc13_45.3 (constants.%.f9658d.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc13_47.3: Core.Form = init_form %.loc13_47.2 [template = %.loc13_47.1 (constants.%.6c4209.1)]
// CHECK:STDOUT: %_.param: @Local.%T (%T.67db0b.1) = value_param call_param0
// CHECK:STDOUT: %.loc13_15.1: type = splice_block %T.ref [template = %T (constants.%T.67db0b.1)] {
// CHECK:STDOUT: %.loc13_15.2: type = specific_constant @EnclosingTemplate.%T.loc8_32.2, @EnclosingTemplate(constants.%T.67db0b.1) [template = %T (constants.%T.67db0b.1)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc13_15.2 [template = %T (constants.%T.67db0b.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %_: @Local.%T (%T.67db0b.1) = wrapper_binding _, %_.param
// CHECK:STDOUT: %y.param: @Local.%.loc13_29.2 (%.237907.1) = value_param call_param1
// CHECK:STDOUT: %.loc13_31: type = type_of %.loc13_29.5 in [template = %.loc13_29.2 (constants.%.237907.1)] {
// CHECK:STDOUT: %.loc13_28: @Local.%T (%T.67db0b.1) = specific_inst @EnclosingTemplate.%a, @EnclosingTemplate(constants.%T.67db0b.1)
// CHECK:STDOUT: %a.ref.loc13_28: @Local.%T (%T.67db0b.1) = name_ref a, %.loc13_28
// CHECK:STDOUT: %.loc13_29.4: type = type_of_inst %.loc13_29.1 [template = %.loc13_29.2 (constants.%.237907.1)]
// CHECK:STDOUT: %.loc13_29.5: @Local.%.loc13_29.2 (%.237907.1) = splice_inst %.loc13_29.1 [template = %.loc13_29.3 (constants.%.f9658d.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %y: @Local.%.loc13_29.2 (%.237907.1) = wrapper_binding y, %y.param
// CHECK:STDOUT: %return.param: ref @Local.%.loc13_45.2 (%.237907.2) = out_param call_param2
// CHECK:STDOUT: %return: ref @Local.%.loc13_45.2 (%.237907.2) = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Local(@EnclosingTemplate.%T.loc8_32.2: type) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template = %T (constants.%T.67db0b.1)]
// CHECK:STDOUT: %pattern_type.loc13_13: type = pattern_type %T [template = %pattern_type.loc13_13 (constants.%pattern_type.51d1c4.2)]
// CHECK:STDOUT: %_.param_patt.loc13_13.2: @Local.%pattern_type.loc13_13 (%pattern_type.51d1c4.2) = value_param_pattern [template = %_.param_patt.loc13_13.2 (constants.%_.param_patt.339)]
// CHECK:STDOUT: %_.patt.loc13_13.2: @Local.%pattern_type.loc13_13 (%pattern_type.51d1c4.2) = wrapper_binding_pattern _, %_.param_patt.loc13_13.2 [template = %_.patt.loc13_13.2 (constants.%_.patt.ace)]
// CHECK:STDOUT: %.loc13_29.1: <instruction> = access_member_action %a.ref.loc13_28, n [template]
// CHECK:STDOUT: %.loc13_29.2: type = type_of_inst %.loc13_29.1 [template = %.loc13_29.2 (constants.%.237907.1)]
// CHECK:STDOUT: %.loc13_29.3: @Local.%.loc13_29.2 (%.237907.1) = splice_inst %.loc13_29.1 [template = %.loc13_29.3 (constants.%.f9658d.1)]
// CHECK:STDOUT: %pattern_type.loc13_19: type = pattern_type %.loc13_29.2 [template = %pattern_type.loc13_19 (constants.%pattern_type.940805.1)]
// CHECK:STDOUT: %y.param_patt.loc13_19.2: @Local.%pattern_type.loc13_19 (%pattern_type.940805.1) = value_param_pattern [template = %y.param_patt.loc13_19.2 (constants.%y.param_patt.8246e7.1)]
// CHECK:STDOUT: %y.patt.loc13_19.2: @Local.%pattern_type.loc13_19 (%pattern_type.940805.1) = wrapper_binding_pattern y, %y.param_patt.loc13_19.2 [template = %y.patt.loc13_19.2 (constants.%y.patt.d967f4.1)]
// CHECK:STDOUT: %.loc13_45.1: <instruction> = access_member_action %a.ref.loc13_44, n [template]
// CHECK:STDOUT: %.loc13_45.2: type = type_of_inst %.loc13_45.1 [template = %.loc13_45.2 (constants.%.237907.2)]
// CHECK:STDOUT: %.loc13_45.3: @Local.%.loc13_45.2 (%.237907.2) = splice_inst %.loc13_45.1 [template = %.loc13_45.3 (constants.%.f9658d.2)]
// CHECK:STDOUT: %.loc13_47.1: Core.Form = init_form %.loc13_45.2 [template = %.loc13_47.1 (constants.%.6c4209.1)]
// CHECK:STDOUT: %pattern_type.loc13_47: type = pattern_type %.loc13_45.2 [template = %pattern_type.loc13_47 (constants.%pattern_type.940805.2)]
// CHECK:STDOUT: %return.param_patt.loc13_47.2: @Local.%pattern_type.loc13_47 (%pattern_type.940805.2) = out_param_pattern [template = %return.param_patt.loc13_47.2 (constants.%return.param_patt.bcf038.1)]
// CHECK:STDOUT: %return.patt.loc13_34.2: @Local.%pattern_type.loc13_47 (%pattern_type.940805.2) = return_slot_pattern %return.param_patt.loc13_47.2, %.loc13_45.2 [template = %return.patt.loc13_34.2 (constants.%return.patt.690db9.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc13_13: <witness> = require_complete_type %T [template = %require_complete.loc13_13 (constants.%require_complete.944)]
// CHECK:STDOUT: %require_complete.loc13_19: <witness> = require_complete_type %.loc13_29.2 [template = %require_complete.loc13_19 (constants.%require_complete.b43ae1.1)]
// CHECK:STDOUT: %require_complete.loc13_34: <witness> = require_complete_type %.loc13_45.2 [template = %require_complete.loc13_34 (constants.%require_complete.b43ae1.2)]
// CHECK:STDOUT: %.loc14_13.2: %tuple.type.f7a = initialize_action %y.ref, %.loc13_45.2, %return.param, none, false [template]
// CHECK:STDOUT: %tuple.elem0: <instruction> = tuple_access %.loc14_13.2, element0 [template]
// CHECK:STDOUT: %.loc14_13.3: @Local.%.loc13_45.2 (%.237907.2) = splice_inst %tuple.elem0 [template = %.loc14_13.3 (constants.%.26b)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%_.param: @Local.%T (%T.67db0b.1), %y.param: @Local.%.loc13_29.2 (%.237907.1)) -> out %return.param: @Local.%.loc13_45.2 (%.237907.2) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %y.ref: @Local.%.loc13_29.2 (%.237907.1) = name_ref y, %y
// CHECK:STDOUT: %.loc14_13.1: @Local.%.loc13_45.2 (%.237907.2) = splice_inst %tuple.elem0 [template = %.loc14_13.3 (constants.%.26b)]
// CHECK:STDOUT: return %.loc14_13.1 to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @EnclosingTemplate(constants.%T.67db0b.1) {
// CHECK:STDOUT: %T.patt.loc8_32.2 => constants.%T.patt.3a0592.1
// CHECK:STDOUT: %T.loc8_32.1 => constants.%T.67db0b.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Local(constants.%T.67db0b.1) {
// CHECK:STDOUT: %T => constants.%T.67db0b.1
// CHECK:STDOUT: %pattern_type.loc13_13 => constants.%pattern_type.51d1c4.2
// CHECK:STDOUT: %_.param_patt.loc13_13.2 => constants.%_.param_patt.339
// CHECK:STDOUT: %_.patt.loc13_13.2 => constants.%_.patt.ace
// CHECK:STDOUT: %.loc13_29.1 => constants.%.e9daaa.1
// CHECK:STDOUT: %.loc13_29.2 => constants.%.237907.3
// CHECK:STDOUT: %.loc13_29.3 => constants.%.f9658d.3
// CHECK:STDOUT: %pattern_type.loc13_19 => constants.%pattern_type.940805.3
// CHECK:STDOUT: %y.param_patt.loc13_19.2 => constants.%y.param_patt.8246e7.2
// CHECK:STDOUT: %y.patt.loc13_19.2 => constants.%y.patt.d967f4.2
// CHECK:STDOUT: %.loc13_45.1 => constants.%.e9daaa.2
// CHECK:STDOUT: %.loc13_45.2 => constants.%.237907.4
// CHECK:STDOUT: %.loc13_45.3 => constants.%.f9658d.4
// CHECK:STDOUT: %.loc13_47.1 => constants.%.6c4209.2
// CHECK:STDOUT: %pattern_type.loc13_47 => constants.%pattern_type.940805.4
// CHECK:STDOUT: %return.param_patt.loc13_47.2 => constants.%return.param_patt.bcf038.2
// CHECK:STDOUT: %return.patt.loc13_34.2 => constants.%return.patt.690db9.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @EnclosingTemplate(constants.%S) {
// CHECK:STDOUT: %T.patt.loc8_32.2 => constants.%T.patt.3a0592.1
// CHECK:STDOUT: %T.loc8_32.1 => constants.%S
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.31e
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a55
// CHECK:STDOUT: %a.patt.loc9_8.2 => constants.%a.patt.2a2
// CHECK:STDOUT: %.loc9_15.3 => constants.%inst.name_ref.426619.1
// CHECK:STDOUT: %.loc9_15.4 => constants.%S.Make.type
// CHECK:STDOUT: %.loc9_15.5 => constants.%S.Make
// CHECK:STDOUT: %.loc9_21.4 => constants.%inst.splice_block.426619.1
// CHECK:STDOUT: %.loc9_21.5 => constants.%S
// CHECK:STDOUT: %.loc9_21.6 => <not constant>
// CHECK:STDOUT: %.loc9_21.7 => constants.%inst.splice_block.426619.2
// CHECK:STDOUT: %.loc9_21.8 => <not constant>
// CHECK:STDOUT: %Local.type => constants.%Local.type.9c3
// CHECK:STDOUT: %Local => constants.%Local.688
// CHECK:STDOUT: %.loc17_17.3 => constants.%inst.name_ref.426619.2
// CHECK:STDOUT: %.loc17_17.4 => constants.%S.Make.type
// CHECK:STDOUT: %.loc17_17.5 => constants.%S.Make
// CHECK:STDOUT: %.loc17_23.3 => constants.%inst.splice_block.426619.3
// CHECK:STDOUT: %.loc17_23.4 => constants.%S
// CHECK:STDOUT: %.loc17_23.5 => <not constant>
// CHECK:STDOUT: %.loc17_27.3 => constants.%inst.splice_block.426619.4
// CHECK:STDOUT: %.loc17_27.4 => constants.%i32
// CHECK:STDOUT: %.loc17_27.5 => <not constant>
// CHECK:STDOUT: %.loc17_29.3 => constants.%inst.splice_block.426619.7
// CHECK:STDOUT: %.loc17_29.4 => constants.%i32
// CHECK:STDOUT: %.loc17_29.5 => <not constant>
// CHECK:STDOUT: %.loc17_30.2 => constants.%inst.splice_block.426619.8
// CHECK:STDOUT: %.loc17_30.3 => <not constant>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Local(constants.%S) {
// CHECK:STDOUT: %T => constants.%S
// CHECK:STDOUT: %pattern_type.loc13_13 => constants.%pattern_type.a55
// CHECK:STDOUT: %_.param_patt.loc13_13.2 => constants.%_.param_patt.230
// CHECK:STDOUT: %_.patt.loc13_13.2 => constants.%_.patt.e4c
// CHECK:STDOUT: %.loc13_29.1 => constants.%inst.splice_block.426619.5
// CHECK:STDOUT: %.loc13_29.2 => constants.%i32
// CHECK:STDOUT: %.loc13_29.3 => <not constant>
// CHECK:STDOUT: %pattern_type.loc13_19 => constants.%pattern_type.d94
// CHECK:STDOUT: %y.param_patt.loc13_19.2 => constants.%y.param_patt.665
// CHECK:STDOUT: %y.patt.loc13_19.2 => constants.%y.patt.e18
// CHECK:STDOUT: %.loc13_45.1 => constants.%inst.splice_block.426619.6
// CHECK:STDOUT: %.loc13_45.2 => constants.%i32
// CHECK:STDOUT: %.loc13_45.3 => <not constant>
// CHECK:STDOUT: %.loc13_47.1 => constants.%.0b3
// CHECK:STDOUT: %pattern_type.loc13_47 => constants.%pattern_type.d94
// CHECK:STDOUT: %return.param_patt.loc13_47.2 => constants.%return.param_patt.299
// CHECK:STDOUT: %return.patt.loc13_34.2 => constants.%return.patt.6fa
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc13_13 => constants.%complete_type.31e
// CHECK:STDOUT: %require_complete.loc13_19 => constants.%complete_type.f8a
// CHECK:STDOUT: %require_complete.loc13_34 => constants.%complete_type.f8a
// CHECK:STDOUT: %.loc14_13.2 => constants.%tuple.242
// CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.9
// CHECK:STDOUT: %.loc14_13.3 => <not constant>
// CHECK:STDOUT: }
// CHECK:STDOUT:
+10 -8
View File
@@ -2456,8 +2456,8 @@ fn Run() {
// CHECK:STDOUT: %A.type: type = parameterized_class_name_type @A [concrete]
// CHECK:STDOUT: %A.generic: %A.type = struct_value () [concrete]
// CHECK:STDOUT: %A.59f: type = class_type @A, @A(%T) [template]
// CHECK:STDOUT: %.72e: type = type_of_inst @A.MakeA.%.loc12_20.1 [template]
// CHECK:STDOUT: %.41c: %.72e = splice_inst @A.MakeA.%.loc12_20.1 [template]
// CHECK:STDOUT: %.23e: type = type_of_inst @A.MakeA.%.loc12_20.1 [template]
// CHECK:STDOUT: %.296: %.23e = splice_inst @A.MakeA.%.loc12_20.1 [template]
// CHECK:STDOUT: %.5372ba.1: type = splice_inst @A.MakeA.%.loc12_20.4 [template]
// CHECK:STDOUT: %.cd79f1.1: Core.Form = init_form %.5372ba.1 [template]
// CHECK:STDOUT: %pattern_type.fcb8f3.1: type = pattern_type %.5372ba.1 [template]
@@ -2629,9 +2629,10 @@ fn Run() {
// CHECK:STDOUT: %return.patt.loc12_14.1: @A.MakeA.%pattern_type (%pattern_type.fcb8f3.1) = return_slot_pattern %return.param_patt.loc12_20.1, %.loc12_20.9 [template = %return.patt.loc12_14.2 (constants.%return.patt.7fc6a1.1)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A.generic]
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, @A.%T.loc10_19.2 [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc12_20.7: type = type_of_inst %.loc12_20.1 [template = %.loc12_20.2 (constants.%.72e)]
// CHECK:STDOUT: %.loc12_20.8: @A.MakeA.%.loc12_20.2 (%.72e) = splice_inst %.loc12_20.1 [template = %.loc12_20.3 (constants.%.41c)]
// CHECK:STDOUT: %.loc12_19: type = specific_constant @A.%T.loc10_19.2, @A(constants.%T) [template = %T (constants.%T)]
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %.loc12_19 [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc12_20.7: type = type_of_inst %.loc12_20.1 [template = %.loc12_20.2 (constants.%.23e)]
// CHECK:STDOUT: %.loc12_20.8: @A.MakeA.%.loc12_20.2 (%.23e) = splice_inst %.loc12_20.1 [template = %.loc12_20.3 (constants.%.296)]
// CHECK:STDOUT: %.loc12_20.9: type = splice_inst %.loc12_20.4 [template = %.loc12_20.5 (constants.%.5372ba.1)]
// CHECK:STDOUT: %.loc12_20.10: Core.Form = init_form %.loc12_20.9 [template = %.loc12_20.6 (constants.%.cd79f1.1)]
// CHECK:STDOUT: %return.param: ref @A.MakeA.%.loc12_20.5 (%.5372ba.1) = out_param call_param0
@@ -2652,8 +2653,8 @@ fn Run() {
// CHECK:STDOUT: generic fn @A.MakeA(@A.%T.loc10_19.2: type) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc12_20.1: <instruction> = call_action (%A.ref, %T.ref.loc12), false [template]
// CHECK:STDOUT: %.loc12_20.2: type = type_of_inst %.loc12_20.1 [template = %.loc12_20.2 (constants.%.72e)]
// CHECK:STDOUT: %.loc12_20.3: @A.MakeA.%.loc12_20.2 (%.72e) = splice_inst %.loc12_20.1 [template = %.loc12_20.3 (constants.%.41c)]
// CHECK:STDOUT: %.loc12_20.2: type = type_of_inst %.loc12_20.1 [template = %.loc12_20.2 (constants.%.23e)]
// CHECK:STDOUT: %.loc12_20.3: @A.MakeA.%.loc12_20.2 (%.23e) = splice_inst %.loc12_20.1 [template = %.loc12_20.3 (constants.%.296)]
// CHECK:STDOUT: %.loc12_20.4: <instruction> = convert_to_value_action %.loc12_20.8, type [template]
// CHECK:STDOUT: %.loc12_20.5: type = splice_inst %.loc12_20.4 [template = %.loc12_20.5 (constants.%.5372ba.1)]
// CHECK:STDOUT: %.loc12_20.6: Core.Form = init_form %.loc12_20.5 [template = %.loc12_20.6 (constants.%.cd79f1.1)]
@@ -2677,7 +2678,8 @@ fn Run() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> out %return.param: @A.MakeA.%.loc12_20.5 (%.5372ba.1) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, @A.%T.loc10_19.2 [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc13_22: type = specific_constant @A.%T.loc10_19.2, @A(constants.%T) [template = %T (constants.%T)]
// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %.loc13_22 [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc13_23.1: type = type_of_inst %.loc13_23.3 [template = %.loc13_23.4 (constants.%.a08)]
// CHECK:STDOUT: %.loc13_23.2: @A.MakeA.%.loc13_23.4 (%.a08) = splice_inst %.loc13_23.3 [template = %.loc13_23.5 (constants.%.5c2)]
// CHECK:STDOUT: %.loc13_30.1: type = type_of_inst %.loc13_30.3 [template = %.loc13_30.4 (constants.%.308)]
@@ -21,7 +21,7 @@ class Class(template T: type) {
var n: T;
}
// CHECK:STDERR: fail_todo_basic.carbon:[[@LINE+7]]:30: error: type `<pattern for <splice of <cannot stringify inst7800007A: {kind: ConvertToValueAction, arg0: inst78000077, arg1: inst(TypeType), type: type(inst(InstType))}>>>` of parameter 1 in redeclaration differs from previous parameter type `<pattern for T>` [RedeclParamDiffersType]
// CHECK:STDERR: fail_todo_basic.carbon:[[@LINE+7]]:30: error: type `<pattern for <splice of <cannot stringify inst7800007F: {kind: ConvertToValueAction, arg0: inst7800007C, arg1: inst(TypeType), type: type(inst(InstType))}>>>` of parameter 1 in redeclaration differs from previous parameter type `<pattern for T>` [RedeclParamDiffersType]
// CHECK:STDERR: fn Class(template T: type).F(n: T.U) -> T.U {
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: fail_todo_basic.carbon:[[@LINE-8]]:8: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
@@ -32,7 +32,7 @@ fn Class(template T: type).F(n: T.U) -> T.U {
return n;
}
// CHECK:STDERR: fail_todo_basic.carbon:[[@LINE+7]]:1: error: function redeclaration differs because return type is `<splice of <cannot stringify inst780000D8: {kind: ConvertToValueAction, arg0: inst780000D5, arg1: inst(TypeType), type: type(inst(InstType))}>>` [FunctionRedeclReturnTypeDiffers]
// CHECK:STDERR: fail_todo_basic.carbon:[[@LINE+7]]:1: error: function redeclaration differs because return type is `<splice of <cannot stringify inst780000DF: {kind: ConvertToValueAction, arg0: inst780000DC, arg1: inst(TypeType), type: type(inst(InstType))}>>` [FunctionRedeclReturnTypeDiffers]
// CHECK:STDERR: fn Class(template T: type).G(self) -> T.U {
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_todo_basic.carbon:[[@LINE-18]]:3: note: previously declared with return type `T` [FunctionRedeclReturnTypePrevious]
@@ -139,14 +139,16 @@ fn Class(template T: type).G(self) -> T.U {
// CHECK:STDOUT: %.loc18_22.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc18_20: type = symbolic_binding T, 0, template [template = @Class.%T.loc5_23.1 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc18_41: type = name_ref T, %T.loc18_20 [template = %T.loc18_33 (constants.%T)]
// CHECK:STDOUT: %.loc18_41: type = specific_constant %T.loc18_20, @Class(constants.%T) [template = %T.loc18_33 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc18_41: type = name_ref T, %.loc18_41 [template = %T.loc18_33 (constants.%T)]
// CHECK:STDOUT: %.loc18_42.7: type = type_of_inst %.loc18_42.1 [template = %.loc18_42.2 (constants.%.eff391.2)]
// CHECK:STDOUT: %.loc18_42.8: @Class.F.loc18.%.loc18_42.2 (%.eff391.2) = splice_inst %.loc18_42.1 [template = %.loc18_42.3 (constants.%.b66113.2)]
// CHECK:STDOUT: %.loc18_42.9: type = splice_inst %.loc18_42.4 [template = %.loc18_42.5 (constants.%.5372ba.2)]
// CHECK:STDOUT: %.loc18_42.10: Core.Form = init_form %.loc18_42.9 [template = %.loc18_42.6 (constants.%.cd79f1.1)]
// CHECK:STDOUT: %n.param: @Class.F.loc18.%.loc18_34.5 (%.5372ba.1) = value_param call_param0
// CHECK:STDOUT: %.loc18_34.6: type = splice_block %.loc18_34.9 [template = %.loc18_34.5 (constants.%.5372ba.1)] {
// CHECK:STDOUT: %T.ref.loc18_33: type = name_ref T, %T.loc18_20 [template = %T.loc18_33 (constants.%T)]
// CHECK:STDOUT: %.loc18_33: type = specific_constant %T.loc18_20, @Class(constants.%T) [template = %T.loc18_33 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc18_33: type = name_ref T, %.loc18_33 [template = %T.loc18_33 (constants.%T)]
// CHECK:STDOUT: %.loc18_34.7: type = type_of_inst %.loc18_34.1 [template = %.loc18_34.2 (constants.%.eff391.1)]
// CHECK:STDOUT: %.loc18_34.8: @Class.F.loc18.%.loc18_34.2 (%.eff391.1) = splice_inst %.loc18_34.1 [template = %.loc18_34.3 (constants.%.b66113.1)]
// CHECK:STDOUT: %.loc18_34.9: type = splice_inst %.loc18_34.4 [template = %.loc18_34.5 (constants.%.5372ba.1)]
@@ -166,7 +168,8 @@ fn Class(template T: type).G(self) -> T.U {
// CHECK:STDOUT: %.loc29_22.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc29_20: type = symbolic_binding T, 0, template [template = @Class.%T.loc5_23.1 (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc29_20 [template = %T.loc29_30 (constants.%T)]
// CHECK:STDOUT: %.loc29_39: type = specific_constant %T.loc29_20, @Class(constants.%T) [template = %T.loc29_30 (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc29_39 [template = %T.loc29_30 (constants.%T)]
// CHECK:STDOUT: %.loc29_40.7: type = type_of_inst %.loc29_40.1 [template = %.loc29_40.2 (constants.%.eff391.4)]
// CHECK:STDOUT: %.loc29_40.8: @Class.G.loc29.%.loc29_40.2 (%.eff391.4) = splice_inst %.loc29_40.1 [template = %.loc29_40.3 (constants.%.b66113.4)]
// CHECK:STDOUT: %.loc29_40.9: type = splice_inst %.loc29_40.4 [template = %.loc29_40.5 (constants.%.5372ba.4)]
@@ -204,10 +207,14 @@ fn Class(template T: type).G(self) -> T.U {
// CHECK:STDOUT: %return.param_patt.loc6_17.1: @Class.F.loc6.%pattern_type (%pattern_type.51d) = out_param_pattern [template = %return.param_patt.loc6_17.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc6_14.1: @Class.F.loc6.%pattern_type (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_17.1, %T.ref.loc6_17 [template = %return.patt.loc6_14.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc6_17: type = name_ref T, @Class.%T.loc5_23.2 [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc6_17.2: Core.Form = init_form %T.ref.loc6_17 [template = %.loc6_17.1 (constants.%.184)]
// CHECK:STDOUT: %.loc6_17.2: type = specific_constant @Class.%T.loc5_23.2, @Class(constants.%T) [template = %T (constants.%T)]
// CHECK:STDOUT: %T.ref.loc6_17: type = name_ref T, %.loc6_17.2 [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc6_17.3: Core.Form = init_form %T.ref.loc6_17 [template = %.loc6_17.1 (constants.%.184)]
// CHECK:STDOUT: %n.param: @Class.F.loc6.%T (%T) = value_param call_param0
// CHECK:STDOUT: %T.ref.loc6_11: type = name_ref T, @Class.%T.loc5_23.2 [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc6_11.1: type = splice_block %T.ref.loc6_11 [template = %T (constants.%T)] {
// CHECK:STDOUT: %.loc6_11.2: type = specific_constant @Class.%T.loc5_23.2, @Class(constants.%T) [template = %T (constants.%T)]
// CHECK:STDOUT: %T.ref.loc6_11: type = name_ref T, %.loc6_11.2 [template = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %n: @Class.F.loc6.%T (%T) = wrapper_binding n, %n.param
// CHECK:STDOUT: %return.param: ref @Class.F.loc6.%T (%T) = out_param call_param1
// CHECK:STDOUT: %return: ref @Class.F.loc6.%T (%T) = return_slot %return.param
@@ -218,8 +225,9 @@ fn Class(template T: type).G(self) -> T.U {
// CHECK:STDOUT: %return.param_patt.loc7_17.1: @Class.G.loc7.%pattern_type.loc7_17 (%pattern_type.51d) = out_param_pattern [template = %return.param_patt.loc7_17.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc7_14.1: @Class.G.loc7.%pattern_type.loc7_17 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc7_17.1, %T.ref [template = %return.patt.loc7_14.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc5_23.2 [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc7_17.2: Core.Form = init_form %T.ref [template = %.loc7_17.1 (constants.%.184)]
// CHECK:STDOUT: %.loc7_17.2: type = specific_constant @Class.%T.loc5_23.2, @Class(constants.%T) [template = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc7_17.2 [template = %T (constants.%T)]
// CHECK:STDOUT: %.loc7_17.3: Core.Form = init_form %T.ref [template = %.loc7_17.1 (constants.%.184)]
// CHECK:STDOUT: %self.param: @Class.G.loc7.%Class (%Class) = value_param call_param0
// CHECK:STDOUT: %.loc7_8.1: type = splice_block %Self.ref [template = %Class (constants.%Class)] {
// CHECK:STDOUT: %.loc7_8.2: type = specific_constant constants.%Class, @Class(constants.%T) [template = %Class (constants.%Class)]
+3 -2
View File
@@ -181,8 +181,9 @@ fn InstanceCallFail() {
// CHECK:STDOUT: %return.param_patt.loc4_23.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc4_23.2 (constants.%return.param_patt)]
// CHECK:STDOUT: %return.patt.loc4_20.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc4_23.1, %Dest.ref [symbolic = %return.patt.loc4_20.2 (constants.%return.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc3_26.2 [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %.loc4_23.2: Core.Form = init_form %Dest.ref [symbolic = %.loc4_23.1 (constants.%.184)]
// CHECK:STDOUT: %.loc4_23.2: type = specific_constant @ImplicitAs.%Dest.loc3_26.2, @ImplicitAs(constants.%Dest) [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, %.loc4_23.2 [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %.loc4_23.3: Core.Form = init_form %Dest.ref [symbolic = %.loc4_23.1 (constants.%.184)]
// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc4_14.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.3 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.b02) = specific_constant @ImplicitAs.%Self.loc3_34.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)]
+16 -8
View File
@@ -281,8 +281,9 @@ class X(U: type) {
// CHECK:STDOUT: %return.param_patt.loc5_13.1: @HasF.WithSelf.F.%pattern_type (%pattern_type.51d1c4.1) = out_param_pattern [symbolic = %return.param_patt.loc5_13.2 (constants.%return.param_patt.41d2d9.1)]
// CHECK:STDOUT: %return.patt.loc5_10.1: @HasF.WithSelf.F.%pattern_type (%pattern_type.51d1c4.1) = return_slot_pattern %return.param_patt.loc5_13.1, %T.ref [symbolic = %return.patt.loc5_10.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @HasF.%T.loc4_17.2 [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %.loc5_13.2: Core.Form = init_form %T.ref [symbolic = %.loc5_13.1 (constants.%.184347.1)]
// CHECK:STDOUT: %.loc5_13.2: type = specific_constant @HasF.%T.loc4_17.2, @HasF(constants.%T.67d) [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc5_13.2 [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %.loc5_13.3: Core.Form = init_form %T.ref [symbolic = %.loc5_13.1 (constants.%.184347.1)]
// CHECK:STDOUT: %return.param: ref @HasF.WithSelf.F.%T (%T.67d) = out_param call_param0
// CHECK:STDOUT: %return: ref @HasF.WithSelf.F.%T (%T.67d) = return_slot %return.param
// CHECK:STDOUT: }
@@ -654,7 +655,10 @@ class X(U: type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type) = wrapper_binding self, %self.param
// CHECK:STDOUT: %t.param: @I.WithSelf.F.%T (%T) = value_param call_param1
// CHECK:STDOUT: %T.ref: type = name_ref T, @I.%T.loc4_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc5_17.1: type = splice_block %T.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc5_17.2: type = specific_constant @I.%T.loc4_14.2, @I(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc5_17.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %t: @I.WithSelf.F.%T (%T) = wrapper_binding t, %t.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc0.loc5_19.1: @I.WithSelf.%I.assoc_type (%I.assoc_type.a2b03f.1) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc5_19.2 (constants.%assoc0.e82d38.1)]
@@ -675,7 +679,7 @@ class X(U: type) {
// CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %X: type = class_type @X, @X(%U) [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %I.type.loc9_21.1: type = facet_type <@I, @I(%U)> [symbolic = %I.type.loc9_21.1 (constants.%I.type.1843af.2)]
// CHECK:STDOUT: %.loc9: <witness> = impl_self_witness %X, @I, @I(%U) [symbolic = %.loc9 (constants.%.0ea)]
// CHECK:STDOUT: %.loc9_23: <witness> = impl_self_witness %X, @I, @I(%U) [symbolic = %.loc9_23 (constants.%.0ea)]
// CHECK:STDOUT: %I.impl_witness.loc9_23.2: <witness> = impl_witness %I.impl_witness_table, @X.as.I.impl(%U) [symbolic = %I.impl_witness.loc9_23.2 (constants.%I.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -697,7 +701,10 @@ class X(U: type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @X.as.I.impl.F.%X (%X) = wrapper_binding self, %self.param
// CHECK:STDOUT: %t.param: @X.as.I.impl.F.%U (%U) = value_param call_param1
// CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc8_10.2 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %.loc10_33.1: type = splice_block %U.ref [symbolic = %U (constants.%U)] {
// CHECK:STDOUT: %.loc10_33.2: type = specific_constant @X.%U.loc8_10.2, @X(constants.%U) [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %U.ref: type = name_ref U, %.loc10_33.2 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %t: @X.as.I.impl.F.%U (%U) = wrapper_binding t, %t.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%X.as.I.impl.F.decl), @X.as.I.impl [concrete]
@@ -723,10 +730,11 @@ class X(U: type) {
// CHECK:STDOUT: impl_decl @X.as.I.impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%X [symbolic = %X (constants.%X)]
// CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
// CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc8_10.2 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %.loc9_20: type = specific_constant @X.%U.loc8_10.2, @X(constants.%U) [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %U.ref: type = name_ref U, %.loc9_20 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %I.type.loc9_21.2: type = facet_type <@I, @I(constants.%U)> [symbolic = %I.type.loc9_21.1 (constants.%I.type.1843af.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc9_23: <witness> = impl_self_witness @X.as.I.impl.%Self.ref, @I, @I(constants.%U) [symbolic = @X.as.I.impl.%.loc9 (constants.%.0ea)]
// CHECK:STDOUT: %.loc9_23: <witness> = impl_self_witness @X.as.I.impl.%Self.ref, @I, @I(constants.%U) [symbolic = @X.as.I.impl.%.loc9_23 (constants.%.0ea)]
// CHECK:STDOUT: %.loc9_21: type = specific_constant @X.as.I.impl.%I.type.loc9_21.2, @X.as.I.impl(constants.%U) [symbolic = %I.type (constants.%I.type.1843af.2)]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -816,7 +824,7 @@ class X(U: type) {
// CHECK:STDOUT: %U => constants.%U
// CHECK:STDOUT: %X => constants.%X
// CHECK:STDOUT: %I.type.loc9_21.1 => constants.%I.type.1843af.2
// CHECK:STDOUT: %.loc9 => constants.%.0ea
// CHECK:STDOUT: %.loc9_23 => constants.%.0ea
// CHECK:STDOUT: %I.impl_witness.loc9_23.2 => constants.%I.impl_witness
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -90,7 +90,10 @@ class C {
// CHECK:STDOUT: %x.patt.loc16_9.1: @GenericInterface.WithSelf.F.%pattern_type (%pattern_type.51d) = wrapper_binding_pattern x, %x.param_patt.loc16_9.1 [symbolic = %x.patt.loc16_9.2 (constants.%x.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: @GenericInterface.WithSelf.F.%T (%T) = value_param call_param0
// CHECK:STDOUT: %T.ref: type = name_ref T, @GenericInterface.%T.loc15_29.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc16_11.1: type = splice_block %T.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc16_11.2: type = specific_constant @GenericInterface.%T.loc15_29.2, @GenericInterface(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc16_11.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @GenericInterface.WithSelf.F.%T (%T) = wrapper_binding x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc0.loc16_13.1: @GenericInterface.WithSelf.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %GenericInterface.WithSelf.F.decl [symbolic = %assoc0.loc16_13.2 (constants.%assoc0)]
@@ -123,7 +126,10 @@ class C {
// CHECK:STDOUT: %x.patt.loc25_18.1: @C.as.GenericInterface.impl.F.%pattern_type (%pattern_type.51d) = wrapper_binding_pattern x, %x.param_patt.loc25_18.1 [symbolic = %x.patt.loc25_18.2 (constants.%x.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: @C.as.GenericInterface.impl.F.%T (%T) = value_param call_param0
// CHECK:STDOUT: %T.ref: type = name_ref T, @C.as.GenericInterface.impl.%T.loc24_24.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc25_20.1: type = splice_block %T.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc25_20.2: type = specific_constant @C.as.GenericInterface.impl.%T.loc24_24.2, @C.as.GenericInterface.impl(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc25_20.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @C.as.GenericInterface.impl.F.%T (%T) = wrapper_binding x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %GenericInterface.impl_witness_table = impl_witness_table (), @C.as.GenericInterface.impl [concrete]
+10 -5
View File
@@ -267,7 +267,8 @@ impl forall [T: type] D as N(T*) {}
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.as_type.loc5_18.1: type = facet_access_type @J.%Self.loc4_22.1 [symbolic = %Self.as_type.loc5_18.2 (constants.%Self.as_type)]
// CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @J.%T.loc4_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc5: type = specific_constant @J.%T.loc4_14.2, @J(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc5 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %I.type.loc5_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.184)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc5: type = specific_constant @J.WithSelf.Self.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.WithSelf.Self.as_type.impls.I.type.require(constants.%T, constants.%Self.55b) [symbolic = %I.type (constants.%I.type.184)]
@@ -635,7 +636,8 @@ impl forall [T: type] D as N(T*) {}
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.as_type.loc5_18.1: type = facet_access_type @J.%Self.loc4_23.1 [symbolic = %Self.as_type.loc5_18.2 (constants.%Self.as_type)]
// CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @J.%T.loc4_15.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc5: type = specific_constant @J.%T.loc4_15.2, @J(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc5 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %I.type.loc5_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.184)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc5: type = specific_constant @J.WithSelf.Self.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.WithSelf.Self.as_type.impls.I.type.require(constants.%T, constants.%Self.22b) [symbolic = %I.type (constants.%I.type.184)]
@@ -1031,7 +1033,8 @@ impl forall [T: type] D as N(T*) {}
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.as_type.loc15_18.1: type = facet_access_type @N.%Self.loc14_23.1 [symbolic = %Self.as_type.loc15_18.2 (constants.%Self.as_type)]
// CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc14_15.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc15: type = specific_constant @N.%T.loc14_15.2, @N(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc15 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %I.type.loc15_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc15_27.2 (constants.%I.type.184)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc15: type = specific_constant @N.WithSelf.Self.as_type.impls.I.type.require.%I.type.loc15_27.1, @N.WithSelf.Self.as_type.impls.I.type.require(constants.%T, constants.%Self.22b) [symbolic = %I.type (constants.%I.type.184)]
@@ -1727,7 +1730,8 @@ impl forall [T: type] D as N(T*) {}
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.as_type.loc10_18.1: type = facet_access_type @N.%Self.loc9_23.1 [symbolic = %Self.as_type.loc10_18.2 (constants.%Self.as_type)]
// CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc9_15.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc10: type = specific_constant @N.%T.loc9_15.2, @N(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc10 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %I.type.loc10_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc10_27.2 (constants.%I.type.184)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc10: type = specific_constant @N.WithSelf.Self.as_type.impls.I.type.require.%I.type.loc10_27.1, @N.WithSelf.Self.as_type.impls.I.type.require(constants.%T, constants.%Self.22b) [symbolic = %I.type (constants.%I.type.184)]
@@ -2274,7 +2278,8 @@ impl forall [T: type] D as N(T*) {}
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.as_type.loc8_18.1: type = facet_access_type @N.%Self.loc7_23.1 [symbolic = %Self.as_type.loc8_18.2 (constants.%Self.as_type)]
// CHECK:STDOUT: %J.ref: %J.type.23c = name_ref J, file.%J.decl [concrete = constants.%J.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc7_15.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc8: type = specific_constant @N.%T.loc7_15.2, @N(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc8 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %J.type.loc8_27.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_27.2 (constants.%J.type.ed5)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8: type = specific_constant @N.WithSelf.Self.as_type.impls.J.type.require.%J.type.loc8_27.1, @N.WithSelf.Self.as_type.impls.J.type.require(constants.%T, constants.%Self.22b) [symbolic = %J.type (constants.%J.type.ed5)]
+3 -2
View File
@@ -271,9 +271,10 @@ fn G() {
// CHECK:STDOUT: %x.patt.loc8_16.1: @C.as.I.impl.F.loc8_24.1.%pattern_type (%pattern_type.a58) = wrapper_binding_pattern x, %x.param_patt.loc8_16.1 [symbolic = %x.patt.loc8_16.2 (constants.%x.patt.642)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: @C.as.I.impl.F.loc8_24.1.%C.loc8_21.1 (%C.49b051.2) = value_param call_param0
// CHECK:STDOUT: %.loc8: type = splice_block %C.loc8_21.2 [symbolic = %C.loc8_21.1 (constants.%C.49b051.2)] {
// CHECK:STDOUT: %.loc8_21: type = splice_block %C.loc8_21.2 [symbolic = %C.loc8_21.1 (constants.%C.49b051.2)] {
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
// CHECK:STDOUT: %Y.ref: %empty_tuple.type = name_ref Y, @C.as.I.impl.%Y.loc7_15.2 [symbolic = %Y (constants.%Y)]
// CHECK:STDOUT: %.loc8_20: %empty_tuple.type = specific_constant @C.as.I.impl.%Y.loc7_15.2, @C.as.I.impl(constants.%Y) [symbolic = %Y (constants.%Y)]
// CHECK:STDOUT: %Y.ref: %empty_tuple.type = name_ref Y, %.loc8_20 [symbolic = %Y (constants.%Y)]
// CHECK:STDOUT: %C.loc8_21.2: type = class_type @C, @C(constants.%Y) [symbolic = %C.loc8_21.1 (constants.%C.49b051.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @C.as.I.impl.F.loc8_24.1.%C.loc8_21.1 (%C.49b051.2) = wrapper_binding x, %x.param
+9 -6
View File
@@ -174,8 +174,9 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %return.param_patt.loc4_23.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc4_23.2 (constants.%return.param_patt)]
// CHECK:STDOUT: %return.patt.loc4_20.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc4_23.1, %Dest.ref [symbolic = %return.patt.loc4_20.2 (constants.%return.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc3_26.2 [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %.loc4_23.2: Core.Form = init_form %Dest.ref [symbolic = %.loc4_23.1 (constants.%.184)]
// CHECK:STDOUT: %.loc4_23.2: type = specific_constant @ImplicitAs.%Dest.loc3_26.2, @ImplicitAs(constants.%Dest) [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, %.loc4_23.2 [symbolic = %Dest (constants.%Dest)]
// CHECK:STDOUT: %.loc4_23.3: Core.Form = init_form %Dest.ref [symbolic = %.loc4_23.1 (constants.%.184)]
// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc4_14.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.3 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.b02) = specific_constant @ImplicitAs.%Self.loc3_34.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)]
@@ -1033,8 +1034,9 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %return.param_patt.loc6_16.1: @Factory.WithSelf.Make.%pattern_type (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_16.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc6_13.1: @Factory.WithSelf.Make.%pattern_type (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_16.1, %T.ref [symbolic = %return.patt.loc6_13.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Factory.%T.loc4_20.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc6_16.2: Core.Form = init_form %T.ref [symbolic = %.loc6_16.1 (constants.%.184)]
// CHECK:STDOUT: %.loc6_16.2: type = specific_constant @Factory.%T.loc4_20.2, @Factory(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc6_16.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc6_16.3: Core.Form = init_form %T.ref [symbolic = %.loc6_16.1 (constants.%.184)]
// CHECK:STDOUT: %return.param: ref @Factory.WithSelf.Make.%T (%T) = out_param call_param0
// CHECK:STDOUT: %return: ref @Factory.WithSelf.Make.%T (%T) = return_slot %return.param
// CHECK:STDOUT: }
@@ -1045,8 +1047,9 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %return.param_patt.loc8_22.1: @Factory.WithSelf.Method.%pattern_type.loc8_22 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc8_22.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc8_19.1: @Factory.WithSelf.Method.%pattern_type.loc8_22 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc8_22.1, %T.ref [symbolic = %return.patt.loc8_19.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Factory.%T.loc4_20.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc8_22.2: Core.Form = init_form %T.ref [symbolic = %.loc8_22.1 (constants.%.184)]
// CHECK:STDOUT: %.loc8_22.2: type = specific_constant @Factory.%T.loc4_20.2, @Factory(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc8_22.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc8_22.3: Core.Form = init_form %T.ref [symbolic = %.loc8_22.1 (constants.%.184)]
// CHECK:STDOUT: %self.param: @Factory.WithSelf.Method.%Self.as_type.loc8_13.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.3 [symbolic = %Self.as_type.loc8_13.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %.loc8_13.2: @Factory.WithSelf.Method.%Factory.type (%Factory.type.377) = specific_constant @Factory.%Self.loc4_28.1, @Factory(constants.%T) [symbolic = %Self (constants.%Self.c06)]
+22 -6
View File
@@ -262,7 +262,10 @@ fn G(x: A) {
// CHECK:STDOUT: %self.patt.loc9_15.1: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = wrapper_binding_pattern self, %self.param_patt.loc9_15.1 [symbolic = %self.patt.loc9_15.2 (constants.%self.patt.4d9)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc9_15.1: type = splice_block %Self.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc9_15.2: type = specific_constant @T.as.HasF.impl.%T.ref, @T.as.HasF.impl(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc9_15.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
@@ -576,11 +579,15 @@ fn G(x: A) {
// CHECK:STDOUT: %return.param_patt.loc9_18.1: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc9_18.2 (constants.%return.param_patt.27f)]
// CHECK:STDOUT: %return.patt.loc9_14.1: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc9_18.1, %ptr.loc9_18 [symbolic = %return.patt.loc9_14.2 (constants.%return.patt.d67)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @ptr.as.HasF.impl.%T.loc8_15.2 [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %.loc9_17: type = specific_constant @ptr.as.HasF.impl.%T.loc8_15.2, @ptr.as.HasF.impl(constants.%T.67d) [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc9_17 [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %ptr.loc9_18: type = ptr_type %T.ref [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)]
// CHECK:STDOUT: %.loc9_18.2: Core.Form = init_form %ptr.loc9_18 [symbolic = %.loc9_18.1 (constants.%.cb6)]
// CHECK:STDOUT: %self.param: @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @ptr.as.HasF.impl.%ptr.loc8_24.2 [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)]
// CHECK:STDOUT: %.loc9_8.1: type = splice_block %Self.ref [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)] {
// CHECK:STDOUT: %.loc9_8.2: type = specific_constant @ptr.as.HasF.impl.%ptr.loc8_24.2, @ptr.as.HasF.impl(constants.%T.67d) [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc9_8.2 [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = wrapper_binding self, %self.param
// CHECK:STDOUT: %return.param: ref @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = out_param call_param1
// CHECK:STDOUT: %return: ref @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = return_slot %return.param
@@ -910,7 +917,10 @@ fn G(x: A) {
// CHECK:STDOUT: %self.patt.loc11_15.1: @C.as.HasF.impl.F.%pattern_type (%pattern_type.563) = wrapper_binding_pattern self, %self.param_patt.loc11_15.1 [symbolic = %self.patt.loc11_15.2 (constants.%self.patt.8ba)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @C.as.HasF.impl.F.%C (%C.04a) = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.HasF.impl.%C.loc10_26.2 [symbolic = %C (constants.%C.04a)]
// CHECK:STDOUT: %.loc11_15.1: type = splice_block %Self.ref [symbolic = %C (constants.%C.04a)] {
// CHECK:STDOUT: %.loc11_15.2: type = specific_constant @C.as.HasF.impl.%C.loc10_26.2, @C.as.HasF.impl(constants.%T) [symbolic = %C (constants.%C.04a)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc11_15.2 [symbolic = %C (constants.%C.04a)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @C.as.HasF.impl.F.%C (%C.04a) = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%C.as.HasF.impl.F.decl), @C.as.HasF.impl [concrete]
@@ -1526,7 +1536,10 @@ fn G(x: A) {
// CHECK:STDOUT: %self.patt.loc13_15.1: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = wrapper_binding_pattern self, %self.param_patt.loc13_15.1 [symbolic = %self.patt.loc13_15.2 (constants.%self.patt.4d9)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc13_15.1: type = splice_block %Self.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc13_15.2: type = specific_constant @T.as.HasF.impl.%T.ref, @T.as.HasF.impl(constants.%T, constants.%U) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13_15.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (), @T.as.HasF.impl [concrete]
@@ -1762,7 +1775,10 @@ fn G(x: A) {
// CHECK:STDOUT: %self.patt.loc9_15.1: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = wrapper_binding_pattern self, %self.param_patt.loc9_15.1 [symbolic = %self.patt.loc9_15.2 (constants.%self.patt.4d9)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref.loc8_23 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc9_15.1: type = splice_block %Self.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc9_15.2: type = specific_constant @T.as.HasF.impl.%T.ref.loc8_23, @T.as.HasF.impl(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc9_15.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
+6 -2
View File
@@ -195,11 +195,15 @@ fn TestSpecific(a: A({})*) -> {}* {
// CHECK:STDOUT: %return.param_patt.loc13_22.1: @A.as.I.impl.F.%pattern_type.loc13_22 (%pattern_type.4f4b84.2) = out_param_pattern [symbolic = %return.param_patt.loc13_22.2 (constants.%return.param_patt.27f587.2)]
// CHECK:STDOUT: %return.patt.loc13_18.1: @A.as.I.impl.F.%pattern_type.loc13_22 (%pattern_type.4f4b84.2) = return_slot_pattern %return.param_patt.loc13_22.1, %ptr.loc13_22.2 [symbolic = %return.patt.loc13_18.2 (constants.%return.patt.d67681.2)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %V.ref: type = name_ref V, @A.as.I.impl.%V.loc12_15.2 [symbolic = %V (constants.%V.67d)]
// CHECK:STDOUT: %.loc13_21: type = specific_constant @A.as.I.impl.%V.loc12_15.2, @A.as.I.impl(constants.%V.67d) [symbolic = %V (constants.%V.67d)]
// CHECK:STDOUT: %V.ref: type = name_ref V, %.loc13_21 [symbolic = %V (constants.%V.67d)]
// CHECK:STDOUT: %ptr.loc13_22.2: type = ptr_type %V.ref [symbolic = %ptr.loc13_22.1 (constants.%ptr.e8f8f9.2)]
// CHECK:STDOUT: %.loc13_22.2: Core.Form = init_form %ptr.loc13_22.2 [symbolic = %.loc13_22.1 (constants.%.cb6cb9.2)]
// CHECK:STDOUT: %self.param: ref @A.as.I.impl.F.%A (%A.59fd23.2) = ref_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @A.as.I.impl.%A.loc12_26.2 [symbolic = %A (constants.%A.59fd23.2)]
// CHECK:STDOUT: %.loc13_12.1: type = splice_block %Self.ref [symbolic = %A (constants.%A.59fd23.2)] {
// CHECK:STDOUT: %.loc13_12.2: type = specific_constant @A.as.I.impl.%A.loc12_26.2, @A.as.I.impl(constants.%V.67d) [symbolic = %A (constants.%A.59fd23.2)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13_12.2 [symbolic = %A (constants.%A.59fd23.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: ref @A.as.I.impl.F.%A (%A.59fd23.2) = wrapper_binding self, %self.param
// CHECK:STDOUT: %return.param: ref @A.as.I.impl.F.%ptr.loc13_22.1 (%ptr.e8f8f9.2) = out_param call_param1
// CHECK:STDOUT: %return: ref @A.as.I.impl.F.%ptr.loc13_22.1 (%ptr.e8f8f9.2) = return_slot %return.param
+10 -5
View File
@@ -485,7 +485,8 @@ fn CallIndirect() {
// CHECK:STDOUT: %return.param_patt.loc6_47.1: @A.WithSelf.F.%pattern_type.loc6_47 (%pattern_type.60c) = out_param_pattern [symbolic = %return.param_patt.loc6_47.2 (constants.%return.param_patt.e9c)]
// CHECK:STDOUT: %return.patt.loc6_32.1: @A.WithSelf.F.%pattern_type.loc6_47 (%pattern_type.60c) = return_slot_pattern %return.param_patt.loc6_47.1, %.loc6_47.4 [symbolic = %return.patt.loc6_32.2 (constants.%return.patt.76b)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_14.2 [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %.loc6_36: type = specific_constant @A.%T.loc5_14.2, @A(constants.%T.67d) [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc6_36 [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %.loc6_39: @A.WithSelf.F.%A.type (%A.type.fa0) = specific_constant @A.%Self.loc5_22.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.5d3)]
// CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.fa0) = name_ref Self, %.loc6_39 [symbolic = %Self (constants.%Self.5d3)]
// CHECK:STDOUT: %U.ref.loc6_45: type = name_ref U, %U.loc6_17.2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)]
@@ -1510,7 +1511,8 @@ fn CallIndirect() {
// CHECK:STDOUT: %return.param_patt.loc6_45.1: @A.WithSelf.F.%pattern_type.loc6_45 (%pattern_type.47c) = out_param_pattern [symbolic = %return.param_patt.loc6_45.2 (constants.%return.param_patt.550)]
// CHECK:STDOUT: %return.patt.loc6_31.1: @A.WithSelf.F.%pattern_type.loc6_45 (%pattern_type.47c) = return_slot_pattern %return.param_patt.loc6_45.1, %.loc6_45.4 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.6c9)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_14.2 [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %.loc6_35: type = specific_constant @A.%T.loc5_14.2, @A(constants.%T.67d) [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc6_35 [symbolic = %T (constants.%T.67d)]
// CHECK:STDOUT: %.loc6_38: @A.WithSelf.F.%A.type (%A.type.fa0) = specific_constant @A.%Self.loc5_22.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.5d3)]
// CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.fa0) = name_ref Self, %.loc6_38 [symbolic = %Self (constants.%Self.5d3)]
// CHECK:STDOUT: %U.ref.loc6_44: type = name_ref U, %U.loc6_17.2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)]
@@ -1572,9 +1574,12 @@ fn CallIndirect() {
// CHECK:STDOUT: %return.param_patt.loc17_49.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_49 (%pattern_type.5cc) = out_param_pattern [symbolic = %return.param_patt.loc17_49.2 (constants.%return.param_patt.b1c)]
// CHECK:STDOUT: %return.patt.loc17_31.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_49 (%pattern_type.5cc) = return_slot_pattern %return.param_patt.loc17_49.1, %.loc17_49.5 [symbolic = %return.patt.loc17_31.2 (constants.%return.patt.bad9)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %W.ref: type = name_ref W, @tuple.type.as.A.impl.%W.loc14_35.2 [symbolic = %W (constants.%W)]
// CHECK:STDOUT: %V1.ref: type = name_ref V1, @tuple.type.as.A.impl.%V1.loc14_16.2 [symbolic = %V1 (constants.%V1)]
// CHECK:STDOUT: %V2.ref: type = name_ref V2, @tuple.type.as.A.impl.%V2.loc14_26.2 [symbolic = %V2 (constants.%V2)]
// CHECK:STDOUT: %.loc17_35: type = specific_constant @tuple.type.as.A.impl.%W.loc14_35.2, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %W (constants.%W)]
// CHECK:STDOUT: %W.ref: type = name_ref W, %.loc17_35 [symbolic = %W (constants.%W)]
// CHECK:STDOUT: %.loc17_39: type = specific_constant @tuple.type.as.A.impl.%V1.loc14_16.2, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %V1 (constants.%V1)]
// CHECK:STDOUT: %V1.ref: type = name_ref V1, %.loc17_39 [symbolic = %V1 (constants.%V1)]
// CHECK:STDOUT: %.loc17_43: type = specific_constant @tuple.type.as.A.impl.%V2.loc14_26.2, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %V2 (constants.%V2)]
// CHECK:STDOUT: %V2.ref: type = name_ref V2, %.loc17_43 [symbolic = %V2 (constants.%V2)]
// CHECK:STDOUT: %.loc17_45: %tuple.type.693 = tuple_literal (%V1.ref, %V2.ref) [symbolic = %tuple.loc17_45 (constants.%tuple.fa2)]
// CHECK:STDOUT: %U.ref.loc17_48: type = name_ref U, %U.loc17_17.2 [symbolic = %U.loc17_17.1 (constants.%U.ce4)]
// CHECK:STDOUT: %.loc17_49.3: %tuple.type.649 = tuple_literal (%W.ref, %.loc17_45, %U.ref.loc17_48) [symbolic = %tuple.loc17_49 (constants.%tuple.cd3)]
+11 -8
View File
@@ -854,10 +854,11 @@ fn F[T: I(C)](t: T) {
// CHECK:STDOUT: %x.patt.loc11_14.1: @InnerF.%pattern_type (%pattern_type.d51) = wrapper_binding_pattern x, %x.param_patt.loc11_14.1 [symbolic = %x.patt.loc11_14.2 (constants.%x.patt.a34)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: @InnerF.%U.as_type.loc11_16.1 (%U.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc11_16.1: type = splice_block %.loc11_16.2 [symbolic = %U.as_type.loc11_16.1 (constants.%U.as_type)] {
// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, @F.%U.loc8_13.2 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %.loc11_16.1: type = splice_block %.loc11_16.3 [symbolic = %U.as_type.loc11_16.1 (constants.%U.as_type)] {
// CHECK:STDOUT: %.loc11_16.2: %B_where.type = specific_constant @F.%U.loc8_13.2, @F(constants.%T, constants.%U) [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %.loc11_16.2 [symbolic = %U (constants.%U)]
// CHECK:STDOUT: %U.as_type.loc11_16.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc11_16.1 (constants.%U.as_type)]
// CHECK:STDOUT: %.loc11_16.2: type = converted %U.ref, %U.as_type.loc11_16.2 [symbolic = %U.as_type.loc11_16.1 (constants.%U.as_type)]
// CHECK:STDOUT: %.loc11_16.3: type = converted %U.ref, %U.as_type.loc11_16.2 [symbolic = %U.as_type.loc11_16.1 (constants.%U.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @InnerF.%U.as_type.loc11_16.1 (%U.as_type) = wrapper_binding x, %x.param
// CHECK:STDOUT: }
@@ -1049,21 +1050,23 @@ fn F[T: I(C)](t: T) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @I.WithSelf.TakesT.%Self.as_type.loc10_13.1 (%Self.as_type.7b3) = wrapper_binding self, %self.param
// CHECK:STDOUT: %t.param: @I.WithSelf.TakesT.%T.as_type.loc10_22.1 (%T.as_type) = value_param call_param1
// CHECK:STDOUT: %.loc10_22.1: type = splice_block %.loc10_22.2 [symbolic = %T.as_type.loc10_22.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref: %facet_type.8cb = name_ref T, @I.%T.loc6_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc10_22.1: type = splice_block %.loc10_22.3 [symbolic = %T.as_type.loc10_22.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %.loc10_22.2: %facet_type.8cb = specific_constant @I.%T.loc6_14.2, @I(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: %facet_type.8cb = name_ref T, %.loc10_22.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc10_22.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_22.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc10_22.2: type = converted %T.ref, %T.as_type.loc10_22.2 [symbolic = %T.as_type.loc10_22.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc10_22.3: type = converted %T.ref, %T.as_type.loc10_22.2 [symbolic = %T.as_type.loc10_22.1 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %t: @I.WithSelf.TakesT.%T.as_type.loc10_22.1 (%T.as_type) = wrapper_binding t, %t.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc2.loc10_24.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element2, %I.WithSelf.TakesT.decl [symbolic = %assoc2.loc10_24.2 (constants.%assoc2)]
// CHECK:STDOUT: %T.ref: %facet_type.8cb = name_ref T, @I.%T.loc6_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc12_11.1: %facet_type.8cb = specific_constant @I.%T.loc6_14.2, @I(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: %facet_type.8cb = name_ref T, %.loc12_11.1 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %impl.elem0.loc12_16.1: %facet_type.208 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_16.2 (constants.%impl.elem0.931)]
// CHECK:STDOUT: %U.ref: %facet_type.208 = name_ref U, %impl.elem0.loc12_16.1 [symbolic = %impl.elem0.loc12_16.2 (constants.%impl.elem0.931)]
// CHECK:STDOUT: %U.as_type: type = facet_access_type %U.ref [symbolic = %as_type (constants.%as_type)]
// CHECK:STDOUT: %.loc12_16: type = converted %U.ref, %U.as_type [symbolic = %as_type (constants.%as_type)]
// CHECK:STDOUT: %T.as_type.loc12_11.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_11.2 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc12_11: type = converted %T.ref, %T.as_type.loc12_11.1 [symbolic = %T.as_type.loc12_11.2 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc12_11.2: type = converted %T.ref, %T.as_type.loc12_11.1 [symbolic = %T.as_type.loc12_11.2 (constants.%T.as_type)]
// CHECK:STDOUT: %I.observe.decl = observe_decl @I.observe [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
+4 -2
View File
@@ -807,7 +807,8 @@ interface Z(T: type) {
// CHECK:STDOUT: %Z.WithSelf.T.impls.Z.type.require.decl = require_decl @Z.WithSelf.T.impls.Z.type.require [concrete] {
// CHECK:STDOUT: require %T.ref impls %Z.type.loc5_25.1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Z.%T.loc4_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc5_11: type = specific_constant @Z.%T.loc4_14.2, @Z(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc5_11 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
// CHECK:STDOUT: %.loc5_21: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.c5f) = specific_constant @Z.%Self.loc4_22.1, @Z(constants.%T) [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.ref: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.c5f) = name_ref Self, %.loc5_21 [symbolic = %Self (constants.%Self)]
@@ -993,7 +994,8 @@ interface Z(T: type) {
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.as_type.loc11_11.1: type = facet_access_type @Z.%Self.loc8_22.1 [symbolic = %Self.as_type.loc11_11.2 (constants.%Self.as_type.709)]
// CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @Z.%T.loc8_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc11: type = specific_constant @Z.%T.loc8_14.2, @Z(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc11 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Z.type.loc11_20: type = facet_type <@Z, @Z(constants.%T)> [symbolic = %Z.type.loc11_11 (constants.%Z.type.c5f)]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2997,8 +2997,8 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: %Core.import_ref.e41: @Cpp.long.as.BitOrAssignWith.impl.%Cpp.long.as.BitOrAssignWith.impl.Op.type.2 (%Cpp.long.as.BitOrAssignWith.impl.Op.type.035048.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.BitOrAssignWith.impl.%Cpp.long.as.BitOrAssignWith.impl.Op.2 (constants.%Cpp.long.as.BitOrAssignWith.impl.Op.c04b02.1)]
// CHECK:STDOUT: %BitOrAssignWith.impl_witness_table.ab8 = impl_witness_table (%Core.import_ref.e41), @Cpp.long.as.BitOrAssignWith.impl [concrete]
// CHECK:STDOUT: %Core.Op.56f: @Cpp.long.as.BitOrAssignWith.impl.%Cpp.long.as.BitOrAssignWith.impl.Op.type.1 (%Cpp.long.as.BitOrAssignWith.impl.Op.type.035048.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long.as.BitOrAssignWith.impl.%Cpp.long.as.BitOrAssignWith.impl.Op.1 (constants.%Cpp.long.as.BitOrAssignWith.impl.Op.c04b02.2)]
// CHECK:STDOUT: %Core.import_ref.36c: @Cpp.long.as.BitXorAssignWith.impl.%Cpp.long.as.BitXorAssignWith.impl.Op.type.2 (%Cpp.long.as.BitXorAssignWith.impl.Op.type.01a7c8.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.BitXorAssignWith.impl.%Cpp.long.as.BitXorAssignWith.impl.Op.2 (constants.%Cpp.long.as.BitXorAssignWith.impl.Op.8644ea.1)]
// CHECK:STDOUT: %BitXorAssignWith.impl_witness_table.f38 = impl_witness_table (%Core.import_ref.36c), @Cpp.long.as.BitXorAssignWith.impl [concrete]
// CHECK:STDOUT: %Core.import_ref.36c1: @Cpp.long.as.BitXorAssignWith.impl.%Cpp.long.as.BitXorAssignWith.impl.Op.type.2 (%Cpp.long.as.BitXorAssignWith.impl.Op.type.01a7c8.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.BitXorAssignWith.impl.%Cpp.long.as.BitXorAssignWith.impl.Op.2 (constants.%Cpp.long.as.BitXorAssignWith.impl.Op.8644ea.1)]
// CHECK:STDOUT: %BitXorAssignWith.impl_witness_table.f38 = impl_witness_table (%Core.import_ref.36c1), @Cpp.long.as.BitXorAssignWith.impl [concrete]
// CHECK:STDOUT: %Core.Op.310: @Cpp.long.as.BitXorAssignWith.impl.%Cpp.long.as.BitXorAssignWith.impl.Op.type.1 (%Cpp.long.as.BitXorAssignWith.impl.Op.type.01a7c8.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long.as.BitXorAssignWith.impl.%Cpp.long.as.BitXorAssignWith.impl.Op.1 (constants.%Cpp.long.as.BitXorAssignWith.impl.Op.8644ea.2)]
// CHECK:STDOUT: %Core.import_ref.160: @Cpp.long.as.LeftShiftAssignWith.impl.%Cpp.long.as.LeftShiftAssignWith.impl.Op.type.2 (%Cpp.long.as.LeftShiftAssignWith.impl.Op.type.837768.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.LeftShiftAssignWith.impl.%Cpp.long.as.LeftShiftAssignWith.impl.Op.2 (constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op.f10195.1)]
// CHECK:STDOUT: %LeftShiftAssignWith.impl_witness_table.6ad = impl_witness_table (%Core.import_ref.160), @Cpp.long.as.LeftShiftAssignWith.impl [concrete]
@@ -1025,8 +1025,8 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import_ref.685: @Core.IntLiteral.as.ImplicitAs.impl.bd8.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.be5) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.bd8.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.60e)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.79a = impl_witness_table (%Core.import_ref.685), @Core.IntLiteral.as.ImplicitAs.impl.bd8 [concrete]
// CHECK:STDOUT: %Core.import_ref.b7af0: @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert.type (%UInt.as.ImplicitAs.impl.Convert.type.802) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert (constants.%UInt.as.ImplicitAs.impl.Convert.7a2)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.7eb = impl_witness_table (%Core.import_ref.b7af0), @UInt.as.ImplicitAs.impl.d6a [concrete]
// CHECK:STDOUT: %Core.import_ref.b7af: @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert.type (%UInt.as.ImplicitAs.impl.Convert.type.802) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert (constants.%UInt.as.ImplicitAs.impl.Convert.7a2)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.7eb = impl_witness_table (%Core.import_ref.b7af), @UInt.as.ImplicitAs.impl.d6a [concrete]
// CHECK:STDOUT: %Core.import_ref.d9c7: @Core.IntLiteral.as.As.impl.d83.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.16e) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.d83.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.81c)]
// CHECK:STDOUT: %As.impl_witness_table.43c = impl_witness_table (%Core.import_ref.d9c7), @Core.IntLiteral.as.As.impl.d83 [concrete]
// CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)]
@@ -2541,8 +2541,8 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: %Core.import_ref.1d33: @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.Less.type.2 (%T.as_type.as.OrderedWith.impl.Less.type.5accdd.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.Less.2 (constants.%T.as_type.as.OrderedWith.impl.Less.1112a9.1)]
// CHECK:STDOUT: %Core.import_ref.dea: @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.2 (%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.851dcb.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.2 (constants.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.d2878e.1)]
// CHECK:STDOUT: %Core.import_ref.154: @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.Greater.type.2 (%T.as_type.as.OrderedWith.impl.Greater.type.621e88.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.Greater.2 (constants.%T.as_type.as.OrderedWith.impl.Greater.35aaff.1)]
// CHECK:STDOUT: %Core.import_ref.9d4: @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2 (%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.97df82.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2 (constants.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.9b73bb.1)]
// CHECK:STDOUT: %OrderedWith.impl_witness_table.00a = impl_witness_table (%Core.import_ref.1d33, %Core.import_ref.dea, %Core.import_ref.154, %Core.import_ref.9d4), @T.as_type.as.OrderedWith.impl.800 [concrete]
// CHECK:STDOUT: %Core.import_ref.9d4e: @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2 (%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.97df82.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2 (constants.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.9b73bb.1)]
// CHECK:STDOUT: %OrderedWith.impl_witness_table.00a = impl_witness_table (%Core.import_ref.1d33, %Core.import_ref.dea, %Core.import_ref.154, %Core.import_ref.9d4e), @T.as_type.as.OrderedWith.impl.800 [concrete]
// CHECK:STDOUT: %Core.Less.a83: @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.Less.type.1 (%T.as_type.as.OrderedWith.impl.Less.type.5accdd.2) = import_ref Core//prelude/types/cpp/int, Less, loaded [symbolic = @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.Less.1 (constants.%T.as_type.as.OrderedWith.impl.Less.1112a9.2)]
// CHECK:STDOUT: %Core.LessOrEquivalent.551: @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.1 (%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.851dcb.2) = import_ref Core//prelude/types/cpp/int, LessOrEquivalent, loaded [symbolic = @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.1 (constants.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.d2878e.2)]
// CHECK:STDOUT: %Core.Greater.233: @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.Greater.type.1 (%T.as_type.as.OrderedWith.impl.Greater.type.621e88.2) = import_ref Core//prelude/types/cpp/int, Greater, loaded [symbolic = @T.as_type.as.OrderedWith.impl.800.%T.as_type.as.OrderedWith.impl.Greater.1 (constants.%T.as_type.as.OrderedWith.impl.Greater.35aaff.2)]
@@ -973,8 +973,8 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import_ref.685: @Core.IntLiteral.as.ImplicitAs.impl.bd8.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.be5) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.bd8.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.60e)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.79a = impl_witness_table (%Core.import_ref.685), @Core.IntLiteral.as.ImplicitAs.impl.bd8 [concrete]
// CHECK:STDOUT: %Core.import_ref.b7af0: @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert.type (%UInt.as.ImplicitAs.impl.Convert.type.802) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert (constants.%UInt.as.ImplicitAs.impl.Convert.7a2)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.7eb = impl_witness_table (%Core.import_ref.b7af0), @UInt.as.ImplicitAs.impl.d6a [concrete]
// CHECK:STDOUT: %Core.import_ref.b7af: @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert.type (%UInt.as.ImplicitAs.impl.Convert.type.802) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.ImplicitAs.impl.d6a.%UInt.as.ImplicitAs.impl.Convert (constants.%UInt.as.ImplicitAs.impl.Convert.7a2)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.7eb = impl_witness_table (%Core.import_ref.b7af), @UInt.as.ImplicitAs.impl.d6a [concrete]
// CHECK:STDOUT: %Core.import_ref.d9c7: @Core.IntLiteral.as.As.impl.d83.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.16e) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.d83.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.81c)]
// CHECK:STDOUT: %As.impl_witness_table.43c = impl_witness_table (%Core.import_ref.d9c7), @Core.IntLiteral.as.As.impl.d83 [concrete]
// CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)]
+61 -57
View File
@@ -802,19 +802,19 @@ fn F() {
// CHECK:STDOUT: %require_complete.d83: <witness> = require_complete_type %T.as_type [symbolic]
// CHECK:STDOUT: %y.param_patt.ec0: %pattern_type.2c66b4.2 = value_param_pattern [symbolic]
// CHECK:STDOUT: %y.patt.d6d: %pattern_type.2c66b4.2 = wrapper_binding_pattern y, %y.param_patt.ec0 [symbolic]
// CHECK:STDOUT: %fn.type.d27: type = fn_type @fn.loc6, @fn.loc5(%T.f84) [symbolic]
// CHECK:STDOUT: %fn.85b: %fn.type.d27 = struct_value () [symbolic]
// CHECK:STDOUT: %fn.type.48e: type = fn_type @fn.loc6, @fn.loc5(%T.f84) [symbolic]
// CHECK:STDOUT: %fn.7f4: %fn.type.48e = struct_value () [symbolic]
// CHECK:STDOUT: %z.param_patt.b42: %pattern_type.2c66b4.2 = value_param_pattern [symbolic]
// CHECK:STDOUT: %z.patt.513: %pattern_type.2c66b4.2 = wrapper_binding_pattern z, %z.param_patt.b42 [symbolic]
// CHECK:STDOUT: %fn.type.a09: type = fn_type @fn.loc7, @fn.loc6(%T.f84) [symbolic]
// CHECK:STDOUT: %fn.ecf: %fn.type.a09 = struct_value () [symbolic]
// CHECK:STDOUT: %fn.type.3f9: type = fn_type @fn.loc7, @fn.loc6(%T.f84) [symbolic]
// CHECK:STDOUT: %fn.8a9: %fn.type.3f9 = struct_value () [symbolic]
// CHECK:STDOUT: %Copy.lookup_impl_witness.d9c: <witness> = lookup_impl_witness %T.f84, @Copy [symbolic]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.d2f9c3.2: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.f84) [symbolic]
// CHECK:STDOUT: %.8bf: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d2f9c3.2, %T.f84 [symbolic]
// CHECK:STDOUT: %impl.elem0.bb5: %.8bf = impl_witness_access %Copy.lookup_impl_witness.d9c, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.2ac: <specific function> = specific_impl_function %impl.elem0.bb5, @Copy.WithSelf.Op(%T.f84) [symbolic]
// CHECK:STDOUT: %fn.specific_fn.63f: <specific function> = specific_function %fn.ecf, @fn.loc7(%T.f84) [symbolic]
// CHECK:STDOUT: %fn.specific_fn.278: <specific function> = specific_function %fn.85b, @fn.loc6(%T.f84) [symbolic]
// CHECK:STDOUT: %fn.specific_fn.127: <specific function> = specific_function %fn.8a9, @fn.loc7(%T.f84) [symbolic]
// CHECK:STDOUT: %fn.specific_fn.3ca: <specific function> = specific_function %fn.7f4, @fn.loc6(%T.f84) [symbolic]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %Int.type: type = parameterized_class_name_type @Int [concrete]
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
@@ -864,27 +864,27 @@ fn F() {
// CHECK:STDOUT: %return.param_patt.5a1: %pattern_type.831 = out_param_pattern [concrete]
// CHECK:STDOUT: %return.patt.c0c: %pattern_type.831 = return_slot_pattern %return.param_patt.5a1, bool [concrete]
// CHECK:STDOUT: %fn.specific_fn.c23: <specific function> = specific_function %fn.415, @fn.loc5(%Copy.facet.7af) [concrete]
// CHECK:STDOUT: %fn.type.923: type = fn_type @fn.loc6, @fn.loc5(%Copy.facet.95d) [concrete]
// CHECK:STDOUT: %fn.793: %fn.type.923 = struct_value () [concrete]
// CHECK:STDOUT: %fn.type.7b0: type = fn_type @fn.loc6, @fn.loc5(%Copy.facet.95d) [concrete]
// CHECK:STDOUT: %fn.758: %fn.type.7b0 = struct_value () [concrete]
// CHECK:STDOUT: %y.param_patt.665: %pattern_type.d94 = value_param_pattern [concrete]
// CHECK:STDOUT: %y.patt.e18: %pattern_type.d94 = wrapper_binding_pattern y, %y.param_patt.665 [concrete]
// CHECK:STDOUT: %fn.specific_fn.41b: <specific function> = specific_function %fn.793, @fn.loc6(%Copy.facet.95d) [concrete]
// CHECK:STDOUT: %fn.specific_fn.2f6: <specific function> = specific_function %fn.758, @fn.loc6(%Copy.facet.95d) [concrete]
// CHECK:STDOUT: %complete_type.127: <witness> = complete_type_witness bool [concrete]
// CHECK:STDOUT: %fn.type.da6: type = fn_type @fn.loc6, @fn.loc5(%Copy.facet.7af) [concrete]
// CHECK:STDOUT: %fn.e2b: %fn.type.da6 = struct_value () [concrete]
// CHECK:STDOUT: %fn.type.641: type = fn_type @fn.loc6, @fn.loc5(%Copy.facet.7af) [concrete]
// CHECK:STDOUT: %fn.3e7: %fn.type.641 = struct_value () [concrete]
// CHECK:STDOUT: %y.param_patt.077: %pattern_type.831 = value_param_pattern [concrete]
// CHECK:STDOUT: %y.patt.252: %pattern_type.831 = wrapper_binding_pattern y, %y.param_patt.077 [concrete]
// CHECK:STDOUT: %fn.specific_fn.88e: <specific function> = specific_function %fn.e2b, @fn.loc6(%Copy.facet.7af) [concrete]
// CHECK:STDOUT: %fn.type.7e4: type = fn_type @fn.loc7, @fn.loc6(%Copy.facet.95d) [concrete]
// CHECK:STDOUT: %fn.ea4: %fn.type.7e4 = struct_value () [concrete]
// CHECK:STDOUT: %fn.specific_fn.421: <specific function> = specific_function %fn.3e7, @fn.loc6(%Copy.facet.7af) [concrete]
// CHECK:STDOUT: %fn.type.8ae: type = fn_type @fn.loc7, @fn.loc6(%Copy.facet.95d) [concrete]
// CHECK:STDOUT: %fn.c3f: %fn.type.8ae = struct_value () [concrete]
// CHECK:STDOUT: %z.param_patt.896: %pattern_type.d94 = value_param_pattern [concrete]
// CHECK:STDOUT: %z.patt.660: %pattern_type.d94 = wrapper_binding_pattern z, %z.param_patt.896 [concrete]
// CHECK:STDOUT: %fn.specific_fn.01e: <specific function> = specific_function %fn.ea4, @fn.loc7(%Copy.facet.95d) [concrete]
// CHECK:STDOUT: %fn.type.16e: type = fn_type @fn.loc7, @fn.loc6(%Copy.facet.7af) [concrete]
// CHECK:STDOUT: %fn.8bf: %fn.type.16e = struct_value () [concrete]
// CHECK:STDOUT: %fn.specific_fn.0fa: <specific function> = specific_function %fn.c3f, @fn.loc7(%Copy.facet.95d) [concrete]
// CHECK:STDOUT: %fn.type.d03: type = fn_type @fn.loc7, @fn.loc6(%Copy.facet.7af) [concrete]
// CHECK:STDOUT: %fn.b92: %fn.type.d03 = struct_value () [concrete]
// CHECK:STDOUT: %z.param_patt.a49: %pattern_type.831 = value_param_pattern [concrete]
// CHECK:STDOUT: %z.patt.246: %pattern_type.831 = wrapper_binding_pattern z, %z.param_patt.a49 [concrete]
// CHECK:STDOUT: %fn.specific_fn.b95: <specific function> = specific_function %fn.8bf, @fn.loc7(%Copy.facet.7af) [concrete]
// CHECK:STDOUT: %fn.specific_fn.c7b: <specific function> = specific_function %fn.b92, @fn.loc7(%Copy.facet.7af) [concrete]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete]
// CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete]
@@ -999,27 +999,29 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc5_43.1 [symbolic = %require_complete (constants.%require_complete.d83)]
// CHECK:STDOUT: %fn.type: type = fn_type @fn.loc6, @fn.loc5(%T.loc5_27.1) [symbolic = %fn.type (constants.%fn.type.d27)]
// CHECK:STDOUT: %fn: @fn.loc5.%fn.type (%fn.type.d27) = struct_value () [symbolic = %fn (constants.%fn.85b)]
// CHECK:STDOUT: %fn.specific_fn.loc6_26.2: <specific function> = specific_function %fn, @fn.loc6(%T.loc5_27.1) [symbolic = %fn.specific_fn.loc6_26.2 (constants.%fn.specific_fn.278)]
// CHECK:STDOUT: %fn.type: type = fn_type @fn.loc6, @fn.loc5(%T.loc5_27.1) [symbolic = %fn.type (constants.%fn.type.48e)]
// CHECK:STDOUT: %fn: @fn.loc5.%fn.type (%fn.type.48e) = struct_value () [symbolic = %fn (constants.%fn.7f4)]
// CHECK:STDOUT: %fn.specific_fn.loc6_26.2: <specific function> = specific_function %fn, @fn.loc6(%T.loc5_27.1) [symbolic = %fn.specific_fn.loc6_26.2 (constants.%fn.specific_fn.3ca)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @fn.loc5.%T.as_type.loc5_43.1 (%T.as_type)) -> out %return.param: @fn.loc5.%T.as_type.loc5_43.1 (%T.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %fn.decl: @fn.loc5.%fn.type (%fn.type.d27) = fn_decl @fn.loc6 [symbolic = @fn.loc5.%fn (constants.%fn.85b)] {
// CHECK:STDOUT: %fn.decl: @fn.loc5.%fn.type (%fn.type.48e) = fn_decl @fn.loc6 [symbolic = @fn.loc5.%fn (constants.%fn.7f4)] {
// CHECK:STDOUT: %y.param_patt.loc6_16.1: @fn.loc6.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %y.param_patt.loc6_16.2 (constants.%y.param_patt.ec0)]
// CHECK:STDOUT: %y.patt.loc6_16.1: @fn.loc6.%pattern_type (%pattern_type.2c66b4.2) = wrapper_binding_pattern y, %y.param_patt.loc6_16.1 [symbolic = %y.patt.loc6_16.2 (constants.%y.patt.d6d)]
// CHECK:STDOUT: %return.param_patt.loc6_24.1: @fn.loc6.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc6_24.2 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc6_21.1: @fn.loc6.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc6_24.1, %.loc6_24.3 [symbolic = %return.patt.loc6_21.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc6_21.1: @fn.loc6.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc6_24.1, %.loc6_24.4 [symbolic = %return.patt.loc6_21.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc6_24: %Copy.type = name_ref T, @fn.loc5.%T.loc5_27.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc6_24.3: %Copy.type = specific_constant @fn.loc5.%T.loc5_27.2, @fn.loc5(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc6_24: %Copy.type = name_ref T, %.loc6_24.3 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc6_24: type = facet_access_type %T.ref.loc6_24 [symbolic = %T.as_type.loc6_18.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_24.3: type = converted %T.ref.loc6_24, %T.as_type.loc6_24 [symbolic = %T.as_type.loc6_18.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_24.4: Core.Form = init_form %.loc6_24.3 [symbolic = %.loc6_24.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc6_24.4: type = converted %T.ref.loc6_24, %T.as_type.loc6_24 [symbolic = %T.as_type.loc6_18.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_24.5: Core.Form = init_form %.loc6_24.4 [symbolic = %.loc6_24.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %y.param: @fn.loc6.%T.as_type.loc6_18.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.2 [symbolic = %T.as_type.loc6_18.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref.loc6_18: %Copy.type = name_ref T, @fn.loc5.%T.loc5_27.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.3 [symbolic = %T.as_type.loc6_18.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %.loc6_18.2: %Copy.type = specific_constant @fn.loc5.%T.loc5_27.2, @fn.loc5(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc6_18: %Copy.type = name_ref T, %.loc6_18.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc6_18.2: type = facet_access_type %T.ref.loc6_18 [symbolic = %T.as_type.loc6_18.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_18.2: type = converted %T.ref.loc6_18, %T.as_type.loc6_18.2 [symbolic = %T.as_type.loc6_18.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc6_18.3: type = converted %T.ref.loc6_18, %T.as_type.loc6_18.2 [symbolic = %T.as_type.loc6_18.1 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %y: @fn.loc6.%T.as_type.loc6_18.1 (%T.as_type) = wrapper_binding y, %y.param
// CHECK:STDOUT: %return.param: ref @fn.loc6.%T.as_type.loc6_18.1 (%T.as_type) = out_param call_param1
@@ -1028,7 +1030,7 @@ fn F() {
// CHECK:STDOUT: %x.ref: @fn.loc5.%T.as_type.loc5_43.1 (%T.as_type) = name_ref x, %x
// CHECK:STDOUT: %.loc10_8.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc5_27.1 (constants.%T.f84)]
// CHECK:STDOUT: %.loc10_8.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc5_27.1 (constants.%T.f84)]
// CHECK:STDOUT: %fn.specific_fn.loc6_26.1: <specific function> = specific_function %fn.decl, @fn.loc6(constants.%T.f84) [symbolic = %fn.specific_fn.loc6_26.2 (constants.%fn.specific_fn.278)]
// CHECK:STDOUT: %fn.specific_fn.loc6_26.1: <specific function> = specific_function %fn.decl, @fn.loc6(constants.%T.f84) [symbolic = %fn.specific_fn.loc6_26.2 (constants.%fn.specific_fn.3ca)]
// CHECK:STDOUT: %.loc5_49.1: ref @fn.loc5.%T.as_type.loc5_43.1 (%T.as_type) = splice_block %return.param {}
// CHECK:STDOUT: %fn.call: init @fn.loc5.%T.as_type.loc5_43.1 (%T.as_type) to %.loc5_49.1 = call %fn.specific_fn.loc6_26.1(%x.ref)
// CHECK:STDOUT: return %fn.call to %return.param
@@ -1047,27 +1049,29 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc6_18.1 [symbolic = %require_complete (constants.%require_complete.d83)]
// CHECK:STDOUT: %fn.type: type = fn_type @fn.loc7, @fn.loc6(%T) [symbolic = %fn.type (constants.%fn.type.a09)]
// CHECK:STDOUT: %fn: @fn.loc6.%fn.type (%fn.type.a09) = struct_value () [symbolic = %fn (constants.%fn.ecf)]
// CHECK:STDOUT: %fn.specific_fn.loc7_28.2: <specific function> = specific_function %fn, @fn.loc7(%T) [symbolic = %fn.specific_fn.loc7_28.2 (constants.%fn.specific_fn.63f)]
// CHECK:STDOUT: %fn.type: type = fn_type @fn.loc7, @fn.loc6(%T) [symbolic = %fn.type (constants.%fn.type.3f9)]
// CHECK:STDOUT: %fn: @fn.loc6.%fn.type (%fn.type.3f9) = struct_value () [symbolic = %fn (constants.%fn.8a9)]
// CHECK:STDOUT: %fn.specific_fn.loc7_28.2: <specific function> = specific_function %fn, @fn.loc7(%T) [symbolic = %fn.specific_fn.loc7_28.2 (constants.%fn.specific_fn.127)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%y.param: @fn.loc6.%T.as_type.loc6_18.1 (%T.as_type)) -> out %return.param: @fn.loc6.%T.as_type.loc6_18.1 (%T.as_type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %fn.decl: @fn.loc6.%fn.type (%fn.type.a09) = fn_decl @fn.loc7 [symbolic = @fn.loc6.%fn (constants.%fn.ecf)] {
// CHECK:STDOUT: %fn.decl: @fn.loc6.%fn.type (%fn.type.3f9) = fn_decl @fn.loc7 [symbolic = @fn.loc6.%fn (constants.%fn.8a9)] {
// CHECK:STDOUT: %z.param_patt.loc7_18.1: @fn.loc7.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %z.param_patt.loc7_18.2 (constants.%z.param_patt.b42)]
// CHECK:STDOUT: %z.patt.loc7_18.1: @fn.loc7.%pattern_type (%pattern_type.2c66b4.2) = wrapper_binding_pattern z, %z.param_patt.loc7_18.1 [symbolic = %z.patt.loc7_18.2 (constants.%z.patt.513)]
// CHECK:STDOUT: %return.param_patt.loc7_26.1: @fn.loc7.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc7_26.2 (constants.%return.param_patt.bf4475.2)]
// CHECK:STDOUT: %return.patt.loc7_23.1: @fn.loc7.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc7_26.1, %.loc7_26.3 [symbolic = %return.patt.loc7_23.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: %return.patt.loc7_23.1: @fn.loc7.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc7_26.1, %.loc7_26.4 [symbolic = %return.patt.loc7_23.2 (constants.%return.patt.f44)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc7_26: %Copy.type = name_ref T, @fn.loc5.%T.loc5_27.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc7_26.3: %Copy.type = specific_constant @fn.loc5.%T.loc5_27.2, @fn.loc5(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc7_26: %Copy.type = name_ref T, %.loc7_26.3 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc7_26: type = facet_access_type %T.ref.loc7_26 [symbolic = %T.as_type.loc7_20.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_26.3: type = converted %T.ref.loc7_26, %T.as_type.loc7_26 [symbolic = %T.as_type.loc7_20.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_26.4: Core.Form = init_form %.loc7_26.3 [symbolic = %.loc7_26.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %.loc7_26.4: type = converted %T.ref.loc7_26, %T.as_type.loc7_26 [symbolic = %T.as_type.loc7_20.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_26.5: Core.Form = init_form %.loc7_26.4 [symbolic = %.loc7_26.2 (constants.%.1ce700.2)]
// CHECK:STDOUT: %z.param: @fn.loc7.%T.as_type.loc7_20.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc7_20.1: type = splice_block %.loc7_20.2 [symbolic = %T.as_type.loc7_20.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref.loc7_20: %Copy.type = name_ref T, @fn.loc5.%T.loc5_27.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc7_20.1: type = splice_block %.loc7_20.3 [symbolic = %T.as_type.loc7_20.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %.loc7_20.2: %Copy.type = specific_constant @fn.loc5.%T.loc5_27.2, @fn.loc5(constants.%T.f84) [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.ref.loc7_20: %Copy.type = name_ref T, %.loc7_20.2 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %T.as_type.loc7_20.2: type = facet_access_type %T.ref.loc7_20 [symbolic = %T.as_type.loc7_20.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_20.2: type = converted %T.ref.loc7_20, %T.as_type.loc7_20.2 [symbolic = %T.as_type.loc7_20.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc7_20.3: type = converted %T.ref.loc7_20, %T.as_type.loc7_20.2 [symbolic = %T.as_type.loc7_20.1 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %z: @fn.loc7.%T.as_type.loc7_20.1 (%T.as_type) = wrapper_binding z, %z.param
// CHECK:STDOUT: %return.param: ref @fn.loc7.%T.as_type.loc7_20.1 (%T.as_type) = out_param call_param1
@@ -1076,7 +1080,7 @@ fn F() {
// CHECK:STDOUT: %y.ref: @fn.loc6.%T.as_type.loc6_18.1 (%T.as_type) = name_ref y, %y
// CHECK:STDOUT: %.loc9_10.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %.loc9_10.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T (constants.%T.f84)]
// CHECK:STDOUT: %fn.specific_fn.loc7_28.1: <specific function> = specific_function %fn.decl, @fn.loc7(constants.%T.f84) [symbolic = %fn.specific_fn.loc7_28.2 (constants.%fn.specific_fn.63f)]
// CHECK:STDOUT: %fn.specific_fn.loc7_28.1: <specific function> = specific_function %fn.decl, @fn.loc7(constants.%T.f84) [symbolic = %fn.specific_fn.loc7_28.2 (constants.%fn.specific_fn.127)]
// CHECK:STDOUT: %.loc6_24.1: ref @fn.loc6.%T.as_type.loc6_18.1 (%T.as_type) = splice_block %return.param {}
// CHECK:STDOUT: %fn.call: init @fn.loc6.%T.as_type.loc6_18.1 (%T.as_type) to %.loc6_24.1 = call %fn.specific_fn.loc7_28.1(%y.ref)
// CHECK:STDOUT: return %fn.call to %return.param
@@ -1140,9 +1144,9 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%require_complete.d83
// CHECK:STDOUT: %fn.type => constants.%fn.type.a09
// CHECK:STDOUT: %fn => constants.%fn.ecf
// CHECK:STDOUT: %fn.specific_fn.loc7_28.2 => constants.%fn.specific_fn.63f
// CHECK:STDOUT: %fn.type => constants.%fn.type.3f9
// CHECK:STDOUT: %fn => constants.%fn.8a9
// CHECK:STDOUT: %fn.specific_fn.loc7_28.2 => constants.%fn.specific_fn.127
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @fn.loc7(constants.%T.f84) {
@@ -1177,9 +1181,9 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
// CHECK:STDOUT: %fn.type => constants.%fn.type.923
// CHECK:STDOUT: %fn => constants.%fn.793
// CHECK:STDOUT: %fn.specific_fn.loc6_26.2 => constants.%fn.specific_fn.41b
// CHECK:STDOUT: %fn.type => constants.%fn.type.7b0
// CHECK:STDOUT: %fn => constants.%fn.758
// CHECK:STDOUT: %fn.specific_fn.loc6_26.2 => constants.%fn.specific_fn.2f6
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @fn.loc5(constants.%Copy.facet.7af) {
@@ -1195,9 +1199,9 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.127
// CHECK:STDOUT: %fn.type => constants.%fn.type.da6
// CHECK:STDOUT: %fn => constants.%fn.e2b
// CHECK:STDOUT: %fn.specific_fn.loc6_26.2 => constants.%fn.specific_fn.88e
// CHECK:STDOUT: %fn.type => constants.%fn.type.641
// CHECK:STDOUT: %fn => constants.%fn.3e7
// CHECK:STDOUT: %fn.specific_fn.loc6_26.2 => constants.%fn.specific_fn.421
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @fn.loc6(constants.%Copy.facet.95d) {
@@ -1212,9 +1216,9 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
// CHECK:STDOUT: %fn.type => constants.%fn.type.7e4
// CHECK:STDOUT: %fn => constants.%fn.ea4
// CHECK:STDOUT: %fn.specific_fn.loc7_28.2 => constants.%fn.specific_fn.01e
// CHECK:STDOUT: %fn.type => constants.%fn.type.8ae
// CHECK:STDOUT: %fn => constants.%fn.c3f
// CHECK:STDOUT: %fn.specific_fn.loc7_28.2 => constants.%fn.specific_fn.0fa
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @fn.loc6(constants.%Copy.facet.7af) {
@@ -1229,9 +1233,9 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.127
// CHECK:STDOUT: %fn.type => constants.%fn.type.16e
// CHECK:STDOUT: %fn => constants.%fn.8bf
// CHECK:STDOUT: %fn.specific_fn.loc7_28.2 => constants.%fn.specific_fn.b95
// CHECK:STDOUT: %fn.type => constants.%fn.type.d03
// CHECK:STDOUT: %fn => constants.%fn.b92
// CHECK:STDOUT: %fn.specific_fn.loc7_28.2 => constants.%fn.specific_fn.c7b
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @fn.loc7(constants.%Copy.facet.95d) {
+7 -3
View File
@@ -301,8 +301,9 @@ fn F() {
// CHECK:STDOUT: %return.param_patt.loc5_44.1: @IndexWith.WithSelf.At.%pattern_type.loc5_44 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc5_44.2 (constants.%return.param_patt)]
// CHECK:STDOUT: %return.patt.loc5_41.1: @IndexWith.WithSelf.At.%pattern_type.loc5_44 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc5_44.1, %ElementType.ref [symbolic = %return.patt.loc5_41.2 (constants.%return.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, @IndexWith.%ElementType.loc4_53.2 [symbolic = %ElementType (constants.%ElementType)]
// CHECK:STDOUT: %.loc5_44.2: Core.Form = init_form %ElementType.ref [symbolic = %.loc5_44.1 (constants.%.822)]
// CHECK:STDOUT: %.loc5_44.2: type = specific_constant @IndexWith.%ElementType.loc4_53.2, @IndexWith(constants.%SubscriptType, constants.%ElementType) [symbolic = %ElementType (constants.%ElementType)]
// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, %.loc5_44.2 [symbolic = %ElementType (constants.%ElementType)]
// CHECK:STDOUT: %.loc5_44.3: Core.Form = init_form %ElementType.ref [symbolic = %.loc5_44.1 (constants.%.822)]
// CHECK:STDOUT: %self.param: @IndexWith.WithSelf.At.%Self.as_type.loc5_9.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc5_9.1: type = splice_block %.loc5_9.3 [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %.loc5_9.2: @IndexWith.WithSelf.At.%IndexWith.type (%IndexWith.type.3a9) = specific_constant @IndexWith.%Self.loc4_61.1, @IndexWith(constants.%SubscriptType, constants.%ElementType) [symbolic = %Self (constants.%Self)]
@@ -312,7 +313,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @IndexWith.WithSelf.At.%Self.as_type.loc5_9.1 (%Self.as_type) = wrapper_binding self, %self.param
// CHECK:STDOUT: %subscript.param: @IndexWith.WithSelf.At.%SubscriptType (%SubscriptType) = value_param call_param1
// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, @IndexWith.%SubscriptType.loc4_34.2 [symbolic = %SubscriptType (constants.%SubscriptType)]
// CHECK:STDOUT: %.loc5_26.1: type = splice_block %SubscriptType.ref [symbolic = %SubscriptType (constants.%SubscriptType)] {
// CHECK:STDOUT: %.loc5_26.2: type = specific_constant @IndexWith.%SubscriptType.loc4_34.2, @IndexWith(constants.%SubscriptType, constants.%ElementType) [symbolic = %SubscriptType (constants.%SubscriptType)]
// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, %.loc5_26.2 [symbolic = %SubscriptType (constants.%SubscriptType)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %subscript: @IndexWith.WithSelf.At.%SubscriptType (%SubscriptType) = wrapper_binding subscript, %subscript.param
// CHECK:STDOUT: %return.param: ref @IndexWith.WithSelf.At.%ElementType (%ElementType) = out_param call_param2
// CHECK:STDOUT: %return: ref @IndexWith.WithSelf.At.%ElementType (%ElementType) = return_slot %return.param
+3 -2
View File
@@ -287,8 +287,9 @@ let n: type = i32;
// CHECK:STDOUT: %return.param_patt.loc9_23.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc9_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc9_23.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc9_20.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc9_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc9_23.1, %T.ref [symbolic = %return.patt.loc9_20.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc8_23.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc9_23.2: Core.Form = init_form %T.ref [symbolic = %.loc9_23.1 (constants.%.184)]
// CHECK:STDOUT: %.loc9_23.2: type = specific_constant @ImplicitAs.%T.loc8_23.2, @ImplicitAs(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc9_23.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %.loc9_23.3: Core.Form = init_form %T.ref [symbolic = %.loc9_23.1 (constants.%.184)]
// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc9_14.1 (%Self.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc9_14.1: type = splice_block %.loc9_14.3 [symbolic = %Self.as_type.loc9_14.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %.loc9_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.b02) = specific_constant @ImplicitAs.%Self.loc8_31.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)]
@@ -14,40 +14,89 @@
// This previously crashed due to the local function not having a parent name
// scope.
class S {
fn Make() -> S { return {.n = 0}; }
var n: i32;
}
fn EnclosingTemplate(template T: type) -> i32 {
let a: T = T.Make();
fn Local(y: typeof(a.n)) -> typeof(a.n) {
return y;
}
return Local(a.n);
}
fn F(generic T: Core.Copy, y: T) -> T {
fn G(x: T) -> T { return x; }
return G(y);
}
fn Run() -> i32 {
return F(i32, 0);
return F(i32, EnclosingTemplate(S));
}
// CHECK:STDOUT: ; ---
// CHECK:STDOUT: ; ModuleID = 'local_function.carbon'
// CHECK:STDOUT: source_filename = "local_function.carbon"
// CHECK:STDOUT:
// CHECK:STDOUT: @S.val.loc18_35 = internal constant { i32 } zeroinitializer
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define i32 @main() #0 !dbg !39 {
// CHECK:STDOUT: define void @_CMake.S.Main(ptr sret({ i32 }) %return) #0 !dbg !42 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %F.call = call i32 @_CF.Main.2fad9574e050607e(i32 0), !dbg !42
// CHECK:STDOUT: ret i32 %F.call, !dbg !45
// CHECK:STDOUT: %.loc18_34.3.n = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !45
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @S.val.loc18_35, i64 4, i1 false), !dbg !46
// CHECK:STDOUT: ret void, !dbg !46
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.2fad9574e050607e(i32 %y) #0 !dbg !46 {
// CHECK:STDOUT: define i32 @main() #0 !dbg !47 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %G.call = call i32 @"_CG:enclosed.2fad9574e050607e"(i32 %y), !dbg !52
// CHECK:STDOUT: ret i32 %G.call, !dbg !53
// CHECK:STDOUT: %EnclosingTemplate.call = call i32 @_CEnclosingTemplate.Main.d82ccacf0414a2bc(), !dbg !50
// CHECK:STDOUT: %F.call = call i32 @_CF.Main.2fad9574e050607e(i32 %EnclosingTemplate.call), !dbg !51
// CHECK:STDOUT: ret i32 %F.call, !dbg !54
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
// CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr i32 @_CEnclosingTemplate.Main.d82ccacf0414a2bc() #0 !dbg !55 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.405.temp = alloca { i32 }, align 4, !dbg !58
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.405.temp), !dbg !58
// CHECK:STDOUT: call void @_CMake.S.Main(ptr %.405.temp), !dbg !58
// CHECK:STDOUT: %.134.n = getelementptr inbounds nuw { i32 }, ptr %.405.temp, i32 0, i32 0, !dbg !61
// CHECK:STDOUT: %.1c7 = load i32, ptr %.134.n, align 4, !dbg !61
// CHECK:STDOUT: %Local.call = call i32 @"_CLocal:enclosed.d82ccacf0414a2bc"(i32 %.1c7), !dbg !62
// CHECK:STDOUT: ret i32 %Local.call, !dbg !63
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr i32 @"_CG:enclosed.2fad9574e050607e"(i32 %x) #0 !dbg !55 {
// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.2fad9574e050607e(i32 %y) #0 !dbg !64 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret i32 %x, !dbg !61
// CHECK:STDOUT: %G.call = call i32 @"_CG:enclosed.2fad9574e050607e"(i32 %y), !dbg !70
// CHECK:STDOUT: ret i32 %G.call, !dbg !71
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr i32 @"_CLocal:enclosed.d82ccacf0414a2bc"(i32 %y) #0 !dbg !73 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret i32 %y, !dbg !79
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr i32 @"_CG:enclosed.2fad9574e050607e"(i32 %x) #0 !dbg !81 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret i32 %x, !dbg !87
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: attributes #0 = { nounwind }
// CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!35}
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3}
@@ -57,20 +106,36 @@ fn Run() -> i32 {
// CHECK:STDOUT: !34 = !DIFile(filename: "local_function.carbon", directory: "")
// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
// CHECK:STDOUT: !37 = !{!36}
// CHECK:STDOUT: !38 = !DISubroutineType(types: !37)
// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !34, line: 22, type: !38, spFlags: DISPFlagDefinition, unit: !35)
// CHECK:STDOUT: !42 = !DILocation(line: 23, column: 10, scope: !39)
// CHECK:STDOUT: !43 = !{!36, !36}
// CHECK:STDOUT: !44 = !DISubroutineType(types: !43)
// CHECK:STDOUT: !45 = !DILocation(line: 23, column: 3, scope: !39)
// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !34, line: 17, type: !44, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !54)
// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !36)
// CHECK:STDOUT: !52 = !DILocation(line: 19, column: 10, scope: !46)
// CHECK:STDOUT: !53 = !DILocation(line: 19, column: 3, scope: !46)
// CHECK:STDOUT: !54 = !{!47}
// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "G", linkageName: "_CG:enclosed.2fad9574e050607e", scope: null, file: !34, line: 18, type: !44, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !62)
// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !36)
// CHECK:STDOUT: !61 = !DILocation(line: 18, column: 21, scope: !55)
// CHECK:STDOUT: !62 = !{!56}
// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !38 = !{!37}
// CHECK:STDOUT: !39 = !DISubroutineType(types: !38)
// CHECK:STDOUT: !40 = !{!36}
// CHECK:STDOUT: !41 = !DISubroutineType(types: !40)
// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.S.Main", scope: null, file: !34, line: 18, type: !39, spFlags: DISPFlagDefinition, unit: !35)
// CHECK:STDOUT: !45 = !DILocation(line: 18, column: 27, scope: !42)
// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 20, scope: !42)
// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !34, line: 35, type: !41, spFlags: DISPFlagDefinition, unit: !35)
// CHECK:STDOUT: !50 = !DILocation(line: 36, column: 17, scope: !47)
// CHECK:STDOUT: !51 = !DILocation(line: 36, column: 10, scope: !47)
// CHECK:STDOUT: !52 = !{!36, !36}
// CHECK:STDOUT: !53 = !DISubroutineType(types: !52)
// CHECK:STDOUT: !54 = !DILocation(line: 36, column: 3, scope: !47)
// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "EnclosingTemplate", linkageName: "_CEnclosingTemplate.Main.d82ccacf0414a2bc", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35)
// CHECK:STDOUT: !58 = !DILocation(line: 23, column: 14, scope: !55)
// CHECK:STDOUT: !61 = !DILocation(line: 27, column: 16, scope: !55)
// CHECK:STDOUT: !62 = !DILocation(line: 27, column: 10, scope: !55)
// CHECK:STDOUT: !63 = !DILocation(line: 27, column: 3, scope: !55)
// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !34, line: 30, type: !53, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72)
// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !36)
// CHECK:STDOUT: !70 = !DILocation(line: 32, column: 10, scope: !64)
// CHECK:STDOUT: !71 = !DILocation(line: 32, column: 3, scope: !64)
// CHECK:STDOUT: !72 = !{!65}
// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Local", linkageName: "_CLocal:enclosed.d82ccacf0414a2bc", scope: null, file: !34, line: 24, type: !53, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !80)
// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !36)
// CHECK:STDOUT: !79 = !DILocation(line: 25, column: 5, scope: !73)
// CHECK:STDOUT: !80 = !{!74}
// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "G", linkageName: "_CG:enclosed.2fad9574e050607e", scope: null, file: !34, line: 31, type: !53, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !88)
// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !36)
// CHECK:STDOUT: !87 = !DILocation(line: 31, column: 21, scope: !81)
// CHECK:STDOUT: !88 = !{!82}
// CHECK:STDOUT:
+17 -11
View File
@@ -148,8 +148,8 @@ using SpecificsByGeneric =
GroupedValueStore<GenericId, SpecificId, Tag<CheckIRId>>;
// Collects the specifics in `file`, grouped by the generic they're a specific
// of. A specific that has never been resolved, or whose resolution failed,
// doesn't have instructions to check, so is omitted.
// of. A specific whose definition has never been resolved, or whose resolution
// failed, doesn't have body instructions to check, so is omitted.
//
// This grouping is built once for the file so that each generic function can
// find its own specifics without scanning all of them.
@@ -159,7 +159,7 @@ using SpecificsByGeneric =
auto CollectSpecifics(const File& file) -> SpecificsByGeneric {
return SpecificsByGeneric(file.generics(), [&](auto add) {
for (const auto& [specific_id, specific] : file.specifics().enumerate()) {
if (specific.IsUnresolved() || specific.HasError()) {
if (!specific.definition_block_id.has_value() || specific.HasError()) {
continue;
}
add(specific.generic_id, specific_id);
@@ -541,6 +541,18 @@ auto DominanceVerifier::VerifyAndRecordInst(InstId root_inst_id,
continue;
}
// A non-constant `SpecificInst` evaluates to the value of the instruction
// that its `AbsoluteInstId` operand names.
if (auto specific_inst = inst.TryAs<SpecificInst>()) {
if (!GetConstantValueInSpecific(file_, specific_id_, inst_id)
.is_constant()) {
CARBON_RETURN_IF_ERROR(
VerifyOperand(inst_id, specific_inst->inst_id, block_index));
}
RecordEvaluated(inst_id);
continue;
}
CARBON_RETURN_IF_ERROR(
VerifyArg(inst_id, inst.arg0_and_kind(), block_index));
CARBON_RETURN_IF_ERROR(
@@ -598,14 +610,8 @@ auto DominanceVerifier::VerifyOperand(InstId user_id, InstId operand_id,
return Success();
}
// A constant isn't evaluated in the function body, so can be used anywhere.
//
// TODO: Use `GetConstantValueInSpecific` here, so that an instruction that is
// only constant in this specific is also exempt. That currently crashes,
// because a function body can name an instruction whose constant value is
// attached to an enclosing generic rather than to this function's generic,
// which `GetConstantInSpecific` rejects. Lowering should hit the same crash;
// see `FunctionContext::LowerInst`.
if (file_.constant_values().Get(operand_id).is_constant()) {
if (GetConstantValueInSpecific(file_, specific_id_, operand_id)
.is_constant()) {
return Success();
}
if (evaluated_.Contains(operand_id)) {
+79
View File
@@ -478,5 +478,84 @@ TEST_F(DominanceSpecificSpliceTest, SplicedUseInSpecificIsNotDominated) {
EXPECT_THAT(Verify(), HasSubstr("not dominated by any evaluation"));
}
TEST_F(DominanceTest, SpecificInstDominatedByEvaluation) {
auto generic_id = AddGeneric();
auto specific_id = file().specifics().GetOrAdd(generic_id, InstBlockId::Empty,
/*identified=*/false);
auto value_id = AddValue();
auto specific_inst_id =
AddNonConstInst(SpecificInst{.type_id = TypeType::TypeId,
.inst_id = value_id,
.specific_id = specific_id});
AddFunction({AddBlock({value_id, specific_inst_id, AddReturn()})});
EXPECT_THAT(Verify(), IsEmpty());
}
TEST_F(DominanceTest, SpecificInstNotDominated) {
auto generic_id = AddGeneric();
auto specific_id = file().specifics().GetOrAdd(generic_id, InstBlockId::Empty,
/*identified=*/false);
auto value_id = AddValue();
auto specific_inst_id =
AddNonConstInst(SpecificInst{.type_id = TypeType::TypeId,
.inst_id = value_id,
.specific_id = specific_id});
AddFunction({AddBlock({specific_inst_id, value_id, AddReturn()})});
EXPECT_THAT(Verify(), HasSubstr("not dominated by any evaluation"));
}
// A generic function whose body uses an instruction that has a template
// symbolic constant value in the generic, which resolves to the first entry of
// the specific's declaration value block when checked in the specific.
class DominanceOperandConstantInSpecificTest : public DominanceTest {
protected:
auto MakeSymbolicInGeneric(GenericId generic_id) -> InstId {
auto unattached_id = AddInst(
BoolLiteral{.type_id = TypeType::TypeId, .value = BoolValue(false)});
file().constant_values().Set(
unattached_id, file().constant_values().AddSymbolicConstant(
{.inst_id = unattached_id,
.generic_id = GenericId::None,
.index = GenericInstIndex::None,
.dependence = ConstantDependence::Template}));
auto inst_id = AddInst(
BoolLiteral{.type_id = TypeType::TypeId, .value = BoolValue(false)});
file().constant_values().Set(
inst_id,
file().constant_values().AddSymbolicConstant(
{.inst_id = unattached_id,
.generic_id = generic_id,
.index = GenericInstIndex(GenericInstIndex::Declaration, 0),
.dependence = ConstantDependence::Template}));
return inst_id;
}
};
TEST_F(DominanceOperandConstantInSpecificTest, ConstantInSpecificIsExempt) {
// `sym_id` is a symbolic constant in the generic and is constant in the
// specific, so using it before its evaluation passes verification in both.
auto generic_id = AddGeneric(AddBlock({AddConstant()}));
auto sym_id = MakeSymbolicInGeneric(generic_id);
AddFunction({AddBlock({AddUse(sym_id), sym_id, AddReturn()})}, generic_id);
EXPECT_THAT(Verify(), IsEmpty());
}
TEST_F(DominanceOperandConstantInSpecificTest,
NonConstantInSpecificRequiresDominance) {
// `sym_id` is a symbolic constant in the generic, so using it before its
// evaluation passes generic verification, but in the specific it resolves to
// a non-constant value (represented by `InstId::None` in the value block
// below), so we require its evaluation to dominate the use.
auto generic_id = AddGeneric(AddBlock({InstId::None}));
auto sym_id = MakeSymbolicInGeneric(generic_id);
AddFunction({AddBlock({AddUse(sym_id), sym_id, AddReturn()})}, generic_id);
EXPECT_THAT(Verify(), HasSubstr("not dominated by any evaluation"));
}
} // namespace
} // namespace Carbon::SemIR
@@ -131,6 +131,9 @@ class DominanceTestFile {
file_.specifics()
.Get(specific_id)
.SetValueBlock(GenericInstIndex::Declaration, value_block_id);
file_.specifics()
.Get(specific_id)
.SetValueBlock(GenericInstIndex::Definition, InstBlockId::Empty);
return generic_id;
}
+7 -6
View File
@@ -2002,9 +2002,9 @@ struct ReturnSlotPattern {
TypeInstId type_inst_id;
};
// Given an instruction with a constant value that depends on a generic
// parameter, selects a version of that instruction with the constant value
// corresponding to a particular specific.
// Given a constant instruction whose constant value or type depends on a
// generic parameter, selects a version of that instruction with the type and
// constant value corresponding to a particular specific.
struct SpecificConstant {
// TODO: Can we make Parse::NodeId more specific?
static constexpr auto Kind = InstKind::SpecificConstant.Define<Parse::NodeId>(
@@ -2083,9 +2083,10 @@ struct SpecificImplFunction {
// used to refer to constants and to instructions from the same scope (and hence
// the same specific) that this instruction occupies.
//
// This is used as a convenience during action evaluation to allow an action to
// refer to its `MetaInstId` operands from the generic with their specific types
// and constant values.
// This is used for lexical references to non-constant instructions from an
// enclosing generic, and as a convenience during action evaluation to allow an
// action to refer to its `MetaInstId` operands from the generic with their
// specific types and constant values.
struct SpecificInst {
static constexpr auto Kind = InstKind::SpecificInst.Define<Parse::NodeId>(
{.ir_name = "specific_inst",