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: 80f0bfe0ad8b
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: 506725f78abe
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Nov 16, 2015

  1. Copy the full SHA
    b0c6b70 View commit details
  2. transforms.iodelay_estimator: fix handling of methods.

    whitequark committed Nov 16, 2015
    Copy the full SHA
    506725f View commit details
2 changes: 1 addition & 1 deletion artiq/compiler/transforms/asttyped_rewriter.py
Original file line number Diff line number Diff line change
@@ -263,7 +263,7 @@ def visit_ClassDef(self, node):

if node.name in self.env_stack[-1]:
diag = diagnostic.Diagnostic("fatal",
"variable '{name}' is already defined", {"name":name}, loc)
"variable '{name}' is already defined", {"name":node.name}, node.name_loc)
self.engine.process(diag)

extractor = LocalExtractor(env_stack=self.env_stack, engine=self.engine)
2 changes: 1 addition & 1 deletion artiq/compiler/transforms/iodelay_estimator.py
Original file line number Diff line number Diff line change
@@ -258,7 +258,7 @@ def abort(notes):
args = {}
for kw_node in node.keywords:
args[kw_node.arg] = kw_node.value
for arg_name, arg_node in zip(typ.args, node.args[offset:]):
for arg_name, arg_node in zip(list(typ.args)[offset:], node.args):
args[arg_name] = arg_node

free_vars = delay.duration.free_vars()
6 changes: 6 additions & 0 deletions lit-test/test/inferencer/error_class.py
Original file line number Diff line number Diff line change
@@ -8,3 +8,9 @@ class a(1):
class b:
# CHECK-L: ${LINE:+1}: fatal: class body must contain only assignments and function definitions
x += 1

class c:
pass
# CHECK-L: ${LINE:+1}: fatal: variable 'c' is already defined
class c:
pass
12 changes: 12 additions & 0 deletions lit-test/test/iodelay/class.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
# RUN: OutputCheck %s --file-to-check=%t

# CHECK-L: g: ()->NoneType delay(s->mu(1.0) mu)
def g(i):
i.f(1.0)

class c:
def f(self, x):
delay(x)

g(c())