aboutsummaryrefslogtreecommitdiff
path: root/py/bc0.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-08 21:11:49 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-08 21:11:49 +0100
commit1d24ea5207ba4b62b20dbba22ab2800496418463 (patch)
tree0ac953019f01f030778f2bc6381b69884e7124be /py/bc0.h
parent134c10e776a5d75cfdd6bf98697cb50d7da7adf6 (diff)
py: Finish implementation of all del opcodes.
At this point, all opcodes are now implemented! Some del opcodes have been combined with store opcodes, with the value to store being MP_OBJ_NULL.
Diffstat (limited to 'py/bc0.h')
-rw-r--r--py/bc0.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/py/bc0.h b/py/bc0.h
index 80a8248de..0fe33d48a 100644
--- a/py/bc0.h
+++ b/py/bc0.h
@@ -1,6 +1,10 @@
// Micro Python byte-codes.
// The comment at the end of the line (if it exists) tells the arguments to the byte-code.
+// TODO Add MP_BC_LOAD_FAST_CHECKED and MP_BC_STORE_FAST_CHECKED for acting on those
+// locals which have del called on them anywhere in the function.
+// UnboundLocalError: local variable '%s' referenced before assignment
+
#define MP_BC_LOAD_CONST_FALSE (0x10)
#define MP_BC_LOAD_CONST_NONE (0x11)
#define MP_BC_LOAD_CONST_TRUE (0x12)
@@ -34,12 +38,9 @@
#define MP_BC_STORE_ATTR (0x37) // qstr
#define MP_BC_STORE_SUBSCR (0x38)
-#define MP_BC_DELETE_FAST_N (0x39) // uint
-#define MP_BC_DELETE_DEREF (0x3a) // uint
-#define MP_BC_DELETE_NAME (0x3b) // qstr
-#define MP_BC_DELETE_GLOBAL (0x3c) // qstr
-#define MP_BC_DELETE_ATTR (0x3d) // qstr
-#define MP_BC_DELETE_SUBSCR (0x3e)
+#define MP_BC_DELETE_NAME (0x39) // qstr
+#define MP_BC_DELETE_GLOBAL (0x3a) // qstr
+#define MP_BC_DELETE_SUBSCR (0x3b)
#define MP_BC_DUP_TOP (0x40)
#define MP_BC_DUP_TOP_TWO (0x41)
@@ -97,4 +98,3 @@
#define MP_BC_IMPORT_NAME (0xe0) // qstr
#define MP_BC_IMPORT_FROM (0xe1) // qstr
#define MP_BC_IMPORT_STAR (0xe2)
-