mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Initial const eval feature release
This commit is contained in:
parent
be929c3626
commit
ff1f8aff3f
27 changed files with 887 additions and 178 deletions
|
@ -6438,10 +6438,15 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
|
|||
methodMatcher.CheckType(itrInterface, itr, false);
|
||||
methodMatcher.TryDevirtualizeCall(itr);
|
||||
exprEvaluator.mReceivingValue = &nextResult;
|
||||
auto retVal = exprEvaluator.CreateCall(&methodMatcher, itr);
|
||||
auto retVal = exprEvaluator.CreateCall(&methodMatcher, itr);
|
||||
if (exprEvaluator.mReceivingValue != NULL)
|
||||
{
|
||||
AssertErrorState();
|
||||
if (mIsConstModule)
|
||||
{
|
||||
mBfIRBuilder->CreateStore(retVal.mValue, nextResult.mValue);
|
||||
}
|
||||
else
|
||||
AssertErrorState();
|
||||
}
|
||||
if ((retVal) && (!retVal.mType->IsVar()))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue