Commit Graph

537 Commits

Author SHA1 Message Date
whitequark ebae6d248f compiler: unbreak casts to int32/int64. 2016-11-21 14:22:35 +00:00
whitequark ebb3205dff analyses.constness: fix false positive on x[...]. 2016-11-21 14:22:34 +00:00
whitequark fd1d77767e inferencer: significantly improve the op-assignment diagnostic.
Before this commit, it displayed incorrect output if an error
appeared on 2nd run and beyond, and displayed messages for trying
to do "num32 -= num64" that made very little sense.
2016-11-21 14:22:32 +00:00
whitequark 372e8f9b2b llvm_ir_generator: handle no-op coercions. 2016-11-21 10:58:42 +08:00
whitequark b85ab712a9 artiq_compile: actually disable attribute writeback.
I wrote both halves of this condition but forgot to hook
them together.

Fixes #586.
2016-11-10 01:04:48 +00:00
David Nadlinger f368e1b228 compiler: Clarify recv_rpc value names and documentation [nfc]
Previously, the phi emitted for the pointer parameter to recv_rpc was –
rather confusingly – called "size", and the pseudo-code in the comment
had bit-rotted.

Signed-off-by: David Nadlinger <code@klickverbot.at>
2016-11-07 22:47:18 +08:00
David Nadlinger 4c2e921270 compiler: Fix break/continue targets in loop else blocks
Previously, they would still target the respective labels in the
just-exited loop.

Signed-off-by: David Nadlinger <code@klickverbot.at>
2016-11-05 17:27:36 +08:00
whitequark 6f2125258c compiler: skip kernel_invariant linting for exception types. 2016-09-14 21:49:43 -04:00
whitequark ecb01d055f compiler: warn about unused kernel_invariant entries.
Fixes #543.
2016-09-14 21:49:43 -04:00
Sebastien Bourdeauducq c9eeddbb9f import_cache: make sure last line ends with \n as linecache does. Closes #547 2016-09-02 11:02:40 +08:00
whitequark 5f5975844a Revert "Update for LLVM 3.9."
This reverts commit 3aa7b99b8f.
2016-08-13 04:43:19 +00:00
whitequark 3aa7b99b8f Update for LLVM 3.9. 2016-08-13 03:28:04 +00:00
whitequark 1a518ea7eb compiler.embedding: implement string concatenation.
Fixes #526.
2016-08-08 04:05:52 +00:00
whitequark 5a2306ae5a compiler.embedding: implement type annotations for function arguments.
Fixes #318.
2016-08-08 03:28:25 +00:00
Sebastien Bourdeauducq 84f4725015 cache source on import of modules that may contain kernels. Closes #416 2016-08-06 12:01:49 +08:00
whitequark 21bc285604 transforms.llvm_ir_generator: skip RPC values for attribute writeback. 2016-08-03 04:59:14 +00:00
whitequark c50d436f0b ir: `invoke` is a valid `delay` decomposition.
Fixes #510.
2016-07-13 08:48:31 +00:00
whitequark c5ba44b8a6 compiler.testbench.perf_embedding: more fine grained reporting. 2016-07-11 17:55:24 +00:00
whitequark c4dc4e7bf5 compiler.testbench.perf_embedding: update for core changes. 2016-07-08 10:48:41 +00:00
whitequark 5a79fcf9ba embedding: reimplement 373578bc properly.
The core of the problem that 373578bc was attempting to solve is
that diagnostics sometimes should be chained; one way of chaining
is the loc.expanded_from feature, which handles macro-like expansion,
but another is providing context.

