@@ -402,10 +402,10 @@ struct EscapeAnalyzer {
402402 }
403403 } else {
404404 // Either the child is the descriptor, in which case we consume it, or
405- // we have already optimized this ref.cast_desc for an allocation that
406- // flowed through as its `ref`. In the latter case the current child
407- // must have originally been the descriptor, so we can still say it's
408- // fully consumed, but we cannot assert that curr->desc == child.
405+ // we have already optimized this ref.cast_desc_eq for an allocation
406+ // that flowed through as its `ref`. In the latter case the current
407+ // child must have originally been the descriptor, so we can still say
408+ // it's fully consumed, but we cannot assert that curr->desc == child.
409409 fullyConsumes = true ;
410410 }
411411 }
@@ -869,23 +869,23 @@ struct Struct2Local : PostWalker<Struct2Local> {
869869 builder.makeUnreachable ()));
870870 };
871871
872- // If we are doing a ref.cast_desc of the optimized allocation, but the
872+ // If we are doing a ref.cast_desc_eq of the optimized allocation, but the
873873 // allocation does not have a descriptor, then we know the cast must fail.
874874 // We also know the cast must fail (except for nulls it might let through)
875875 // if the optimized allocation flows in as the descriptor, since it cannot
876876 // possibly have been used in the allocation of the cast value without
877877 // having been considered to escape.
878878 bool allocIsCastRef =
879879 analyzer.getInteraction (curr->ref ) == ParentChildInteraction::Flows;
880- bool allocIsCastDesc =
880+ bool allocIsCastDescEq =
881881 analyzer.getInteraction (curr->desc ) == ParentChildInteraction::Flows;
882- if (!allocation->desc || allocIsCastDesc ) {
882+ if (!allocation->desc || allocIsCastDescEq ) {
883883 // It would seem convenient to use ChildLocalizer here, but we cannot.
884884 // ChildLocalizer would create a local.set for a desc operand with
885885 // side effects, but that local.set would not be reflected in the parent
886886 // map, so it would not be updated if the allocation flowing through
887887 // that desc operand were later optimized.
888- if (allocIsCastDesc && !allocIsCastRef && curr->type .isNullable ()) {
888+ if (allocIsCastDescEq && !allocIsCastRef && curr->type .isNullable ()) {
889889 // There might be a null value to let through. Reuse curr as a cast to
890890 // null. Use a scratch local to move the reference value past the desc
891891 // value.
0 commit comments