diff options
| author | Damien George <damien.p.george@gmail.com> | 2014-04-12 18:20:40 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2014-04-12 18:20:40 +0100 |
| commit | 6ce427755112c28f8a7efab65d329205d833f623 (patch) | |
| tree | 47b3b292e4472cc15996b745202dd98133e89feb /py/emitpass1.c | |
| parent | c2803db010ab575e9387e4eaf2f8090b083b3c5f (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.c | 4 |
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 = { |
