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

Bug fixes, installer, [Export]

Fixed a bunch of bugs in aggregate const initializers
Fixed ZIP bugs
Fixed a compilation case where we change protection while reifying a type
Added another project kind - Dynamic Library
Added [Export] for DLL method exporting
Fixed some issues of things being  generated as __NOINLINE incorrectly
Fixed an issue with module extensions with not-yet-demanded on-demand methods
Started adding Installer
This commit is contained in:
Brian Fiete 2019-08-27 08:04:41 -07:00
parent efa22e51fb
commit 09016c8dc0
135 changed files with 3615 additions and 2337 deletions

View file

@ -121,8 +121,16 @@ namespace bf
}
}
extern bf::System::Runtime::BfRtCallbacks gBfRtCallbacks;
extern BfRtFlags gBfRtFlags;
#ifdef BFRTDBG
#define BFRTCALLBACKS gBfRtDbgCallbacks
#define BFRTFLAGS gBfRtDbgFlags
#else
#define BFRTCALLBACKS gBfRtCallbacks
#define BFRTFLAGS gBfRtFlags
#endif
extern bf::System::Runtime::BfRtCallbacks BFRTCALLBACKS;
extern BfRtFlags BFRTFLAGS;
namespace bf
{
@ -155,9 +163,9 @@ namespace bf
};
#endif
Type* GetType()
Type* _GetType()
{
return gBfRtCallbacks.Object_GetType(this);
return BFRTCALLBACKS.Object_GetType(this);
}
Type* GetTypeSafe()
@ -275,7 +283,7 @@ namespace bf
const char* CStr()
{
return gBfRtCallbacks.String_ToCStr(this);
return BFRTCALLBACKS.String_ToCStr(this);
}
};
}

View file

@ -261,6 +261,11 @@ void bf::System::Runtime::Init(int version, int flags, BfRtCallbacks* callbacks)
BfpSystem_Init(BFP_VERSION, sysInitFlags);
BfpSystem_AddCrashInfoFunc(GetCrashInfo);
if (gBfRtCallbacks.Alloc != NULL)
{
BfpSystem_FatalError(StrFormat("BeefRT already initialized. Multiple executable modules in the same process cannot dynamically link to the Beef runtime.").c_str(), "BEEF FATAL ERROR");
}
if (version != BFRT_VERSION)
{
BfpSystem_FatalError(StrFormat("BeefRT build version '%d' does not match requested version '%d'", BFRT_VERSION, version).c_str(), "BEEF FATAL ERROR");

View file

@ -4,19 +4,19 @@ USING_NS_BF;
Beefy::String bf::System::Object::GetTypeName()
{
String* strObj = gBfRtCallbacks.String_Alloc();
Type* type = GetType();
gBfRtCallbacks.Type_GetFullName(type, strObj);
String* strObj = BFRTCALLBACKS.String_Alloc();
Type* type = _GetType();
BFRTCALLBACKS.Type_GetFullName(type, strObj);
Beefy::String str = strObj->CStr();
gBfRtCallbacks.Object_Delete(strObj);
BFRTCALLBACKS.Object_Delete(strObj);
return str;
}
Beefy::String bf::System::Type::GetFullName()
{
String* strObj = gBfRtCallbacks.String_Alloc();
gBfRtCallbacks.Type_GetFullName(this, strObj);
String* strObj = BFRTCALLBACKS.String_Alloc();
BFRTCALLBACKS.Type_GetFullName(this, strObj);
Beefy::String str = strObj->CStr();
gBfRtCallbacks.Object_Delete(strObj);
BFRTCALLBACKS.Object_Delete(strObj);
return str;
}

View file

@ -70,27 +70,27 @@ namespace bf
static Thread* Alloc()
{
return gBfRtCallbacks.Thread_Alloc();
return BFRTCALLBACKS.Thread_Alloc();
}
BfInternalThread* GetInternalThread()
{
return gBfRtCallbacks.Thread_GetInternalThread(this);
return BFRTCALLBACKS.Thread_GetInternalThread(this);
}
BfDbgInternalThread* Dbg_GetInternalThread()
{
return (BfDbgInternalThread*)gBfRtCallbacks.Thread_GetInternalThread(this);
return (BfDbgInternalThread*)BFRTCALLBACKS.Thread_GetInternalThread(this);
}
void SetInternalThread(BfInternalThread* internalThread)
{
gBfRtCallbacks.Thread_SetInternalThread(this, internalThread);
BFRTCALLBACKS.Thread_SetInternalThread(this, internalThread);
}
int GetMaxStackSize()
{
return gBfRtCallbacks.Thread_GetMaxStackSize(this);
return BFRTCALLBACKS.Thread_GetMaxStackSize(this);
}
};
}