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:
parent
6e0cabf8aa
commit
471897a150
6 changed files with 81 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue