@@ -4599,17 +4599,17 @@ visitMagicIdentifierLiteralExpr(MagicIdentifierLiteralExpr *E, SGFContext C) {
4599
4599
llvm_unreachable (" Unhandled MagicIdentifierLiteralExpr in switch." );
4600
4600
}
4601
4601
4602
- static RValue emitSlabLiteral (SILGenFunction &SGF, CollectionExpr *E,
4602
+ static RValue emitInlineArrayLiteral (SILGenFunction &SGF, CollectionExpr *E,
4603
4603
SGFContext C) {
4604
4604
ArgumentScope scope (SGF, E);
4605
4605
4606
- auto slabType = E->getType ()->castTo <BoundGenericType>();
4607
- auto loweredSlabType = SGF.getLoweredType (slabType );
4608
- auto elementType = slabType ->getGenericArgs ()[1 ]->getCanonicalType ();
4606
+ auto iaTy = E->getType ()->castTo <BoundGenericType>();
4607
+ auto loweredIAType = SGF.getLoweredType (iaTy );
4608
+ auto elementType = iaTy ->getGenericArgs ()[1 ]->getCanonicalType ();
4609
4609
auto loweredElementType = SGF.getLoweredType (elementType);
4610
4610
auto &eltTL = SGF.getTypeLowering (AbstractionPattern::getOpaque (), elementType);
4611
4611
4612
- SILValue alloc = SGF.emitTemporaryAllocation (E, loweredSlabType );
4612
+ SILValue alloc = SGF.emitTemporaryAllocation (E, loweredIAType );
4613
4613
SILValue addr = SGF.B .createUncheckedAddrCast (E, alloc,
4614
4614
loweredElementType.getAddressType ());
4615
4615
@@ -4642,31 +4642,31 @@ static RValue emitSlabLiteral(SILGenFunction &SGF, CollectionExpr *E,
4642
4642
.forwardInto (SGF, AbstractionPattern::getOpaque (), &init, eltTL);
4643
4643
}
4644
4644
4645
- // Kill the per-element cleanups. The slab will take ownership of them.
4645
+ // Kill the per-element cleanups. The inline array will take ownership of them.
4646
4646
for (auto destCleanup : cleanups)
4647
4647
SGF.Cleanups .setCleanupState (destCleanup, CleanupState::Dead);
4648
4648
4649
- SILValue slabVal ;
4649
+ SILValue iaVal ;
4650
4650
4651
- // If the slab is naturally address-only, then we can adopt the stack slot
4652
- // as the value directly.
4653
- if (loweredSlabType .isAddressOnly (SGF.F )) {
4654
- slabVal = SGF.B .createUncheckedAddrCast (E, alloc, loweredSlabType );
4651
+ // If the inline array is naturally address-only, then we can adopt the stack
4652
+ // slot as the value directly.
4653
+ if (loweredIAType .isAddressOnly (SGF.F )) {
4654
+ iaVal = SGF.B .createUncheckedAddrCast (E, alloc, loweredIAType );
4655
4655
} else {
4656
- // Otherwise, this slab is loadable. Load it.
4657
- slabVal = SGF.B .createTrivialLoadOr (E, alloc, LoadOwnershipQualifier::Take);
4656
+ // Otherwise, this inline array is loadable. Load it.
4657
+ iaVal = SGF.B .createTrivialLoadOr (E, alloc, LoadOwnershipQualifier::Take);
4658
4658
}
4659
4659
4660
- auto slabMV = SGF.emitManagedRValueWithCleanup (slabVal );
4661
- auto slab = RValue (SGF, E, slabMV );
4660
+ auto iaMV = SGF.emitManagedRValueWithCleanup (iaVal );
4661
+ auto ia = RValue (SGF, E, iaMV );
4662
4662
4663
- return scope.popPreservingValue (std::move (slab ));
4663
+ return scope.popPreservingValue (std::move (ia ));
4664
4664
}
4665
4665
4666
4666
RValue RValueEmitter::visitCollectionExpr (CollectionExpr *E, SGFContext C) {
4667
- // Handle 'Slab ' literals separately.
4668
- if (E->getType ()->isSlab ()) {
4669
- return emitSlabLiteral (SGF, E, C);
4667
+ // Handle 'InlineArray ' literals separately.
4668
+ if (E->getType ()->isInlineArray ()) {
4669
+ return emitInlineArrayLiteral (SGF, E, C);
4670
4670
}
4671
4671
4672
4672
auto loc = SILLocation (E);
0 commit comments