whitequark
47f13bf921
Always load the personality library in JIT testbench, if available.
2015-07-27 04:44:40 +03:00
whitequark
14c7b15785
Add a test harness for exceptions.
...
The libunwind.h is duplicated here so that it would be possible
to test the Python parts without pulling in misoc.
2015-07-27 04:18:12 +03:00
whitequark
862ac1f90d
lit-test/compiler -> lit-test/test.
...
Other directories in lit-test will host various parts of
the test harness.
2015-07-27 04:13:29 +03:00
whitequark
ece52062f2
Implement code generation for exception handling.
2015-07-25 05:37:37 +03:00
whitequark
20f5f8217d
Make sure tests pass both on ARTIQ Python and CPython.
...
In some cases (the `is` operator and wraparound arithmetics)
the tests will only pass on ARTIQ Python. These are conditionally
commented out.
2015-07-23 08:09:25 +03:00
whitequark
65121b437f
Rework internal logic of slices.
2015-07-23 07:57:49 +03:00
whitequark
9db199cad9
Handle closure effects appropriately in LocalAccessValidator.
2015-07-23 03:15:36 +03:00
whitequark
acb8810e62
Add tests for lambdas and functions.
2015-07-23 03:07:30 +03:00
whitequark
4cfe4ea148
Make negative and too-far shifts have defined behavior.
2015-07-23 00:58:41 +03:00
whitequark
bf60978c7b
Add bool coercion support.
2015-07-22 19:15:54 +03:00
whitequark
de181e0cb9
Revert "Require boolean operand in BoolOp."
...
This reverts commit 5d518dcec6
.
2015-07-22 18:35:18 +03:00
whitequark
51aef980a0
Revert "Require boolean condition in If, While, IfExp."
...
This reverts commit e21829ce74
.
2015-07-22 18:35:14 +03:00
whitequark
f2a6110cc4
Add integration tests for every language construct.
2015-07-22 18:34:52 +03:00
whitequark
236d5b886a
Add support for Assert.
2015-07-22 02:58:59 +03:00
whitequark
5d518dcec6
Require boolean operand in BoolOp.
2015-07-21 23:46:22 +03:00
whitequark
e21829ce74
Require boolean condition in If, While, IfExp.
2015-07-21 23:39:22 +03:00
whitequark
49ece6a12a
Add support for string literals.
2015-07-21 14:27:48 +03:00
whitequark
e58b811d6d
Fix tests broken by fixed FloorDiv.
2015-07-21 14:05:07 +03:00
whitequark
7e3f91c0bb
Teach closures to LocalAccessValidator.
2015-07-19 12:08:26 +03:00
whitequark
ac491fae47
Add LocalAccessValidator.
2015-07-19 11:44:51 +03:00
whitequark
f5d9e11b38
Remove irgen tests.
...
These are too hard to write and will be replaced by integration
tests of ARTIQ IR generator + LLVM IR generator once the latter
gets implemented.
2015-07-19 11:30:53 +03:00
whitequark
21eafefd28
Fix inference for globals.
2015-07-18 08:13:49 +03:00
whitequark
53fb03d1bf
Restrict comprehensions to single for and no if clauses.
2015-07-16 14:52:41 +03:00
whitequark
227f97f8a3
Add inference for Index, Slice and ExtSlice.
2015-07-16 04:22:41 +03:00
whitequark
bdcb24108b
Add basic IR generator.
2015-07-14 08:56:51 +03:00
whitequark
02b41ea0f7
Add MonomorphismChecker.
2015-07-02 21:28:26 +03:00
whitequark
7ce9bdf54d
Move transforms to artiq.compiler.transforms, add artiq.Module.
2015-07-02 19:35:35 +03:00
whitequark
6bf95397d7
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.
2015-06-29 20:15:22 +03:00
whitequark
f430bf3f63
Add support for exceptions.
2015-06-29 00:35:48 +03:00
whitequark
a4a9cd884e
Add exception constructor types.
2015-06-28 22:48:15 +03:00
whitequark
9044e88983
Elaborate hierarchy of builtins.
2015-06-28 22:40:57 +03:00
whitequark
ea0d11b8be
Allow also passing iterables to lists.
2015-06-26 19:14:24 +03:00
whitequark
e07057c224
Add range types.
2015-06-26 18:53:20 +03:00
whitequark
7cd6011981
Add typechecking for most builtin.
2015-06-26 11:16:08 +03:00
whitequark
752031147d
Add valid forms for builtin calls.
2015-06-24 12:16:17 +03:00
whitequark
4d407ace4b
Implement prelude.
2015-06-24 11:46:15 +03:00
whitequark
3adb4150f4
Fix type of Call.
2015-06-15 17:16:44 +03:00
whitequark
8c5e58f83c
Implement Call.
2015-06-15 16:55:13 +03:00
whitequark
7a00a4a47f
Fix typo in a test.
2015-06-15 16:00:19 +03:00
whitequark
20e0e69358
Add support for function types and LambdaT.
...
Also fix scoping of Nonlocal.
2015-06-15 11:30:50 +03:00
whitequark
dbfdbc3c22
Add check for duplicate parameter names.
2015-06-15 09:05:24 +03:00
whitequark
d27bb3168d
Add support for ListComp.
2015-06-15 08:40:37 +03:00
whitequark
20b7a73b49
Add support for Compare.
2015-06-14 22:48:04 +03:00
whitequark
fe69c5b465
Implement BinOp coercion rules for AugAssign.
2015-06-14 13:10:32 +03:00
whitequark
7b78e7de67
Add support for BinOp.
2015-06-14 12:07:13 +03:00
whitequark
faaf189961
Add support for Attribute.
2015-06-13 13:50:56 +03:00
whitequark
23f33d7239
Invert operand should be integer.
2015-06-13 13:45:09 +03:00
whitequark
4b4805265d
Add support for Break and Continue.
2015-06-13 12:10:30 +03:00
whitequark
c89bf6fae0
Add support for UnaryOp.
2015-06-12 08:59:41 +03:00
whitequark
e18ea0daae
Better error reporting for List.
2015-06-11 04:36:52 +03:00
whitequark
4b7d4c2425
Add support for BoolOp.
2015-06-11 04:36:51 +03:00
whitequark
b8ce3f85bd
Refactor error reporting in _unify to factor out custom notes.
2015-06-11 04:36:28 +03:00
whitequark
ba9a7d087d
Add support for IfExp.
2015-06-11 04:36:03 +03:00
whitequark
159692339d
Add tests for all diagnostics and unifications.
2015-06-06 18:05:06 +03:00
whitequark
98fe152159
Add lit-based tests for diagnostics.
2015-06-06 17:15:06 +03:00
whitequark
7f77632f1a
Add lit-based tests for type inferencer.
2015-06-06 16:58:23 +03:00