1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-11 04:52:21 +02:00

Fix for Win32 vdata reflection hot swap

This commit is contained in:
Brian Fiete 2019-12-03 08:03:45 -08:00
parent 04a46850d6
commit bb66c77da8
3 changed files with 19 additions and 22 deletions

View file

@ -307,28 +307,23 @@ struct Blurg
public static int32 Hey() public static int32 Hey()
{ {
Hey2(); while (true)
Test(); {
Test2(11, 22, 33); Type t = typeof(Yoofer);
Test3(); for (let field in t.GetFields())
Test4(); {
NoFrame.Test(); StringView name = field.Name;
}
}
#unwarn
return (int32)123; return (int32)123;
} }
} }
[Reflect]
class NoFrame struct Yoofer
{ {
public static void Test() int mA;
{
//Test_Start
Blurg.Derived dr = .();
Int iVal = (.)123;
int q = 999;
//Test_End
}
} }

View file

@ -1881,7 +1881,7 @@ public:
}; };
#endif #endif
void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDefine) void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
{ {
bool wantDIData = DbgHasInfo() && (!type->IsUnspecializedType()); bool wantDIData = DbgHasInfo() && (!type->IsUnspecializedType());
@ -1892,6 +1892,8 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDefine)
// wantsDIForwardDecl = false; // wantsDIForwardDecl = false;
if (mModule->mExtensionCount != 0) if (mModule->mExtensionCount != 0)
wantsDIForwardDecl = true; wantsDIForwardDecl = true;
if (forceDbgDefine)
wantsDIForwardDecl = false;
bool isPrimEnum = (type->IsEnum()) && (type->IsTypedPrimitive()); bool isPrimEnum = (type->IsEnum()) && (type->IsTypedPrimitive());
@ -2772,7 +2774,7 @@ bool BfIRBuilder::WantsDbgDefinition(BfType* type)
return false; return false;
} }
void BfIRBuilder::CreateTypeDefinition(BfType* type, bool forceDefine) void BfIRBuilder::CreateTypeDefinition(BfType* type, bool forceDbgDefine)
{ {
// This PopulateType is generally NOT needed, but here is a scenario in which it is: // This PopulateType is generally NOT needed, but here is a scenario in which it is:
// ClassB derives from ClassA. ClassC uses ClassB. A method inside ClassA gets modified, // ClassB derives from ClassA. ClassC uses ClassB. A method inside ClassA gets modified,

View file

@ -940,8 +940,8 @@ public:
String GetDebugTypeName(BfTypeInstance* typeInstance, bool includeOuterTypeName); String GetDebugTypeName(BfTypeInstance* typeInstance, bool includeOuterTypeName);
void CreateDbgTypeDefinition(BfType* type); void CreateDbgTypeDefinition(BfType* type);
bool WantsDbgDefinition(BfType * type); bool WantsDbgDefinition(BfType * type);
void CreateTypeDeclaration(BfType* type, bool forceDefine); void CreateTypeDeclaration(BfType* type, bool forceDbgDefine);
void CreateTypeDefinition(BfType* type, bool forceDefine); void CreateTypeDefinition(BfType* type, bool forceDbgDefine);
void ReplaceDITemporaryTypes(); void ReplaceDITemporaryTypes();
void PushDbgLoc(BfTypeInstance* typeInst); void PushDbgLoc(BfTypeInstance* typeInst);
BfIRPopulateType GetPopulateTypeState(BfType* type); BfIRPopulateType GetPopulateTypeState(BfType* type);