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

BF_RUNTIME_DISABLE improvements

This commit is contained in:
Brian Fiete 2025-02-18 09:26:34 -08:00
parent 04ebd9a738
commit 375fb2807f
5 changed files with 17 additions and 4 deletions

View file

@ -44,10 +44,19 @@ namespace System.Diagnostics
#endif
}
#if BF_ENABLE_OBJECT_DEBUG_FLAGS
static void Write(char8* str, int strLen)
{
}
static void Write(int val)
{
}
#else
[CallingConvention(.Cdecl)]
static extern void Write(char8* str, int strLen);
[CallingConvention(.Cdecl)]
static extern void Write(int val);
#endif
public static void Write(String line)
{

View file

@ -653,7 +653,7 @@ namespace System
}
[DisableChecks, DisableObjectAccessChecks]
public static void Dbg_ObjectStackInit(Object obj, ClassVData* classVData)
public static void Dbg_ObjectStackInit(Object obj, ClassVData* classVData, int size, uint8 allocFlags)
{
#if BF_ENABLE_OBJECT_DEBUG_FLAGS
obj.[Friend]mClassVData = (.)(void*)classVData;

View file

@ -39,7 +39,11 @@ namespace System
private int32 inextp;
private int32[] SeedArray = new int32[56] ~ delete _;
#if !BF_RUNTIME_DISABLE
private static int32 sSeed = (int32)Platform.BfpSystem_GetTimeStamp();
#else
private static int32 sSeed = 0;
#endif
//
// Public Constants

View file

@ -746,8 +746,8 @@ namespace System
return 0;
}
[LinkName(.C), AlwaysInclude]
static extern void WinMain(void* module, void* prevModule, char8* args, int32 showCmd);
/*[LinkName(.C), AlwaysInclude]
static extern void WinMain(void* module, void* prevModule, char8* args, int32 showCmd);*/
[LinkName(.C), AlwaysInclude]
static extern int32 main(int argc, char8** argv);

View file

@ -1714,7 +1714,7 @@ namespace System.Reflection
int32 stackCount = Compiler.Options.AllocStackCount;
if (mAllocStackCountOverride != 0)
stackCount = mAllocStackCountOverride;
obj = Internal.Dbg_ObjectAlloc([Friend]mTypeClassVData, arraySize, [Friend]mInstAlign, stackCount, 0);
obj = Internal.Dbg_ObjectAlloc([Friend]mTypeClassVData, arraySize, [Friend]mInstAlign, stackCount);
#else
void* mem = new [Align(16)] uint8[arraySize]* (?);
obj = Internal.UnsafeCastToObject(mem);