fhdl/tracer: recognize CALL_FUNCTION_VAR opcode
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 12 Mar 2013 12:48:09 +0000 (13:48 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 12 Mar 2013 12:48:09 +0000 (13:48 +0100)
migen/fhdl/tracer.py

index 53cc3663411a83d10996cc31f86e4e2f568b7050..fa6d40644d71f0434c808d91197ecf427adecb62 100644 (file)
@@ -5,7 +5,8 @@ from collections import defaultdict
 def get_var_name(frame):
        code = frame.f_code
        call_index = frame.f_lasti
-       if opname[code.co_code[call_index]] != "CALL_FUNCTION":
+       call_opc = opname[code.co_code[call_index]]
+       if call_opc != "CALL_FUNCTION" and call_opc != "CALL_FUNCTION_VAR":
                return None
        index = call_index+3
        while True: