Avoid impl lookup cycles from evaluating lookup instructions inside an impl decl (#7454)

`LookupImplWitness` instructions inside the impl declaration can't use
the impl they are apart of. Previously we had an heuristic in eval which
would try to prevent finding the impl for a lookup from inside that
impl. But it breaks when the `.Self` is replaced in a generic impl with
a symbolic, and then that symbolic is replaced in a specific. The
specific's decl block contains that `LookupImplWitness` instruction and
it tries to use the impl it came from. This causes the same specific to
be formed again, but now it exists, so it's used as-is but it has no
decl block yet, and so we crash.

Now we ban an impl while we resolve its specific, both deduction of its
arguments and from any other substitution. The prevents instructions
from inside the impl (which are evaluated when resolving the specific)
from finding their own impl. We do so by adding the ImplId to a stack on
the Context, and then skipping such impls when looking for candidates
during eval.

This fixes a crash, which was demonstrated by the new test being added.
It also makes another todo test pass.

There's a whole lot of other semir churn, which seems to be mostly
reordering of constants. There are some fingerprint changes in
constants, but it appears they are the same canonical instructions, so
they don't represent a behaviour change. For example in
`toolchain/check/testdata/for/actual.carbon` the `%N.patt` constant has
been given its fingerprint suffix now as `%N.patt.aa5`. But they are
both this instruction, so it is just a formatting change:

```
inst6100001A: {kind: SymbolicBindingPattern, arg0: entity_name61000002, type: type(inst61000018)}
  - name: `N`
  - type: type(inst61000018): <pattern for Core.IntLiteral>; {kind: PatternType, arg0: inst(IntLiteralType), type: type(TypeType)} (concrete)
  - value: symbolic_constant61000001
```
This commit is contained in:
Dana Jansens
2026-07-09 20:38:56 +00:00
committed by GitHub
parent 06e31437b9
commit c74bb933d2
15 changed files with 659 additions and 625 deletions
+9
View File
@@ -291,6 +291,10 @@ class Context {
return where_stack_;
}
auto forbidden_impls() -> llvm::SmallVector<SemIR::ImplId>& {
return forbidden_impls_;
}
// Data about a form expression.
//
// TODO: consider moving this out of Context.
@@ -579,6 +583,11 @@ class Context {
// being checked so that they can be used by later constraints.
llvm::SmallVector<WhereStackEntry> where_stack_;
// Impls that cannot be used in impl lookup. This prevents cycles where a
// `LookupImplWitness` instruction inside the impl decl should not be able to
// find the containing impl decl.
llvm::SmallVector<SemIR::ImplId> forbidden_impls_;
// Declared return form for the in-progress function declaration, if any.
std::optional<FormExpr> return_form_expr_;
+2 -1
View File
@@ -647,9 +647,10 @@ auto DeduceGenericCallArguments(
}
auto DeduceImplArguments(Context& context, SemIR::LocId loc_id,
const SemIR::Impl& impl, SemIR::ConstantId self_id,
SemIR::ImplId impl_id, SemIR::ConstantId self_id,
SemIR::SpecificId constraint_specific_id)
-> SemIR::SpecificId {
const auto& impl = context.impls().Get(impl_id);
DeductionContext deduction(&context, loc_id, impl.generic_id,
/*enclosing_specific_id=*/SemIR::SpecificId::None,
/*diagnose=*/false);
+1 -1
View File
@@ -23,7 +23,7 @@ auto DeduceGenericCallArguments(Context& context, SemIR::LocId loc_id,
// Deduces the impl arguments to use in a use of a parameterized impl. Returns
// `None` if deduction fails.
auto DeduceImplArguments(Context& context, SemIR::LocId loc_id,
const SemIR::Impl& impl, SemIR::ConstantId self_id,
SemIR::ImplId impl_id, SemIR::ConstantId self_id,
SemIR::SpecificId constraint_specific_id)
-> SemIR::SpecificId;
+15
View File
@@ -666,9 +666,24 @@ auto ResolveSpecificDecl(Context& context, SemIR::LocId loc_id,
// recursively resolve the same specific.
specific.decl_block_id = SemIR::InstBlockId::Empty;
// When resolving a specific for an `impl`, we will rebuild and evaluate any
// `LookupImplWitness` instructions in the `impl` declaration. These lookups
// should not find the `impl` that contains them or they become cyclical.
const auto& generic = context.generics().Get(specific.generic_id);
bool is_impl_decl = false;
if (auto decl =
context.insts().TryGetAs<SemIR::ImplDecl>(generic.decl_id)) {
is_impl_decl = true;
context.forbidden_impls().push_back(decl->impl_id);
}
std::tie(specific.decl_block_id, specific.decl_block_has_error) =
TryEvalBlockForSpecific(context, loc_id, specific_id,
SemIR::GenericInstIndex::Region::Declaration);
if (is_impl_decl) {
context.forbidden_impls().pop_back();
}
}
}
+4 -2
View File
@@ -206,6 +206,7 @@ static auto VerifyImplRedecl(Context& context, const SemIR::Impl& new_impl,
// false is returned.
static auto VerifyAllGenericBindingsUsed(Context& context, SemIR::LocId loc_id,
SemIR::LocId implicit_params_loc_id,
SemIR::ImplId impl_id,
SemIR::Impl& impl) -> bool {
if (impl.witness_id == SemIR::ErrorInst::InstId) {
return true;
@@ -225,7 +226,7 @@ static auto VerifyAllGenericBindingsUsed(Context& context, SemIR::LocId loc_id,
}
auto deduced_specific_id = DeduceImplArguments(
context, loc_id, impl, context.constant_values().Get(impl.self_id),
context, loc_id, impl_id, context.constant_values().Get(impl.self_id),
impl.interface.specific_id);
if (deduced_specific_id.has_value()) {
// Deduction succeeded, all bindings were used.
@@ -376,7 +377,8 @@ auto AddImpl(Context& context, const SemIR::Impl& impl,
// its generic bindings, and will never be matched. This should be
// diagnossed to the user.
if (!VerifyAllGenericBindingsUsed(context, SemIR::LocId(impl_decl_id),
implicit_params_loc_id, stored_impl)) {
implicit_params_loc_id, impl_id,
stored_impl)) {
FillImplWitnessWithErrors(context, stored_impl);
}
+21 -32
View File
@@ -256,15 +256,15 @@ static auto TreatImplAsFinal(Context& context, const SemIR::Impl& impl)
static auto TryGetSpecificWitnessIdForImpl(
Context& context, SemIR::LocId loc_id,
SemIR::ConstantId query_self_const_id,
const SemIR::SpecificInterface& interface, const SemIR::Impl& impl)
-> SemIR::ConstantId {
const SemIR::SpecificInterface& interface, SemIR::ImplId impl_id,
const SemIR::Impl& impl) -> SemIR::ConstantId {
// The impl may have generic arguments, in which case we need to deduce them
// to find what they are given the specific type and interface query. We use
// that specific to map values in the impl to the deduced values.
auto specific_id = SemIR::SpecificId::None;
if (impl.generic_id.has_value()) {
specific_id = DeduceImplArguments(
context, loc_id, impl, query_self_const_id, interface.specific_id);
context, loc_id, impl_id, query_self_const_id, interface.specific_id);
if (!specific_id.has_value()) {
return SemIR::ConstantId::None;
}
@@ -672,6 +672,7 @@ class ImportImplFilter {
} // namespace
struct CandidateImpl {
SemIR::ImplId impl_id;
const SemIR::Impl* impl;
// Used for sorting the candidates to find the most-specialized match.
@@ -717,13 +718,17 @@ static auto CollectCandidateImplsForQuery(
for (auto [id, impl] : context.impls().enumerate()) {
CARBON_CHECK(impl.witness_id.has_value());
// If the impl's interface_id differs from the query, then this impl can
// not possibly provide the queried interface.
if (impl.interface.interface_id != query_specific_interface.interface_id) {
continue;
}
if (final_only && !TreatImplAsFinal(context, impl)) {
continue;
}
// If the impl's interface_id differs from the query, then this impl can
// not possibly provide the queried interface.
if (impl.interface.interface_id != query_specific_interface.interface_id) {
if (llvm::is_contained(context.forbidden_impls(), id)) {
continue;
}
@@ -756,7 +761,7 @@ static auto CollectCandidateImplsForQuery(
continue;
}
candidates.impls.push_back({&impl, std::move(*type_structure)});
candidates.impls.push_back({id, &impl, std::move(*type_structure)});
}
auto compare = [](auto& lhs, auto& rhs) -> bool {
@@ -911,11 +916,13 @@ static auto FindNonFinalWitness(
req_specific_interface);
for (const auto& candidate : candidates.impls) {
auto impl_id = candidate.impl_id;
const auto& impl = *candidate.impl;
context.impl_lookup_stack().back().impl_loc = impl.definition_id;
auto witness_id = TryGetSpecificWitnessIdForImpl(
context, loc_id, req_self_const_id, req_specific_interface, impl);
auto witness_id =
TryGetSpecificWitnessIdForImpl(context, loc_id, req_self_const_id,
req_specific_interface, impl_id, impl);
if (witness_id.has_value()) {
// We looked for errors in the query self and facet type already, and
// we're not dealing with monomorphizations here.
@@ -1179,26 +1186,6 @@ auto EvalLookupSingleFinalWitness(Context& context, SemIR::LocId loc_id,
}
}
// If the query is on `.Self` and looking for the same interface as `.Self`
// provides, do not look for a witness in monomorphization - a non-final
// witness will be found from the facet type. This happens inside an `impl`
// declaration, and we must avoid finding that same `impl` and trying to
// deduce `.Self` for it, as that results in a specific declaration for the
// `impl` which evaluates this lookup again, producing a cycle.
//
// If the query is for `.Self` and for the facet type of `.Self`, then there
// is no final witness yet.
if (auto bind = context.insts().TryGetAs<SemIR::SymbolicBinding>(
eval_query.query_self_inst_id)) {
const auto& entity = context.entity_names().Get(bind->entity_name_id);
if (entity.name_id == SemIR::NameId::PeriodSelf) {
if (FacetTypeIsSingleInterface(context, bind->type_id,
query_specific_interface)) {
return SemIR::ConstantId::None;
}
}
}
// Check to see if this result is in the cache. But skip the cache if we're
// re-checking a poisoned result and need to redo the lookup.
auto impl_lookup_cache_key = Context::ImplLookupCacheKey{
@@ -1261,6 +1248,7 @@ auto EvalLookupSingleFinalWitness(Context& context, SemIR::LocId loc_id,
// Only consider candidates when a custom witness didn't apply.
if (!used_custom_witness) {
for (const auto& candidate : candidates.impls) {
auto impl_id = candidate.impl_id;
const auto& impl = *candidate.impl;
// In monomorphization, while resolving a specific, there may be no stack
@@ -1271,7 +1259,8 @@ auto EvalLookupSingleFinalWitness(Context& context, SemIR::LocId loc_id,
}
auto witness_id = TryGetSpecificWitnessIdForImpl(
context, loc_id, query_self_const_id, query_specific_interface, impl);
context, loc_id, query_self_const_id, query_specific_interface,
impl_id, impl);
if (witness_id.has_value()) {
PoisonImplLookupQuery(context, loc_id, mode, eval_query, witness_id,
impl);
@@ -1308,13 +1297,13 @@ auto EvalLookupSingleFinalWitness(Context& context, SemIR::LocId loc_id,
auto LookupMatchesImpl(Context& context, SemIR::LocId loc_id,
SemIR::ConstantId query_self_const_id,
SemIR::SpecificInterface query_specific_interface,
SemIR::ImplId target_impl) -> bool {
SemIR::ImplId target_impl_id) -> bool {
if (query_self_const_id == SemIR::ErrorInst::ConstantId) {
return false;
}
auto witness_id = TryGetSpecificWitnessIdForImpl(
context, loc_id, query_self_const_id, query_specific_interface,
context.impls().Get(target_impl));
target_impl_id, context.impls().Get(target_impl_id));
// TODO: If this fails, it would be because there is an error in the specific
// interface. Should we check for that and return false?
CARBON_CHECK(witness_id != SemIR::ErrorInst::ConstantId,
+1 -1
View File
@@ -45,7 +45,7 @@ auto LookupImplWitness(Context& context, SemIR::LocId loc_id,
auto LookupMatchesImpl(Context& context, SemIR::LocId loc_id,
SemIR::ConstantId query_self_const_id,
SemIR::SpecificInterface query_specific_interface,
SemIR::ImplId target_impl) -> bool;
SemIR::ImplId target_impl_id) -> bool;
// Given a self facet, returns the canonical query self for a LookupImplWitness
// instruction. The canonicalization looks through `FacetValue` and makes a
+1 -8
View File
@@ -468,7 +468,7 @@ fn H(T:! (L where .Self impls M) where C(.W) impls Z(.Self)) {
C(()) as Z(T);
}
// --- fail_todo_concrete_access_witness_m_in_earlier_constraint.carbon
// --- concrete_access_witness_m_in_earlier_constraint.carbon
library "[[@TEST_NAME]]";
interface L { let W:! type; }
@@ -484,14 +484,7 @@ class C(C1:! type);
// Should pass. `.W` can resolve to `()` immediately through the type of `.Self`
// (since the type of `.Self` contains `M`) and the `final impl`. So we can get
// a witness for `C(())` from `T`.
//
// TODO: How come we don't get `.W` evaluating to `()` when `M` comes from an
// earlier constraint? Is the `where_stack` not working with `.Self`?
fn G(T:! L where .Self impls M and C(.W) impls Z(.Self)) {
// CHECK:STDERR: fail_todo_concrete_access_witness_m_in_earlier_constraint.carbon:[[@LINE+4]]:3: error: cannot convert type `C(())` into type implementing `Z(T)` [ConversionFailureTypeToFacet]
// CHECK:STDERR: C(()) as Z(T);
// CHECK:STDERR: ^~~~~~~~~~~~~
// CHECK:STDERR:
C(()) as Z(T);
}
@@ -48,7 +48,7 @@ fn F(U:! type, unused T:! I(U) where .X = ()) {}
fn G() {
// This finds the impl where `.X = {}`, but F requires that `.X = ()`.
//
// CHECK:STDERR: fail_generic_interface_facet_value_wrong_specific_impl.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `I({}) where .(I({}).X) = ()` [ConversionFailureTypeToFacet]
// CHECK:STDERR: fail_generic_interface_facet_value_wrong_specific_impl.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `I({}) where {} = ()` [ConversionFailureTypeToFacet]
// CHECK:STDERR: F({}, C);
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: fail_generic_interface_facet_value_wrong_specific_impl.carbon:[[@LINE-7]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
+145 -145
View File
@@ -56,15 +56,15 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %.Self.frozen.197: %type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
// CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
// CHECK:STDOUT: %N.patt.aa5: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic]
// CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
// CHECK:STDOUT: %IntRange.type: type = generic_class_type @IntRange [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %IntRange.generic: %IntRange.type = struct_value () [concrete]
// CHECK:STDOUT: %IntRange.2c4: type = class_type @IntRange, @IntRange(%N) [symbolic]
// CHECK:STDOUT: %IntRange.2c4: type = class_type @IntRange, @IntRange(%N.fe9) [symbolic]
// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
// CHECK:STDOUT: %Int.67af24.1: type = class_type @Int, @Int(%N) [symbolic]
// CHECK:STDOUT: %Int.67af24.1: type = class_type @Int, @Int(%N.fe9) [symbolic]
// CHECK:STDOUT: %pattern_type.142cb7.1: type = pattern_type %Int.67af24.1 [symbolic]
// CHECK:STDOUT: %start.param_patt.b2c: %pattern_type.142cb7.1 = value_param_pattern [symbolic]
// CHECK:STDOUT: %start.patt.9ef: %pattern_type.142cb7.1 = at_binding_pattern start, %start.param_patt.b2c [symbolic]
@@ -74,7 +74,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %pattern_type.1ea: type = pattern_type %IntRange.2c4 [symbolic]
// CHECK:STDOUT: %return.param_patt.262: %pattern_type.1ea = out_param_pattern [symbolic]
// CHECK:STDOUT: %return.patt.dbf: %pattern_type.1ea = return_slot_pattern %return.param_patt.262, %IntRange.2c4 [symbolic]
// CHECK:STDOUT: %IntRange.Make.type.522: type = fn_type @IntRange.Make, @IntRange(%N) [symbolic]
// CHECK:STDOUT: %IntRange.Make.type.522: type = fn_type @IntRange.Make, @IntRange(%N.fe9) [symbolic]
// CHECK:STDOUT: %IntRange.Make.8ef: %IntRange.Make.type.522 = struct_value () [symbolic]
// CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete]
// CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete]
@@ -92,45 +92,62 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.bdd [symbolic_self]
// CHECK:STDOUT: %Iterate.assoc_type: type = assoc_entity_type @Iterate [concrete]
// CHECK:STDOUT: %assoc1.c91: %Iterate.assoc_type = assoc_entity element1, imports.%Core.import_ref.dd9 [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// 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.6b6: type = pattern_type %i32 [concrete]
// CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: <witness> = lookup_impl_witness %.Self.500, @Iterate [symbolic_self]
// CHECK:STDOUT: %impl.elem1.6f4: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.1d8, element1 [symbolic_self]
// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self]
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl.0e9(%To) [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.845: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74 = struct_value () [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.2ba: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl.0e9(%int_32) [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.2ba = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.type.914: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
// CHECK:STDOUT: %ImplicitAs.impl_witness.778: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.1f3, @Core.IntLiteral.as.ImplicitAs.impl.0e9(%int_32) [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
// CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic]
// CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete]
// CHECK:STDOUT: %Iterate.lookup_impl_witness.98d: <witness> = lookup_impl_witness %.Self.frozen.bdd, @Iterate [symbolic_self]
// CHECK:STDOUT: %impl.elem1.990: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.98d, element1 [symbolic_self]
// CHECK:STDOUT: %Destroy.lookup_impl_witness.173: <witness> = lookup_impl_witness %Int.67af24.1, @Destroy [symbolic]
// CHECK:STDOUT: %Destroy.facet.7bb: %Destroy.type = facet_value %Int.67af24.1, (%Destroy.lookup_impl_witness.173) [symbolic]
// CHECK:STDOUT: %assoc0.0f0: %Iterate.assoc_type = assoc_entity element0, imports.%Core.import_ref.ebd7 [concrete]
// CHECK:STDOUT: %impl.elem0.94d: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.98d, element0 [symbolic_self]
// CHECK:STDOUT: %require_complete.4dfb92.1: <witness> = require_complete_type %Int.67af24.1 [symbolic]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
// CHECK:STDOUT: %require_complete.4dfb92.2: <witness> = require_complete_type %Int.67af24.1 [symbolic]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic]
// CHECK:STDOUT: %return.param_patt.5a2679.1: %pattern_type.142cb7.1 = out_param_pattern [symbolic]
// CHECK:STDOUT: %.df5d8d.1: Core.Form = init_form %Int.67af24.1 [symbolic]
// CHECK:STDOUT: %return.param_patt.5a2679.2: %pattern_type.142cb7.1 = out_param_pattern [symbolic]
// CHECK:STDOUT: %.df5d8d.2: Core.Form = init_form %Int.67af24.1 [symbolic]
// CHECK:STDOUT: %Copy.lookup_impl_witness.df6: <witness> = lookup_impl_witness %Int.67af24.1, @Copy [symbolic]
// CHECK:STDOUT: %.a53: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic]
// CHECK:STDOUT: %facet_value: %facet_type.f48 = facet_value %Int.67af24.1, (%Destroy.lookup_impl_witness.173, %Copy.lookup_impl_witness.df6) [symbolic]
// CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self]
// CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: <witness> = lookup_impl_witness %.Self.500, @Iterate [symbolic_self]
// CHECK:STDOUT: %impl.elem1.6f4: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.1d8, element1 [symbolic_self]
// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self]
// CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where %impl.elem1.6f4 = %Destroy.facet.7bb and %impl.elem0.294 = %facet_value> [symbolic]
// CHECK:STDOUT: %Iterate.impl_witness: <witness> = impl_witness @IntRange.as.Iterate.impl.%Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N) [symbolic]
// CHECK:STDOUT: %require_complete.466: <witness> = require_complete_type %Iterate_where.type [symbolic]
// CHECK:STDOUT: %.a53: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N.fe9) [symbolic]
// CHECK:STDOUT: %facet_value.c69: %facet_type.f48 = facet_value %Int.67af24.1, (%Destroy.lookup_impl_witness.173, %Copy.lookup_impl_witness.df6) [symbolic]
// CHECK:STDOUT: %Iterate_where.type.836: type = facet_type <@Iterate where %impl.elem1.6f4 = %Destroy.facet.7bb and %impl.elem0.294 = %facet_value.c69> [symbolic]
// CHECK:STDOUT: %Iterate.impl_witness.81c: <witness> = impl_witness @IntRange.as.Iterate.impl.%Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N.fe9) [symbolic]
// CHECK:STDOUT: %require_complete.466: <witness> = require_complete_type %Iterate_where.type.836 [symbolic]
// CHECK:STDOUT: %self.param_patt.5cc: %pattern_type.1ea = value_param_pattern [symbolic]
// CHECK:STDOUT: %self.patt.13b: %pattern_type.1ea = at_binding_pattern self, %self.param_patt.5cc [symbolic]
// CHECK:STDOUT: %return.patt.434: %pattern_type.142cb7.1 = return_slot_pattern %return.param_patt.5a2679.1, %Int.67af24.1 [symbolic]
// CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type: type = fn_type @IntRange.as.Iterate.impl.NewCursor, @IntRange.as.Iterate.impl(%N) [symbolic]
// CHECK:STDOUT: %return.patt.434: %pattern_type.142cb7.1 = return_slot_pattern %return.param_patt.5a2679.2, %Int.67af24.1 [symbolic]
// CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type: type = fn_type @IntRange.as.Iterate.impl.NewCursor, @IntRange.as.Iterate.impl(%N.fe9) [symbolic]
// CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor: %IntRange.as.Iterate.impl.NewCursor.type = struct_value () [symbolic]
// CHECK:STDOUT: %ptr.41e: type = ptr_type %Int.67af24.1 [symbolic]
// CHECK:STDOUT: %pattern_type.833: type = pattern_type %ptr.41e [symbolic]
// CHECK:STDOUT: %cursor.param_patt.328: %pattern_type.833 = value_param_pattern [symbolic]
// CHECK:STDOUT: %cursor.patt.652: %pattern_type.833 = at_binding_pattern cursor, %cursor.param_patt.328 [symbolic]
// CHECK:STDOUT: %OptionalStorage.lookup_impl_witness.a32: <witness> = lookup_impl_witness %Int.67af24.1, @OptionalStorage [symbolic]
// CHECK:STDOUT: %.3c5: require_specific_def_type = require_specific_def @T.as_type.as.OptionalStorage.impl(%facet_value) [symbolic]
// CHECK:STDOUT: %.3c5: require_specific_def_type = require_specific_def @T.as_type.as.OptionalStorage.impl(%facet_value.c69) [symbolic]
// CHECK:STDOUT: %OptionalStorage.facet.b99: %OptionalStorage.type = facet_value %Int.67af24.1, (%OptionalStorage.lookup_impl_witness.a32) [symbolic]
// CHECK:STDOUT: %Optional.5ec: type = class_type @Optional, @Optional(%OptionalStorage.facet.b99) [symbolic]
// CHECK:STDOUT: %.3f3: Core.Form = init_form %Optional.5ec [symbolic]
// CHECK:STDOUT: %pattern_type.b38: type = pattern_type %Optional.5ec [symbolic]
// CHECK:STDOUT: %return.param_patt.4bb: %pattern_type.b38 = out_param_pattern [symbolic]
// CHECK:STDOUT: %return.patt.427: %pattern_type.b38 = return_slot_pattern %return.param_patt.4bb, %Optional.5ec [symbolic]
// CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.type: type = fn_type @IntRange.as.Iterate.impl.Next, @IntRange.as.Iterate.impl(%N) [symbolic]
// CHECK:STDOUT: %IntRange.as.Iterate.impl.Next.type: type = fn_type @IntRange.as.Iterate.impl.Next, @IntRange.as.Iterate.impl(%N.fe9) [symbolic]
// CHECK:STDOUT: %IntRange.as.Iterate.impl.Next: %IntRange.as.Iterate.impl.Next.type = struct_value () [symbolic]
// CHECK:STDOUT: %start.patt.477: %pattern_type.142cb7.1 = ref_binding_pattern start [symbolic]
// CHECK:STDOUT: %IntRange.elem.bed: type = unbound_element_type %IntRange.2c4, %Int.67af24.1 [symbolic]
@@ -153,7 +170,6 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %value.var_patt: %pattern_type.142cb7.1 = var_pattern %value.patt.505 [symbolic]
// CHECK:STDOUT: %OrderedWith.type.ad8: type = generic_interface_type @OrderedWith [concrete]
// CHECK:STDOUT: %OrderedWith.generic: %OrderedWith.type.ad8 = struct_value () [concrete]
// CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic]
// CHECK:STDOUT: %OrderedWith.type.32a: type = facet_type <@OrderedWith, @OrderedWith(%Other)> [symbolic]
// CHECK:STDOUT: %Self.7df: %OrderedWith.type.32a = symbolic_binding Self, 1 [symbolic]
// CHECK:STDOUT: %OrderedWith.assoc_type.1d2: type = assoc_entity_type @OrderedWith, @OrderedWith(%Other) [symbolic]
@@ -165,35 +181,29 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %require_complete.4c8: <witness> = require_complete_type %OrderedWith.type.6f8 [symbolic]
// CHECK:STDOUT: %assoc0.13c: %OrderedWith.assoc_type.1d2 = assoc_entity element0, imports.%Core.import_ref.447 [symbolic]
// CHECK:STDOUT: %M: Core.IntLiteral = symbolic_binding M, 1 [symbolic]
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.89b: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.ab3(%N, %M) [symbolic]
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.89b: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.ab3(%N.fe9, %M) [symbolic]
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.050: %Int.as.OrderedWith.impl.Less.type.89b = struct_value () [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete]
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete]
// CHECK:STDOUT: %OrderedWith.impl_witness.339: <witness> = impl_witness imports.%OrderedWith.impl_witness_table.5c1, @Int.as.OrderedWith.impl.ab3(%N, %N) [symbolic]
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.f5c: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.ab3(%N, %N) [symbolic]
// CHECK:STDOUT: %OrderedWith.impl_witness.339: <witness> = impl_witness imports.%OrderedWith.impl_witness_table.5c1, @Int.as.OrderedWith.impl.ab3(%N.fe9, %N.fe9) [symbolic]
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.f5c: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.ab3(%N.fe9, %N.fe9) [symbolic]
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.13c: %Int.as.OrderedWith.impl.Less.type.f5c = struct_value () [symbolic]
// CHECK:STDOUT: %.4a8: require_specific_def_type = require_specific_def @Int.as.OrderedWith.impl.ab3(%N, %N) [symbolic]
// CHECK:STDOUT: %.4a8: require_specific_def_type = require_specific_def @Int.as.OrderedWith.impl.ab3(%N.fe9, %N.fe9) [symbolic]
// CHECK:STDOUT: %OrderedWith.facet.bf1: %OrderedWith.type.6f8 = facet_value %Int.67af24.1, (%OrderedWith.impl_witness.339) [symbolic]
// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.c02: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%Int.67af24.1, %OrderedWith.facet.bf1) [symbolic]
// CHECK:STDOUT: %.08f: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.c02, %OrderedWith.facet.bf1 [symbolic]
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn.6ce: <specific function> = specific_function %Int.as.OrderedWith.impl.Less.13c, @Int.as.OrderedWith.impl.Less.1(%N, %N) [symbolic]
// CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete]
// CHECK:STDOUT: %Inc.lookup_impl_witness: <witness> = lookup_impl_witness %Int.67af24.1, @Inc [symbolic]
// CHECK:STDOUT: %.f62: require_specific_def_type = require_specific_def @Int.as.Inc.impl(%N) [symbolic]
// CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int.67af24.1, (%Inc.lookup_impl_witness) [symbolic]
// CHECK:STDOUT: %Inc.WithSelf.Op.type.36a: type = fn_type @Inc.WithSelf.Op, @Inc.WithSelf(%Inc.facet) [symbolic]
// CHECK:STDOUT: %.952: type = fn_type_with_self_type %Inc.WithSelf.Op.type.36a, %Inc.facet [symbolic]
// CHECK:STDOUT: %impl.elem0.7b5: %.952 = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.ed1: <specific function> = specific_impl_function %impl.elem0.7b5, @Inc.WithSelf.Op(%Inc.facet) [symbolic]
// CHECK:STDOUT: %Optional.Some.specific_fn: <specific function> = specific_function %Optional.Some.bcf, @Optional.Some(%OptionalStorage.facet.b99) [symbolic]
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn.6ce: <specific function> = specific_function %Int.as.OrderedWith.impl.Less.13c, @Int.as.OrderedWith.impl.Less.1(%N.fe9, %N.fe9) [symbolic]
// CHECK:STDOUT: %Inc.lookup_impl_witness.428: <witness> = lookup_impl_witness %Int.67af24.1, @Inc [symbolic]
// CHECK:STDOUT: %.f62: require_specific_def_type = require_specific_def @Int.as.Inc.impl(%N.fe9) [symbolic]
// CHECK:STDOUT: %Inc.facet.a38: %Inc.type = facet_value %Int.67af24.1, (%Inc.lookup_impl_witness.428) [symbolic]
// CHECK:STDOUT: %Inc.WithSelf.Op.type.36a: type = fn_type @Inc.WithSelf.Op, @Inc.WithSelf(%Inc.facet.a38) [symbolic]
// CHECK:STDOUT: %.952c: type = fn_type_with_self_type %Inc.WithSelf.Op.type.36a, %Inc.facet.a38 [symbolic]
// CHECK:STDOUT: %impl.elem0.7b5: %.952c = impl_witness_access %Inc.lookup_impl_witness.428, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.ed1: <specific function> = specific_impl_function %impl.elem0.7b5, @Inc.WithSelf.Op(%Inc.facet.a38) [symbolic]
// CHECK:STDOUT: %Optional.Some.specific_fn.d36: <specific function> = specific_function %Optional.Some.bcf, @Optional.Some(%OptionalStorage.facet.b99) [symbolic]
// CHECK:STDOUT: %Destroy.WithSelf.Op.type.8f1: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.7bb) [symbolic]
// CHECK:STDOUT: %.2c6: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.8f1, %Destroy.facet.7bb [symbolic]
// CHECK:STDOUT: %impl.elem0.604: %.2c6 = impl_witness_access %Destroy.lookup_impl_witness.173, element0 [symbolic]
// CHECK:STDOUT: %specific_impl_fn.693: <specific function> = specific_impl_function %impl.elem0.604, @Destroy.WithSelf.Op(%Destroy.facet.7bb) [symbolic]
// CHECK:STDOUT: %Optional.None.specific_fn: <specific function> = specific_function %Optional.None.fb7, @Optional.None(%OptionalStorage.facet.b99) [symbolic]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete]
// CHECK:STDOUT: %Optional.None.specific_fn.5e5: <specific function> = specific_function %Optional.None.fb7, @Optional.None(%OptionalStorage.facet.b99) [symbolic]
// CHECK:STDOUT: %end.param_patt.c55: %pattern_type.6b6 = value_param_pattern [concrete]
// CHECK:STDOUT: %end.patt.367: %pattern_type.6b6 = at_binding_pattern end, %end.param_patt.c55 [concrete]
// CHECK:STDOUT: %IntRange.bbd: type = class_type @IntRange, @IntRange(%int_32) [concrete]
@@ -203,8 +213,6 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %return.patt.7d9: %pattern_type.0f3 = return_slot_pattern %return.param_patt.108, %IntRange.bbd [concrete]
// CHECK:STDOUT: %Range.type: type = fn_type @Range [concrete]
// CHECK:STDOUT: %Range: %Range.type = struct_value () [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: %IntRange.Make.type.d27: type = fn_type @IntRange.Make, @IntRange(%int_32) [concrete]
// CHECK:STDOUT: %IntRange.Make.9ef: %IntRange.Make.type.d27 = struct_value () [concrete]
// CHECK:STDOUT: %start.patt.c23: %pattern_type.6b6 = ref_binding_pattern start [concrete]
@@ -216,19 +224,11 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %start.param_patt.619: %pattern_type.6b6 = value_param_pattern [concrete]
// CHECK:STDOUT: %start.patt.304: %pattern_type.6b6 = at_binding_pattern start, %start.param_patt.619 [concrete]
// CHECK:STDOUT: %IntRange.Make.specific_fn: <specific function> = specific_function %IntRange.Make.9ef, @IntRange.Make(%int_32) [concrete]
// CHECK:STDOUT: %ImplicitAs.type.914: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl.0e9(%To) [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.845: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74 = struct_value () [symbolic]
// CHECK:STDOUT: %ImplicitAs.impl_witness.a23: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.b3c, @Core.IntLiteral.as.ImplicitAs.impl.0e9(%int_32) [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.2ba: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl.0e9(%int_32) [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.2ba = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.facet.9f1: %ImplicitAs.type.914 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.a23) [concrete]
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.740: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet.9f1) [concrete]
// CHECK:STDOUT: %.1c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.740, %ImplicitAs.facet.9f1 [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
// CHECK:STDOUT: %ImplicitAs.facet.a2b: %ImplicitAs.type.914 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.778) [concrete]
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.2eb: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet.a2b) [concrete]
// CHECK:STDOUT: %.d74: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.2eb, %ImplicitAs.facet.a2b [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [concrete]
// CHECK:STDOUT: %bound_method.6e0: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
// CHECK:STDOUT: %int_0.3c0: %i32 = int_value 0 [concrete]
// CHECK:STDOUT: %Copy.impl_witness.0e0: <witness> = impl_witness imports.%Copy.impl_witness_table.367, @Int.as.Copy.impl(%int_32) [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
@@ -262,6 +262,8 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %Core.import_ref.6e4: @Optional.%Optional.None.type (%Optional.None.type.bdc) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.01e)]
// CHECK:STDOUT: %Core.import_ref.84ba: @Optional.%Optional.Some.type (%Optional.Some.type.304) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.2a0)]
// CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %CursorType]
// CHECK:STDOUT: %Core.import_ref.717c: @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1f3 = impl_witness_table (%Core.import_ref.717c), @Core.IntLiteral.as.ImplicitAs.impl.0e9 [concrete]
// CHECK:STDOUT: %CursorType: %Destroy.type = assoc_const_decl @CursorType [concrete] {}
// CHECK:STDOUT: %Core.import_ref.ebd7: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %ElementType]
// CHECK:STDOUT: %ElementType: %facet_type.f48 = assoc_const_decl @ElementType [concrete] {}
@@ -281,8 +283,6 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type]
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
// CHECK:STDOUT: %Core.import_ref.edf: @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.b3c = impl_witness_table (%Core.import_ref.edf), @Core.IntLiteral.as.ImplicitAs.impl.0e9 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -293,14 +293,14 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %IntRange.decl: %IntRange.type = class_decl @IntRange [concrete = constants.%IntRange.generic] {
// CHECK:STDOUT: %N.patt.loc4_17.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_17.2 (constants.%N.patt)]
// CHECK:STDOUT: %N.patt.loc4_17.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_17.2 (constants.%N.patt.aa5)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc4: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral]
// CHECK:STDOUT: }
// CHECK:STDOUT: %N.loc4_17.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_17.1 (constants.%N)]
// CHECK:STDOUT: %N.loc4_17.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_17.1 (constants.%N.fe9)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Range.decl: %Range.type = fn_decl @Range [concrete = constants.%Range] {
// CHECK:STDOUT: %end.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%end.param_patt.c55]
@@ -321,16 +321,16 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @IntRange.as.Iterate.impl(@IntRange.%N.loc4_17.2: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %Int.loc9_54.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc9_54.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc9_54.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.173)]
// CHECK:STDOUT: %Destroy.facet.loc9_54.1: %Destroy.type = facet_value %Int.loc9_54.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.7bb)]
// CHECK:STDOUT: %.loc9_85.1: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc9_85.1 (constants.%.a53)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc9_54.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.df6)]
// CHECK:STDOUT: %facet_value.loc9_85.1: %facet_type.f48 = facet_value %Int.loc9_54.1, (%Destroy.lookup_impl_witness, %Copy.lookup_impl_witness) [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)]
// CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where constants.%impl.elem1.6f4 = %Destroy.facet.loc9_54.1 and constants.%impl.elem0.294 = %facet_value.loc9_85.1> [symbolic = %Iterate_where.type (constants.%Iterate_where.type)]
// CHECK:STDOUT: %Iterate.impl_witness.loc9_87.2: <witness> = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N) [symbolic = %Iterate.impl_witness.loc9_87.2 (constants.%Iterate.impl_witness)]
// CHECK:STDOUT: %facet_value.loc9_85.1: %facet_type.f48 = facet_value %Int.loc9_54.1, (%Destroy.lookup_impl_witness, %Copy.lookup_impl_witness) [symbolic = %facet_value.loc9_85.1 (constants.%facet_value.c69)]
// CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where constants.%impl.elem1.6f4 = %Destroy.facet.loc9_54.1 and constants.%impl.elem0.294 = %facet_value.loc9_85.1> [symbolic = %Iterate_where.type (constants.%Iterate_where.type.836)]
// CHECK:STDOUT: %Iterate.impl_witness.loc9_87.2: <witness> = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N) [symbolic = %Iterate.impl_witness.loc9_87.2 (constants.%Iterate.impl_witness.81c)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Iterate_where.type [symbolic = %require_complete (constants.%require_complete.466)]
@@ -343,17 +343,17 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.decl: @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.NewCursor.type (%IntRange.as.Iterate.impl.NewCursor.type) = fn_decl @IntRange.as.Iterate.impl.NewCursor [symbolic = @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.NewCursor (constants.%IntRange.as.Iterate.impl.NewCursor)] {
// CHECK:STDOUT: %self.param_patt.loc10_18.1: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_18 (%pattern_type.1ea) = value_param_pattern [symbolic = %self.param_patt.loc10_18.2 (constants.%self.param_patt.5cc)]
// CHECK:STDOUT: %self.patt.loc10_18.1: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_18 (%pattern_type.1ea) = at_binding_pattern self, %self.param_patt.loc10_18.1 [symbolic = %self.patt.loc10_18.2 (constants.%self.patt.13b)]
// CHECK:STDOUT: %return.param_patt.loc10_37.1: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_37 (%pattern_type.142cb7.1) = out_param_pattern [symbolic = %return.param_patt.loc10_37.2 (constants.%return.param_patt.5a2679.1)]
// CHECK:STDOUT: %return.param_patt.loc10_37.1: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_37 (%pattern_type.142cb7.1) = out_param_pattern [symbolic = %return.param_patt.loc10_37.2 (constants.%return.param_patt.5a2679.2)]
// CHECK:STDOUT: %return.patt.loc10_24.1: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_37 (%pattern_type.142cb7.1) = return_slot_pattern %return.param_patt.loc10_37.1, %Int.loc10_37.2 [symbolic = %return.patt.loc10_24.2 (constants.%return.patt.434)]
// 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: %Int.loc10_37.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc10_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %.loc10_37.2: Core.Form = init_form %Int.loc10_37.2 [symbolic = %.loc10_37.1 (constants.%.df5d8d.1)]
// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc10_37.2: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc10_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %.loc10_37.2: Core.Form = init_form %Int.loc10_37.2 [symbolic = %.loc10_37.1 (constants.%.df5d8d.2)]
// CHECK:STDOUT: %self.param: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.2c4) = value_param call_param0
// CHECK:STDOUT: %.loc10_18.1: type = splice_block %Self.ref [symbolic = %IntRange (constants.%IntRange.2c4)] {
// CHECK:STDOUT: %.loc10_18.2: type = specific_constant constants.%IntRange.2c4, @IntRange(constants.%N) [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %.loc10_18.2: type = specific_constant constants.%IntRange.2c4, @IntRange(constants.%N.fe9) [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10_18.2 [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.2c4) = wrapper_binding self, %self.param
@@ -372,15 +372,15 @@ fn Read(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_58: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc11_62: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc11_67: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc11_68: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %N.ref.loc11_67: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc11_68: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %OptionalStorage.facet.loc11_69.2: %OptionalStorage.type = facet_value %Int.loc11_68, (constants.%OptionalStorage.lookup_impl_witness.a32) [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
// CHECK:STDOUT: %.loc11_69.5: %OptionalStorage.type = converted %Int.loc11_68, %OptionalStorage.facet.loc11_69.2 [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
// CHECK:STDOUT: %Optional.loc11_69.2: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet.b99) [symbolic = %Optional.loc11_69.1 (constants.%Optional.5ec)]
// CHECK:STDOUT: %.loc11_69.6: Core.Form = init_form %Optional.loc11_69.2 [symbolic = %.loc11_69.4 (constants.%.3f3)]
// CHECK:STDOUT: %self.param: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.2c4) = value_param call_param0
// CHECK:STDOUT: %.loc11_13.1: type = splice_block %Self.ref [symbolic = %IntRange (constants.%IntRange.2c4)] {
// CHECK:STDOUT: %.loc11_13.2: type = specific_constant constants.%IntRange.2c4, @IntRange(constants.%N) [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %.loc11_13.2: type = specific_constant constants.%IntRange.2c4, @IntRange(constants.%N.fe9) [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc11_13.2 [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.2c4) = wrapper_binding self, %self.param
@@ -388,8 +388,8 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %.loc11_38: type = splice_block %ptr.loc11_38.2 [symbolic = %ptr.loc11_38.1 (constants.%ptr.41e)] {
// CHECK:STDOUT: %Core.ref.loc11_27: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Int.ref.loc11_31: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
// CHECK:STDOUT: %N.ref.loc11_36: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %Int.loc11_37.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %N.ref.loc11_36: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc11_37.2: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %ptr.loc11_38.2: type = ptr_type %Int.loc11_37.2 [symbolic = %ptr.loc11_38.1 (constants.%ptr.41e)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %cursor: @IntRange.as.Iterate.impl.Next.%ptr.loc11_38.1 (%ptr.41e) = wrapper_binding cursor, %cursor.param
@@ -397,9 +397,9 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %return: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_69.1 (%Optional.5ec) = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant.loc9_87.2, %impl_witness_assoc_constant.loc9_87.1, %IntRange.as.Iterate.impl.NewCursor.decl, %IntRange.as.Iterate.impl.Next.decl), @IntRange.as.Iterate.impl [concrete]
// CHECK:STDOUT: %Iterate.impl_witness.loc9_87.1: <witness> = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(constants.%N) [symbolic = %Iterate.impl_witness.loc9_87.2 (constants.%Iterate.impl_witness)]
// CHECK:STDOUT: %Iterate.impl_witness.loc9_87.1: <witness> = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(constants.%N.fe9) [symbolic = %Iterate.impl_witness.loc9_87.2 (constants.%Iterate.impl_witness.81c)]
// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.1: %Destroy.type = impl_witness_assoc_constant constants.%Destroy.facet.7bb [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.7bb)]
// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.2: %facet_type.f48 = impl_witness_assoc_constant constants.%facet_value [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)]
// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.2: %facet_type.f48 = impl_witness_assoc_constant constants.%facet_value.c69 [symbolic = %facet_value.loc9_85.1 (constants.%facet_value.c69)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .N = <poisoned>
@@ -411,14 +411,14 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic class @IntRange(%N.loc4_17.2: Core.IntLiteral) {
// CHECK:STDOUT: %N.patt.loc4_17.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_17.2 (constants.%N.patt)]
// CHECK:STDOUT: %N.loc4_17.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_17.1 (constants.%N)]
// CHECK:STDOUT: %N.patt.loc4_17.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_17.2 (constants.%N.patt.aa5)]
// CHECK:STDOUT: %N.loc4_17.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_17.1 (constants.%N.fe9)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %IntRange.Make.type: type = fn_type @IntRange.Make, @IntRange(%N.loc4_17.1) [symbolic = %IntRange.Make.type (constants.%IntRange.Make.type.522)]
// CHECK:STDOUT: %IntRange.Make: @IntRange.%IntRange.Make.type (%IntRange.Make.type.522) = struct_value () [symbolic = %IntRange.Make (constants.%IntRange.Make.8ef)]
// CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N.loc4_17.1) [symbolic = %Int (constants.%Int.67af24.1)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Int [symbolic = %require_complete (constants.%require_complete.4dfb92.1)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Int [symbolic = %require_complete (constants.%require_complete.4dfb92.2)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %Int [symbolic = %pattern_type (constants.%pattern_type.142cb7.1)]
// CHECK:STDOUT: %start.patt: @IntRange.%pattern_type (%pattern_type.142cb7.1) = ref_binding_pattern start [symbolic = %start.patt (constants.%start.patt.477)]
// CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N.loc4_17.1) [symbolic = %IntRange (constants.%IntRange.2c4)]
@@ -436,23 +436,23 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %return.param_patt.loc5_52.1: @IntRange.Make.%pattern_type.loc5_52 (%pattern_type.1ea) = out_param_pattern [symbolic = %return.param_patt.loc5_52.2 (constants.%return.param_patt.262)]
// CHECK:STDOUT: %return.patt.loc5_49.1: @IntRange.Make.%pattern_type.loc5_52 (%pattern_type.1ea) = return_slot_pattern %return.param_patt.loc5_52.1, %Self.ref [symbolic = %return.patt.loc5_49.2 (constants.%return.patt.dbf)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc5_52.2: type = specific_constant constants.%IntRange.2c4, @IntRange(constants.%N) [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %.loc5_52.2: type = specific_constant constants.%IntRange.2c4, @IntRange(constants.%N.fe9) [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc5_52.2 [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %.loc5_52.3: Core.Form = init_form %Self.ref [symbolic = %.loc5_52.1 (constants.%.5c3)]
// CHECK:STDOUT: %start.param: @IntRange.Make.%Int.loc5_28.1 (%Int.67af24.1) = value_param call_param0
// CHECK:STDOUT: %.loc5_28: type = splice_block %Int.loc5_28.2 [symbolic = %Int.loc5_28.1 (constants.%Int.67af24.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: %Int.loc5_28.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc5_28.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %N.ref.loc5_27: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc5_28.2: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc5_28.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %start: @IntRange.Make.%Int.loc5_28.1 (%Int.67af24.1) = wrapper_binding start, %start.param
// CHECK:STDOUT: %end.param: @IntRange.Make.%Int.loc5_28.1 (%Int.67af24.1) = value_param call_param1
// CHECK:STDOUT: %.loc5_46: type = splice_block %Int.loc5_46 [symbolic = %Int.loc5_28.1 (constants.%Int.67af24.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: %Int.loc5_46: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc5_28.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %N.ref.loc5_45: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc5_46: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc5_28.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %end: @IntRange.Make.%Int.loc5_28.1 (%Int.67af24.1) = wrapper_binding end, %end.param
// CHECK:STDOUT: %return.param: ref @IntRange.Make.%IntRange (%IntRange.2c4) = out_param call_param2
@@ -471,8 +471,8 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %impl.elem1.loc9_30.1: %Destroy.type = impl_witness_access constants.%Iterate.lookup_impl_witness.98d, element1 [symbolic_self = constants.%impl.elem1.990]
// 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: %Int.loc9_54.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_54.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %N.ref.loc9_53: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc9_54.2: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc9_54.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %Destroy.facet.loc9_54.2: %Destroy.type = facet_value %Int.loc9_54.2, (constants.%Destroy.lookup_impl_witness.173) [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.7bb)]
// 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.7bb)]
// CHECK:STDOUT: %rewrite.loc9_42.1 = requirement_rewrite %impl.elem1.loc9_30.1, %.loc9_54 [concrete]
@@ -483,16 +483,16 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %impl.elem0.loc9_60.1: %facet_type.f48 = impl_witness_access constants.%Iterate.lookup_impl_witness.98d, element0 [symbolic_self = constants.%impl.elem0.94d]
// 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: %Int.loc9_85: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_54.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %facet_value.loc9_85.2: %facet_type.f48 = facet_value %Int.loc9_85, (constants.%Destroy.lookup_impl_witness.173, constants.%Copy.lookup_impl_witness.df6) [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)]
// CHECK:STDOUT: %N.ref.loc9_84: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc9_85: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc9_54.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %facet_value.loc9_85.2: %facet_type.f48 = facet_value %Int.loc9_85, (constants.%Destroy.lookup_impl_witness.173, constants.%Copy.lookup_impl_witness.df6) [symbolic = %facet_value.loc9_85.1 (constants.%facet_value.c69)]
// 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.c69)]
// CHECK:STDOUT: %rewrite.loc9_73.1 = requirement_rewrite %impl.elem0.loc9_60.1, %.loc9_85.2 [concrete]
// CHECK:STDOUT: %impl.elem1.loc9_30.2: %Destroy.type = impl_witness_access constants.%Iterate.lookup_impl_witness.1d8, element1 [symbolic_self = constants.%impl.elem1.6f4]
// CHECK:STDOUT: %rewrite.loc9_42.2 = requirement_rewrite %impl.elem1.loc9_30.2, %.loc9_54 [concrete]
// CHECK:STDOUT: %impl.elem0.loc9_60.2: %facet_type.f48 = impl_witness_access constants.%Iterate.lookup_impl_witness.1d8, element0 [symbolic_self = constants.%impl.elem0.294]
// CHECK:STDOUT: %rewrite.loc9_73.2 = requirement_rewrite %impl.elem0.loc9_60.2, %.loc9_85.2 [concrete]
// CHECK:STDOUT: %.loc9_24: type = where_expr [symbolic = %Iterate_where.type (constants.%Iterate_where.type)] {
// CHECK:STDOUT: %.loc9_24: type = where_expr [symbolic = %Iterate_where.type (constants.%Iterate_where.type.836)] {
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Iterate.ref [concrete]
// CHECK:STDOUT: %rewrite.loc9_42.2 = requirement_rewrite %impl.elem1.loc9_30.2, %.loc9_54 [concrete]
// CHECK:STDOUT: %rewrite.loc9_73.2 = requirement_rewrite %impl.elem0.loc9_60.2, %.loc9_85.2 [concrete]
@@ -513,7 +513,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @IntRange.Make(@IntRange.%N.loc4_17.2: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc5_28.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc5_28.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %pattern_type.loc5_16: type = pattern_type %Int.loc5_28.1 [symbolic = %pattern_type.loc5_16 (constants.%pattern_type.142cb7.1)]
// CHECK:STDOUT: %start.param_patt.loc5_16.2: @IntRange.Make.%pattern_type.loc5_16 (%pattern_type.142cb7.1) = value_param_pattern [symbolic = %start.param_patt.loc5_16.2 (constants.%start.param_patt.b2c)]
@@ -527,7 +527,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %return.patt.loc5_49.2: @IntRange.Make.%pattern_type.loc5_52 (%pattern_type.1ea) = return_slot_pattern %return.param_patt.loc5_52.2, %IntRange [symbolic = %return.patt.loc5_49.2 (constants.%return.patt.dbf)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc5_16: <witness> = require_complete_type %Int.loc5_28.1 [symbolic = %require_complete.loc5_16 (constants.%require_complete.4dfb92.1)]
// CHECK:STDOUT: %require_complete.loc5_16: <witness> = require_complete_type %Int.loc5_28.1 [symbolic = %require_complete.loc5_16 (constants.%require_complete.4dfb92.2)]
// CHECK:STDOUT: %require_complete.loc5_49: <witness> = require_complete_type %IntRange [symbolic = %require_complete.loc5_49 (constants.%require_complete.5d9)]
// CHECK:STDOUT: %struct_type.start.end: type = struct_type {.start: @IntRange.Make.%Int.loc5_28.1 (%Int.67af24.1), .end: @IntRange.Make.%Int.loc5_28.1 (%Int.67af24.1)} [symbolic = %struct_type.start.end (constants.%struct_type.start.end.d4d)]
// CHECK:STDOUT: %.loc6_22.3: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc6_22.3 (constants.%.a53)]
@@ -574,21 +574,21 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @IntRange.as.Iterate.impl.NewCursor(@IntRange.%N.loc4_17.2: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %pattern_type.loc10_18: type = pattern_type %IntRange [symbolic = %pattern_type.loc10_18 (constants.%pattern_type.1ea)]
// CHECK:STDOUT: %self.param_patt.loc10_18.2: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_18 (%pattern_type.1ea) = value_param_pattern [symbolic = %self.param_patt.loc10_18.2 (constants.%self.param_patt.5cc)]
// CHECK:STDOUT: %self.patt.loc10_18.2: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_18 (%pattern_type.1ea) = at_binding_pattern self, %self.param_patt.loc10_18.2 [symbolic = %self.patt.loc10_18.2 (constants.%self.patt.13b)]
// CHECK:STDOUT: %Int.loc10_37.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc10_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %.loc10_37.1: Core.Form = init_form %Int.loc10_37.1 [symbolic = %.loc10_37.1 (constants.%.df5d8d.1)]
// CHECK:STDOUT: %.loc10_37.1: Core.Form = init_form %Int.loc10_37.1 [symbolic = %.loc10_37.1 (constants.%.df5d8d.2)]
// CHECK:STDOUT: %pattern_type.loc10_37: type = pattern_type %Int.loc10_37.1 [symbolic = %pattern_type.loc10_37 (constants.%pattern_type.142cb7.1)]
// CHECK:STDOUT: %return.param_patt.loc10_37.2: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_37 (%pattern_type.142cb7.1) = out_param_pattern [symbolic = %return.param_patt.loc10_37.2 (constants.%return.param_patt.5a2679.1)]
// CHECK:STDOUT: %return.param_patt.loc10_37.2: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_37 (%pattern_type.142cb7.1) = out_param_pattern [symbolic = %return.param_patt.loc10_37.2 (constants.%return.param_patt.5a2679.2)]
// CHECK:STDOUT: %return.patt.loc10_24.2: @IntRange.as.Iterate.impl.NewCursor.%pattern_type.loc10_37 (%pattern_type.142cb7.1) = return_slot_pattern %return.param_patt.loc10_37.2, %Int.loc10_37.1 [symbolic = %return.patt.loc10_24.2 (constants.%return.patt.434)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc10_18: <witness> = require_complete_type %IntRange [symbolic = %require_complete.loc10_18 (constants.%require_complete.5d9)]
// CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc10_37.1 [symbolic = %IntRange.elem (constants.%IntRange.elem.bed)]
// CHECK:STDOUT: %require_complete.loc10_52: <witness> = require_complete_type %Int.loc10_37.1 [symbolic = %require_complete.loc10_52 (constants.%require_complete.4dfb92.1)]
// CHECK:STDOUT: %require_complete.loc10_52: <witness> = require_complete_type %Int.loc10_37.1 [symbolic = %require_complete.loc10_52 (constants.%require_complete.4dfb92.2)]
// CHECK:STDOUT: %.loc10_52.5: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc10_52.5 (constants.%.a53)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc10_37.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.df6)]
// CHECK:STDOUT: %Copy.facet.loc10_52.3: %Copy.type = facet_value %Int.loc10_37.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_52.3 (constants.%Copy.facet.f12)]
@@ -619,7 +619,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @IntRange.as.Iterate.impl.Next(@IntRange.%N.loc4_17.2: Core.IntLiteral) {
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.2c4)]
// CHECK:STDOUT: %pattern_type.loc11_13: type = pattern_type %IntRange [symbolic = %pattern_type.loc11_13 (constants.%pattern_type.1ea)]
// CHECK:STDOUT: %self.param_patt.loc11_13.2: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_13 (%pattern_type.1ea) = value_param_pattern [symbolic = %self.param_patt.loc11_13.2 (constants.%self.param_patt.5cc)]
@@ -631,7 +631,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %cursor.patt.loc11_25.2: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_25 (%pattern_type.833) = at_binding_pattern cursor, %cursor.param_patt.loc11_25.2 [symbolic = %cursor.patt.loc11_25.2 (constants.%cursor.patt.652)]
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc11_37.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.173)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc11_37.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.df6)]
// CHECK:STDOUT: %facet_value: %facet_type.f48 = facet_value %Int.loc11_37.1, (%Destroy.lookup_impl_witness, %Copy.lookup_impl_witness) [symbolic = %facet_value (constants.%facet_value)]
// CHECK:STDOUT: %facet_value: %facet_type.f48 = facet_value %Int.loc11_37.1, (%Destroy.lookup_impl_witness, %Copy.lookup_impl_witness) [symbolic = %facet_value (constants.%facet_value.c69)]
// CHECK:STDOUT: %.loc11_69.3: require_specific_def_type = require_specific_def @T.as_type.as.OptionalStorage.impl(%facet_value) [symbolic = %.loc11_69.3 (constants.%.3c5)]
// CHECK:STDOUT: %OptionalStorage.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc11_37.1, @OptionalStorage [symbolic = %OptionalStorage.lookup_impl_witness (constants.%OptionalStorage.lookup_impl_witness.a32)]
// CHECK:STDOUT: %OptionalStorage.facet.loc11_69.1: %OptionalStorage.type = facet_value %Int.loc11_37.1, (%OptionalStorage.lookup_impl_witness) [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
@@ -645,7 +645,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %require_complete.loc11_13: <witness> = require_complete_type %IntRange [symbolic = %require_complete.loc11_13 (constants.%require_complete.5d9)]
// CHECK:STDOUT: %require_complete.loc11_25: <witness> = require_complete_type %ptr.loc11_38.1 [symbolic = %require_complete.loc11_25 (constants.%require_complete.f79)]
// CHECK:STDOUT: %require_complete.loc11_41: <witness> = require_complete_type %Optional.loc11_69.1 [symbolic = %require_complete.loc11_41 (constants.%require_complete.63c)]
// CHECK:STDOUT: %require_complete.loc12: <witness> = require_complete_type %Int.loc11_37.1 [symbolic = %require_complete.loc12 (constants.%require_complete.4dfb92.1)]
// CHECK:STDOUT: %require_complete.loc12: <witness> = require_complete_type %Int.loc11_37.1 [symbolic = %require_complete.loc12 (constants.%require_complete.4dfb92.2)]
// CHECK:STDOUT: %pattern_type.loc12: type = pattern_type %Int.loc11_37.1 [symbolic = %pattern_type.loc12 (constants.%pattern_type.142cb7.1)]
// CHECK:STDOUT: %value.patt.loc12_16.2: @IntRange.as.Iterate.impl.Next.%pattern_type.loc12 (%pattern_type.142cb7.1) = ref_binding_pattern value [symbolic = %value.patt.loc12_16.2 (constants.%value.patt.505)]
// CHECK:STDOUT: %value.var_patt.loc12_7.2: @IntRange.as.Iterate.impl.Next.%pattern_type.loc12 (%pattern_type.142cb7.1) = var_pattern %value.patt.loc12_16.2 [symbolic = %value.var_patt.loc12_7.2 (constants.%value.var_patt)]
@@ -669,15 +669,15 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less: @IntRange.as.Iterate.impl.Next.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.f5c) = struct_value () [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.13c)]
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn: <specific function> = specific_function %Int.as.OrderedWith.impl.Less, @Int.as.OrderedWith.impl.Less.1(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.specific_fn (constants.%Int.as.OrderedWith.impl.Less.specific_fn.6ce)]
// CHECK:STDOUT: %.loc14_9.3: require_specific_def_type = require_specific_def @Int.as.Inc.impl(%N) [symbolic = %.loc14_9.3 (constants.%.f62)]
// CHECK:STDOUT: %Inc.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc11_37.1, @Inc [symbolic = %Inc.lookup_impl_witness (constants.%Inc.lookup_impl_witness)]
// CHECK:STDOUT: %Inc.facet.loc14_9.3: %Inc.type = facet_value %Int.loc11_37.1, (%Inc.lookup_impl_witness) [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet)]
// CHECK:STDOUT: %Inc.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc11_37.1, @Inc [symbolic = %Inc.lookup_impl_witness (constants.%Inc.lookup_impl_witness.428)]
// CHECK:STDOUT: %Inc.facet.loc14_9.3: %Inc.type = facet_value %Int.loc11_37.1, (%Inc.lookup_impl_witness) [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet.a38)]
// CHECK:STDOUT: %Inc.WithSelf.Op.type: type = fn_type @Inc.WithSelf.Op, @Inc.WithSelf(%Inc.facet.loc14_9.3) [symbolic = %Inc.WithSelf.Op.type (constants.%Inc.WithSelf.Op.type.36a)]
// CHECK:STDOUT: %.loc14_9.4: type = fn_type_with_self_type %Inc.WithSelf.Op.type, %Inc.facet.loc14_9.3 [symbolic = %.loc14_9.4 (constants.%.952)]
// CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.4 (%.952) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.7b5)]
// CHECK:STDOUT: %.loc14_9.4: type = fn_type_with_self_type %Inc.WithSelf.Op.type, %Inc.facet.loc14_9.3 [symbolic = %.loc14_9.4 (constants.%.952c)]
// CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.4 (%.952c) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.7b5)]
// CHECK:STDOUT: %specific_impl_fn.loc14_9.2: <specific function> = specific_impl_function %impl.elem0.loc14_9.2, @Inc.WithSelf.Op(%Inc.facet.loc14_9.3) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.ed1)]
// CHECK:STDOUT: %Optional.Some.type: type = fn_type @Optional.Some, @Optional(%OptionalStorage.facet.loc11_69.1) [symbolic = %Optional.Some.type (constants.%Optional.Some.type.422)]
// CHECK:STDOUT: %Optional.Some: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.422) = struct_value () [symbolic = %Optional.Some (constants.%Optional.Some.bcf)]
// CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.2: <specific function> = specific_function %Optional.Some, @Optional.Some(%OptionalStorage.facet.loc11_69.1) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn)]
// CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.2: <specific function> = specific_function %Optional.Some, @Optional.Some(%OptionalStorage.facet.loc11_69.1) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn.d36)]
// CHECK:STDOUT: %Destroy.facet.loc12_7.5: %Destroy.type = facet_value %Int.loc11_37.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.7bb)]
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.loc12_7.5) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.8f1)]
// CHECK:STDOUT: %.loc12_7.5: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet.loc12_7.5 [symbolic = %.loc12_7.5 (constants.%.2c6)]
@@ -685,7 +685,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %specific_impl_fn.loc12_7.3: <specific function> = specific_impl_function %impl.elem0.loc12_7.3, @Destroy.WithSelf.Op(%Destroy.facet.loc12_7.5) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.693)]
// CHECK:STDOUT: %Optional.None.type: type = fn_type @Optional.None, @Optional(%OptionalStorage.facet.loc11_69.1) [symbolic = %Optional.None.type (constants.%Optional.None.type.2aa)]
// CHECK:STDOUT: %Optional.None: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.2aa) = struct_value () [symbolic = %Optional.None (constants.%Optional.None.fb7)]
// CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.2: <specific function> = specific_function %Optional.None, @Optional.None(%OptionalStorage.facet.loc11_69.1) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn)]
// CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.2: <specific function> = specific_function %Optional.None, @Optional.None(%OptionalStorage.facet.loc11_69.1) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn.5e5)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param: @IntRange.as.Iterate.impl.Next.%IntRange (%IntRange.2c4), %cursor.param: @IntRange.as.Iterate.impl.Next.%ptr.loc11_38.1 (%ptr.41e)) -> out %return.param: @IntRange.as.Iterate.impl.Next.%Optional.loc11_69.1 (%Optional.5ec) {
// CHECK:STDOUT: !entry:
@@ -706,8 +706,8 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %.loc12_28: type = splice_block %Int.loc12 [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.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: %Int.loc12: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %N.ref.loc12: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc12: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %value: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_37.1 (%Int.67af24.1) = wrapper_binding value, %value.var
// CHECK:STDOUT: name_binding_decl {
@@ -724,7 +724,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %Less.ref: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.e6d) = name_ref Less, %.loc13_17.1 [symbolic = %assoc0 (constants.%assoc0.ebc)]
// CHECK:STDOUT: %impl.elem0.loc13: @IntRange.as.Iterate.impl.Next.%.loc13_17.3 (%.08f) = impl_witness_access constants.%OrderedWith.impl_witness.339, element0 [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.13c)]
// CHECK:STDOUT: %bound_method.loc13_17.1: <bound method> = bound_method %value.ref.loc13, %impl.elem0.loc13
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc13, @Int.as.OrderedWith.impl.Less.1(constants.%N, constants.%N) [symbolic = %Int.as.OrderedWith.impl.Less.specific_fn (constants.%Int.as.OrderedWith.impl.Less.specific_fn.6ce)]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc13, @Int.as.OrderedWith.impl.Less.1(constants.%N.fe9, constants.%N.fe9) [symbolic = %Int.as.OrderedWith.impl.Less.specific_fn (constants.%Int.as.OrderedWith.impl.Less.specific_fn.6ce)]
// CHECK:STDOUT: %bound_method.loc13_17.2: <bound method> = bound_method %value.ref.loc13, %specific_fn
// CHECK:STDOUT: %.loc13_11: @IntRange.as.Iterate.impl.Next.%Int.loc11_37.1 (%Int.67af24.1) = acquire_value %value.ref.loc13
// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call: init bool = call %bound_method.loc13_17.2(%.loc13_11, %.loc13_23.2)
@@ -735,21 +735,21 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: !if.then:
// CHECK:STDOUT: %cursor.ref.loc14: @IntRange.as.Iterate.impl.Next.%ptr.loc11_38.1 (%ptr.41e) = name_ref cursor, %cursor
// CHECK:STDOUT: %.loc14_11: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_37.1 (%Int.67af24.1) = deref %cursor.ref.loc14
// CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.4 (%.952) = impl_witness_access constants.%Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.7b5)]
// CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.4 (%.952c) = impl_witness_access constants.%Inc.lookup_impl_witness.428, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.7b5)]
// CHECK:STDOUT: %bound_method.loc14_9.1: <bound method> = bound_method %.loc14_11, %impl.elem0.loc14_9.1
// CHECK:STDOUT: %Inc.facet.loc14_9.1: %Inc.type = facet_value constants.%Int.67af24.1, (constants.%Inc.lookup_impl_witness) [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet)]
// CHECK:STDOUT: %.loc14_9.1: %Inc.type = converted constants.%Int.67af24.1, %Inc.facet.loc14_9.1 [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet)]
// CHECK:STDOUT: %Inc.facet.loc14_9.2: %Inc.type = facet_value constants.%Int.67af24.1, (constants.%Inc.lookup_impl_witness) [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet)]
// CHECK:STDOUT: %.loc14_9.2: %Inc.type = converted constants.%Int.67af24.1, %Inc.facet.loc14_9.2 [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet)]
// CHECK:STDOUT: %specific_impl_fn.loc14_9.1: <specific function> = specific_impl_function %impl.elem0.loc14_9.1, @Inc.WithSelf.Op(constants.%Inc.facet) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.ed1)]
// CHECK:STDOUT: %Inc.facet.loc14_9.1: %Inc.type = facet_value constants.%Int.67af24.1, (constants.%Inc.lookup_impl_witness.428) [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet.a38)]
// CHECK:STDOUT: %.loc14_9.1: %Inc.type = converted constants.%Int.67af24.1, %Inc.facet.loc14_9.1 [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet.a38)]
// CHECK:STDOUT: %Inc.facet.loc14_9.2: %Inc.type = facet_value constants.%Int.67af24.1, (constants.%Inc.lookup_impl_witness.428) [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet.a38)]
// CHECK:STDOUT: %.loc14_9.2: %Inc.type = converted constants.%Int.67af24.1, %Inc.facet.loc14_9.2 [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet.a38)]
// CHECK:STDOUT: %specific_impl_fn.loc14_9.1: <specific function> = specific_impl_function %impl.elem0.loc14_9.1, @Inc.WithSelf.Op(constants.%Inc.facet.a38) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.ed1)]
// CHECK:STDOUT: %bound_method.loc14_9.2: <bound method> = bound_method %.loc14_11, %specific_impl_fn.loc14_9.1
// CHECK:STDOUT: %Inc.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc14_9.2(%.loc14_11)
// CHECK:STDOUT: %Core.ref.loc15_16: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// 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: %Int.loc15: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %N.ref.loc15: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc15: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %OptionalStorage.facet.loc15_41: %OptionalStorage.type = facet_value %Int.loc15, (constants.%OptionalStorage.lookup_impl_witness.a32) [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
// CHECK:STDOUT: %.loc15_41: %OptionalStorage.type = converted %Int.loc15, %OptionalStorage.facet.loc15_41 [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
// CHECK:STDOUT: %Optional.loc15: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet.b99) [symbolic = %Optional.loc11_69.1 (constants.%Optional.5ec)]
@@ -760,7 +760,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %.loc15_53.1: %OptionalStorage.type = converted constants.%Int.67af24.1, %OptionalStorage.facet.loc15_53.1 [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
// CHECK:STDOUT: %OptionalStorage.facet.loc15_53.2: %OptionalStorage.type = facet_value constants.%Int.67af24.1, (constants.%OptionalStorage.lookup_impl_witness.a32) [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
// CHECK:STDOUT: %.loc15_53.2: %OptionalStorage.type = converted constants.%Int.67af24.1, %OptionalStorage.facet.loc15_53.2 [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
// CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.1: <specific function> = specific_function %Some.ref, @Optional.Some(constants.%OptionalStorage.facet.b99) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn)]
// CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.1: <specific function> = specific_function %Some.ref, @Optional.Some(constants.%OptionalStorage.facet.b99) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn.d36)]
// CHECK:STDOUT: %.loc11_69.1: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_69.1 (%Optional.5ec) = splice_block %return.param {}
// CHECK:STDOUT: %.loc15_48: @IntRange.as.Iterate.impl.Next.%Int.loc11_37.1 (%Int.67af24.1) = acquire_value %value.ref.loc15
// CHECK:STDOUT: %Optional.Some.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_69.1 (%Optional.5ec) to %.loc11_69.1 = call %Optional.Some.specific_fn.loc15_42.1(%.loc15_48)
@@ -780,14 +780,14 @@ fn Read(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: %Int.loc17: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %N.ref.loc17: Core.IntLiteral = name_ref N, @IntRange.%N.loc4_17.2 [symbolic = %N (constants.%N.fe9)]
// CHECK:STDOUT: %Int.loc17: type = class_type @Int, @Int(constants.%N.fe9) [symbolic = %Int.loc11_37.1 (constants.%Int.67af24.1)]
// CHECK:STDOUT: %OptionalStorage.facet.loc17: %OptionalStorage.type = facet_value %Int.loc17, (constants.%OptionalStorage.lookup_impl_witness.a32) [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
// CHECK:STDOUT: %.loc17_41: %OptionalStorage.type = converted %Int.loc17, %OptionalStorage.facet.loc17 [symbolic = %OptionalStorage.facet.loc11_69.1 (constants.%OptionalStorage.facet.b99)]
// CHECK:STDOUT: %Optional.loc17: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet.b99) [symbolic = %Optional.loc11_69.1 (constants.%Optional.5ec)]
// CHECK:STDOUT: %.loc17_42: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.2aa) = specific_constant imports.%Core.import_ref.6e4, @Optional(constants.%OptionalStorage.facet.b99) [symbolic = %Optional.None (constants.%Optional.None.fb7)]
// CHECK:STDOUT: %None.ref: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.2aa) = name_ref None, %.loc17_42 [symbolic = %Optional.None (constants.%Optional.None.fb7)]
// CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.1: <specific function> = specific_function %None.ref, @Optional.None(constants.%OptionalStorage.facet.b99) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn)]
// CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.1: <specific function> = specific_function %None.ref, @Optional.None(constants.%OptionalStorage.facet.b99) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn.5e5)]
// CHECK:STDOUT: %.loc11_69.2: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_69.1 (%Optional.5ec) = splice_block %return.param {}
// CHECK:STDOUT: %Optional.None.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_69.1 (%Optional.5ec) to %.loc11_69.2 = call %Optional.None.specific_fn.loc17_42.1()
// CHECK:STDOUT: %impl.elem0.loc12_7.2: @IntRange.as.Iterate.impl.Next.%.loc12_7.5 (%.2c6) = impl_witness_access constants.%Destroy.lookup_impl_witness.173, element0 [symbolic = %impl.elem0.loc12_7.3 (constants.%impl.elem0.604)]
@@ -816,10 +816,10 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %end.ref: %i32 = name_ref end, %end
// CHECK:STDOUT: %IntRange.Make.specific_fn: <specific function> = specific_function %Make.ref, @IntRange.Make(constants.%int_32) [concrete = constants.%IntRange.Make.specific_fn]
// CHECK:STDOUT: %.loc26_34.1: ref %IntRange.bbd = splice_block %return.param {}
// CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39]
// CHECK:STDOUT: %bound_method.loc27_28.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %impl.elem0: %.d74 = impl_witness_access constants.%ImplicitAs.impl_witness.778, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39]
// CHECK:STDOUT: %bound_method.loc27_28.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7b4]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc27_28.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %bound_method.loc27_28.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.6e0]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc27_28.2(%int_0) [concrete = constants.%int_0.3c0]
// CHECK:STDOUT: %.loc27_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.3c0]
// CHECK:STDOUT: %.loc27_28.2: %i32 = converted %int_0, %.loc27_28.1 [concrete = constants.%int_0.3c0]
@@ -829,15 +829,15 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: !observes:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @IntRange(constants.%N) {
// CHECK:STDOUT: %N.patt.loc4_17.2 => constants.%N.patt
// CHECK:STDOUT: %N.loc4_17.1 => constants.%N
// CHECK:STDOUT: specific @IntRange(constants.%N.fe9) {
// CHECK:STDOUT: %N.patt.loc4_17.2 => constants.%N.patt.aa5
// CHECK:STDOUT: %N.loc4_17.1 => constants.%N.fe9
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %IntRange.Make.type => constants.%IntRange.Make.type.522
// CHECK:STDOUT: %IntRange.Make => constants.%IntRange.Make.8ef
// CHECK:STDOUT: %Int => constants.%Int.67af24.1
// CHECK:STDOUT: %require_complete => constants.%require_complete.4dfb92.1
// CHECK:STDOUT: %require_complete => constants.%require_complete.4dfb92.2
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.142cb7.1
// CHECK:STDOUT: %start.patt => constants.%start.patt.477
// CHECK:STDOUT: %IntRange => constants.%IntRange.2c4
@@ -847,8 +847,8 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %complete_type.loc24_1.2 => constants.%complete_type.aa1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @IntRange.Make(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: specific @IntRange.Make(constants.%N.fe9) {
// CHECK:STDOUT: %N => constants.%N.fe9
// CHECK:STDOUT: %Int.loc5_28.1 => constants.%Int.67af24.1
// CHECK:STDOUT: %pattern_type.loc5_16 => constants.%pattern_type.142cb7.1
// CHECK:STDOUT: %start.param_patt.loc5_16.2 => constants.%start.param_patt.b2c
@@ -862,17 +862,17 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %return.patt.loc5_49.2 => constants.%return.patt.dbf
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @IntRange.as.Iterate.impl(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: specific @IntRange.as.Iterate.impl(constants.%N.fe9) {
// CHECK:STDOUT: %N => constants.%N.fe9
// CHECK:STDOUT: %IntRange => constants.%IntRange.2c4
// CHECK:STDOUT: %Int.loc9_54.1 => constants.%Int.67af24.1
// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.lookup_impl_witness.173
// CHECK:STDOUT: %Destroy.facet.loc9_54.1 => constants.%Destroy.facet.7bb
// CHECK:STDOUT: %.loc9_85.1 => constants.%.a53
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.df6
// CHECK:STDOUT: %facet_value.loc9_85.1 => constants.%facet_value
// CHECK:STDOUT: %Iterate_where.type => constants.%Iterate_where.type
// CHECK:STDOUT: %Iterate.impl_witness.loc9_87.2 => constants.%Iterate.impl_witness
// CHECK:STDOUT: %facet_value.loc9_85.1 => constants.%facet_value.c69
// CHECK:STDOUT: %Iterate_where.type => constants.%Iterate_where.type.836
// CHECK:STDOUT: %Iterate.impl_witness.loc9_87.2 => constants.%Iterate.impl_witness.81c
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%require_complete.466
@@ -882,21 +882,21 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %IntRange.as.Iterate.impl.Next => constants.%IntRange.as.Iterate.impl.Next
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @IntRange.as.Iterate.impl.NewCursor(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: specific @IntRange.as.Iterate.impl.NewCursor(constants.%N.fe9) {
// CHECK:STDOUT: %N => constants.%N.fe9
// CHECK:STDOUT: %IntRange => constants.%IntRange.2c4
// CHECK:STDOUT: %pattern_type.loc10_18 => constants.%pattern_type.1ea
// CHECK:STDOUT: %self.param_patt.loc10_18.2 => constants.%self.param_patt.5cc
// CHECK:STDOUT: %self.patt.loc10_18.2 => constants.%self.patt.13b
// CHECK:STDOUT: %Int.loc10_37.1 => constants.%Int.67af24.1
// CHECK:STDOUT: %.loc10_37.1 => constants.%.df5d8d.1
// CHECK:STDOUT: %.loc10_37.1 => constants.%.df5d8d.2
// CHECK:STDOUT: %pattern_type.loc10_37 => constants.%pattern_type.142cb7.1
// CHECK:STDOUT: %return.param_patt.loc10_37.2 => constants.%return.param_patt.5a2679.1
// CHECK:STDOUT: %return.param_patt.loc10_37.2 => constants.%return.param_patt.5a2679.2
// CHECK:STDOUT: %return.patt.loc10_24.2 => constants.%return.patt.434
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @IntRange.as.Iterate.impl.Next(constants.%N) {
// CHECK:STDOUT: %N => constants.%N
// CHECK:STDOUT: specific @IntRange.as.Iterate.impl.Next(constants.%N.fe9) {
// CHECK:STDOUT: %N => constants.%N.fe9
// CHECK:STDOUT: %IntRange => constants.%IntRange.2c4
// CHECK:STDOUT: %pattern_type.loc11_13 => constants.%pattern_type.1ea
// CHECK:STDOUT: %self.param_patt.loc11_13.2 => constants.%self.param_patt.5cc
@@ -908,7 +908,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: %cursor.patt.loc11_25.2 => constants.%cursor.patt.652
// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.lookup_impl_witness.173
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.df6
// CHECK:STDOUT: %facet_value => constants.%facet_value
// CHECK:STDOUT: %facet_value => constants.%facet_value.c69
// CHECK:STDOUT: %.loc11_69.3 => constants.%.3c5
// CHECK:STDOUT: %OptionalStorage.lookup_impl_witness => constants.%OptionalStorage.lookup_impl_witness.a32
// CHECK:STDOUT: %OptionalStorage.facet.loc11_69.1 => constants.%OptionalStorage.facet.b99
@@ -920,7 +920,7 @@ fn Read(y:! Core.IntLiteral) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @IntRange(constants.%int_32) {
// CHECK:STDOUT: %N.patt.loc4_17.2 => constants.%N.patt
// CHECK:STDOUT: %N.patt.loc4_17.2 => constants.%N.patt.aa5
// CHECK:STDOUT: %N.loc4_17.1 => constants.%int_32
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
+21
View File
@@ -400,6 +400,27 @@ fn G() {
C as (Z where .Z1 = .Self);
}
// --- assoc_const_impls_in_decl.carbon
library "[[@TEST_NAME]]";
interface I { let X:! type; }
interface J {}
// Test that we avoid an infinite impl lookup cycle from an LookupImplWitness
// instruction in the impl declaration. When matching this impl during impl
// lookup, we deduce and replace `T` with a specific argument, and resolve that
// specific's decl eval block. Doing so re-evaluates the lookup for `I` inside
// `.X`. If that lookup found this impl (since it's a final impl, eval can find
// it), we would deduce and produce an infinite cycle. Instructions inside the
// impl decl should not be able to find the impl.
final impl forall [T:! type] T as I where .X impls J and .X = () {}
fn F(unused T:! I where .X = ()) {}
fn G() {
class C;
F(C);
}
// CHECK:STDOUT: --- fail_many_different.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -37,6 +37,8 @@ fn For() {
// CHECK:STDOUT:
// CHECK:STDOUT: @EmptyRange.val.loc27_3 = internal constant {} zeroinitializer
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @"_COp.1155b488c23b5086:core.Destroy.Core"(ptr)
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_CF.Main(i32, ptr)
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
@@ -91,8 +93,6 @@ fn For() {
// CHECK:STDOUT: ret void, !dbg !26
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @"_COp.1155b488c23b5086:core.Destroy.Core"(ptr)
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_COp.5172fb5622df6926:core.Destroy.Core"(ptr %self) #0 !dbg !27 {
// CHECK:STDOUT: entry:
+3 -1
View File
@@ -81,7 +81,7 @@ fn For() {
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_CRange.Core(ptr sret({ i32, i32 }), i32)
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @"_COp.1155b488c23b5086:core.Destroy.Core"(ptr)
// CHECK:STDOUT: declare void @"_COp.5168ce3c64c7e43f:core.Destroy.Core"(ptr)
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %self) #0 !dbg !18 {
@@ -178,6 +178,8 @@ fn For() {
// CHECK:STDOUT: ret i32 %1, !dbg !93
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @"_COp.1155b488c23b5086:core.Destroy.Core"(ptr)
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_CInclusiveRange.Core(ptr sret({ i32, i32 }), i32, i32)
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
+3 -1
View File
@@ -69,7 +69,7 @@ fn For() {
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_CRange.Core(ptr sret({ i32, i32 }), i32)
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @"_COp.1155b488c23b5086:core.Destroy.Core"(ptr)
// CHECK:STDOUT: declare void @"_COp.5168ce3c64c7e43f:core.Destroy.Core"(ptr)
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %self) #0 !dbg !14 {
@@ -166,6 +166,8 @@ fn For() {
// CHECK:STDOUT: ret i32 %1, !dbg !89
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @"_COp.1155b488c23b5086:core.Destroy.Core"(ptr)
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_CInclusiveRange.Core(ptr sret({ i32, i32 }), i32, i32)
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind