mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Added CallingConvention support, mangle specifying
This commit is contained in:
parent
904f907f1d
commit
61d9edea83
26 changed files with 413 additions and 96 deletions
|
@ -405,6 +405,7 @@ BfCompiler::BfCompiler(BfSystem* bfSystem, bool isResolveOnly)
|
|||
mIPrintableTypeDef = NULL;
|
||||
mIHashableTypeDef = NULL;
|
||||
mLinkNameAttributeTypeDef = NULL;
|
||||
mCallingConventionAttributeTypeDef = NULL;
|
||||
mMethodRefTypeDef = NULL;
|
||||
mNullableTypeDef = NULL;
|
||||
mOrderedAttributeTypeDef = NULL;
|
||||
|
@ -481,7 +482,7 @@ bool BfCompiler::IsTypeAccessible(BfType* checkType, BfProject* curProject)
|
|||
}
|
||||
|
||||
bool BfCompiler::IsTypeUsed(BfType* checkType, BfProject* curProject)
|
||||
{
|
||||
{
|
||||
if (mOptions.mCompileOnDemandKind == BfCompileOnDemandKind_AlwaysInclude)
|
||||
return IsTypeAccessible(checkType, curProject);
|
||||
|
||||
|
@ -518,6 +519,12 @@ bool BfCompiler::IsTypeUsed(BfType* checkType, BfProject* curProject)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (checkType->IsFunction())
|
||||
{
|
||||
// These don't get their own modules so just assume "always used" at this point
|
||||
return true;
|
||||
}
|
||||
|
||||
auto module = typeInst->GetModule();
|
||||
if (module == NULL)
|
||||
return true;
|
||||
|
@ -5983,6 +5990,7 @@ bool BfCompiler::DoCompile(const StringImpl& outputDirectory)
|
|||
mIPrintableTypeDef = _GetRequiredType("System.IPrintable");
|
||||
mIHashableTypeDef = _GetRequiredType("System.IHashable");
|
||||
mLinkNameAttributeTypeDef = _GetRequiredType("System.LinkNameAttribute");
|
||||
mCallingConventionAttributeTypeDef = _GetRequiredType("System.CallingConventionAttribute");
|
||||
mMethodRefTypeDef = _GetRequiredType("System.MethodReference", 1);
|
||||
mNullableTypeDef = _GetRequiredType("System.Nullable");
|
||||
mOrderedAttributeTypeDef = _GetRequiredType("System.OrderedAttribute");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue