Skip to content

Commit

Permalink
transforms.artiq_ir_generator: fix optarg codegen (closes #205).
Browse files Browse the repository at this point in the history
whitequark committed Dec 25, 2015
1 parent cd8eccf commit 690b2fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion artiq/compiler/transforms/artiq_ir_generator.py
Original file line number Diff line number Diff line change
@@ -1626,7 +1626,7 @@ def visit_CallT(self, node):

for index, arg_node in enumerate(node.args):
arg = self.visit(arg_node)
if index < len(fn_typ.args):
if index + offset < len(fn_typ.args):
args[index + offset] = arg
else:
args[index + offset] = self.append(ir.Alloc([arg], ir.TOption(arg.type)))

0 comments on commit 690b2fd

Please sign in to comment.