mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 15:26:00 +02:00
Added IsReadOnly to FieldInfo and MethodInfo
This commit is contained in:
parent
c080f1cbb1
commit
996377909f
6 changed files with 28 additions and 26 deletions
|
@ -5585,6 +5585,8 @@ BfIRValue BfModule::CreateFieldData(BfFieldInstance* fieldInstance, int customAt
|
|||
fieldFlags = (BfFieldFlags)(fieldFlags | BfFieldFlags_Const);
|
||||
if (fieldDef->IsEnumCaseEntry())
|
||||
fieldFlags = (BfFieldFlags)(fieldFlags | BfFieldFlags_EnumCase);
|
||||
if (fieldDef->mIsReadOnly)
|
||||
fieldFlags = (BfFieldFlags)(fieldFlags | BfFieldFlags_ReadOnly);
|
||||
|
||||
BfIRValue constValue;
|
||||
BfIRValue constValue2;
|
||||
|
@ -7163,7 +7165,7 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
|
|||
paramFlags = (ParamFlags)(paramFlags | ParamFlag_Splat);
|
||||
if (defaultMethod->GetParamKind(paramIdx) == BfParamKind_AppendIdx)
|
||||
paramFlags = (ParamFlags)(paramFlags | ParamFlag_Implicit | ParamFlag_AppendIdx);
|
||||
|
||||
|
||||
BfIRValue paramNameConst = GetStringObjectValue(paramName, !mIsComptimeModule);
|
||||
|
||||
int paramCustomAttrIdx = -1;
|
||||
|
|
|
@ -697,6 +697,8 @@ BfMethodFlags BfMethodInstance::GetMethodFlags()
|
|||
methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_Mutating);
|
||||
if (mMethodDef->mMethodType == BfMethodType_Ctor)
|
||||
methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_Constructor);
|
||||
if (mMethodDef->mIsReadOnly)
|
||||
methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_ReadOnly);
|
||||
|
||||
auto callingConvention = GetOwner()->mModule->GetIRCallingConvention(this);
|
||||
if (callingConvention == BfIRCallingConv_ThisCall)
|
||||
|
@ -705,6 +707,7 @@ BfMethodFlags BfMethodInstance::GetMethodFlags()
|
|||
methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_StdCall);
|
||||
else if (callingConvention == BfIRCallingConv_FastCall)
|
||||
methodFlags = (BfMethodFlags)(methodFlags | BfMethodFlags_FastCall);
|
||||
|
||||
return methodFlags;
|
||||
}
|
||||
|
||||
|
|
|
@ -229,11 +229,12 @@ enum BfMethodFlags
|
|||
BfMethodFlags_Public = 6,
|
||||
BfMethodFlags_Static = 0x10,
|
||||
BfMethodFlags_Virtual = 0x40,
|
||||
BfMethodFlags_ReadOnly = 0x100,
|
||||
BfMethodFlags_StdCall = 0x1000,
|
||||
BfMethodFlags_FastCall = 0x2000,
|
||||
BfMethodFlags_ThisCall = 0x3000,
|
||||
BfMethodFlags_Mutating = 0x4000,
|
||||
BfMethodFlags_Constructor = 0x8000,
|
||||
BfMethodFlags_Constructor = 0x8000
|
||||
};
|
||||
|
||||
enum BfObjectFlags : uint8
|
||||
|
@ -1666,7 +1667,8 @@ enum BfFieldFlags
|
|||
BfFieldFlags_SpecialName = 0x80,
|
||||
BfFieldFlags_EnumPayload = 0x100,
|
||||
BfFieldFlags_EnumDiscriminator = 0x200,
|
||||
BfFieldFlags_EnumCase = 0x400
|
||||
BfFieldFlags_EnumCase = 0x400,
|
||||
BfFieldFlags_ReadOnly = 0x800
|
||||
};
|
||||
|
||||
enum BfReflectKind
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue