some more fixes

This commit is contained in:
ceriel 1987-09-14 12:41:08 +00:00
parent 74c758e503
commit 8d2afe1103
2 changed files with 26 additions and 24 deletions

View file

@ -1 +1 @@
static char Version[] = "ACK Modula-2 compiler Version 0.16"; static char Version[] = "ACK Modula-2 compiler Version 0.17";

View file

@ -532,21 +532,22 @@ WalkStat(nd, exit_label)
C_stl(tmp); C_stl(tmp);
nd->nd_def->df_flags |= D_FORLOOP; nd->nd_def->df_flags |= D_FORLOOP;
C_df_ilb(l1); C_df_ilb(l1);
}
if (! options['R']) { if (! options['R']) {
tmp2 = NewInt(); tmp2 = NewInt();
ForLoopVarExpr(nd); ForLoopVarExpr(nd);
C_stl(tmp2); C_stl(tmp2);
} }
}
WalkNode(right, exit_label); WalkNode(right, exit_label);
nd->nd_def->df_flags &= ~D_FORLOOP;
if (good_forvar) {
if (! options['R']) { if (! options['R']) {
C_lol(tmp2); C_lol(tmp2);
ForLoopVarExpr(nd); ForLoopVarExpr(nd);
C_cal("_forloopchk"); C_cal("_forloopchk");
FreeInt(tmp2); FreeInt(tmp2);
} }
nd->nd_def->df_flags &= ~D_FORLOOP; if (stepsize) {
if (good_forvar && stepsize) {
C_lol(tmp); C_lol(tmp);
C_zeq(l2); C_zeq(l2);
C_lol(tmp); C_lol(tmp);
@ -559,6 +560,7 @@ WalkStat(nd, exit_label)
RangeCheck(nd->nd_type, bstp); RangeCheck(nd->nd_type, bstp);
CodeDStore(nd); CodeDStore(nd);
} }
}
C_bra(l1); C_bra(l1);
C_df_ilb(l2); C_df_ilb(l2);
FreeInt(tmp); FreeInt(tmp);