mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Improved string table usage tracking
This commit is contained in:
parent
bb2fe56dc9
commit
9d79db063b
6 changed files with 94 additions and 55 deletions
|
@ -6439,19 +6439,16 @@ void BfModule::FixIntUnknown(BfTypedValue& lhs, BfTypedValue& rhs)
|
|||
FixIntUnknown(rhs);
|
||||
}
|
||||
|
||||
void BfModule::FixValueActualization(BfTypedValue& typedVal)
|
||||
void BfModule::FixValueActualization(BfTypedValue& typedVal, bool force)
|
||||
{
|
||||
if (!typedVal.mValue.IsConst())
|
||||
return;
|
||||
if (mBfIRBuilder->mIgnoreWrites)
|
||||
if ((mBfIRBuilder->mIgnoreWrites) && (!force))
|
||||
return;
|
||||
auto constant = mBfIRBuilder->GetConstant(typedVal.mValue);
|
||||
if (constant->mConstType == BfConstType_TypeOf)
|
||||
{
|
||||
auto constTypeOf = (BfTypeOf_Const*)constant;
|
||||
AddDependency(constTypeOf->mType, mCurTypeInstance, BfDependencyMap::DependencyFlag_ExprTypeReference);
|
||||
typedVal.mValue = CreateTypeDataRef(constTypeOf->mType);
|
||||
}
|
||||
if (!HasUnactializedConstant(constant, mBfIRBuilder))
|
||||
return;
|
||||
typedVal.mValue = ConstantToCurrent(constant, mBfIRBuilder, typedVal.mType, false);
|
||||
}
|
||||
|
||||
BfTypeInstance* BfModule::GetPrimitiveStructType(BfTypeCode typeCode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue