Skip to content

Commit

Permalink
fhdl/namer: Add support for STORE_DEREF opcode
Browse files Browse the repository at this point in the history
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
  • Loading branch information
larsclausen committed Feb 2, 2012
1 parent 9f05e72 commit 2b3f00c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions migen/fhdl/namer.py
Expand Up @@ -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":
Expand Down

0 comments on commit 2b3f00c

Please sign in to comment.