mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Changes to improve IDE Module Panel, allowing loading image and pdb
This commit is contained in:
parent
d41a8c5683
commit
bac46ef6e9
10 changed files with 124 additions and 41 deletions
|
@ -9756,22 +9756,26 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
|
|||
auto voidType = mModule->GetPrimitiveType(BfTypeCode_None);
|
||||
auto dtorFuncType = mModule->mBfIRBuilder->CreateFunctionType(mModule->mBfIRBuilder->MapType(voidType), newTypes, false);
|
||||
|
||||
String dtorMangledName = "~" + closureFuncName;
|
||||
dtorFunc = mModule->mBfIRBuilder->CreateFunction(dtorFuncType, BfIRLinkageType_External, dtorMangledName);
|
||||
|
||||
BfMethodDef* dtorMethodDef = new BfMethodDef();
|
||||
dtorMethodDef->mDeclaringType = mModule->mCurMethodInstance->mMethodDef->mDeclaringType;
|
||||
dtorMethodDef->mName = "~this";
|
||||
dtorMethodDef->mName = "~this$";
|
||||
dtorMethodDef->mName += methodDef->mName;
|
||||
|
||||
dtorMethodDef->mMethodType = BfMethodType_Normal;
|
||||
dtorMethodDef->mBody = lambdaBindExpr->mDtor;
|
||||
dtorMethodDef->mIdx = mModule->mCurMethodInstance->mMethodDef->mIdx;
|
||||
|
||||
BfMethodInstance* dtorMethodInstance = new BfMethodInstance();
|
||||
//dtorMethodInstance->mMethodInstanceGroup = &methodInstanceGroup;
|
||||
dtorMethodInstance->mIRFunction = dtorFunc;
|
||||
BfMethodInstance* dtorMethodInstance = new BfMethodInstance();
|
||||
dtorMethodInstance->mMethodDef = dtorMethodDef;
|
||||
dtorMethodInstance->mReturnType = mModule->GetPrimitiveType(BfTypeCode_None);
|
||||
dtorMethodInstance->mMethodInstanceGroup = &methodInstanceGroup;
|
||||
|
||||
StringT<128> dtorMangledName;
|
||||
BfMangler::Mangle(dtorMangledName, mModule->mCompiler->GetMangleKind(), dtorMethodInstance);
|
||||
dtorFunc = mModule->mBfIRBuilder->CreateFunction(dtorFuncType, BfIRLinkageType_External, dtorMangledName);
|
||||
mModule->SetupIRMethod(NULL, dtorFunc, false);
|
||||
dtorMethodInstance->mIRFunction = dtorFunc;
|
||||
|
||||
mModule->mIncompleteMethodCount++;
|
||||
mModule->mBfIRBuilder->SaveDebugLocation();
|
||||
//
|
||||
|
@ -9784,7 +9788,7 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
|
|||
mModule->mBfIRBuilder->RestoreDebugLocation();
|
||||
if (mModule->mCompiler->IsSkippingExtraResolveChecks())
|
||||
dtorFunc = BfIRFunction();
|
||||
|
||||
|
||||
if (dtorMethodInstance->mIsReified)
|
||||
mModule->CheckHotMethod(dtorMethodInstance, dtorMangledName);
|
||||
if ((dtorMethodInstance->mHotMethod != NULL) && (mModule->mCurMethodState->mHotDataReferenceBuilder))
|
||||
|
|
|
@ -4668,7 +4668,7 @@ BfIRMDNode BfIRBuilder::DbgCreateMethod(BfIRMDNode context, const StringImpl& na
|
|||
{
|
||||
BfIRMDNode retVal = WriteCmd(BfIRCmd_DbgCreateMethod, context, name, linkageName, file, lineNum, type, isLocalToUnit, isDefinition, vk, vIndex, vTableHolder, flags, isOptimized, fn, genericArgs, genericConstValueArgs);
|
||||
NEW_CMD_INSERTED_IRMD;
|
||||
|
||||
|
||||
// if (mDbgVerifyCodeGen && gDebugDbgLoc)
|
||||
// {
|
||||
// OutputDebugStrF("DbgCreateFunction Context:%d name:%s = %d\n", context.mId, name.c_str(), retVal.mId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue