Forráskód Böngészése

IsThreadLocal fixes

Brian Fiete 1 éve
szülő
commit
43e718b24e

+ 2 - 2
IDEHelper/Compiler/BfIRBuilder.cpp

@@ -3967,9 +3967,9 @@ void BfIRBuilder::CreateTypeDefinition(BfType* type, bool forceDbgDefine)
 			{
 				if (isDefiningModule)
 				{
-					fieldInstance->mIsThreadLocal = mModule->IsThreadLocal(fieldInstance);
+					bool isThreadLocal = mModule->IsThreadLocal(fieldInstance);
 					if (!resolvedFieldType->IsVoid())
-						mModule->CreateStaticField(fieldInstance, fieldInstance->mIsThreadLocal);
+						mModule->CreateStaticField(fieldInstance, isThreadLocal);
 				}
 			}
 		}

+ 2 - 2
IDEHelper/Compiler/BfModule.cpp

@@ -19959,7 +19959,7 @@ void BfModule::EmitGCMarkMembers()
 					auto fieldDef = fieldInst.GetFieldDef();
 					if (fieldDef == NULL)
 						continue;
-					if (fieldInst.mIsThreadLocal)
+					if (IsThreadLocal(&fieldInst))
 						continue;
 
 					if (fieldDef->mIsStatic == methodDef->mIsStatic)
@@ -20038,7 +20038,7 @@ void BfModule::EmitGCFindTLSMembers()
 		auto fieldDef = fieldInst.GetFieldDef();
 		if (fieldDef == NULL)
 			continue;
-		if (!fieldInst.mIsThreadLocal)
+		if (!IsThreadLocal(&fieldInst))
 			continue;
 
 		// For extensions, only handle these fields in the appropriate extension

+ 0 - 4
IDEHelper/Compiler/BfResolvedTypeUtils.h

@@ -1393,7 +1393,6 @@ public:
 	int mDataSize;
 	bool mFieldIncluded;
 	bool mIsEnumPayloadCase;
-	bool mIsThreadLocal;
 	bool mIsInferredType;
 	bool mHadConstEval;
 	int mLastRevisionReferenced;
@@ -1418,7 +1417,6 @@ public:
 		mDataSize = copyFrom.mDataSize;
 		mFieldIncluded = copyFrom.mFieldIncluded;
 		mIsEnumPayloadCase = copyFrom.mIsEnumPayloadCase;
-		mIsThreadLocal = copyFrom.mIsThreadLocal;
 		mIsInferredType = copyFrom.mIsInferredType;
 		mHadConstEval = copyFrom.mHadConstEval;
 		mLastRevisionReferenced = copyFrom.mLastRevisionReferenced;
@@ -1440,7 +1438,6 @@ public:
 		mDataSize = copyFrom.mDataSize;
 		mFieldIncluded = copyFrom.mFieldIncluded;
 		mIsEnumPayloadCase = copyFrom.mIsEnumPayloadCase;
-		mIsThreadLocal = copyFrom.mIsThreadLocal;
 		mIsInferredType = copyFrom.mIsInferredType;
 		mHadConstEval = copyFrom.mHadConstEval;
 		mLastRevisionReferenced = copyFrom.mLastRevisionReferenced;
@@ -1459,7 +1456,6 @@ public:
 		mDataOffset = -1;
 		mDataSize = 0;
 		mFieldIncluded = true;
-		mIsThreadLocal = false;
 		mIsInferredType = false;
 		mHadConstEval = false;
 		mLastRevisionReferenced = -1;