mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Deleted type protection in EmitGCMarkValue, RequestExtraCompile feature
This commit is contained in:
parent
6e0cabf8aa
commit
471897a150
6 changed files with 81 additions and 1 deletions
|
@ -4730,6 +4730,7 @@ BfTypedValue BfModule::GetFieldInitializerValue(BfFieldInstance* fieldInstance,
|
|||
|
||||
if (fieldType->IsDeleting())
|
||||
{
|
||||
mCompiler->RequestExtraCompile();
|
||||
InternalError("Field using deleted type", fieldDef->GetRefNode());
|
||||
}
|
||||
else if (fieldType->IsVar())
|
||||
|
@ -11264,6 +11265,7 @@ BfMethodInstance* BfModule::GetRawMethodInstanceAtIdx(BfTypeInstance* typeInstan
|
|||
{
|
||||
if (typeInstance->IsDeleting())
|
||||
{
|
||||
mCompiler->RequestExtraCompile();
|
||||
InternalError("GetRawMethodInstanceAtIdx for deleted type", typeInstance->mTypeDef->GetRefNode());
|
||||
return NULL;
|
||||
}
|
||||
|
@ -20301,6 +20303,13 @@ void BfModule::EmitGCMarkValue(BfTypedValue& thisValue, BfType* checkType, int m
|
|||
if (!checkType->WantsGCMarking())
|
||||
return;
|
||||
|
||||
if (checkType->IsDeleting())
|
||||
{
|
||||
mCompiler->RequestExtraCompile();
|
||||
InternalError("EmitGCMarkValue deleted type");
|
||||
return;
|
||||
}
|
||||
|
||||
auto typeInstance = checkType->ToTypeInstance();
|
||||
bool callMarkMethod = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue