1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Deleted type protection in EmitGCMarkValue, RequestExtraCompile feature

This commit is contained in:
Brian Fiete 2025-02-19 12:01:06 -08:00
parent 6e0cabf8aa
commit 471897a150
6 changed files with 81 additions and 1 deletions

View file

@ -1223,6 +1223,37 @@ BfPassInstance::~BfPassInstance()
delete bfError;
}
BfPassInstance::StateInfo BfPassInstance::GetState()
{
StateInfo stateInfo;
stateInfo.mOutStreamSize = (int)mOutStream.mSize;
stateInfo.mErrorsSize = mErrors.mSize;
stateInfo.mWarningCount = mWarningCount;
stateInfo.mDeferredErrorCount = mDeferredErrorCount;
stateInfo.mFailedIdx = mFailedIdx;
stateInfo.mWarnIdx = mWarnIdx;
return stateInfo;
}
void BfPassInstance::RestoreState(StateInfo stateInfo)
{
while (mOutStream.mSize > stateInfo.mOutStreamSize)
mOutStream.pop_back();
while (mErrors.mSize > stateInfo.mErrorsSize)
{
auto error = mErrors.back();
mErrors.pop_back();
mErrorSet.Remove(error);
delete error;
}
mWarningCount = stateInfo.mWarningCount;
mDeferredErrorCount = stateInfo.mDeferredErrorCount;
mFailedIdx = stateInfo.mFailedIdx;
mWarnIdx = stateInfo.mWarnIdx;
}
void BfPassInstance::ClearErrors()
{
mFailedIdx = 0;