diff --git a/BeefBuild/BeefSpace.toml b/BeefBuild/BeefSpace.toml index 3f970596..fc118007 100644 --- a/BeefBuild/BeefSpace.toml +++ b/BeefBuild/BeefSpace.toml @@ -1,15 +1,14 @@ FileVersion = 1 Projects = {BeefBuild = {Path = "."}, corlib = "*", Beefy2D = {Path = "../BeefLibs/Beefy2D"}, IDEHelper = {Path = "../IDEHelper"}, Debugger64 = {Path = "../Debugger64"}, BeefySysLib = {Path = "../BeefySysLib"}} +Unlocked = ["corlib"] [Workspace] StartupProject = "BeefBuild" [Configs.Debug.Win32] Toolset = "GNU" -BfOptimizationLevel = "O0" InitLocalVariables = true EmitObjectAccessCheck = false -EnableCustodian = false EnableRealtimeLeakCheck = false AllocStackTraceDepth = 0 ConfigSelections = {IDEHelper = {Enabled = false}} @@ -25,24 +24,18 @@ EmitDebugInfo = "No" AllocStackTraceDepth = 0 ConfigSelections = {IDEHelper = {Enabled = false}} -[Configs.Release.Win64] - [Configs.Release.Win64z] EnableObjectDebugFlags = true EmitObjectAccessCheck = true -EnableCustodian = true EnableRealtimeLeakCheck = true AllocStackTraceDepth = 0 [Configs.Debug-IDE.Win32] Toolset = "GNU" -BfOptimizationLevel = "O0" EmitDebugInfo = "No" -ArrayBoundsCheck = false EmitDynamicCastCheck = false EnableObjectDebugFlags = false EmitObjectAccessCheck = false -EnableCustodian = false EnableRealtimeLeakCheck = false AllocStackTraceDepth = 0 ConfigSelections = {corlib = {Config = "Debug"}, Beefy2D = {Config = "Debug"}, IDEHelper = {Config = "Debug"}, Debugger64 = {Config = "Debug"}, BeefySysLib = {Config = "Debug"}} @@ -51,29 +44,25 @@ ConfigSelections = {corlib = {Config = "Debug"}, Beefy2D = {Config = "Debug"}, I Toolset = "GNU" BfOptimizationLevel = "O0" EmitDebugInfo = "No" -ArrayBoundsCheck = false EmitDynamicCastCheck = false EnableObjectDebugFlags = false EmitObjectAccessCheck = false -EnableCustodian = false EnableRealtimeLeakCheck = false ConfigSelections = {corlib = {Config = "Debug"}, Beefy2D = {Config = "Debug"}, IDEHelper = {Config = "Debug"}, Debugger64 = {Config = "Debug"}, BeefySysLib = {Config = "Debug"}} [Configs.Debug2.Win32] Toolset = "GNU" -BfOptimizationLevel = "O0" EmitDebugInfo = "No" -ArrayBoundsCheck = false EmitDynamicCastCheck = false EnableObjectDebugFlags = false EmitObjectAccessCheck = false -EnableCustodian = false EnableRealtimeLeakCheck = false AllocStackTraceDepth = 0 ConfigSelections = {corlib = {Config = "Debug"}, Beefy2D = {Config = "Debug"}, IDEHelper = {Config = "Debug"}, Debugger64 = {Config = "Debug"}, BeefySysLib = {Config = "Debug"}} [Configs.Debug2.Win64] PreprocessorMacros = ["NEWFONT"] +BfOptimizationLevel = "O0" IntermediateType = "ObjectAndIRCode" ConfigSelections = {corlib = {Config = "Debug"}, Beefy2D = {Config = "Debug"}, IDEHelper = {Config = "Debug"}, Debugger64 = {Config = "Debug"}, BeefySysLib = {Config = "Debug"}} diff --git a/BeefLibs/corlib/src/Attribute.bf b/BeefLibs/corlib/src/Attribute.bf index 26c8c7ff..ac1be99b 100644 --- a/BeefLibs/corlib/src/Attribute.bf +++ b/BeefLibs/corlib/src/Attribute.bf @@ -132,12 +132,6 @@ namespace System } - [AttributeUsage(.MemberAccess)] - public struct SkipAccessCheckAttribute : Attribute - { - - } - [AttributeUsage(.Method | .Class | .Struct | .Enum)] public struct OptimizeAttribute : Attribute { @@ -331,7 +325,7 @@ namespace System /// Generally used as a per-method optimization, [DisableObjectAccessChecks] will avoid the runtime per-object-access /// checks which by default are only applied in debug builds anyway. - [AttributeUsage(.Method/*, AlwaysIncludeTarget=true*/)] + [AttributeUsage(.Method | .MemberAccess)] public struct DisableObjectAccessChecksAttribute : Attribute { } diff --git a/BeefLibs/corlib/src/Runtime.bf b/BeefLibs/corlib/src/Runtime.bf index b55d7dd1..0c609494 100644 --- a/BeefLibs/corlib/src/Runtime.bf +++ b/BeefLibs/corlib/src/Runtime.bf @@ -159,7 +159,7 @@ namespace System static void Object_GCMarkMembers(Object obj) { #if BF_ENABLE_REALTIME_LEAK_CHECK - obj.[Friend, SkipAccessCheck]GCMarkMembers(); + obj.[Friend, DisableObjectAccessChecks]GCMarkMembers(); #endif } diff --git a/IDE/BeefProj.toml b/IDE/BeefProj.toml index 733e3bf4..8079fa51 100644 --- a/IDE/BeefProj.toml +++ b/IDE/BeefProj.toml @@ -25,7 +25,7 @@ OtherLinkFlags = "" TargetDirectory = "$(WorkspaceDir)/dist" TargetName = "BeefIDE_d" OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib" -DebugCommandArguments = "-proddir=C:\\Beef\\IDE\\Tests\\Test1 -test=scripts\\Data01.txt -testNoExit" +DebugCommandArguments = "-proddir=C:\\Beef\\IDE" DebugWorkingDirectory = "c:\\Beef\\IDE\\Tests\\EmptyTest" EnvironmentVars = ["_NO_DEBUG_HEAP=1"] @@ -37,7 +37,7 @@ OtherLinkFlags = "" TargetDirectory = "$(WorkspaceDir)/dist" TargetName = "BeefIDE" OtherLinkFlags = "Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib Beef042RT64.lib IDEHelper64.lib BeefySysLib64.lib" -DebugCommandArguments = "-proddir=C:\\Beef\\IDE" +DebugCommandArguments = "-proddir=C:\\Beef\\IDE\\Tests\\Test1 -test=scripts\\Data01.txt -testNoExit" DebugWorkingDirectory = "$(ProjectDir)\\dist" EnvironmentVars = ["_NO_DEBUG_HEAP=1"] diff --git a/IDE/BeefSpace.toml b/IDE/BeefSpace.toml index 7fb24a01..1aa872b6 100644 --- a/IDE/BeefSpace.toml +++ b/IDE/BeefSpace.toml @@ -100,6 +100,7 @@ AllowHotSwapping = false AllocStackTraceDepth = 0 [Configs.Debug3.Win64] +BfOptimizationLevel = "O0" IntermediateType = "ObjectAndIRCode" ConfigSelections = {Beefy2D = {Config = "Debug"}, IDEHelper = {Config = "Debug"}, Debugger64 = {Config = "Debug"}, BeefySysLib = {Config = "Debug"}} diff --git a/IDE/mintest/BeefProj.toml b/IDE/mintest/BeefProj.toml index 38d31656..840a63e9 100644 --- a/IDE/mintest/BeefProj.toml +++ b/IDE/mintest/BeefProj.toml @@ -5,7 +5,6 @@ Dependencies = {minlib = "*"} Name = "mintest" StartupObject = "Hey.Dude.Bro.TestClass" DefaultNamespace = "Mintest" -Aliases = ["corlib"] [Platform.Windows] Description = "Mintest" diff --git a/IDE/mintest/BeefSpace.toml b/IDE/mintest/BeefSpace.toml index 3e5cadb7..c63ed4cc 100644 --- a/IDE/mintest/BeefSpace.toml +++ b/IDE/mintest/BeefSpace.toml @@ -11,6 +11,9 @@ InitLocalVariables = true IntermediateType = "ObjectAndIRCode" ConfigSelections = {mintest2 = {Enabled = false}} +[[Configs.Debug.Win32.DistinctOptions]] +Filter = "NoFrame" + [Configs.Debug.Win64] IntermediateType = "ObjectAndIRCode" COptimizationLevel = "Og" diff --git a/IDE/mintest/minlib/BeefProj.toml b/IDE/mintest/minlib/BeefProj.toml index 2310eb19..1965d049 100644 --- a/IDE/mintest/minlib/BeefProj.toml +++ b/IDE/mintest/minlib/BeefProj.toml @@ -5,6 +5,7 @@ Dependencies = {} Name = "minlib" TargetType = "BeefLib" DefaultNamespace = "" +Aliases = ["corlib"] [Configs.Debug.Win32] OtherLinkFlags = "" diff --git a/IDE/mintest/minlib/src/System/Attribute.bf b/IDE/mintest/minlib/src/System/Attribute.bf index 61394d2e..6892b9fe 100644 --- a/IDE/mintest/minlib/src/System/Attribute.bf +++ b/IDE/mintest/minlib/src/System/Attribute.bf @@ -132,12 +132,6 @@ namespace System } - [AttributeUsage(.MemberAccess)] - public struct SkipAccessCheckAttribute : Attribute - { - - } - [AttributeUsage(.Method | .Class | .Struct | .Enum)] public struct OptimizeAttribute : Attribute { @@ -337,7 +331,7 @@ namespace System { } - [AttributeUsage(.Method/*, AlwaysIncludeTarget=true*/)] + [AttributeUsage(.Method | .MemberAccess)] public struct DisableObjectAccessChecksAttribute : Attribute { } diff --git a/IDE/mintest/minlib/src/System/Runtime.bf b/IDE/mintest/minlib/src/System/Runtime.bf index b55d7dd1..0c609494 100644 --- a/IDE/mintest/minlib/src/System/Runtime.bf +++ b/IDE/mintest/minlib/src/System/Runtime.bf @@ -159,7 +159,7 @@ namespace System static void Object_GCMarkMembers(Object obj) { #if BF_ENABLE_REALTIME_LEAK_CHECK - obj.[Friend, SkipAccessCheck]GCMarkMembers(); + obj.[Friend, DisableObjectAccessChecks]GCMarkMembers(); #endif } diff --git a/IDE/mintest/minlib/src/System/String.bf b/IDE/mintest/minlib/src/System/String.bf index 8685bb22..2e65b6a1 100644 --- a/IDE/mintest/minlib/src/System/String.bf +++ b/IDE/mintest/minlib/src/System/String.bf @@ -241,6 +241,14 @@ namespace System } } + private int PrivateLength + { + get + { + return mLength; + } + } + int32 AllocSize { [Inline] diff --git a/IDE/mintest/src/main3.bf b/IDE/mintest/src/main3.bf index 79529f13..389a54c8 100644 --- a/IDE/mintest/src/main3.bf +++ b/IDE/mintest/src/main3.bf @@ -195,15 +195,20 @@ struct Blurg }*/ - struct Base + public struct Base { int32 mA; int64 mB; } - struct Derived : Base + public struct Derived : Base { int8 mC; + + public int GetC() + { + return mC + 10000; + } } static int[] gArr = new .(1, 2, 3, 4, 5, ); @@ -225,17 +230,105 @@ struct Blurg return 3; } + + public static void Test() + { + //Test_Start + Derived dr = .(); + dr.GetC(); + Int iVal = (.)123; + + int q = 999; + + //Test_End + } + + public static void Test2(int aa, int bb, int cc) + { + //Test_Start + Derived dr2 = .(); + Int iVal2 = (.)123; + + int q2 = 999; + + String str = scope .(); + + //Test_End + } + + public static void Recurse(int a) + { + int b = 234; + //Recurse_C + int c = 345; + + if (a == 10) + return; + + Recurse(a + 1); + int d = 100 + a; + } + + public static void Test3() + { + //BreakpointTester_Test + int a = 0; + int b = 0; + + while (a < 20) + { + //BreakpointTester_LoopA + a++; + } + + //BreakpointTester_Recurse + Recurse(0); + } + + public static void Test4() + { + //Test_Start + Derived dr = .(); + Int iVal = (.)123; + + int q = 999; + + //Test_End + } + + //[DisableObjectAccessChecks] + public static void Hey2() + { + String str = "Hey"; + //int len = str.[Friend, DisableObjectAccessChecks]PrivateLength; + int len = str.[DisableObjectAccessChecks]Length; + //int len = str.[Friend]GetLength(); + } + public static int32 Hey() { - /*Self.[Checked]GetVal(); - Self.[Unchecked]GetVal(); - GetVal2();*/ - - int a = gArr[1]; - a = gArr[[Unchecked]2]; - + Hey2(); + Test(); + Test2(11, 22, 33); + Test3(); + Test4(); + NoFrame.Test(); return (int32)123; } } + +class NoFrame +{ + public static void Test() + { + //Test_Start + Blurg.Derived dr = .(); + Int iVal = (.)123; + + int q = 999; + + //Test_End + } +} \ No newline at end of file diff --git a/IDE/src/ui/ProjectPanel.bf b/IDE/src/ui/ProjectPanel.bf index 537873a8..f0ace8b5 100644 --- a/IDE/src/ui/ProjectPanel.bf +++ b/IDE/src/ui/ProjectPanel.bf @@ -1151,7 +1151,10 @@ namespace IDE.ui gApp.WithTabs(scope (tab) => { var sourceViewPanel = tab.mContent as SourceViewPanel; - if ((sourceViewPanel != null) && (sourceViewPanel.mProjectSource.mProject == project)) + //if (sourceViewPanel?.mProjectSource?.mProject == project) + if ((sourceViewPanel != null) && + (sourceViewPanel.mProjectSource != null) && + (sourceViewPanel.mProjectSource.mProject == project)) { sourceViewPanel.DetachFromProjectItem(); } diff --git a/IDEHelper/Compiler/BfAutoComplete.cpp b/IDEHelper/Compiler/BfAutoComplete.cpp index 0e439b13..82355381 100644 --- a/IDEHelper/Compiler/BfAutoComplete.cpp +++ b/IDEHelper/Compiler/BfAutoComplete.cpp @@ -1438,11 +1438,14 @@ bool BfAutoComplete::CheckMemberReference(BfAstNode* target, BfAstNode* dotToken if ((attrIdentifier = BfNodeDynCast(memberName))) { memberName = attrIdentifier->mIdentifier; - if ((memberName == NULL) && (IsAutocompleteNode(attrIdentifier->mAttributes))) + if (IsAutocompleteNode(attrIdentifier->mAttributes)) { auto bfParser = attrIdentifier->mAttributes->GetSourceData()->ToParser(); int cursorIdx = bfParser->mCursorIdx; - isAutocompletingName = cursorIdx == attrIdentifier->mAttributes->GetSrcEnd(); + if (cursorIdx == attrIdentifier->mAttributes->GetSrcEnd()) + isAutocompletingName = true; + else + return false; } } diff --git a/IDEHelper/Compiler/BfCompiler.cpp b/IDEHelper/Compiler/BfCompiler.cpp index ceac2332..2ce9bb52 100644 --- a/IDEHelper/Compiler/BfCompiler.cpp +++ b/IDEHelper/Compiler/BfCompiler.cpp @@ -417,7 +417,6 @@ BfCompiler::BfCompiler(BfSystem* bfSystem, bool isResolveOnly) mReflectTypeInstanceTypeDef = NULL; mReflectUnspecializedGenericType = NULL; mSizedArrayTypeDef = NULL; - mSkipAccessCheckAttributeTypeDef = NULL; mStaticInitAfterAttributeTypeDef = NULL; mStaticInitPriorityAttributeTypeDef = NULL; mStringTypeDef = NULL; @@ -5870,8 +5869,7 @@ bool BfCompiler::DoCompile(const StringImpl& outputDirectory) mReflectSpecializedGenericType = _GetRequiredType("System.Reflection.SpecializedGenericType"); mReflectTypeInstanceTypeDef = _GetRequiredType("System.Reflection.TypeInstance"); mReflectUnspecializedGenericType = _GetRequiredType("System.Reflection.UnspecializedGenericType"); - mSizedArrayTypeDef = _GetRequiredType("System.SizedArray", 2); - mSkipAccessCheckAttributeTypeDef = _GetRequiredType("System.SkipAccessCheckAttribute"); + mSizedArrayTypeDef = _GetRequiredType("System.SizedArray", 2); mStaticInitAfterAttributeTypeDef = _GetRequiredType("System.StaticInitAfterAttribute"); mStaticInitPriorityAttributeTypeDef = _GetRequiredType("System.StaticInitPriorityAttribute"); mStringTypeDef = _GetRequiredType("System.String"); diff --git a/IDEHelper/Compiler/BfCompiler.h b/IDEHelper/Compiler/BfCompiler.h index 92a96747..2f83e043 100644 --- a/IDEHelper/Compiler/BfCompiler.h +++ b/IDEHelper/Compiler/BfCompiler.h @@ -384,8 +384,7 @@ public: BfTypeDef* mDisableObjectAccessChecksAttributeTypeDef; BfTypeDef* mFriendAttributeTypeDef; BfTypeDef* mCheckedAttributeTypeDef; - BfTypeDef* mUncheckedAttributeTypeDef; - BfTypeDef* mSkipAccessCheckAttributeTypeDef; + BfTypeDef* mUncheckedAttributeTypeDef; BfTypeDef* mStaticInitAfterAttributeTypeDef; BfTypeDef* mStaticInitPriorityAttributeTypeDef; BfTypeDef* mTestAttributeTypeDef; diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index 2e51943c..ba97fdeb 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -3441,7 +3441,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar bool doAccessCheck = true; - if ((mModule->mAttributeState != NULL) && (mModule->mAttributeState->mCustomAttributes != NULL) && (mModule->mAttributeState->mCustomAttributes->Contains(mModule->mCompiler->mSkipAccessCheckAttributeTypeDef))) + if ((mModule->mAttributeState != NULL) && (mModule->mAttributeState->mCustomAttributes != NULL) && (mModule->mAttributeState->mCustomAttributes->Contains(mModule->mCompiler->mDisableObjectAccessChecksAttributeTypeDef))) doAccessCheck = false; if (target.IsThis()) @@ -3583,6 +3583,14 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar if (isInlined) mPropGetMethodFlags = (BfGetMethodInstanceFlags)(mPropGetMethodFlags | BfGetMethodInstanceFlag_ForceInline); + if ((mModule->mAttributeState != NULL) && (mModule->mAttributeState->mCustomAttributes != NULL)) + { + if (mModule->mAttributeState->mCustomAttributes->Contains(mModule->mCompiler->mFriendAttributeTypeDef)) + mPropGetMethodFlags = (BfGetMethodInstanceFlags)(mPropGetMethodFlags | BfGetMethodInstanceFlag_Friend); + if (mModule->mAttributeState->mCustomAttributes->Contains(mModule->mCompiler->mDisableObjectAccessChecksAttributeTypeDef)) + mPropGetMethodFlags = (BfGetMethodInstanceFlags)(mPropGetMethodFlags | BfGetMethodInstanceFlag_DisableObjectAccessChecks); + } + if (mPropDef->mIsStatic) { if ((target) && ((flags & BfLookupFieldFlag_IsImplicitThis) == 0) && (!curCheckType->mTypeDef->IsGlobalsContainer())) @@ -4800,7 +4808,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu if (!mModule->mCurMethodState->mMayNeedThisAccessCheck) doAccessCheck = false; } - if ((mModule->mAttributeState != NULL) && (mModule->mAttributeState->mCustomAttributes != NULL) && (mModule->mAttributeState->mCustomAttributes->Contains(mModule->mCompiler->mSkipAccessCheckAttributeTypeDef))) + if ((mModule->mAttributeState != NULL) && (mModule->mAttributeState->mCustomAttributes != NULL) && (mModule->mAttributeState->mCustomAttributes->Contains(mModule->mCompiler->mDisableObjectAccessChecksAttributeTypeDef))) doAccessCheck = false; if ((doAccessCheck) && (!isSkipCall)) mModule->EmitObjectAccessCheck(target); @@ -11735,7 +11743,7 @@ BfAllocTarget BfExprEvaluator::ResolveAllocTarget(BfAstNode* allocNode, BfTokenN if ((alignOverride & (alignOverride - 1)) == 0) allocTarget.mAlignOverride = alignOverride; else - mModule->Fail("Alignment must be a power of 2", attrib.mRef); + mModule->Fail("Alignment must be a power of 2", attrib.GetRefNode()); } } } @@ -13787,7 +13795,8 @@ BfTypedValue BfExprEvaluator::GetResult(bool clearResult, bool resolveGenericTyp if (mPropSrc != NULL) mModule->UpdateExprSrcPos(mPropSrc); - CheckPropFail(matchedMethod, methodInstance.mMethodInstance); + if ((mPropGetMethodFlags & BfGetMethodInstanceFlag_Friend) == 0) + CheckPropFail(matchedMethod, methodInstance.mMethodInstance); PerformCallChecks(methodInstance.mMethodInstance, mPropSrc); if (methodInstance.mMethodInstance->IsSkipCall()) @@ -13802,7 +13811,8 @@ BfTypedValue BfExprEvaluator::GetResult(bool clearResult, bool resolveGenericTyp if ((mPropDefBypassVirtual) && (mPropTarget.mType != methodInstance.mMethodInstance->GetOwner())) mPropTarget = mModule->Cast(mPropSrc, mOrigPropTarget, methodInstance.mMethodInstance->GetOwner()); - mModule->EmitObjectAccessCheck(mPropTarget); + if ((mPropGetMethodFlags & BfGetMethodInstanceFlag_DisableObjectAccessChecks) == 0) + mModule->EmitObjectAccessCheck(mPropTarget); PushThis(mPropSrc, mPropTarget, methodInstance.mMethodInstance, args); } @@ -15512,7 +15522,7 @@ void BfExprEvaluator::DoMemberReference(BfMemberReferenceExpression* memberRefEx if (attributeState.mCustomAttributes != NULL) { if (mPropDef != NULL) - attributeState.mTarget = BfAttributeTargets_Invocation; + attributeState.mTarget = (BfAttributeTargets)(attributeState.mTarget | BfAttributeTargets_Invocation); mModule->ValidateCustomAttributes(attributeState.mCustomAttributes, attributeState.mTarget); } ); diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index cfdbd228..facc0039 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -9393,7 +9393,7 @@ void BfModule::ValidateCustomAttributes(BfCustomAttributes* customAttributes, Bf if ((customAttribute.mType->mAttributeData->mAttributeTargets & attrTarget) == 0) { Fail(StrFormat("Attribute '%s' is not valid on this declaration type. It is only valid on %s.", - customAttribute.mRef->ToString().c_str(), GetAttributesTargetListString(customAttribute.mType->mAttributeData->mAttributeTargets).c_str()), customAttribute.mRef->mAttributeTypeRef); // CS0592 + customAttribute.GetRefNode()->ToString().c_str(), GetAttributesTargetListString(customAttribute.mType->mAttributeData->mAttributeTargets).c_str()), customAttribute.mRef->mAttributeTypeRef); // CS0592 } customAttribute.mAwaitingValidation = false; diff --git a/IDEHelper/Compiler/BfResolvedTypeUtils.h b/IDEHelper/Compiler/BfResolvedTypeUtils.h index 59dd71de..4ca4829e 100644 --- a/IDEHelper/Compiler/BfResolvedTypeUtils.h +++ b/IDEHelper/Compiler/BfResolvedTypeUtils.h @@ -37,7 +37,7 @@ enum BfMethodNameFlags : uint8 BfMethodNameFlag_OmitTypeName = 2 }; -enum BfGetMethodInstanceFlags : uint8 +enum BfGetMethodInstanceFlags : uint16 { BfGetMethodInstanceFlag_None = 0, BfGetMethodInstanceFlag_UnspecializedPass = 1, @@ -47,7 +47,9 @@ enum BfGetMethodInstanceFlags : uint8 BfGetMethodInstanceFlag_Unreified = 0x10, BfGetMethodInstanceFlag_NoForceReification = 0x20, BfGetMethodInstanceFlag_ResultNotUsed = 0x40, - BfGetMethodInstanceFlag_ForceInline = 0x80 + BfGetMethodInstanceFlag_ForceInline = 0x80, + BfGetMethodInstanceFlag_Friend = 0x100, + BfGetMethodInstanceFlag_DisableObjectAccessChecks = 0x200, }; class BfDependencyMap @@ -2203,6 +2205,13 @@ public: Array mSetProperties; Array mSetField; bool mAwaitingValidation; + + BfAstNode* GetRefNode() + { + if (mRef->mAttributeTypeRef != NULL) + return mRef->mAttributeTypeRef; + return mRef; + } }; class BfCustomAttributes