mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Changed ProgramStart/ProgramEnd to ensure StaticInits get called
This commit is contained in:
parent
07b993d824
commit
7882632e93
6 changed files with 19 additions and 19 deletions
|
@ -118,9 +118,6 @@ namespace IDE.Debugger
|
|||
[StdCall,CLink]
|
||||
static extern void Debugger_Delete();
|
||||
|
||||
[StdCall,CLink]
|
||||
static extern void Debugger_ProgramDone();
|
||||
|
||||
[StdCall,CLink]
|
||||
static extern int32 Debugger_GetAddrSize();
|
||||
|
||||
|
@ -398,11 +395,6 @@ namespace IDE.Debugger
|
|||
Debugger_LoadDebugVisualizers(fileName);
|
||||
}
|
||||
|
||||
public static void ProgramDone()
|
||||
{
|
||||
Debugger_ProgramDone();
|
||||
}
|
||||
|
||||
public void FullReportMemory()
|
||||
{
|
||||
Debugger_FullReportMemory();
|
||||
|
|
|
@ -498,12 +498,19 @@ namespace IDE
|
|||
}
|
||||
}
|
||||
|
||||
[StdCall,CLink]
|
||||
static extern void IDEHelper_ProgramStart();
|
||||
[StdCall,CLink]
|
||||
static extern void IDEHelper_ProgramDone();
|
||||
|
||||
public this()
|
||||
{
|
||||
sApp = this;
|
||||
gApp = this;
|
||||
mMainThread = Thread.CurrentThread;
|
||||
|
||||
IDEHelper_ProgramStart();
|
||||
|
||||
#if !CLI
|
||||
mDebugger = new DebugManager();
|
||||
mVerb = .OpenOrNew;
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace A0
|
|||
{
|
||||
static ~this()
|
||||
{
|
||||
IDE.Debugger.DebugManager.ProgramDone();
|
||||
IDE.IDEApp.[Friend]IDEHelper_ProgramDone();
|
||||
|
||||
#if BF_PLATFORM_WINDOWS
|
||||
if (IDE.IDEApp.sExitTest)
|
||||
|
|
|
@ -1365,8 +1365,6 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration)
|
|||
if (outerTypeDef != NULL)
|
||||
numGenericParams += (int)outerTypeDef->mGenericParamDefs.size();
|
||||
|
||||
BfLogSys(mCurSource->mSystem, "DefBuilder %p Hash:%d isAutoComplete:%d\n", mCurTypeDef, mSystem->mTypeDefs.GetHash(mCurTypeDef), isAutoCompleteTempType);
|
||||
|
||||
if (!isAutoCompleteTempType)
|
||||
{
|
||||
BfTypeDef* prevDef = NULL;
|
||||
|
@ -1466,7 +1464,8 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration)
|
|||
outerTypeDef->mNestedTypes.push_back(mCurActualTypeDef);
|
||||
}
|
||||
|
||||
BfLogSysM("Creating TypeDef %p from TypeDecl: %p Source: %p ResolvePass: %d\n", mCurTypeDef, typeDeclaration, typeDeclaration->GetSourceData(), mResolvePassData != NULL);
|
||||
BfLogSysM("Creating TypeDef %p Hash:%d from TypeDecl: %p Source: %p ResolvePass: %d AutoComplete:%d\n", mCurTypeDef, mSystem->mTypeDefs.GetHash(mCurTypeDef), typeDeclaration,
|
||||
typeDeclaration->GetSourceData(), mResolvePassData != NULL, isAutoCompleteTempType);
|
||||
|
||||
mCurTypeDef->mSource = mCurSource;
|
||||
mCurTypeDef->mSource->mRefCount++;
|
||||
|
|
|
@ -3813,4 +3813,3 @@ BF_EXPORT void BF_CALLTYPE BfSystem_FixTypes(BfSystem* bfSystem)
|
|||
fixTypesHelper.mBfSystem = bfSystem;
|
||||
fixTypesHelper.Fix();
|
||||
}
|
||||
|
||||
|
|
|
@ -630,8 +630,6 @@ BF_EXPORT void BF_CALLTYPE Debugger_Create()
|
|||
//TODO: _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF /*| _CRTDBG_CHECK_EVERY_16_DF*/);
|
||||
//_CrtSetAllocHook(BfAllocHook);
|
||||
|
||||
BfIRCodeGen::StaticInit();
|
||||
|
||||
#ifdef BF_PLATFORM_WINDOWS
|
||||
_CrtMemCheckpoint(&gStartMemCheckpoint);
|
||||
#endif
|
||||
|
@ -683,7 +681,12 @@ BF_EXPORT void BF_CALLTYPE Debugger_Delete()
|
|||
#endif
|
||||
}
|
||||
|
||||
BF_EXPORT void BF_CALLTYPE Debugger_ProgramDone()
|
||||
BF_EXPORT void BF_CALLTYPE IDEHelper_ProgramStart()
|
||||
{
|
||||
BfIRCodeGen::StaticInit();
|
||||
}
|
||||
|
||||
BF_EXPORT void BF_CALLTYPE IDEHelper_ProgramDone()
|
||||
{
|
||||
//TODO:
|
||||
//::MessageBoxA(NULL, "Done", "Done", MB_OK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue