mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +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 ((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
|
// 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) ||
|
if ((vEntry.mDeclaringMethod.mTypeInstance == NULL) ||
|
||||||
(vEntry.mDeclaringMethod.mTypeInstance->IsIncomplete()) ||
|
(vEntry.mDeclaringMethod.mTypeInstance->IsIncomplete()) ||
|
||||||
(vEntry.mImplementingMethod.mTypeInstance == NULL) ||
|
(vEntry.mImplementingMethod.mTypeInstance == NULL) ||
|
||||||
|
|
|
@ -9177,7 +9177,7 @@ BfIRValue BfModule::AllocFromType(BfType* type, const BfAllocTarget& allocTarget
|
||||||
int allocAlign = type->mAlign;
|
int allocAlign = type->mAlign;
|
||||||
if (typeInstance != NULL)
|
if (typeInstance != NULL)
|
||||||
{
|
{
|
||||||
if (!mBfIRBuilder->mIgnoreWrites)
|
if ((!mBfIRBuilder->mIgnoreWrites) && (!mIsComptimeModule))
|
||||||
typeInstance->mHasBeenInstantiated = true;
|
typeInstance->mHasBeenInstantiated = true;
|
||||||
allocSize = typeInstance->mInstSize;
|
allocSize = typeInstance->mInstSize;
|
||||||
allocAlign = typeInstance->mInstAlign;
|
allocAlign = typeInstance->mInstAlign;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue