Commit graph

695 commits

Author SHA1 Message Date
Brian Carroll
85ba3154ec wasm: fix roc_panic message retrieval 2022-03-01 18:47:51 +00:00
Brendan Hansknecht
a5ce124bd3 Merge branch 'list-replace' into gen-dev/quicksort2 2022-02-27 20:42:45 -08:00
Brian Carroll
8d484e8c9e wasm: tests read panic message from a global pointer 2022-02-28 00:53:01 +00:00
Brendan Hansknecht
457ba524aa fix tests and alias analysis 2022-02-27 15:20:54 -08:00
Brian Carroll
7ccc5ec768 Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-runtime-error 2022-02-27 22:57:23 +00:00
Brendan Hansknecht
d9e9c28889 add error test case 2022-02-27 00:45:51 -08:00
Brendan Hansknecht
b802d681a3 Merge remote-tracking branch 'origin/trunk' into list-replace 2022-02-27 00:28:08 -08:00
Brendan Hansknecht
7a608524ec Merge remote-tracking branch 'origin/trunk' into gen-dev/quicksort2 2022-02-27 00:26:04 -08:00
Brendan Hansknecht
ffee5ab97a add some more tests, including failure for new line 2022-02-25 22:05:21 -08:00
Brendan Hansknecht
c025b8806b disable accidentally enabled test on dev backend 2022-02-25 21:07:20 -08:00
Brendan Hansknecht
cd0d89fdc9 Merge remote-tracking branch 'origin/trunk' into single-quote-literal 2022-02-25 07:39:58 -08:00
Brendan Hansknecht
7c6c9b52a9 Merge remote-tracking branch 'origin/trunk' into list-replace 2022-02-25 07:35:00 -08:00
Tom Dohrmann
954064fa1e make more types more explicit 2022-02-25 13:58:07 +01:00
Tom Dohrmann
868316abb8 make types more explicit 2022-02-25 13:02:11 +01:00
Brendan Hansknecht
116b585cdc add more tests 2022-02-24 22:59:47 -08:00
Brendan Hansknecht
889b189191 fix list passing 2022-02-24 22:46:50 -08:00
Brendan Hansknecht
dddf8ff785 switch from pair to record and change name to ListReplaceUnsafe 2022-02-24 20:41:26 -08:00
Brendan Hansknecht
ba2e8cd32b Add base piping for list.Replace 2022-02-24 17:58:56 -08:00
Brendan Hansknecht
f7c0e2ef19 Merge remote-tracking branch 'origin/trunk' into single-quote-literal 2022-02-24 10:13:39 -08:00
Tom Dohrmann
788c8a6af2 reimplement RocList and RocStr 2022-02-23 16:02:13 +01:00
Brian Carroll
3952a7cc7c test_gen: Add comments to some extremely subtle test code 2022-02-21 22:52:50 +00:00
Brian Carroll
89b8926d27 gen_wasm: fix bug choosing the right proc specialization (#2549) 2022-02-21 22:52:45 +00:00
ayazhafiz
dd2b3097e1 Disable WASM test for now 2022-02-21 14:10:46 -05:00
ayazhafiz
475be2363c Add a gen test for #2535 2022-02-21 14:10:46 -05:00
Brendan Hansknecht
74daec84df
Merge pull request #2472 from rtfeldman/add_Int.toInt_builtins
Add `{Int *}.to{Int *}` builtins
2022-02-21 18:03:14 +00:00
Brian Carroll
e8571de1ae
Merge pull request #2517 from rtfeldman/repl-www
Web REPL initial version
2022-02-21 13:58:23 +00:00
Folkert
3e413764e2
make llvm gen tests work 2022-02-20 14:25:26 +01:00
Folkert
177529bfb6
all string tests passing 2022-02-20 13:04:12 +01:00
Brian Carroll
603c98d1d9 wasm tests: use wasmer .unwrap_i32 2022-02-20 09:05:08 +00:00
Brendan Hansknecht
2154e910d8 expand test coverage 2022-02-19 19:39:44 -08:00
Brendan Hansknecht
c6f1edbf47 load literals that are union args 2022-02-19 19:24:37 -08:00
Folkert
2c4d0e71a6
fix string repeat tests 2022-02-20 00:47:07 +01:00
Folkert
dea6cfbc8f
various fixes 2022-02-20 00:20:50 +01:00
ayazhafiz
ee37d8c4e0 Disable unimplemented int casts on wasm 2022-02-19 17:08:20 -05:00
ayazhafiz
25b355eb38 Fix cast tests 2022-02-19 16:24:49 -05:00
ayazhafiz
13067f2908 Implement Num.toNNNChecked
Closes #2411
2022-02-19 16:20:21 -05:00
ayazhafiz
d90915a8cd Implement Num.to* builtins
Just wrap over Num.intCast
2022-02-19 11:28:41 -05:00
Jan Van Bruggen
e12d98af98 WIP: Start adding new Int.toInt builtins 2022-02-19 11:28:12 -05:00
Folkert
5582644166
use str/list helpers to prepare for adding capacity 2022-02-18 22:23:05 +01:00
Folkert
04adbe75ca fix test compilation 2022-02-14 21:09:51 +01:00
hafiz
91483dbf55
Merge pull request #2471 from rtfeldman/fix_args_order
Swap arg order in `List` builtins to put the more-complex types first
2022-02-13 23:25:05 -05:00
ayazhafiz
6e5c1d5914 Specialize Num.toFloat for different target float types
Closes #2476
2022-02-13 20:20:25 -05:00
ayazhafiz
c831b99432 Add test for issue #1162
This was fixed some time ago; add a regression test.

Closes #1162
2022-02-13 14:02:39 -05:00
Brian Carroll
a9df6f4ff9 test_gen: create a getter for wasm panic messages 2022-02-12 00:19:52 +00:00
Jan Van Bruggen
f47dbb5171
Swap List.mapWithIndex arg1 args order to put the element first 2022-02-11 16:10:29 -07:00
Jan Van Bruggen
92e0f8714f
Swap List.repeat args order to put the list first 2022-02-11 16:10:29 -07:00
ayazhafiz
8c0e39211d Instantiate recursive aliases to their smallest closures
Now, when we have two aliases like

```
T a : [ A, B (U a) ]
U a : [ C, D (T a) ]
```

during the first pass, we simply canonicalize them but add neither to
the scope. This means that `T` will not be instantiated in the
definition of `U`. Only in the second pass, during correction, do we
instantiate both aliases **independently**:

```
T a : [ A, B [ C, D (T a) ] ]
U a : [ C, D [ A, B (U a) ] ]
```

and now we can mark each recursive, individually:

```
T a : [ A, B [ C, D <rec1> ] ] as <rec1>
U a : [ C, D [ A, B <rec2> ] ] as <rec2>
```

This means that the surface types shown to users might be a bit larger,
but it has the benefit that everything needed to understand a layout of
a type in later passes is stored on the type directly, and we don't need
to keep alias mappings.

Since we sort by connected components, this should be complete.

Closes #2458
2022-02-11 08:43:33 -05:00
Brian Carroll
57179eb458 test_gen: comments about wasm panics 2022-02-11 08:12:36 +00:00
Brian Carroll
5f64f32a4a wasm: Better implementation of roc_panic in tests 2022-02-11 07:33:49 +00:00
Brian Carroll
2af4016f34 wasm: improve the HTML debugger's WASI syscall implementations 2022-02-10 10:15:59 +00:00