For statements.

git-svn-id: svn://10.0.0.236/trunk@64841 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rogerl%netscape.com
2000-04-01 02:53:16 +00:00
parent 485de8da7a
commit 0c6fc8328e
6 changed files with 190 additions and 18 deletions

View File

@@ -400,6 +400,17 @@ void testICG(World &world)
icg.endDefaultStatement();
icg.endSwitchStatement();
// for ( ; i; i + 1 ) j = 99;
icg.beginForStatement(pos);
r1 = icg.loadVariable(0);
icg.forCondition(r1);
icg.saveVariable(0, icg.op(ADD, icg.loadVariable(0), icg.loadImmediate(1)));
icg.forIncrement();
icg.saveVariable(0, icg.loadImmediate(99));
icg.endForStatement();
InstructionStream *iCode = icg.complete();
std::cout << icg;