Before this commit, context was provided using an ad-hoc override
of a diagnostic engine, which did not work in cases where diagnostic
engine was not threaded through the call stack. This commit uses
the newly added pythonparser context feature to elegantly handle
the problem.
2016-07-07 11:49:21 +00:00
whitequark 373578bc02 embedding: fix location for diagnostics on quoted values.
Fixes #489.
2016-07-07 08:32:56 +00:00
whitequark d90fd7dc00 compiler: implement numpy.full (#424). 2016-07-07 06:33:38 +00:00
whitequark 7a671fb2fd embedding: treat numpy.{int32,int64,array} specially (#424).
Also, remove them from prelude to not pollute the namespace.
2016-07-07 06:33:38 +00:00
whitequark 933ea53c77 compiler: add basic numpy array support (#424). 2016-07-06 09:51:57 +00:00
whitequark 906db876a6 language: replace coredevice int with numpy.{int32,int64}.
Fixes #453.
2016-07-06 04:44:21 +00:00
whitequark fa71b40c80 compiler: print the builtin type int(width=...) as np.int... 2016-07-06 04:22:51 +00:00
whitequark ef2af8c331 compiler.embedding: use the builtin print as RPC.
Fixes #206.
2016-06-28 04:42:41 +00:00
whitequark 6155f65366 compiler: remove now()/at().
Fixes #490.
2016-06-28 04:39:14 +00:00
whitequark 21574bdfa9 compiler.embedding: rename user-defined types with identical names.
Fixes #478.
2016-06-22 01:32:01 +00:00
whitequark 33e8e59cc7 compiler: implement min()/max() as builtins.
Fixes #239.
2016-06-22 01:09:41 +00:00
whitequark 77d47c2fdd transforms.artiq_ir_generator: split out finally→reraise control flow.
This makes it accessible to introspect by local access validator,
making some previously rejected code valid.

Fixes #331.
2016-06-22 00:57:32 +00:00
whitequark f2ae24da39 compiler: add support for Python modules.
Fixes #408.
2016-06-21 23:35:07 +00:00
whitequark c0e42bbfc8 compiler.embedding: always do one final inference pass.
Fixes #477.
2016-06-16 14:18:43 +00:00
whitequark 26117e8d93 transforms.inferencer: allow variable as type of `n` in `[]*n`.
Fixes #473.
2016-06-16 13:35:00 +00:00
whitequark e47538ca33 analyzer: explicitly delimit messages (with \x1D).
Fixes #461.
2016-06-07 11:26:49 +00:00
whitequark 355af3e569 embedding: specialize inherited functions.
Fixes #414.
2016-05-16 15:59:26 +00:00
whitequark 640022122b embedding: refactor some more. 2016-05-16 14:38:09 +00:00
whitequark d085d5a372 embedding: refactor. 2016-05-16 14:38:09 +00:00
whitequark c94c411fd5 compiler: demangle symbols.
In future commits we'll add Itanium C++ ABI style mangling to ARTIQ
emitted function names.
2016-05-16 14:38:09 +00:00
whitequark 0826ceb8ba Commit missing parts of a5bb4a24. 2016-05-10 02:12:57 +00:00
whitequark a5bb4a24af compiler: support short form of raise.
Fixes #240.
2016-05-10 01:41:40 +00:00
whitequark 6d29e768a5 Commit missing parts of 4e5d75295. 2016-05-09 12:51:24 +00:00
whitequark 4e5d752951 compiler: fix quoting of methods (fixes #423). 2016-05-09 12:25:57 +00:00
whitequark f7d83e9bdf compiler: make kernel_invariant an instance, not class, property.
Fixes #409.
2016-04-29 13:06:11 +00:00
whitequark aa0882a06f embedding: ignore empty lines, like annotations, before kernel functions.
Fixes #363.
2016-04-26 02:25:08 +00:00
whitequark a88425b66b compiler: allow RPCing builtin functions.
Fixes #366.
2016-04-26 01:31:17 +00:00
whitequark 1464bae6b7 compiler: don't typecheck RPCs except for return type.
Fixes #260.
2016-04-26 01:12:36 +00:00
whitequark 9cc9e8b276 embedding: s/kernel_constant_attributes/kernel_invariants/g
Requested in #359.
2016-04-06 22:38:31 +00:00
whitequark 8b1c5e3a26 llvm_ir_generator: add fast-math flags to fcmp.
This is allowed in 3.8.
2016-04-05 00:48:41 +00:00
whitequark ad83b092fa llvm_ir_generator: change !{→unconditionally_}dereferenceable.
Since LLVM 3.8, !dereferenceable is weaker, so we introduce
!unconditionally_dereferenceable (http://reviews.llvm.org/D18738)
to regain its functionality.
2016-04-05 00:48:41 +00:00