mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Prevent comptime from setting mHasBeenInstantiated
This commit is contained in:
parent
ab494ad8d4
commit
d9e97c7dc0
2 changed files with 5 additions and 4 deletions
|
@ -5805,8 +5805,9 @@ void BfCompiler::PopulateReified()
|
|||
if ((typeInst->HasBeenInstantiated()) && (!mCanceling))
|
||||
{
|
||||
// If we have any virtual methods overrides that are unreified but the declaring virtual method is reified then we also need to reify
|
||||
for (auto&& vEntry : typeInst->mVirtualMethodTable)
|
||||
for (int virtIdx = 0; virtIdx < typeInst->mVirtualMethodTable.mSize; virtIdx++)
|
||||
{
|
||||
auto& vEntry = typeInst->mVirtualMethodTable[virtIdx];
|
||||
if ((vEntry.mDeclaringMethod.mTypeInstance == NULL) ||
|
||||
(vEntry.mDeclaringMethod.mTypeInstance->IsIncomplete()) ||
|
||||
(vEntry.mImplementingMethod.mTypeInstance == NULL) ||
|
||||
|
|
|
@ -9177,7 +9177,7 @@ BfIRValue BfModule::AllocFromType(BfType* type, const BfAllocTarget& allocTarget
|
|||
int allocAlign = type->mAlign;
|
||||
if (typeInstance != NULL)
|
||||
{
|
||||
if (!mBfIRBuilder->mIgnoreWrites)
|
||||
if ((!mBfIRBuilder->mIgnoreWrites) && (!mIsComptimeModule))
|
||||
typeInstance->mHasBeenInstantiated = true;
|
||||
allocSize = typeInstance->mInstSize;
|
||||
allocAlign = typeInstance->mInstAlign;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue