mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-17 00:44:19 +00:00
BLOCKS API: Added a couple of missing simplification steps in the littlefoot compiler
This commit is contained in:
parent
fb172ac41b
commit
355addb5c3
1 changed files with 15 additions and 0 deletions
|
|
@ -1516,6 +1516,15 @@ private:
|
|||
cg.continueTarget = oldContinueTarget;
|
||||
}
|
||||
|
||||
StatementPtr simplify (SyntaxTreeBuilder& stb) override
|
||||
{
|
||||
initialiser = initialiser->simplify (stb);
|
||||
iterator = iterator->simplify (stb);
|
||||
body = body->simplify (stb);
|
||||
condition = condition->simplify (stb);
|
||||
return this;
|
||||
}
|
||||
|
||||
void visitSubStatements (Statement::Visitor& visit) const override
|
||||
{
|
||||
visit (condition); visit (initialiser); visit (iterator); visit (body);
|
||||
|
|
@ -1548,6 +1557,12 @@ private:
|
|||
|
||||
bool alwaysReturns() const override { return true; }
|
||||
|
||||
StatementPtr simplify (SyntaxTreeBuilder& stb) override
|
||||
{
|
||||
returnValue = returnValue->simplify (stb);
|
||||
return this;
|
||||
}
|
||||
|
||||
void visitSubStatements (Statement::Visitor& visit) const override
|
||||
{
|
||||
visit (returnValue);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue