artiq/artiq/test/lit/integration
Jonathan Coates 5c85cef0c2
Allow indexing tuples in kernel code
This only allows for indexing with a constant value (e.g. x[0]).

While slices would be possible to implement, it's not clear how to
preserve type inference here. The current typing rule is:

  Γ ⊢ x : τ  Γ ⊢ a : Int  Γ ⊢ b : Int
  ------------------------------------
             Γ ⊢ x[a:b] : τ

However, tuples would require a different typing rule, and so we'd need
to defer type inference if τ is a tyvar. I'm not confident that this
won't change behaviour, so we leave as-is for now.

Signed-off-by: Jonathan Coates <jonathan.coates@oxionics.com>
2023-09-12 14:43:38 +01:00
..
abs.py test/lit: Make abs() integration test slightly more interesting 2019-04-14 04:12:40 +01:00
arithmetics.py compiler: implement ~ operator (fix #836). 2017-10-01 19:33:18 +00:00
array_binops.py compiler: Implement assigning binops for arrays 2021-01-12 03:02:07 +01:00
array_broadcast.py compiler: Implement array vs. scalar broadcasting 2020-08-09 03:54:42 +01:00
array_creation.py test/lit: Rename `array` to avoid conflict with standard library 2020-11-11 17:42:53 +01:00
array_matmult.py compiler: Implement matrix multiplication 2020-08-09 03:54:42 +01:00
array_slice.py compiler: Properly implement NumPy array slicing 2021-03-14 20:02:59 +00:00
array_unaryops.py compiler: Implement unary plus/minus for arrays 2020-08-09 03:54:41 +01:00
attribute.py lit-test: move to artiq/test 2016-01-18 15:28:24 -07:00
bool.py lit-test: move to artiq/test 2016-01-18 15:28:24 -07:00
builtin.py compiler: unbreak casts to int32/int64. 2016-11-21 14:20:28 +00:00
bytes.py compiler: add support for concatenating bytes values (#714). 2017-06-09 07:10:48 +00:00
class.py lit-test: move to artiq/test 2016-01-18 15:28:24 -07:00
compare.py lit-test: move to artiq/test 2016-01-18 15:28:24 -07:00
finally.py lit-test: move to artiq/test 2016-01-18 15:28:24 -07:00
for.py compiler: Fix break/continue targets in loop else blocks 2016-11-05 02:35:01 +00:00
function.py lit-test: move to artiq/test 2016-01-18 15:28:24 -07:00
if.py compiler: coerce `while` condition to bool. 2017-07-01 18:59:07 +00:00
instance.py compiler: Raise exception on failed assert()s rather than panic 2020-11-10 00:51:24 +01:00
lambda.py lit-test: move to artiq/test 2016-01-18 15:28:24 -07:00
list.py test/lit: Move some list tests to appropriate module [nfc] 2020-08-09 03:54:41 +01:00
locals.py lit-test: move to artiq/test 2016-01-18 15:28:24 -07:00
minmax.py compiler: implement min()/max() as builtins. 2016-06-22 01:09:41 +00:00
print.py compiler: add support for printing of bytearray values (#714). 2017-06-09 07:15:25 +00:00
raise.py compiler: support short form of raise. 2016-05-10 01:41:40 +00:00
str.py Commit missing part of b4e3c30d. 2018-04-20 15:27:27 +00:00
subscript.py compiler: add support for bytearray type (#714). 2017-06-09 07:15:24 +00:00
tuple.py compiler: Fix comparison of tuples of lists 2019-03-31 17:10:27 +01:00
tuple_index.py Allow indexing tuples in kernel code 2023-09-12 14:43:38 +01:00
while.py compiler: coerce `while` condition to bool. 2017-07-01 18:59:07 +00:00
with.py lit-test: move to artiq/test 2016-01-18 15:28:24 -07:00