1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed attribs for properties, renamed SkipAccessCheckAttribute

This commit is contained in:
Brian Fiete 2019-12-01 14:40:17 -08:00
parent 9c44273737
commit 04a46850d6
19 changed files with 162 additions and 58 deletions

View file

@ -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"]

View file

@ -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"}}

View file

@ -5,7 +5,6 @@ Dependencies = {minlib = "*"}
Name = "mintest"
StartupObject = "Hey.Dude.Bro.TestClass"
DefaultNamespace = "Mintest"
Aliases = ["corlib"]
[Platform.Windows]
Description = "Mintest"

View file

@ -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"

View file

@ -5,6 +5,7 @@ Dependencies = {}
Name = "minlib"
TargetType = "BeefLib"
DefaultNamespace = ""
Aliases = ["corlib"]
[Configs.Debug.Win32]
OtherLinkFlags = ""

View file

@ -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
{
}

View file

@ -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
}

View file

@ -241,6 +241,14 @@ namespace System
}
}
private int PrivateLength
{
get
{
return mLength;
}
}
int32 AllocSize
{
[Inline]

View file

@ -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
}
}

View file

@ -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();
}