mirror of https://github.com/m-labs/artiq.git
Rename package py2llvm to compiler.
Since the package implements a typechecker along with a code generator, and the typechecker will be run before or together with transformations, this name is more descriptive.
This commit is contained in:
parent
f430bf3f63
commit
6bf95397d7
|
@ -639,7 +639,7 @@ class Inferencer(algorithm.Visitor):
|
||||||
if types.is_tuple(left.type) or types.is_tuple(right.type):
|
if types.is_tuple(left.type) or types.is_tuple(right.type):
|
||||||
tuple_, other = self._order_by_pred(types.is_tuple, left, right)
|
tuple_, other = self._order_by_pred(types.is_tuple, left, right)
|
||||||
diag = diagnostic.Diagnostic("error",
|
diag = diagnostic.Diagnostic("error",
|
||||||
"py2llvm does not support passing tuples to '*'", {},
|
"passing tuples to '*' is not supported", {},
|
||||||
op.loc, [tuple_.loc])
|
op.loc, [tuple_.loc])
|
||||||
self.engine.process(diag)
|
self.engine.process(diag)
|
||||||
return
|
return
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing %s >%t
|
# RUN: %python -m artiq.compiler.typing %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: bool:<constructor bool>():bool
|
# CHECK-L: bool:<constructor bool>():bool
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing %s >%t
|
# RUN: %python -m artiq.compiler.typing %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
1 | 2
|
1 | 2
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
a = 1
|
a = 1
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: ${LINE:+1}: error: cannot call this expression of type int
|
# CHECK-L: ${LINE:+1}: error: cannot call this expression of type int
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: ${LINE:+1}: error: expected '<<' operand to be of integer type, not float
|
# CHECK-L: ${LINE:+1}: error: expected '<<' operand to be of integer type, not float
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
# CHECK-L: ${LINE:+1}: note: int(width='b), which cannot be added to a tuple
|
# CHECK-L: ${LINE:+1}: note: int(width='b), which cannot be added to a tuple
|
||||||
(1,) + 2
|
(1,) + 2
|
||||||
|
|
||||||
# CHECK-L: ${LINE:+1}: error: py2llvm does not support passing tuples to '*'
|
# CHECK-L: ${LINE:+1}: error: passing tuples to '*' is not supported
|
||||||
(1,) * 2
|
(1,) * 2
|
||||||
|
|
||||||
# CHECK-L: ${LINE:+3}: error: expected '*' operands to be a list and an integer in this context
|
# CHECK-L: ${LINE:+3}: error: expected '*' operands to be a list and an integer in this context
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: ${LINE:+1}: error: return statement outside of a function
|
# CHECK-L: ${LINE:+1}: error: return statement outside of a function
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
try:
|
try:
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: ${LINE:+1}: error: type int(width='a) is not iterable
|
# CHECK-L: ${LINE:+1}: error: type int(width='a) is not iterable
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: ${LINE:+1}: fatal: name 'x' is not bound to anything
|
# CHECK-L: ${LINE:+1}: fatal: name 'x' is not bound to anything
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
x = 1
|
x = 1
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: ${LINE:+2}: error: cannot unify int(width='a) with NoneType
|
# CHECK-L: ${LINE:+2}: error: cannot unify int(width='a) with NoneType
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
# RUN: %python -m artiq.compiler.typing +diag %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
a = 1
|
a = 1
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing %s >%t
|
# RUN: %python -m artiq.compiler.typing %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: Exception:<constructor Exception>
|
# CHECK-L: Exception:<constructor Exception>
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing %s >%t
|
# RUN: %python -m artiq.compiler.typing %s >%t
|
||||||
|
|
||||||
def _gcd(a, b):
|
def _gcd(a, b):
|
||||||
if a < 0:
|
if a < 0:
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing %s >%t
|
# RUN: %python -m artiq.compiler.typing %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: x:<function len>
|
# CHECK-L: x:<function len>
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing %s >%t
|
# RUN: %python -m artiq.compiler.typing %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
def f():
|
def f():
|
|
@ -1,4 +1,4 @@
|
||||||
# RUN: %python -m artiq.py2llvm.typing %s >%t
|
# RUN: %python -m artiq.compiler.typing %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
a = 1
|
a = 1
|
Loading…
Reference in New Issue