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

Fixes to enum changes, fixed [Checked] debugger interaction

This commit is contained in:
Brian Fiete 2019-11-29 09:21:51 -08:00
parent 17be9daade
commit 64f117b89f
10 changed files with 116 additions and 24 deletions

View file

@ -56,6 +56,13 @@ enum BfProtection : uint8
BfProtection_Public,
};
enum BfCheckedKind : int8
{
BfCheckedKind_NotSet,
BfCheckedKind_Checked,
BfCheckedKind_Unchecked
};
static bool CheckProtection(BfProtection protection, bool allowProtected, bool allowPrivate)
{
return (protection == BfProtection_Public) ||

View file

@ -2615,7 +2615,7 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
flags |= llvm::DINode::FlagArtificial;
}
String methodName = methodDef->mName;
String methodName = methodDef->mName;
llvm::SmallVector<BfIRMDNode, 1> genericArgs;
llvm::SmallVector<BfIRValue, 1> genericConstValueArgs;
auto diFunction = DbgCreateMethod(funcScope, methodName, mangledName, fileDIScope,

View file

@ -1936,7 +1936,8 @@ void BfMSMangler::Mangle(StringImpl& name, bool is64Bit, BfMethodInstance* metho
AddStr(mangleContext, name, methodDef->mName);
}
if ((methodInst->mMethodDef->mDeclaringType->mPartialIdx != -1) && (!methodInst->mIsForeignMethodDef))
if ((methodInst->mMethodDef->mDeclaringType->mPartialIdx != -1) && (methodInst->mMethodDef->mDeclaringType->IsExtension()) &&
(!methodInst->mIsForeignMethodDef) && (!methodInst->mMethodDef->mIsExtern))
{
auto declType = methodInst->mMethodDef->mDeclaringType;
BF_ASSERT(methodInst->GetOwner()->mTypeDef->mIsCombinedPartial);

View file

@ -16187,6 +16187,11 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup)
}
}
if (methodDef->mCheckedKind == BfCheckedKind_Checked)
methodName += "$CHK";
else if (methodDef->mCheckedKind == BfCheckedKind_Unchecked)
methodName += "$UCHK";
methodState.mDIFile = mCurFilePosition.mFileInstance->mDIFile;
// diFunction = mBfIRBuilder->DbgCreateMethod(funcScope, methodName, mangledName, methodState.mDIFile,
// defLine + 1, diFuncType, false, true,

View file

@ -669,13 +669,6 @@ enum BfImportKind : int8
BfImportKind_Export
};
enum BfCheckedKind : int8
{
BfCheckedKind_NotSet,
BfCheckedKind_Checked,
BfCheckedKind_Unchecked
};
enum BfCommutableKind : int8
{
BfCommutableKind_None,