mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Dynamic boxing
This commit is contained in:
parent
7036433e5d
commit
da5b81f419
14 changed files with 266 additions and 151 deletions
|
@ -3996,15 +3996,28 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
|
|||
isFailedType = true;
|
||||
}
|
||||
|
||||
bool typeOptionsIncludeAll = false;
|
||||
if (typeOptions != NULL)
|
||||
typeOptionsIncludeAll = typeOptions->Apply(typeOptionsIncludeAll, BfOptionFlags_ReflectAlwaysIncludeAll);
|
||||
bool typeOptionsIncludeAll = false;
|
||||
if (typeOptions != NULL)
|
||||
typeOptionsIncludeAll = typeOptions->Apply(typeOptionsIncludeAll, BfOptionFlags_ReflectAlwaysIncludeAll);
|
||||
|
||||
// Generate all methods. Pass 1
|
||||
for (auto methodDef : typeDef->mMethods)
|
||||
{
|
||||
auto methodInstanceGroup = &typeInstance->mMethodInstanceGroups[methodDef->mIdx];
|
||||
|
||||
if (typeOptions != NULL)
|
||||
{
|
||||
BfOptionFlags optionFlags = BfOptionFlags_ReflectNonStaticMethods;
|
||||
if (methodDef->mMethodType == BfMethodType_Ctor)
|
||||
optionFlags = BfOptionFlags_ReflectConstructors;
|
||||
else if (methodDef->mIsStatic)
|
||||
optionFlags = BfOptionFlags_ReflectStaticMethods;
|
||||
methodInstanceGroup->mExplicitlyReflected = typeOptions->Apply(false, optionFlags);
|
||||
methodInstanceGroup->mExplicitlyReflected = ApplyTypeOptionMethodFilters(methodInstanceGroup->mExplicitlyReflected, methodDef, typeOptions);
|
||||
}
|
||||
if ((typeInstance->mCustomAttributes != NULL) && (typeInstance->mCustomAttributes->Contains(mCompiler->mReflectAttributeTypeDef)))
|
||||
methodInstanceGroup->mExplicitlyReflected = true;
|
||||
|
||||
if (methodInstanceGroup->mOnDemandKind == BfMethodOnDemandKind_AlwaysInclude)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue