pike.git/
src/
docode.c
Branch:
Tag:
Non-build tags
All tags
No tags
2001-01-14
2001-01-14 20:52:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>
cb76e8bba326fdd2a9694a459155c01ecb674a83 (
23
lines) (+
22
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Added code generation for F_LOOP nodes.
Rev: src/docode.c:1.94
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: docode.c,v 1.
93
2001/01/14
04
:
13
:
48
mast
Exp $");
+
RCSID("$Id: docode.c,v 1.
94
2001/01/14
20
:
52
:
46
grubba
Exp $");
#include "las.h" #include "program.h" #include "pike_types.h"
328:
case F_DO: case F_FOR: case F_FOREACH:
+
case F_LOOP:
case F_INC_LOOP: case F_DEC_LOOP: case F_INC_NEQ_LOOP:
889:
return 0; }
+
case F_LOOP:
+
{
+
/* FIXME: No support for break or continue. */
+
PUSH_STATEMENT_LABEL;
+
tmp1 = do_code(CAR(n));
+
if (tmp1 > 0) {
+
do_pop(tmp1-1);
+
tmp2 = do_branch(-1);
+
tmp3 = ins_label(-1);
+
PUSH_STATEMENT_LABEL;
+
do_code(CDR(n));
+
POP_STATEMENT_LABEL;
+
ins_label(tmp2);
+
emit1(F_LOOP, tmp3);
+
}
+
POP_STATEMENT_LABEL;
+
return 0;
+
}
+
case F_DO: { INT32 *prev_switch_jumptable = current_switch_jumptable;