artiq/artiq/compiler
David Nadlinger 4f311e7448 compiler: Raise exception on failed assert()s rather than panic
This allows assert() to be used on Zynq, where abort() is not
currently implemented for kernels. Furthermore, this is arguably
the more natural implementation of assertions on all kernel targets
(i.e. where embedding into host Python is used), as it matches host
Python behavior, and the exception information actually makes it to
the user rather than leading to a ConnectionClosed error.

Since this does not implement printing of the subexpressions, I
left the old print+abort implementation as default for the time
being.

The lit/integration/instance.py diff isn't just a spurious change;
the exception-based assert implementation exposes a limitation in
the existing closure lifetime tracking algorithm (which is not
supposed to be what is tested there).

GitHub: Fixes #1539.
2020-11-10 00:51:24 +01:00
..
algorithms compiler: do not associate SSA values with iodelay even when inlining. 2015-12-25 15:02:33 +08:00
analyses compiler: Constness is a validator, not analysis. 2017-06-09 07:29:31 +00:00
testbench use tokenize.open() to open Python source files 2018-07-07 17:04:56 +08:00
transforms compiler: Raise exception on failed assert()s rather than panic 2020-11-10 00:51:24 +01:00
validators compiler: T{C -> External}Function, clarify docs [nfc] 2020-08-09 03:54:41 +01:00
__init__.py compiler: pull in dependencies in more finely grained way (fixes #181). 2015-11-24 17:32:04 +08:00
asttyped.py compiler: allow specifying per-function "fast-math" flags. 2016-03-28 21:44:08 +00:00
builtins.py compiler: T{C -> External}Function, clarify docs [nfc] 2020-08-09 03:54:41 +01:00
embedding.py compiler: Support numpy.float 2020-08-09 17:08:43 +01:00
import_cache.py import_cache: make sure last line ends with \n as linecache does. Closes #547 2016-09-02 11:01:28 +08:00
iodelay.py compiler.iodelay: correctly fold max(0, [0, ]...). 2015-11-24 00:46:55 +08:00
ir.py compiler/firmware: RPCs for ndarrays 2020-08-09 17:08:43 +01:00
math_fns.py compiler: Add math_fns module docstring [nfc] 2020-10-31 19:06:00 +01:00
module.py compiler: Raise exception on failed assert()s rather than panic 2020-11-10 00:51:24 +01:00
prelude.py compiler: Implement abs() for scalars 2019-04-13 13:39:16 +08:00
targets.py compiler: Raise exception on failed assert()s rather than panic 2020-11-10 00:51:24 +01:00
types.py compiler: Implement broadcasting of math functions 2020-08-09 03:54:42 +01:00