1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-29 12:55:59 +02:00

Dynamic boxing

This commit is contained in:
Brian Fiete 2020-09-14 11:18:24 -07:00
parent 7036433e5d
commit da5b81f419
14 changed files with 266 additions and 151 deletions

View file

@ -106,6 +106,8 @@ namespace IDE
[Reflect]
public BuildOptions.AlwaysIncludeKind mReflectAlwaysInclude;
[Reflect]
public bool? mReflectBoxing;
[Reflect]
public bool? mReflectStaticFields;
[Reflect]
public bool? mReflectNonStaticFields;
@ -135,6 +137,7 @@ namespace IDE
newVal.mEmitObjectAccessCheck = mEmitObjectAccessCheck;
newVal.mAllocStackTraceDepth = mAllocStackTraceDepth;
newVal.mReflectAlwaysInclude = mReflectAlwaysInclude;
newVal.mReflectBoxing = mReflectBoxing;
newVal.mReflectStaticFields = mReflectStaticFields;
newVal.mReflectNonStaticFields = mReflectNonStaticFields;
newVal.mReflectStaticMethods = mReflectStaticMethods;
@ -166,6 +169,8 @@ namespace IDE
if (data.Contains("ReflectAlwaysInclude"))
mReflectAlwaysInclude = data.GetEnum<BuildOptions.AlwaysIncludeKind>("ReflectAlwaysInclude");
if (data.Contains("ReflectBoxing"))
mReflectStaticFields = data.GetBool("ReflectBoxing");
if (data.Contains("ReflectStaticFields"))
mReflectStaticFields = data.GetBool("ReflectStaticFields");
if (data.Contains("ReflectNonStaticFields"))
@ -191,6 +196,7 @@ namespace IDE
data.ConditionalAdd("EmitObjectAccessCheck", mEmitObjectAccessCheck);
data.ConditionalAdd("AllocStackTraceDepth", mAllocStackTraceDepth);
data.ConditionalAdd("ReflectAlwaysInclude", mReflectAlwaysInclude);
data.ConditionalAdd("ReflectBoxing", mReflectBoxing);
data.ConditionalAdd("ReflectStaticFields", mReflectStaticFields);
data.ConditionalAdd("ReflectNonStaticFields", mReflectNonStaticFields);
data.ConditionalAdd("ReflectStaticMethods", mReflectStaticMethods);

View file

@ -18,14 +18,15 @@ namespace IDE.Compiler
ReflectAlwaysIncludeType = 0x10,
ReflectAlwaysIncludeAll = 0x20,
ReflectAssumeInstantiated = 0x40,
ReflectStaticFields = 0x80,
ReflectNonStaticFields = 0x100,
ReflectStaticMethods = 0x200,
ReflectNonStaticMethods = 0x400,
ReflectConstructors = 0x800,
ReflectAssumeInstantiated = 0x40,
ReflectBoxing = 0x80,
ReflectStaticFields = 0x100,
ReflectNonStaticFields = 0x200,
ReflectStaticMethods = 0x400,
ReflectNonStaticMethods = 0x800,
ReflectConstructors = 0x1000,
All = 0xFFF
All = 0x1FFF
};
[CallingConvention(.Stdcall), CLink]
@ -401,6 +402,7 @@ namespace IDE.Compiler
orFlags |= .ReflectAlwaysIncludeType | .ReflectAlwaysIncludeAll | .ReflectAssumeInstantiated;
}
SetFlag(typeOption.mReflectBoxing, .ReflectBoxing);
SetFlag(typeOption.mReflectStaticFields, .ReflectStaticFields);
SetFlag(typeOption.mReflectNonStaticFields, .ReflectNonStaticFields);
SetFlag(typeOption.mReflectStaticMethods, .ReflectStaticMethods);

View file

@ -151,6 +151,10 @@ namespace IDE.ui
typeName.Clear(); typeName.Append(optionsName, "mReflectAlwaysInclude");
AddPropertiesItem(reflectItem, "Always Include", typeName);
typeName.Clear(); typeName.Append(optionsName, "mReflectBoxing");
AddPropertiesItem(reflectItem, "Dynamic Boxing", typeName,
scope String[] ( "No", "Yes" ));
typeName.Clear(); typeName.Append(optionsName, "mReflectStaticFields");
AddPropertiesItem(reflectItem, "Static Fields", typeName,
scope String[] ( "No", "Yes" ));