fhdl/namer: Add support for STORE_DEREF opcode

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2012-01-31 21:39:53 +01:00
parent 9f05e7235d
commit 2b3f00cbc1
1 changed files with 3 additions and 0 deletions

View 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":