1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed GC marking of sized arrays

This commit is contained in:
Brian Fiete 2020-07-24 06:37:50 -07:00
parent 04de0512c3
commit 8fb6f7304d
2 changed files with 92 additions and 10 deletions

View file

@ -7390,7 +7390,7 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
target = BfTypedValue(target.mValue, mModule->CreateRefType(target.mType));
}
}
BfTypedValue callTarget;
if (isSkipCall)
{
@ -12690,15 +12690,20 @@ BfTypedValue BfExprEvaluator::MakeCallableTarget(BfAstNode* targetSrc, BfTypedVa
{
mModule->PopulateType(primStructType);
target.mType = primStructType;
if ((primStructType->IsSplattable()) && (!primStructType->IsTypedPrimitive()))
if (primStructType->IsTypedPrimitive())
{
// Type is already the same
}
else if (target.IsAddr())
{
auto ptrType = mModule->CreatePointerType(primStructType);
target = BfTypedValue(mModule->mBfIRBuilder->CreateBitCast(target.mValue, mModule->mBfIRBuilder->MapType(ptrType)), primStructType, true);
}
else if (primStructType->IsSplattable())
{
if (target.IsAddr())
{
auto ptrType = mModule->CreatePointerType(primStructType);
target = BfTypedValue(mModule->mBfIRBuilder->CreateBitCast(target.mValue, mModule->mBfIRBuilder->MapType(ptrType)), primStructType, true);
}
else
target.mKind = BfTypedValueKind_SplatHead;
BF_ASSERT(target.IsSplat());
target.mKind = BfTypedValueKind_SplatHead;
}
}