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

Add IsStatic and IsAbstract to System.Type

This commit is contained in:
MineGame159 2023-02-17 16:00:34 +01:00
parent e8c763eb20
commit fdc598b4a2
3 changed files with 28 additions and 1 deletions

View file

@ -5997,6 +5997,11 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
if ((type->mDefineState != BfTypeDefineState_CETypeInit) && (type->WantsGCMarking()))
typeFlags |= BfTypeFlags_WantsMarking;
if ((typeInstance != NULL) && (typeInstance->mTypeDef->mIsStatic))
typeFlags |= BfTypeFlags_Static;
if ((typeInstance != NULL) && (typeInstance->mTypeDef->mIsAbstract))
typeFlags |= BfTypeFlags_Abstract;
int virtSlotIdx = -1;
if ((typeInstance != NULL) && (typeInstance->mSlotNum >= 0))
virtSlotIdx = typeInstance->mSlotNum + 1 + mCompiler->GetDynCastVDataCount();

View file

@ -220,7 +220,10 @@ enum BfTypeFlags
BfTypeFlags_Delegate = 0x20000,
BfTypeFlags_Function = 0x40000,
BfTypeFlags_HasDestructor = 0x80000,
BfTypeFlags_GenericParam = 0x100000
BfTypeFlags_GenericParam = 0x100000,
BfTypeFlags_Static = 0x200000,
BfTypeFlags_Abstract = 0x400000,
};
enum BfMethodFlags