Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4fb1de33c915
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: afee03b89c5a
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 18, 2015

  1. Commit missing parts of 0395efd.

    whitequark committed Dec 18, 2015
    Copy the full SHA
    4fcd6ab View commit details
  2. Commit missing parts of 4fb1de3.

    whitequark committed Dec 18, 2015
    Copy the full SHA
    afee03b View commit details
Showing with 11 additions and 5 deletions.
  1. +10 −4 artiq/compiler/transforms/artiq_ir_generator.py
  2. +1 −1 artiq/coredevice/core.py
14 changes: 10 additions & 4 deletions artiq/compiler/transforms/artiq_ir_generator.py
Original file line number Diff line number Diff line change
@@ -577,8 +577,11 @@ def visit_Try(self, node):

if any(node.finalbody):
# k for continuation
final_state = self.append(ir.Alloc([], ir.TEnvironment({ "$k": ir.TBasicBlock() })))
final_targets = []
final_suffix = ".try@{}:{}".format(node.loc.line(), node.loc.column())
final_env_type = ir.TEnvironment(name=self.current_function.name + final_suffix,
vars={ "$k": ir.TBasicBlock() })
final_state = self.append(ir.Alloc([], final_env_type))
final_targets = []

if self.break_target is not None:
break_proxy = self.add_block("try.break")
@@ -1095,7 +1098,7 @@ def visit_ListCompT(self, node):
result = self.append(ir.Alloc([length], node.type))

try:
gen_suffix = ".gen.{}.{}".format(node.loc.line(), node.loc.column())
gen_suffix = ".gen@{}:{}".format(node.loc.line(), node.loc.column())
env_type = ir.TEnvironment(name=self.current_function.name + gen_suffix,
vars=node.typing_env, outer=self.current_env.type)
env = self.append(ir.Alloc([], env_type, name="env.gen"))
@@ -1697,8 +1700,11 @@ def instrument_assert(self, node, value):

def visit_Assert(self, node):
try:
assert_suffix = ".assert@{}:{}".format(node.loc.line(), node.loc.column())
assert_env_type = ir.TEnvironment(name=self.current_function.name + assert_suffix,
vars={})
assert_env = self.current_assert_env = \
self.append(ir.Alloc([], ir.TEnvironment({}), name="assertenv"))
self.append(ir.Alloc([], assert_env_type, name="assertenv"))
assert_subexprs = self.current_assert_subexprs = []
init = self.current_block

2 changes: 1 addition & 1 deletion artiq/coredevice/core.py
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ def __init__(self, dmgr, ref_period=8*ns, external_clock=False, comm_device="com
self.core = self
self.comm.core = self

def compile(self, function, args, kwargs, set_result, with_attr_writeback=True):
def compile(self, function, args, kwargs, set_result=None, with_attr_writeback=True):
try:
engine = diagnostic.Engine(all_errors_are_fatal=True)