aboutsummaryrefslogtreecommitdiffstats
path: root/code_gen.c
diff options
context:
space:
mode:
authorbjj <bjj>1999-08-12 05:40:09 +0000
committerbjj <bjj>1999-08-12 05:40:09 +0000
commit10dc7c2272a6d99cdb6d750bbdc7768dadd13702 (patch)
tree53ec9141671d38d1b0e764925dc47ccae1020e40 /code_gen.c
parent886347318896e45289042c14b532e9ffcb693aa8 (diff)
downloadmoo-cvs-10dc7c2272a6d99cdb6d750bbdc7768dadd13702.tar.gz
moo-cvs-10dc7c2272a6d99cdb6d750bbdc7768dadd13702.tar.xz
moo-cvs-10dc7c2272a6d99cdb6d750bbdc7768dadd13702.zip
Consider OP_FORK a nonlocal goto so that no variables are undefined
when it happens (the saved environment has to be complete for the forked task).
Diffstat (limited to 'code_gen.c')
-rw-r--r--code_gen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/code_gen.c b/code_gen.c
index 3ae5275..163a0f5 100644
--- a/code_gen.c
+++ b/code_gen.c
@@ -1187,7 +1187,7 @@ stmt_to_code(Stmt * stmt, GState * gstate)
bbd[n_bbd++] = 0;
bbd[n_bbd++] = state.num_bytes;
for (fixup = state.fixups, fix_i = 0; fix_i < state.num_fixups; ++fix_i, ++fixup)
- if (fixup->kind == FIXUP_LABEL)
+ if (fixup->kind == FIXUP_LABEL || fixup->kind == FIXUP_FORK)
bbd[n_bbd++] = fixup->pc;
qsort(bbd, n_bbd, sizeof(*bbd), bbd_cmp);
@@ -1334,6 +1334,11 @@ char rcsid_code_gen[] = "$Id$";
/*
* $Log$
+ * Revision 1.8 1999/08/12 05:40:09 bjj
+ * Consider OP_FORK a nonlocal goto so that no variables are undefined
+ * when it happens (the saved environment has to be complete for the forked
+ * task).
+ *
* Revision 1.7 1999/08/11 07:51:03 bjj
* Fix problem with last checkin which prevented compiling without B_R_R, duh.
*