mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Merge pull request #1798 from MineGame159/type_static_abstract
Add IsStatic and IsAbstract to System.Type
This commit is contained in:
commit
0aedc37d42
3 changed files with 28 additions and 1 deletions
|
@ -394,6 +394,22 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsStatic
|
||||
{
|
||||
get
|
||||
{
|
||||
return (mTypeFlags & .Static) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsAbstract
|
||||
{
|
||||
get
|
||||
{
|
||||
return (mTypeFlags & .Abstract) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual int32 GenericParamCount
|
||||
{
|
||||
get
|
||||
|
@ -1461,6 +1477,9 @@ namespace System.Reflection
|
|||
Function = 0x40000,
|
||||
HasDestructor = 0x80000,
|
||||
GenericParam = 0x100000,
|
||||
|
||||
Static = 0x200000,
|
||||
Abstract = 0x400000,
|
||||
}
|
||||
|
||||
public enum FieldFlags : uint16
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue