fhdl/namer: Add support for STORE_DEREF opcode
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 31 Jan 2012 20:39:53 +0000 (21:39 +0100)
committerLars-Peter Clausen <lars@metafoo.de>
Thu, 2 Feb 2012 20:15:10 +0000 (21:15 +0100)
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
migen/fhdl/namer.py

index 530eedcc1af927001a7b4bec2d211b91ddf51dba..070d4ba7e3a16ee08e5f026552bf2645a13093eb 100644 (file)
@@ -16,6 +16,9 @@ def get_var_name(frame):
                elif opc == "STORE_FAST":
                        name_index = int(code.co_code[index+1])
                        return code.co_varnames[name_index]
+               elif opc == "STORE_DEREF":
+                       name_index = int(code.co_code[index+1])
+                       return code.co_cellvars[name_index]
                elif opc == "LOAD_GLOBAL" or opc == "LOAD_ATTR" or opc == "LOAD_FAST":
                        index += 3
                elif opc == "DUP_TOP":