Bläddra i källkod

Fixed chained GCMarkMember

Brian Fiete 4 år sedan
förälder
incheckning
49a4536e1e
1 ändrade filer med 15 tillägg och 5 borttagningar
  1. 15 5
      IDEHelper/Compiler/BfModule.cpp

+ 15 - 5
IDEHelper/Compiler/BfModule.cpp

@@ -4902,11 +4902,6 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
 		BfMangler::Mangle(typeDataName, mCompiler->GetMangleKind(), type, mContext->mScratchModule);
 	}
 
-	if (typeDataName == "sBfTypeData.?")
-	{
-		NOP;
-	}
-
 	int typeCode = BfTypeCode_None;		
 
 	if (typeInstance != NULL)
@@ -21626,6 +21621,11 @@ bool BfModule::SlotVirtualMethod(BfMethodInstance* methodInstance, BfAmbiguityCo
 	if (mCurTypeInstance->IsUnspecializedTypeVariation())
 		return false;
 
+	if ((mCurTypeInstance->mTypeDef->mName->ToString() == "Zornk") && (methodInstance->mMethodDef->mName == "GCMarkMembers"))
+	{
+		NOP;
+	}
+
 	auto _AddVirtualDecl = [&](BfMethodInstance* declMethodInstance)
 	{
 		if (!mCompiler->mOptions.mAllowHotSwapping)
@@ -21985,6 +21985,16 @@ bool BfModule::SlotVirtualMethod(BfMethodInstance* methodInstance, BfAmbiguityCo
 									ambiguityContext->Remove(virtualMethodMatchIdx);
 								}
 
+								if ((isBetter) && (methodInstance->GetOwner() == methodOverriden->GetOwner()))
+								{
+									if (methodDef->mName == BF_METHODNAME_MARKMEMBERS)
+									{
+										// Leave the master GCMarkMember
+										isBetter = false;
+										isWorse = true;
+									}
+								}
+
 								doOverride = isBetter;
 							}
 						}