summaryrefslogtreecommitdiff
path: root/py/emitpass1.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-12 18:20:40 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-12 18:20:40 +0100
commit6ce427755112c28f8a7efab65d329205d833f623 (patch)
tree47b3b292e4472cc15996b745202dd98133e89feb /py/emitpass1.c
parentc2803db010ab575e9387e4eaf2f8090b083b3c5f (diff)
py: Make all LOAD_FAST ops check for unbound local.
This is necessary to catch all cases where locals are referenced before assignment. We still keep the _0, _1, _2 versions of LOAD_FAST to help reduced the byte code size in RAM. Addresses issue #457.
Diffstat (limited to 'py/emitpass1.c')
-rw-r--r--py/emitpass1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/emitpass1.c b/py/emitpass1.c
index 301c04ebe..ad86588e2 100644
--- a/py/emitpass1.c
+++ b/py/emitpass1.c
@@ -96,7 +96,9 @@ STATIC void emit_pass1_store_id(emit_t *emit, qstr qstr) {
STATIC void emit_pass1_delete_id(emit_t *emit, qstr qstr) {
id_info_t *id = get_id_for_modification(emit->scope, qstr);
- id->flags |= ID_FLAG_IS_DELETED;
+ // this flag is unused
+ //id->flags |= ID_FLAG_IS_DELETED;
+ (void)id; // suppress compiler warning
}
const emit_method_table_t emit_pass1_method_table = {