Commit graph

734 commits

Author SHA1 Message Date
Ayaz Hafiz
1460f60ab1
Unify material recursion variables behind aliases and opaques
Even if there are no changes to alias arguments, and no new variables were
introduced, we may still need to unify the "actual types" of the alias or opaque!

The unification is not necessary from a types perspective (and in fact, we may want
to disable it for `roc check` later on), but it is necessary for the monomorphizer,
which expects identical types to be reflected in the same variable.

As a concrete example, consider the unification of two opaques

  P := [Zero, Succ P]

  (@P (Succ n)) ~ (@P (Succ o))

`P` has no arguments, and unification of the surface of `P` introduces nothing new.
But if we do not unify the types of `n` and `o`, which are recursion variables, they
will remain disjoint! Currently, the implication of this is that they will be seen
to have separate recursive memory layouts in the monomorphizer - which is no good
for our compilation model.

Closes #3653
2022-07-29 11:03:47 -04:00
Brian Carroll
ef47ced57a
test_gen: Update FromWasm32Memory to correctly decode capacity for List and Str 2022-07-29 15:19:02 +02:00
Brian Carroll
82e514678e
wasm: Add a test to ensure list literals have initialized capacity 2022-07-29 15:11:28 +02:00
Folkert
d90fbbb032
remove duplicate test 2022-07-29 14:42:26 +02:00
Folkert
47bbef30e8
when on 128-bit numbers 2022-07-29 14:09:50 +02:00
Brian Carroll
0041d4f3bc
wasm: Fix shiftRightBy for U8 and U16 2022-07-29 14:05:39 +02:00
Folkert
d0f1500dad
implement when on multiple string patterns 2022-07-29 12:13:21 +02:00
Folkert de Vries
21fe0ca559
Merge pull request #3639 from rtfeldman/expect-lists
Tests for expect output
2022-07-28 08:53:58 +02:00
Folkert
a60a49bce6
dev backend cannot compare floats 2022-07-27 14:46:46 +02:00
Folkert
b24c9e33d7
make test_gen a package 2022-07-27 13:49:23 +02:00
Folkert
40d7e94a17
make the mmapped buffer configurable 2022-07-26 23:36:25 +02:00
Folkert
f011748526
fix duplicate test failing llvm wasm tests 2022-07-26 18:22:05 +02:00
Richard Feldman
11ba64c249
Merge pull request #3608 from rtfeldman/more-list-builtins
More `List` builtins
2022-07-25 15:23:45 -04:00
Folkert de Vries
d212dffa1a
Merge pull request #3616 from rtfeldman/i3614
Compile branches in the presence of degenerate patterns
2022-07-25 19:45:36 +02:00
Folkert
67c736948b
fix wasm test 2022-07-25 19:15:40 +02:00
Richard Feldman
f216224495
Fix off-by-one in List.splitFirst and splitLast 2022-07-25 19:15:38 +02:00
Richard Feldman
7cf5732001
Add List.startsWith and endsWith gen tests 2022-07-25 19:15:38 +02:00
Richard Feldman
bdfcabd803
Add List.findLast gen tests 2022-07-25 19:15:37 +02:00
Richard Feldman
c3cfc0d396
Add List.findLastIndex gen tests 2022-07-25 19:15:37 +02:00
Richard Feldman
5520a82bfe
Re-enable and expand list_find_empty_layout 2022-07-25 19:15:35 +02:00
Richard Feldman
f3b8025d8d
Rename List.find and findIndex to include 'First' 2022-07-25 19:15:32 +02:00
Richard Feldman
a9483e4098
Merge pull request #3626 from rtfeldman/llvm-wasm-tests
Llvm wasm tests
2022-07-24 17:12:19 -04:00
Ayaz Hafiz
79dcec705d
Disable wasm test for now 2022-07-24 16:07:26 -04:00
Brendan Hansknecht
3e82d30e89
Merge pull request #3619 from rtfeldman/gen-dev/array
Gen dev/array
2022-07-24 18:21:20 +00:00
Folkert
916ab396c0
don't read uninitialized memory 2022-07-24 17:53:59 +02:00
Folkert
7953da1c71
clippy 2022-07-24 16:33:57 +02:00
Folkert
425004dd28
remove duplicate test 2022-07-24 15:49:21 +02:00
Folkert
6e12ac191d
check i128 alignment for wasm too 2022-07-24 14:11:52 +02:00
Folkert
91a11a70af
fix str_walk_utf8_with_index 2022-07-24 14:04:41 +02:00
Folkert
8d4a770373
return list instead of nat 2022-07-24 13:48:06 +02:00
Folkert
4b5432328b
update tag tests 2022-07-24 13:42:06 +02:00
Folkert
60b7f2cf94
additional 32-bit string layout tests 2022-07-24 13:38:11 +02:00
Folkert
df865222bf
Nat overflow is different between targets 2022-07-24 12:53:03 +02:00
Folkert
69fb5e2cef
disable test for wasm that uses pointers 2022-07-24 12:20:29 +02:00
Folkert
29ad54e5d1
rename wasm llvm test wrapper (now it's the same as dev) 2022-07-24 12:20:17 +02:00
Folkert
bece4342ec
improvements to llvm+wasm test running
- run only the wasm tests
- nicer linker error reporting
2022-07-24 12:17:10 +02:00
Folkert
f5c23a219a
remove assert_non_opt_evals_to 2022-07-24 12:12:28 +02:00
Folkert
e1b427839b
implement wasm traits for roc_std::{I128, U128} 2022-07-24 12:07:27 +02:00
Folkert
754dbf4546
make dict/set tests return i64 instead of usize (for wasm) 2022-07-24 11:55:09 +02:00
Folkert
4e83b4352a
reliable i128 alignment 2022-07-24 01:30:10 +02:00
Brendan Hansknecht
35a452a69b
setup partially functional array loading 2022-07-23 07:52:37 -07:00
Brendan Hansknecht
8b672a3fcd
enable empty list test and fix list init 2022-07-23 07:52:37 -07:00
Folkert
93c331e1aa
Merge remote-tracking branch 'origin/trunk' into tag-alignment 2022-07-23 14:27:06 +02:00
Folkert de Vries
d55d1b00d9
Merge pull request #3611 from rtfeldman/i3266
Emit runtime error when tag unions have an error type
2022-07-23 01:28:55 +02:00
Ayaz Hafiz
59ab1da83f
Compile branches in the presence of degenerate patterns
Closes #3614
2022-07-22 18:16:02 -04:00
Ayaz Hafiz
4031770836
Mark branch patterns degenerate when they don't bind symbols body needs 2022-07-22 17:26:45 -04:00
Richard Feldman
bf8711f2cb
Merge pull request #3605 from rtfeldman/wasm-test-cherrypicks
wasm test cherrypicks
2022-07-22 17:06:01 -04:00
Ayaz Hafiz
ed6ee71225
Add test when bound symbols differ in branch patterns, but no bound symbol is used 2022-07-22 16:51:44 -04:00
Ayaz Hafiz
ee516eaa2f
Don't send delayed errors if we're told to ignore problems 2022-07-22 16:51:29 -04:00
Ayaz Hafiz
5ad04dcd2c
Emit runtime error when tag unions have an error type
Closes #3266
2022-07-22 15:46:09 -04:00