1.1 --- a/src/Opcodes.tbl Sat Dec 22 16:42:20 2012 -0800
1.2 +++ b/src/Opcodes.tbl Sat Dec 22 18:22:14 2012 -0800
1.3 @@ -43,6 +43,10 @@
1.4 // Unconditional jump.
1.5 OPDEF(OP_JUMP, "jump", 5, 0, 0)
1.6
1.7 +// Aliases for JUMP, that automatically leave LR regions.
1.8 +OPDEF(OP_BREAK, "break", 5, 0, 0)
1.9 +OPDEF(OP_CONTINUE, "continue", 5, 0, 0)
1.10 +
1.11 // Gets or sets the value of a local variable onto the stack. The local
1.12 // variable is given by an immediate index.
1.13 OPDEF(OP_GETLOCAL, "getlocal", 5, 0, 1)
1.14 @@ -243,4 +247,12 @@
1.15 OPDEF(OP_SIZEOF, "sizeof", 1, 1, 1)
1.16
1.17 // Registers a function as a publicly exported name.
1.18 -OPDEF(OP_PUBLIC, "public", 1, 1, 0)
1.19 \ No newline at end of file
1.20 +OPDEF(OP_PUBLIC, "public", 1, 1, 0)
1.21 +
1.22 +// Enter and leave loop bodies. This is to track positions in the LIFO stack.
1.23 +// This is only used for the outermost scope inside loop bodies. BREAK and
1.24 +// CONTINUE implicitly perform a LEAVELOOP.
1.25 +//
1.26 +// If the second byte to ENTERLOOP is 0, then no LIFO region is needed.
1.27 +OPDEF(OP_ENTERLOOP, "enterloop", 2, 0, 0)
1.28 +OPDEF(OP_LEAVELOOP, "leaveloop", 1, 0, 0)
1.29 \ No newline at end of file