forked from M-Labs/artiq
1
0
Fork 0
Commit Graph

1125 Commits

Author SHA1 Message Date
whitequark 5000f87dfc Rename the field of CoerceT from expr to value. 2015-07-16 14:55:23 +03:00
whitequark e9416f4707 Convert Slice into typed SliceT. 2015-07-16 14:54:04 +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 c724e024ce Fix inference for multiple-target assignments. 2015-07-15 06:33:44 +03:00
whitequark 9ff9f85f19 Add accessors to instructions. 2015-07-14 22:18:38 +03:00
whitequark bdcb24108b Add basic IR generator. 2015-07-14 08:56:51 +03:00
whitequark f417ef31a4 Make binop coercion look through CoerceT nodes.
This fixes inference for "x = 1 + 1" after int monomorphization.
2015-07-14 06:42:09 +03:00
whitequark ebe243f8d9 Add printing of SSA functions. 2015-07-13 21:08:20 +03:00
whitequark dbdd45acc5 Add missing return. 2015-07-13 20:52:55 +03:00
whitequark 7c9afcce85 Fix Python default argument fiasco. 2015-07-13 20:52:48 +03:00
whitequark 7c52910dc5 Add a basic SSA IR. 2015-07-11 18:46:37 +03:00
whitequark 549c110e7c Fix types.TFunction.fold. 2015-07-04 04:27:24 +03:00
whitequark 4785f0a2de Don't error out in inferencer if builtin arguments have polymorphic types. 2015-07-04 04:27:15 +03:00
whitequark 16432d2652 Implement escape analysis. 2015-07-04 04:16:37 +03:00
whitequark 4358c5c453 Unbreak return type inference. 2015-07-04 02:23:55 +03:00
whitequark 561d403ddd Add missing _loc forwarding. 2015-07-04 00:59:03 +03:00
whitequark ee0990cb5e Automatically infer return type of NoneType for no return statements. 2015-07-04 00:58:48 +03:00
whitequark bfabca494b Remove regions from types.
Unification-based inference for regions is useful with a language
that has let bindings (which would propagate the regions) and
functions polymorphic over regions. For reasons of simplicity,
ARTIQ has neither, and making unification-based inference work would
essentially mean adding region coercions between most AST nodes,
and having every source subexpression have its own region variable,
with the appropriate subtyping relationship.

It's simpler to just keep that state outside of typedtree.
2015-07-02 22:55:12 +03:00
whitequark 0ae13ac1b9 Style fixes. 2015-07-02 22:38:55 +03:00
whitequark 7c833f0727 Move transforms.MonomorphismChecker to validators.MonomorphismValidator. 2015-07-02 21:54:31 +03:00
whitequark 02b41ea0f7 Add MonomorphismChecker. 2015-07-02 21:28:26 +03:00
whitequark 73a8f3c442 Fix tests. 2015-07-02 20:06:43 +03:00
whitequark 8a65266f14 Improve builtin call error message. 2015-07-02 20:06:07 +03:00
whitequark 196acb37f6 Add IntMonomorphizer. 2015-07-02 19:57:27 +03:00
whitequark 7ce9bdf54d Move transforms to artiq.compiler.transforms, add artiq.Module. 2015-07-02 19:35:35 +03:00
whitequark 1702251ee5 Add region field to types. 2015-07-02 18:44:09 +03:00
whitequark 86cdc84f7e Initialize types.TBuiltin's attributes field. 2015-07-02 18:19:01 +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 71256a7109 Assignment rhs is typed before lhs. 2015-06-26 18:35:34 +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 710a04cbee Add builtin definitions for len(), round(), range() and syscall(). 2015-06-24 11:28:24 +03:00
whitequark 8762729e80 Add types.TBuiltin. 2015-06-24 11:24:35 +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 a3789868f2 More friendly artiq.py2llvm.typing testbench. 2015-06-15 15:59:36 +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 77adf2f6b5 Add support for With. 2015-06-14 23:13:41 +03:00
whitequark cd22b8178c Add support for Raise. 2015-06-14 23:02:28 +03:00
whitequark 20b7a73b49 Add support for Compare. 2015-06-14 22:48:04 +03:00