diff options
| author | Damien George | 2014-04-09 15:26:46 +0100 |
|---|---|---|
| committer | Damien George | 2014-04-09 15:26:46 +0100 |
| commit | 2bf7c092225645d8c5b15e536afdce39e3593e42 (patch) | |
| tree | e257514a3008411367ea5e62eaea4b101ccac257 /py/emitpass1.c | |
| parent | 11d8cd54c992eee55f27d3779738626bdc095c03 (diff) | |
py: Properly implement deletion of locals and derefs, and detect errors.
Needed to reinstate 2 delete opcodes, to specifically check that a local
is not deleted twice.
Diffstat (limited to 'py/emitpass1.c')
| -rw-r--r-- | py/emitpass1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/emitpass1.c b/py/emitpass1.c index d2f7aaa53..608848941 100644 --- a/py/emitpass1.c +++ b/py/emitpass1.c @@ -91,7 +91,8 @@ STATIC void emit_pass1_store_id(emit_t *emit, qstr qstr) { } STATIC void emit_pass1_delete_id(emit_t *emit, qstr qstr) { - get_id_for_modification(emit->scope, qstr); + id_info_t *id = get_id_for_modification(emit->scope, qstr); + id->flags |= ID_FLAG_IS_DELETED; } const emit_method_table_t emit_pass1_method_table = { |
