1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-13 05:44:11 +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 #endif
} }
#if BF_ENABLE_OBJECT_DEBUG_FLAGS
static void Write(char8* str, int strLen)
{
}
static void Write(int val)
{
}
#else
[CallingConvention(.Cdecl)] [CallingConvention(.Cdecl)]
static extern void Write(char8* str, int strLen); static extern void Write(char8* str, int strLen);
[CallingConvention(.Cdecl)] [CallingConvention(.Cdecl)]
static extern void Write(int val); static extern void Write(int val);
#endif
public static void Write(String line) public static void Write(String line)
{ {

View file

@ -653,7 +653,7 @@ namespace System
} }
[DisableChecks, DisableObjectAccessChecks] [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 #if BF_ENABLE_OBJECT_DEBUG_FLAGS
obj.[Friend]mClassVData = (.)(void*)classVData; obj.[Friend]mClassVData = (.)(void*)classVData;

View file

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

View file

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

View file

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