|
@@ -4032,11 +4032,6 @@ BfIRValue BfModule::CreateClassVDataGlobal(BfTypeInstance* typeInstance, int* ou
|
|
|
|
|
|
StringT<128> classVDataName;
|
|
StringT<128> classVDataName;
|
|
|
|
|
|
- if ((mCompiler->IsHotCompile()) && (typeInstance->mTypeDef->mName->ToString() == "ClassC"))
|
|
|
|
- {
|
|
|
|
- NOP;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
String memberName = "sBfClassVData";
|
|
String memberName = "sBfClassVData";
|
|
if ((typeInstance->mHotTypeData != NULL) && ((typeInstance->mHotTypeData->mHadDataChange) || (typeInstance->mHotTypeData->mPendingDataChange)))
|
|
if ((typeInstance->mHotTypeData != NULL) && ((typeInstance->mHotTypeData->mHadDataChange) || (typeInstance->mHotTypeData->mPendingDataChange)))
|
|
{
|
|
{
|
|
@@ -9104,12 +9099,7 @@ void BfModule::ValidateCustomAttributes(BfCustomAttributes* customAttributes, Bf
|
|
}
|
|
}
|
|
|
|
|
|
void BfModule::GetCustomAttributes(BfCustomAttributes* customAttributes, BfAttributeDirective* attributesDirective, BfAttributeTargets attrTarget)
|
|
void BfModule::GetCustomAttributes(BfCustomAttributes* customAttributes, BfAttributeDirective* attributesDirective, BfAttributeTargets attrTarget)
|
|
-{
|
|
|
|
- if ((mCurMethodInstance != NULL) && (mCurMethodInstance->mMethodDef->mName == "OpenAudio"))
|
|
|
|
- {
|
|
|
|
- NOP;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
if ((attributesDirective != NULL) && (mCompiler->mResolvePassData != NULL) &&
|
|
if ((attributesDirective != NULL) && (mCompiler->mResolvePassData != NULL) &&
|
|
(attributesDirective->IsFromParser(mCompiler->mResolvePassData->mParser)) && (mCompiler->mResolvePassData->mSourceClassifier != NULL))
|
|
(attributesDirective->IsFromParser(mCompiler->mResolvePassData->mParser)) && (mCompiler->mResolvePassData->mSourceClassifier != NULL))
|
|
{
|
|
{
|
|
@@ -10990,7 +10980,7 @@ BfModuleMethodInstance BfModule::GetMethodInstance(BfTypeInstance* typeInst, BfM
|
|
if (lookupMethodGenericArguments.size() == 0)
|
|
if (lookupMethodGenericArguments.size() == 0)
|
|
{
|
|
{
|
|
methodInstance = methodInstGroup->mDefault;
|
|
methodInstance = methodInstGroup->mDefault;
|
|
-
|
|
|
|
|
|
+
|
|
if ((methodInstance != NULL) && (isReified) && (!methodInstance->mIsReified))
|
|
if ((methodInstance != NULL) && (isReified) && (!methodInstance->mIsReified))
|
|
{
|
|
{
|
|
MarkDerivedDirty(typeInst);
|
|
MarkDerivedDirty(typeInst);
|
|
@@ -11172,11 +11162,6 @@ BfModuleMethodInstance BfModule::GetMethodInstance(BfTypeInstance* typeInst, BfM
|
|
{
|
|
{
|
|
SetAndRestoreValue<bool> prevIgnoreWrites(mBfIRBuilder->mIgnoreWrites, false);
|
|
SetAndRestoreValue<bool> prevIgnoreWrites(mBfIRBuilder->mIgnoreWrites, false);
|
|
|
|
|
|
- if ((methodInstance->mMethodDef->mName == "Unwrap") && (mModuleName == "System_Result_PTR_void"))
|
|
|
|
- {
|
|
|
|
- NOP;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (mAwaitingInitFinish)
|
|
if (mAwaitingInitFinish)
|
|
FinishInit();
|
|
FinishInit();
|
|
|
|
|
|
@@ -11206,7 +11191,7 @@ BfModuleMethodInstance BfModule::GetMethodInstance(BfTypeInstance* typeInst, BfM
|
|
if (mCompiler->IsSkippingExtraResolveChecks())
|
|
if (mCompiler->IsSkippingExtraResolveChecks())
|
|
return BfModuleMethodInstance(methodInstance, BfIRFunction());
|
|
return BfModuleMethodInstance(methodInstance, BfIRFunction());
|
|
else
|
|
else
|
|
- {
|
|
|
|
|
|
+ {
|
|
if (methodInstance->mDeclModule != this)
|
|
if (methodInstance->mDeclModule != this)
|
|
return ReferenceExternalMethodInstance(methodInstance, flags);
|
|
return ReferenceExternalMethodInstance(methodInstance, flags);
|
|
|
|
|
|
@@ -14569,11 +14554,6 @@ void BfModule::ProcessMethod_SetupParams(BfMethodInstance* methodInstance, BfTyp
|
|
auto methodDef = methodInstance->mMethodDef;
|
|
auto methodDef = methodInstance->mMethodDef;
|
|
auto methodDeclaration = methodDef->mMethodDeclaration;
|
|
auto methodDeclaration = methodDef->mMethodDeclaration;
|
|
|
|
|
|
- if (methodDef->mName == "GetIt")
|
|
|
|
- {
|
|
|
|
- NOP;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
bool isThisStruct = false;
|
|
bool isThisStruct = false;
|
|
if (thisType != NULL)
|
|
if (thisType != NULL)
|
|
isThisStruct = thisType->IsStruct() && !thisType->IsTypedPrimitive();
|
|
isThisStruct = thisType->IsStruct() && !thisType->IsTypedPrimitive();
|
|
@@ -18384,11 +18364,6 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
|
|
if (mCurMethodInstance->mMethodInstanceGroup->mOnDemandKind == BfMethodOnDemandKind_NoDecl_AwaitingReference)
|
|
if (mCurMethodInstance->mMethodInstanceGroup->mOnDemandKind == BfMethodOnDemandKind_NoDecl_AwaitingReference)
|
|
mCurMethodInstance->mMethodInstanceGroup->mOnDemandKind = BfMethodOnDemandKind_Decl_AwaitingReference;
|
|
mCurMethodInstance->mMethodInstanceGroup->mOnDemandKind = BfMethodOnDemandKind_Decl_AwaitingReference;
|
|
|
|
|
|
- if (mCurTypeInstance->mTypeDef->mName->ToString() == "ClassA")
|
|
|
|
- {
|
|
|
|
- NOP;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
bool ignoreWrites = mBfIRBuilder->mIgnoreWrites;
|
|
bool ignoreWrites = mBfIRBuilder->mIgnoreWrites;
|
|
|
|
|
|
if (mAwaitingInitFinish)
|
|
if (mAwaitingInitFinish)
|
|
@@ -20322,16 +20297,6 @@ bool BfModule::Finish()
|
|
BP_ZONE("BfModule::Finish");
|
|
BP_ZONE("BfModule::Finish");
|
|
BfLogSysM("BfModule finish: %p\n", this);
|
|
BfLogSysM("BfModule finish: %p\n", this);
|
|
|
|
|
|
- if (mCompiler->mCanceling)
|
|
|
|
- {
|
|
|
|
- NOP;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (mModuleName == "System_Array")
|
|
|
|
- {
|
|
|
|
- NOP;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (mHadBuildError)
|
|
if (mHadBuildError)
|
|
{
|
|
{
|
|
// Don't AssertErrorState here, this current pass may not have failed but
|
|
// Don't AssertErrorState here, this current pass may not have failed but
|
|
@@ -20558,11 +20523,6 @@ void BfModule::ClearModuleData()
|
|
mAddedToCount = false;
|
|
mAddedToCount = false;
|
|
}
|
|
}
|
|
|
|
|
|
- if (mCompiler->mCanceling)
|
|
|
|
- {
|
|
|
|
- NOP;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
mDICompileUnit = BfIRMDNode();
|
|
mDICompileUnit = BfIRMDNode();
|
|
mIsModuleMutable = false;
|
|
mIsModuleMutable = false;
|
|
mIncompleteMethodCount = 0;
|
|
mIncompleteMethodCount = 0;
|
|
@@ -20598,18 +20558,6 @@ void BfModule::ClearModuleData()
|
|
if (mNextAltModule != NULL)
|
|
if (mNextAltModule != NULL)
|
|
mNextAltModule->ClearModuleData();
|
|
mNextAltModule->ClearModuleData();
|
|
|
|
|
|
- for (auto typeInstance : mOwnedTypeInstances)
|
|
|
|
- {
|
|
|
|
- if (typeInstance->IsSpecializedType())
|
|
|
|
- {
|
|
|
|
- for (auto&& methodGroup : typeInstance->mMethodInstanceGroups)
|
|
|
|
- {
|
|
|
|
- if (methodGroup.mDefault != NULL)
|
|
|
|
- methodGroup.mDefault->mDeclModule = NULL;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
BfLogSysM("ClearModuleData. Deleting IRBuilder: %p\n", mBfIRBuilder);
|
|
BfLogSysM("ClearModuleData. Deleting IRBuilder: %p\n", mBfIRBuilder);
|
|
delete mBfIRBuilder;
|
|
delete mBfIRBuilder;
|
|
mBfIRBuilder = NULL;
|
|
mBfIRBuilder = NULL;
|
|
@@ -20617,7 +20565,7 @@ void BfModule::ClearModuleData()
|
|
}
|
|
}
|
|
|
|
|
|
void BfModule::DisownMethods()
|
|
void BfModule::DisownMethods()
|
|
-{
|
|
|
|
|
|
+{
|
|
for (int i = 0; i < BfBuiltInFuncType_Count; i++)
|
|
for (int i = 0; i < BfBuiltInFuncType_Count; i++)
|
|
mBuiltInFuncs[i] = BfIRFunction();
|
|
mBuiltInFuncs[i] = BfIRFunction();
|
|
|
|
|
|
@@ -20631,8 +20579,14 @@ void BfModule::DisownMethods()
|
|
{
|
|
{
|
|
if (methodGroup.mDefault != NULL)
|
|
if (methodGroup.mDefault != NULL)
|
|
{
|
|
{
|
|
- if (methodGroup.mDefault->mDeclModule == this)
|
|
|
|
- methodGroup.mDefault->mIRFunction = BfIRFunction();
|
|
|
|
|
|
+ if (methodGroup.mDefault->mIRFunction)
|
|
|
|
+ {
|
|
|
|
+ BF_ASSERT(methodGroup.mDefault->mDeclModule != NULL);
|
|
|
|
+ if (methodGroup.mDefault->mDeclModule == this)
|
|
|
|
+ {
|
|
|
|
+ methodGroup.mDefault->mIRFunction = BfIRFunction();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
if (methodGroup.mMethodSpecializationMap != NULL)
|
|
if (methodGroup.mMethodSpecializationMap != NULL)
|
|
@@ -20641,7 +20595,9 @@ void BfModule::DisownMethods()
|
|
{
|
|
{
|
|
auto methodInstance = mapPair.mValue;
|
|
auto methodInstance = mapPair.mValue;
|
|
if (methodInstance->mDeclModule == this)
|
|
if (methodInstance->mDeclModule == this)
|
|
|
|
+ {
|
|
methodInstance->mIRFunction = BfIRFunction();
|
|
methodInstance->mIRFunction = BfIRFunction();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|