diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 83709dd6..a854ed66 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -8470,7 +8470,7 @@ void BfModule::InitTypeInst(BfTypedValue typedValue, BfScopeData* scopeData, boo mBfIRBuilder->PopulateType(typedValue.mType); auto vObjectAddr = mBfIRBuilder->CreateInBoundsGEP(typedValue.mValue, 0, 0); bool isAutocomplete = mCompiler->IsAutocomplete(); - + BfIRValue vDataRef; if (!isAutocomplete) { @@ -18478,6 +18478,11 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup) { BP_ZONE_F("BfModule::ProcessMethod %s", BP_DYN_STR(methodInstance->mMethodDef->mName.c_str())); + if (mIsComptimeModule) + { + BF_ASSERT(!mCompiler->IsAutocomplete()); + } + if (mAwaitingInitFinish) FinishInit(); diff --git a/IDEHelper/Compiler/CeMachine.cpp b/IDEHelper/Compiler/CeMachine.cpp index 33de381b..793e2a8d 100644 --- a/IDEHelper/Compiler/CeMachine.cpp +++ b/IDEHelper/Compiler/CeMachine.cpp @@ -5,6 +5,7 @@ #include "BfParser.h" #include "BfReducer.h" #include "BfExprEvaluator.h" +#include "BfResolvePass.h" #include "../Backend/BeIRCodeGen.h" #include "BeefySysLib/platform/PlatformHelper.h" @@ -1332,15 +1333,21 @@ void CeBuilder::Build() mCeMachine->mCeModule->mStaticFieldRefs.Clear(); int startFunctionCount = (int)beModule->mFunctions.size(); - ProcessMethod(methodInstance, &dupMethodInstance); + /// + { + BfAutoComplete* prevAutoComplete = NULL; + if (mCeMachine->mCeModule->mCompiler->mResolvePassData != NULL) + { + prevAutoComplete = mCeMachine->mCeModule->mCompiler->mResolvePassData->mAutoComplete; + mCeMachine->mCeModule->mCompiler->mResolvePassData->mAutoComplete = NULL; + } + ProcessMethod(methodInstance, &dupMethodInstance); + if (mCeMachine->mCeModule->mCompiler->mResolvePassData != NULL) + mCeMachine->mCeModule->mCompiler->mResolvePassData->mAutoComplete = prevAutoComplete; + } if (mCeFunction->mInitializeState == CeFunction::InitializeState_Initialized) return; - if (methodInstance->mMethodDef->mName == "DecodeToUTF8") - { - NOP; - } - if (!dupMethodInstance.mIRFunction) { mCeFunction->mFailed = true; @@ -4653,12 +4660,12 @@ bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8* if (ceModule->mSystem->mPtrSize == 4) { int32 intVal = *(int32*)((uint8*)stackPtr + 0); - OutputDebugStrF("Debug Val: %d\n", intVal); + OutputDebugStrF("Debug Val: %d %X\n", intVal, intVal); } else { int64 intVal = *(int64*)((uint8*)stackPtr + 0); - OutputDebugStrF("Debug Val: %lld\n", intVal); + OutputDebugStrF("Debug Val: %lld %llX\n", intVal, intVal); } } else if (checkFunction->mFunctionKind == CeFunctionKind_GetReflectType) @@ -5379,6 +5386,11 @@ bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8* ++instIdx; + if (ceFunction->mMethodInstance->mMethodDef->mName == "ReadAll") + { + NOP; + } + if (instIdx >= /*0xBC0*/0xBA0) { NOP;