mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Added comptype
This commit is contained in:
parent
bb12a4ec20
commit
4890303508
27 changed files with 382 additions and 157 deletions
|
@ -103,7 +103,7 @@ BfTypedValue BfConstResolver::Resolve(BfExpression* expr, BfType* wantType, BfCo
|
|||
wantIgnoreWrites = true;
|
||||
}
|
||||
|
||||
SetAndRestoreValue<bool> ignoreWrites(mModule->mBfIRBuilder->mIgnoreWrites, wantIgnoreWrites);
|
||||
SetAndRestoreValue<bool> prevIgnoreWrites(mModule->mBfIRBuilder->mIgnoreWrites, wantIgnoreWrites);
|
||||
|
||||
auto prevInsertBlock = mModule->mBfIRBuilder->GetInsertBlock();
|
||||
|
||||
|
@ -139,7 +139,7 @@ BfTypedValue BfConstResolver::Resolve(BfExpression* expr, BfType* wantType, BfCo
|
|||
{
|
||||
if ((flags & BfConstResolveFlag_RemapFromStringId) != 0)
|
||||
{
|
||||
ignoreWrites.Restore();
|
||||
prevIgnoreWrites.Restore();
|
||||
mModule->mBfIRBuilder->PopulateType(mResult.mType);
|
||||
return BfTypedValue(mModule->GetStringObjectValue(stringId), mResult.mType);
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ BfTypedValue BfConstResolver::Resolve(BfExpression* expr, BfType* wantType, BfCo
|
|||
{
|
||||
auto constant = mModule->mBfIRBuilder->GetConstant(mResult.mValue);
|
||||
if ((constant->mConstType == BfConstType_GlobalVar) && ((mBfEvalExprFlags & BfConstResolveFlag_AllowGlobalVariable) != 0))
|
||||
isConst = false;
|
||||
isConst = false;
|
||||
}
|
||||
|
||||
if ((!isConst) && ((mBfEvalExprFlags & BfEvalExprFlags_AllowNonConst) == 0))
|
||||
|
@ -232,6 +232,7 @@ BfTypedValue BfConstResolver::Resolve(BfExpression* expr, BfType* wantType, BfCo
|
|||
}*/
|
||||
|
||||
mModule->FixIntUnknown(mResult);
|
||||
mModule->FixValueActualization(mResult);
|
||||
|
||||
return mResult;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue