mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Mintest revisions
This commit is contained in:
parent
908dbe1a6e
commit
ce66b658c4
7 changed files with 117 additions and 65 deletions
|
@ -16,8 +16,8 @@ TargetName = "$(ProjectName)_d"
|
||||||
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib Rpcrt4.lib Ole32.lib"
|
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib Rpcrt4.lib Ole32.lib"
|
||||||
CLibType = "Dynamic"
|
CLibType = "Dynamic"
|
||||||
BeefLibType = "DynamicDebug"
|
BeefLibType = "DynamicDebug"
|
||||||
DebugCommandArguments = "-help"
|
DebugCommandArguments = "-run"
|
||||||
DebugWorkingDirectory = "c:\\Beef_website\\BeefTools\\BeefInstall"
|
DebugWorkingDirectory = "c:\\temp\\Hello"
|
||||||
EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
|
EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
|
||||||
PreprocessorMacros = ["DEBUG", "CLI"]
|
PreprocessorMacros = ["DEBUG", "CLI"]
|
||||||
|
|
||||||
|
|
|
@ -118,4 +118,25 @@ __declspec(dllexport) void Test3(int a, int b)
|
||||||
|
|
||||||
|
|
||||||
//printf("Hey!\n");
|
//printf("Hey!\n");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static long __stdcall SEHFilter(LPEXCEPTION_POINTERS lpExceptPtr)
|
||||||
|
{
|
||||||
|
printf("SEHFilter!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
__declspec(dllexport) void TestSEH()
|
||||||
|
{
|
||||||
|
if (::MessageBoxA(NULL, "DO IT?", "Crash?", MB_YESNO) == IDNO)
|
||||||
|
return;
|
||||||
|
|
||||||
|
::SetUnhandledExceptionFilter(SEHFilter);
|
||||||
|
|
||||||
|
int* iPtr = nullptr;
|
||||||
|
*iPtr = 1;
|
||||||
|
//printf("Hey!\n");
|
||||||
}
|
}
|
|
@ -26,7 +26,7 @@ OptimizationLevel = "O0"
|
||||||
TargetDirectory = "$(WorkspaceDir)/dist"
|
TargetDirectory = "$(WorkspaceDir)/dist"
|
||||||
TargetName = "BeefIDE_d"
|
TargetName = "BeefIDE_d"
|
||||||
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib"
|
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib"
|
||||||
DebugCommandArguments = "-proddir=C:\\Beef\\IDE"
|
DebugCommandArguments = "-workspace=c:\\Beef\\IDE"
|
||||||
DebugWorkingDirectory = "c:\\Beef\\IDE\\Tests\\EmptyTest"
|
DebugWorkingDirectory = "c:\\Beef\\IDE\\Tests\\EmptyTest"
|
||||||
EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
|
EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,12 @@ StartupObject = "Hey.Dude.Bro.TestClass"
|
||||||
DefaultNamespace = "Mintest"
|
DefaultNamespace = "Mintest"
|
||||||
Aliases = ["corlib"]
|
Aliases = ["corlib"]
|
||||||
|
|
||||||
|
[Platform.Windows]
|
||||||
|
Description = "Mintest"
|
||||||
|
|
||||||
[Configs.Debug.Win64]
|
[Configs.Debug.Win64]
|
||||||
CLibType = "Static"
|
CLibType = "Static"
|
||||||
BeefLibType = "DynamicDebug"
|
BeefLibType = "Static"
|
||||||
StackSize = 4194304
|
StackSize = 4194304
|
||||||
DebugCommandArguments = "hey=\"yo man\" zag= zoogles boof stoopers \"\"\"abc efg\"\"\""
|
DebugCommandArguments = "hey=\"yo man\" zag= zoogles boof stoopers \"\"\"abc efg\"\"\""
|
||||||
DebugWorkingDirectory = ".\\"
|
DebugWorkingDirectory = ".\\"
|
||||||
|
@ -24,6 +27,7 @@ CLibType = "Static"
|
||||||
BeefLibType = "Static"
|
BeefLibType = "Static"
|
||||||
|
|
||||||
[Configs.Release.Win64]
|
[Configs.Release.Win64]
|
||||||
|
OtherLinkFlags = "$(LinkFlags) C:\\Beef\\BeefTools\\TestDLL\\x64\\Debug\\TestDLL.lib"
|
||||||
DebugCommandArguments = "hey=\"yo man\" zag= zoogles boof stoopers \"abc efg\""
|
DebugCommandArguments = "hey=\"yo man\" zag= zoogles boof stoopers \"abc efg\""
|
||||||
|
|
||||||
[Configs.Release.WinFart]
|
[Configs.Release.WinFart]
|
||||||
|
|
|
@ -33,10 +33,7 @@ AllocStackTraceDepth = 0
|
||||||
IntermediateType = "ObjectAndIRCode"
|
IntermediateType = "ObjectAndIRCode"
|
||||||
|
|
||||||
[Configs.Release.Win64]
|
[Configs.Release.Win64]
|
||||||
Toolset = "LLVM"
|
|
||||||
BfSIMDSetting = "SSE3"
|
BfSIMDSetting = "SSE3"
|
||||||
BfOptimizationLevel = "O3"
|
|
||||||
LTOType = "Thin"
|
|
||||||
AllocStackTraceDepth = 0
|
AllocStackTraceDepth = 0
|
||||||
IntermediateType = "ObjectAndIRCode"
|
IntermediateType = "ObjectAndIRCode"
|
||||||
COptimizationLevel = "O3"
|
COptimizationLevel = "O3"
|
||||||
|
|
|
@ -11,13 +11,12 @@
|
||||||
// Zoop
|
// Zoop
|
||||||
//using IDE;
|
//using IDE;
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
//using System.Threading;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Reflection;
|
using System.Threading;
|
||||||
|
|
||||||
// Disable unused variable warning
|
// Disable unused variable warning
|
||||||
#pragma warning disable 168
|
#pragma warning disable 168
|
||||||
|
@ -180,8 +179,43 @@ namespace Hey.Dude.Bro
|
||||||
*a = 123;
|
*a = 123;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int32 SEHHandler(void* ptr)
|
||||||
|
{
|
||||||
|
PrintF("SEH Handler at root\n");
|
||||||
|
//Thread.Sleep(15000);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CRepr, CLink]
|
||||||
|
public static extern void* SetUnhandledExceptionFilter(function int32(void* p) func);
|
||||||
|
|
||||||
public static int Main(String[] args)
|
public static int Main(String[] args)
|
||||||
{
|
{
|
||||||
|
//Test2(1, 2, 3, 4);
|
||||||
|
//int a = Fartso;
|
||||||
|
|
||||||
|
#if ZLOG
|
||||||
|
PrintF("HEY!");
|
||||||
|
#endif
|
||||||
|
List<String> iList = scope .();
|
||||||
|
for (int i < 1000)
|
||||||
|
{
|
||||||
|
iList.Add("Zpops");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool b = false;
|
||||||
|
|
||||||
|
//File file;
|
||||||
|
int len = args.Count;
|
||||||
|
|
||||||
|
int zog = 123;
|
||||||
|
|
||||||
|
int a = 0x1122334455667788;
|
||||||
|
|
||||||
|
void* prev = SetUnhandledExceptionFilter(=> SEHHandler);
|
||||||
|
PrintF("Prev: %p\n", prev);
|
||||||
|
|
||||||
|
//TestA();
|
||||||
Blurg.Hey();
|
Blurg.Hey();
|
||||||
|
|
||||||
for (int i < 100)
|
for (int i < 100)
|
||||||
|
@ -192,6 +226,11 @@ namespace Hey.Dude.Bro
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static this()
|
||||||
|
{
|
||||||
|
//Runtime.TestCrash();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,16 +137,34 @@ class Testo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Blurg
|
class Norg
|
||||||
{
|
{
|
||||||
delegate void() mFuncA;
|
public String mVal;
|
||||||
delegate void() mFuncB;
|
public int32 mA;
|
||||||
|
public int32 mB;
|
||||||
|
|
||||||
int mA = 123;
|
public int32 GetIt(int32 a, int32 b, int32 c) mut
|
||||||
|
{
|
||||||
|
return a + b + c + mA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int32 GetIt(Blurg bl, int32 a, int32 b, int32 c)
|
||||||
|
{
|
||||||
|
return a + b + c + bl.mA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Blurg
|
||||||
|
{
|
||||||
|
public String mVal;
|
||||||
|
public int32 mA;
|
||||||
|
public int32 mB;
|
||||||
|
|
||||||
public this()
|
public this()
|
||||||
{
|
{
|
||||||
|
mVal = "z";
|
||||||
|
mA = 111;
|
||||||
|
mB = 222;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestIt(String a, String b)
|
void TestIt(String a, String b)
|
||||||
|
@ -161,7 +179,7 @@ class Blurg
|
||||||
|
|
||||||
static void Test(int a, int b)
|
static void Test(int a, int b)
|
||||||
{
|
{
|
||||||
|
PrintF("a0");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Test(int a, int b, int c)
|
static void Test(int a, int b, int c)
|
||||||
|
@ -169,63 +187,36 @@ class Blurg
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Use<T>(T val) where T : IFaceA
|
|
||||||
{
|
|
||||||
IFaceA.Fart();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Hey()
|
public static int32 Hey()
|
||||||
{
|
{
|
||||||
Loop:
|
Result<int, float> res = .Ok(123);
|
||||||
for (int i < 10)
|
|
||||||
|
Florg fl = .();
|
||||||
|
|
||||||
|
let f2 = fl;
|
||||||
|
//defer f2.Dispose();
|
||||||
|
|
||||||
|
using (var f = fl)
|
||||||
{
|
{
|
||||||
defer
|
|
||||||
{
|
|
||||||
//for ()
|
|
||||||
JLoop: for (int j < 5)
|
|
||||||
{
|
|
||||||
//continue Loop;
|
|
||||||
}
|
|
||||||
|
|
||||||
//break JLoop;
|
|
||||||
|
|
||||||
int z = 3;
|
|
||||||
|
|
||||||
/*void Zorg()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Zorg();*/
|
|
||||||
//return;
|
|
||||||
|
|
||||||
//break Loop;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
defer
|
return 123;
|
||||||
{
|
|
||||||
scope:: Testo();
|
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
if (i == 0)
|
|
||||||
scope:: Testo();
|
|
||||||
if (i == 1)
|
|
||||||
scope:: Testo();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int aaaaaa = 123;
|
|
||||||
if (aaaaaa == 123)
|
|
||||||
return;//A
|
|
||||||
|
|
||||||
int bbbbbbb = 222;
|
|
||||||
return;//B
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct Florg
|
||||||
|
{
|
||||||
|
int mA = 123;
|
||||||
|
|
||||||
|
public void Dispose() mut
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class CustomAlloc
|
class CustomAlloc
|
||||||
{
|
{
|
||||||
public void* Alloc(int size, int align)
|
public void* Alloc(int size, int align)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue