aboutsummaryrefslogtreecommitdiff
path: root/py/bc0.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-01-09 23:59:52 +0000
committerDamien George <damien.p.george@gmail.com>2017-02-16 18:38:06 +1100
commitf4df3aaa72a0460614b1ab8b7b8a7927a1165e31 (patch)
tree2c1ee2988630c79a4e79e40a15173af588d8fd2c /py/bc0.h
parentae8d86758631e62466a55d179897d2111c3cb1c1 (diff)
py: Allow bytecode/native to put iter_buf on stack for simple for loops.
So that the "for x in it: ..." statement can now work without using the heap (so long as the iterator argument fits in an iter_buf structure).
Diffstat (limited to 'py/bc0.h')
-rw-r--r--py/bc0.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/bc0.h b/py/bc0.h
index 5ff9e50a8..c2b019f1a 100644
--- a/py/bc0.h
+++ b/py/bc0.h
@@ -79,6 +79,7 @@
#define MP_BC_POP_BLOCK (0x44)
#define MP_BC_POP_EXCEPT (0x45)
#define MP_BC_UNWIND_JUMP (0x46) // rel byte code offset, 16-bit signed, in excess; then a byte
+#define MP_BC_GET_ITER_STACK (0x47)
#define MP_BC_BUILD_TUPLE (0x50) // uint
#define MP_BC_BUILD_LIST (0x51) // uint