forked from M-Labs/artiq
1
0
Fork 0

transforms.artiq_ir_generator: fix devirtualized call annotation.

This commit is contained in:
whitequark 2015-10-14 16:12:00 +03:00
parent e9adfd639e
commit 5d64df829e
1 changed files with 6 additions and 2 deletions

View File

@ -105,6 +105,8 @@ class ARTIQIRGenerator(algorithm.Visitor):
def annotate_calls(self, devirtualization): def annotate_calls(self, devirtualization):
for var_node in devirtualization.variable_map: for var_node in devirtualization.variable_map:
callee_node = devirtualization.variable_map[var_node] callee_node = devirtualization.variable_map[var_node]
if callee_node is None:
continue
callee = self.function_map[callee_node] callee = self.function_map[callee_node]
call_target = self.variable_map[var_node] call_target = self.variable_map[var_node]
@ -115,6 +117,8 @@ class ARTIQIRGenerator(algorithm.Visitor):
for type_and_method in devirtualization.method_map: for type_and_method in devirtualization.method_map:
callee_node = devirtualization.method_map[type_and_method] callee_node = devirtualization.method_map[type_and_method]
if callee_node is None:
continue
callee = self.function_map[callee_node] callee = self.function_map[callee_node]
for call in self.method_map[type_and_method]: for call in self.method_map[type_and_method]: