From 6bf95397d798fd47f4278962d4cd9faea2b34fa3 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 29 Jun 2015 20:12:09 +0300 Subject: [PATCH] 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. --- artiq/{py2llvm => compiler}/__init__.py | 0 artiq/{py2llvm => compiler}/asttyped.py | 0 artiq/{py2llvm => compiler}/builtins.py | 0 artiq/{py2llvm => compiler}/prelude.py | 0 artiq/{py2llvm => compiler}/types.py | 0 artiq/{py2llvm => compiler}/typing.py | 2 +- lit-test/{py2llvm => compiler}/typing/builtin_calls.py | 2 +- lit-test/{py2llvm => compiler}/typing/coerce.py | 2 +- lit-test/{py2llvm => compiler}/typing/error_builtin_calls.py | 2 +- lit-test/{py2llvm => compiler}/typing/error_call.py | 2 +- lit-test/{py2llvm => compiler}/typing/error_coerce.py | 4 ++-- lit-test/{py2llvm => compiler}/typing/error_control_flow.py | 2 +- lit-test/{py2llvm => compiler}/typing/error_exception.py | 2 +- lit-test/{py2llvm => compiler}/typing/error_iterable.py | 2 +- lit-test/{py2llvm => compiler}/typing/error_local_unbound.py | 2 +- lit-test/{py2llvm => compiler}/typing/error_locals.py | 2 +- lit-test/{py2llvm => compiler}/typing/error_return.py | 2 +- lit-test/{py2llvm => compiler}/typing/error_unify.py | 2 +- lit-test/{py2llvm => compiler}/typing/exception.py | 2 +- lit-test/{py2llvm => compiler}/typing/gcd.py | 2 +- lit-test/{py2llvm => compiler}/typing/prelude.py | 2 +- lit-test/{py2llvm => compiler}/typing/scoping.py | 2 +- lit-test/{py2llvm => compiler}/typing/unify.py | 2 +- 23 files changed, 19 insertions(+), 19 deletions(-) rename artiq/{py2llvm => compiler}/__init__.py (100%) rename artiq/{py2llvm => compiler}/asttyped.py (100%) rename artiq/{py2llvm => compiler}/builtins.py (100%) rename artiq/{py2llvm => compiler}/prelude.py (100%) rename artiq/{py2llvm => compiler}/types.py (100%) rename artiq/{py2llvm => compiler}/typing.py (99%) rename lit-test/{py2llvm => compiler}/typing/builtin_calls.py (93%) rename lit-test/{py2llvm => compiler}/typing/coerce.py (96%) rename lit-test/{py2llvm => compiler}/typing/error_builtin_calls.py (88%) rename lit-test/{py2llvm => compiler}/typing/error_call.py (89%) rename lit-test/{py2llvm => compiler}/typing/error_coerce.py (92%) rename lit-test/{py2llvm => compiler}/typing/error_control_flow.py (89%) rename lit-test/{py2llvm => compiler}/typing/error_exception.py (84%) rename lit-test/{py2llvm => compiler}/typing/error_iterable.py (70%) rename lit-test/{py2llvm => compiler}/typing/error_local_unbound.py (67%) rename lit-test/{py2llvm => compiler}/typing/error_locals.py (94%) rename lit-test/{py2llvm => compiler}/typing/error_return.py (90%) rename lit-test/{py2llvm => compiler}/typing/error_unify.py (93%) rename lit-test/{py2llvm => compiler}/typing/exception.py (80%) rename lit-test/{py2llvm => compiler}/typing/gcd.py (84%) rename lit-test/{py2llvm => compiler}/typing/prelude.py (76%) rename lit-test/{py2llvm => compiler}/typing/scoping.py (69%) rename lit-test/{py2llvm => compiler}/typing/unify.py (95%) diff --git a/artiq/py2llvm/__init__.py b/artiq/compiler/__init__.py similarity index 100% rename from artiq/py2llvm/__init__.py rename to artiq/compiler/__init__.py diff --git a/artiq/py2llvm/asttyped.py b/artiq/compiler/asttyped.py similarity index 100% rename from artiq/py2llvm/asttyped.py rename to artiq/compiler/asttyped.py diff --git a/artiq/py2llvm/builtins.py b/artiq/compiler/builtins.py similarity index 100% rename from artiq/py2llvm/builtins.py rename to artiq/compiler/builtins.py diff --git a/artiq/py2llvm/prelude.py b/artiq/compiler/prelude.py similarity index 100% rename from artiq/py2llvm/prelude.py rename to artiq/compiler/prelude.py diff --git a/artiq/py2llvm/types.py b/artiq/compiler/types.py similarity index 100% rename from artiq/py2llvm/types.py rename to artiq/compiler/types.py diff --git a/artiq/py2llvm/typing.py b/artiq/compiler/typing.py similarity index 99% rename from artiq/py2llvm/typing.py rename to artiq/compiler/typing.py index dc4ffdb33..3c8c62f76 100644 --- a/artiq/py2llvm/typing.py +++ b/artiq/compiler/typing.py @@ -639,7 +639,7 @@ class Inferencer(algorithm.Visitor): if types.is_tuple(left.type) or types.is_tuple(right.type): tuple_, other = self._order_by_pred(types.is_tuple, left, right) diag = diagnostic.Diagnostic("error", - "py2llvm does not support passing tuples to '*'", {}, + "passing tuples to '*' is not supported", {}, op.loc, [tuple_.loc]) self.engine.process(diag) return diff --git a/lit-test/py2llvm/typing/builtin_calls.py b/lit-test/compiler/typing/builtin_calls.py similarity index 93% rename from lit-test/py2llvm/typing/builtin_calls.py rename to lit-test/compiler/typing/builtin_calls.py index 7d72895e6..82c750bf1 100644 --- a/lit-test/py2llvm/typing/builtin_calls.py +++ b/lit-test/compiler/typing/builtin_calls.py @@ -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 # CHECK-L: bool:():bool diff --git a/lit-test/py2llvm/typing/coerce.py b/lit-test/compiler/typing/coerce.py similarity index 96% rename from lit-test/py2llvm/typing/coerce.py rename to lit-test/compiler/typing/coerce.py index 34df20e7e..5b161ab30 100644 --- a/lit-test/py2llvm/typing/coerce.py +++ b/lit-test/compiler/typing/coerce.py @@ -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 1 | 2 diff --git a/lit-test/py2llvm/typing/error_builtin_calls.py b/lit-test/compiler/typing/error_builtin_calls.py similarity index 88% rename from lit-test/py2llvm/typing/error_builtin_calls.py rename to lit-test/compiler/typing/error_builtin_calls.py index caf77b1a8..858df6d4a 100644 --- a/lit-test/py2llvm/typing/error_builtin_calls.py +++ b/lit-test/compiler/typing/error_builtin_calls.py @@ -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 a = 1 diff --git a/lit-test/py2llvm/typing/error_call.py b/lit-test/compiler/typing/error_call.py similarity index 89% rename from lit-test/py2llvm/typing/error_call.py rename to lit-test/compiler/typing/error_call.py index 2d95078ac..2ff169faf 100644 --- a/lit-test/py2llvm/typing/error_call.py +++ b/lit-test/compiler/typing/error_call.py @@ -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 # CHECK-L: ${LINE:+1}: error: cannot call this expression of type int diff --git a/lit-test/py2llvm/typing/error_coerce.py b/lit-test/compiler/typing/error_coerce.py similarity index 92% rename from lit-test/py2llvm/typing/error_coerce.py rename to lit-test/compiler/typing/error_coerce.py index 0ac65724f..feb7447b8 100644 --- a/lit-test/py2llvm/typing/error_coerce.py +++ b/lit-test/compiler/typing/error_coerce.py @@ -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 # 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 (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 # CHECK-L: ${LINE:+3}: error: expected '*' operands to be a list and an integer in this context diff --git a/lit-test/py2llvm/typing/error_control_flow.py b/lit-test/compiler/typing/error_control_flow.py similarity index 89% rename from lit-test/py2llvm/typing/error_control_flow.py rename to lit-test/compiler/typing/error_control_flow.py index ea72347dd..c5a913bdd 100644 --- a/lit-test/py2llvm/typing/error_control_flow.py +++ b/lit-test/compiler/typing/error_control_flow.py @@ -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 # CHECK-L: ${LINE:+1}: error: return statement outside of a function diff --git a/lit-test/py2llvm/typing/error_exception.py b/lit-test/compiler/typing/error_exception.py similarity index 84% rename from lit-test/py2llvm/typing/error_exception.py rename to lit-test/compiler/typing/error_exception.py index e418b9b8a..4172f7bde 100644 --- a/lit-test/py2llvm/typing/error_exception.py +++ b/lit-test/compiler/typing/error_exception.py @@ -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 try: diff --git a/lit-test/py2llvm/typing/error_iterable.py b/lit-test/compiler/typing/error_iterable.py similarity index 70% rename from lit-test/py2llvm/typing/error_iterable.py rename to lit-test/compiler/typing/error_iterable.py index 63382614f..d3334a616 100644 --- a/lit-test/py2llvm/typing/error_iterable.py +++ b/lit-test/compiler/typing/error_iterable.py @@ -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 # CHECK-L: ${LINE:+1}: error: type int(width='a) is not iterable diff --git a/lit-test/py2llvm/typing/error_local_unbound.py b/lit-test/compiler/typing/error_local_unbound.py similarity index 67% rename from lit-test/py2llvm/typing/error_local_unbound.py rename to lit-test/compiler/typing/error_local_unbound.py index ceb61da83..fdf1b3047 100644 --- a/lit-test/py2llvm/typing/error_local_unbound.py +++ b/lit-test/compiler/typing/error_local_unbound.py @@ -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 # CHECK-L: ${LINE:+1}: fatal: name 'x' is not bound to anything diff --git a/lit-test/py2llvm/typing/error_locals.py b/lit-test/compiler/typing/error_locals.py similarity index 94% rename from lit-test/py2llvm/typing/error_locals.py rename to lit-test/compiler/typing/error_locals.py index 836029b55..048295d2c 100644 --- a/lit-test/py2llvm/typing/error_locals.py +++ b/lit-test/compiler/typing/error_locals.py @@ -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 x = 1 diff --git a/lit-test/py2llvm/typing/error_return.py b/lit-test/compiler/typing/error_return.py similarity index 90% rename from lit-test/py2llvm/typing/error_return.py rename to lit-test/compiler/typing/error_return.py index a84fe8d22..fff45ed0b 100644 --- a/lit-test/py2llvm/typing/error_return.py +++ b/lit-test/compiler/typing/error_return.py @@ -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 # CHECK-L: ${LINE:+2}: error: cannot unify int(width='a) with NoneType diff --git a/lit-test/py2llvm/typing/error_unify.py b/lit-test/compiler/typing/error_unify.py similarity index 93% rename from lit-test/py2llvm/typing/error_unify.py rename to lit-test/compiler/typing/error_unify.py index 3abef5b13..076be96f4 100644 --- a/lit-test/py2llvm/typing/error_unify.py +++ b/lit-test/compiler/typing/error_unify.py @@ -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 a = 1 diff --git a/lit-test/py2llvm/typing/exception.py b/lit-test/compiler/typing/exception.py similarity index 80% rename from lit-test/py2llvm/typing/exception.py rename to lit-test/compiler/typing/exception.py index e7ce38b8d..32046157f 100644 --- a/lit-test/py2llvm/typing/exception.py +++ b/lit-test/compiler/typing/exception.py @@ -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 # CHECK-L: Exception: diff --git a/lit-test/py2llvm/typing/gcd.py b/lit-test/compiler/typing/gcd.py similarity index 84% rename from lit-test/py2llvm/typing/gcd.py rename to lit-test/compiler/typing/gcd.py index 08c589535..c79052d89 100644 --- a/lit-test/py2llvm/typing/gcd.py +++ b/lit-test/compiler/typing/gcd.py @@ -1,4 +1,4 @@ -# RUN: %python -m artiq.py2llvm.typing %s >%t +# RUN: %python -m artiq.compiler.typing %s >%t def _gcd(a, b): if a < 0: diff --git a/lit-test/py2llvm/typing/prelude.py b/lit-test/compiler/typing/prelude.py similarity index 76% rename from lit-test/py2llvm/typing/prelude.py rename to lit-test/compiler/typing/prelude.py index 007c8d3a4..1b70be299 100644 --- a/lit-test/py2llvm/typing/prelude.py +++ b/lit-test/compiler/typing/prelude.py @@ -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 # CHECK-L: x: diff --git a/lit-test/py2llvm/typing/scoping.py b/lit-test/compiler/typing/scoping.py similarity index 69% rename from lit-test/py2llvm/typing/scoping.py rename to lit-test/compiler/typing/scoping.py index 96eefeb14..1d1da612c 100644 --- a/lit-test/py2llvm/typing/scoping.py +++ b/lit-test/compiler/typing/scoping.py @@ -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 def f(): diff --git a/lit-test/py2llvm/typing/unify.py b/lit-test/compiler/typing/unify.py similarity index 95% rename from lit-test/py2llvm/typing/unify.py rename to lit-test/compiler/typing/unify.py index f41fb10d5..9621c5b59 100644 --- a/lit-test/py2llvm/typing/unify.py +++ b/lit-test/compiler/typing/unify.py @@ -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 a = 1