mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Start of compile-time function evaluation
This commit is contained in:
parent
350516fae3
commit
577e199dcd
17 changed files with 2437 additions and 29 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "BeefySysLib/util/BeefPerf.h"
|
||||
#include "../LLVMUtils.h"
|
||||
#include "BfNamespaceVisitor.h"
|
||||
#include "CeMachine.h"
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
|
@ -357,7 +358,7 @@ BfCompiler::BfCompiler(BfSystem* bfSystem, bool isResolveOnly)
|
|||
//mMaxInterfaceSlots = 16;
|
||||
mMaxInterfaceSlots = -1;
|
||||
mInterfaceSlotCountChanged = false;
|
||||
|
||||
|
||||
mHSPreserveIdx = 0;
|
||||
mCompileLogFP = NULL;
|
||||
mWantsDeferMethodDecls = false;
|
||||
|
@ -443,6 +444,10 @@ BfCompiler::BfCompiler(BfSystem* bfSystem, bool isResolveOnly)
|
|||
mReflectAttributeTypeDef = NULL;
|
||||
|
||||
mLastAutocompleteModule = NULL;
|
||||
|
||||
//if (isResolveOnly)
|
||||
//mCEMachine = NULL;
|
||||
mCEMachine = new CeMachine(this);
|
||||
}
|
||||
|
||||
BfCompiler::~BfCompiler()
|
||||
|
@ -451,6 +456,7 @@ BfCompiler::~BfCompiler()
|
|||
delete mHotData;
|
||||
delete mHotState;
|
||||
delete mHotResolveData;
|
||||
delete mCEMachine;
|
||||
}
|
||||
|
||||
bool BfCompiler::IsTypeAccessible(BfType* checkType, BfProject* curProject)
|
||||
|
@ -6411,6 +6417,9 @@ bool BfCompiler::DoCompile(const StringImpl& outputDirectory)
|
|||
else
|
||||
mContext->mUnreifiedModule->mIsReified = false;
|
||||
|
||||
if (mCEMachine != NULL)
|
||||
mCEMachine->CompileStarted();
|
||||
|
||||
if (mOptions.mAllowHotSwapping)
|
||||
{
|
||||
if (mHotData == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue