mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Test updates
This commit is contained in:
parent
adbae6f1d4
commit
639430b41c
7 changed files with 73 additions and 29 deletions
|
@ -1457,7 +1457,10 @@ bool BFGC::ScanThreads()
|
|||
|
||||
mQueueMarkObjects = true;
|
||||
ConservativeScan(regVals, regValCount * sizeof(intptr));
|
||||
intptr prevStackStart = thread->mStackStart;
|
||||
thread->CalcStackStart();
|
||||
|
||||
thread->mLastStackPtr = stackPtr;
|
||||
int length = thread->mStackStart - stackPtr;
|
||||
|
||||
AdjustStackPtr(stackPtr, length);
|
||||
|
|
|
@ -174,12 +174,14 @@ public:
|
|||
BfpThreadId mThreadId;
|
||||
void* mTEB;
|
||||
intptr mStackStart;
|
||||
intptr mLastStackPtr;
|
||||
bool mRunning;
|
||||
Beefy::Array<bf::System::Object*> mStackMarkableObjects;
|
||||
|
||||
ThreadInfo()
|
||||
{
|
||||
mThreadId = 0;
|
||||
mLastStackPtr = 0;
|
||||
mThreadHandle = NULL;
|
||||
mThreadInfo = NULL;
|
||||
mTEB = NULL;
|
||||
|
|
|
@ -167,6 +167,13 @@ void Test3(int a)
|
|||
extern "C"
|
||||
__declspec(dllexport) void Test2(int aa, int bb, int cc, int dd)
|
||||
{
|
||||
int a = 1234;
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
a++;
|
||||
}
|
||||
|
||||
Test3(10);
|
||||
|
||||
char* strP = "Hey yo";
|
||||
|
@ -196,10 +203,6 @@ __declspec(dllexport) void Test2(int aa, int bb, int cc, int dd)
|
|||
std::wstring str2 = L"Hey Dude";
|
||||
str2.push_back((wchar_t)0x85);
|
||||
str2.push_back((wchar_t)0x263a);
|
||||
|
||||
int a = 123;
|
||||
int b = 234;
|
||||
int c = 345;
|
||||
}
|
||||
|
||||
struct ALLEGRO_COLOR
|
||||
|
|
|
@ -24,7 +24,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"
|
||||
DebugCommandArguments = "-proddir=C:\\Beef\\IDEHelper\\Tests"
|
||||
DebugWorkingDirectory = "c:\\Beef"
|
||||
EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
|
||||
|
||||
|
@ -36,7 +36,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\\Tests\\Test1 -test=scripts\\Data01.txt -testNoExit"
|
||||
DebugCommandArguments = "-proddir=C:\\Beef\\IDE\\mintest"
|
||||
DebugWorkingDirectory = "$(ProjectDir)\\dist"
|
||||
EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
|
||||
|
||||
|
|
|
@ -2,25 +2,25 @@
|
|||
|
||||
using System;
|
||||
|
||||
class Foogie<T> where T : IHashable
|
||||
interface IItem
|
||||
{
|
||||
public void Do()
|
||||
{
|
||||
T val = default;
|
||||
val.GetHashCode();
|
||||
}
|
||||
public int Id { get; set; }
|
||||
}
|
||||
|
||||
struct Zorbble
|
||||
class Mintesto
|
||||
{
|
||||
public int mA;
|
||||
public void MainMethod()
|
||||
public static T Alloc<T>() where T : new
|
||||
{
|
||||
|
||||
return new T();
|
||||
}
|
||||
|
||||
static void Zoff()
|
||||
public static void Dispose<T>(mut T val) where T : IDisposable
|
||||
{
|
||||
val.Dispose();
|
||||
}
|
||||
|
||||
public static int Get<T>(mut T val) where T : IItem
|
||||
{
|
||||
return val.Id;
|
||||
}
|
||||
}
|
|
@ -194,6 +194,8 @@ namespace Hey.Dude.Bro
|
|||
PrintF("C...\n");
|
||||
Thread.Sleep(1000);
|
||||
PrintF("D...\n");
|
||||
|
||||
int abc = 234;
|
||||
}
|
||||
|
||||
static int GetVal()
|
||||
|
@ -237,12 +239,9 @@ namespace Hey.Dude.Bro
|
|||
|
||||
public static int Main(String[] args)
|
||||
{
|
||||
//Test2(1, 2, 3, 4);
|
||||
|
||||
Blurg.Hey();
|
||||
while (true)
|
||||
{
|
||||
new String();
|
||||
GC.Collect();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,18 +5,55 @@ using System.Diagnostics;
|
|||
using System.Threading;
|
||||
using System.Collections;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
struct SDL_Cursor
|
||||
{
|
||||
int mA;
|
||||
}
|
||||
}
|
||||
|
||||
struct ImGui
|
||||
{
|
||||
public enum MouseCursor
|
||||
{
|
||||
A,
|
||||
B,
|
||||
C,
|
||||
D,
|
||||
COUNT
|
||||
}
|
||||
}
|
||||
|
||||
struct Blurg
|
||||
{
|
||||
//private static SDL.SDL_Cursor*[(.)ImGui.MouseCursor.COUNT] g_MouseCursors = .(null,);
|
||||
|
||||
private static SDL.SDL_Cursor*[(.)ImGui.MouseCursor.COUNT] g_MouseCursors = .(null,);
|
||||
|
||||
public static void Hey()
|
||||
{
|
||||
String str = new String();
|
||||
delete str;
|
||||
let cur = new SDL.SDL_Cursor();
|
||||
|
||||
//Internal.Malloc(123);
|
||||
Internal.StdMalloc(123);
|
||||
g_MouseCursors[0] = cur;
|
||||
g_MouseCursors[1] = cur;
|
||||
g_MouseCursors[2] = cur;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class TestClass
|
||||
{
|
||||
public void GetIt(ref TestClass tc)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public this()
|
||||
{
|
||||
/*let a = &this;
|
||||
|
||||
GetIt(ref this);*/
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue