From 6ce427755112c28f8a7efab65d329205d833f623 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 12 Apr 2014 18:20:40 +0100 Subject: 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. --- py/emitpass1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'py/emitpass1.c') 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 = { -- cgit v1.2.3