Commit graph

759 commits

Author SHA1 Message Date
Ayaz Hafiz
b86bf94d92
Dev, wasm test bugs 2022-04-12 17:35:00 -04:00
Ayaz Hafiz
865c1f15d7
Fix test compile errors, and simply load_internal tests 2022-04-12 16:42:51 -04:00
Nikita Mounier
dfba77bd04
Explicit i128 in test. 2022-04-12 16:41:29 +00:00
Nikita Mounier
6b2d1a7af6
Remove outdated comments. 2022-04-11 23:36:30 +00:00
Nikita Mounier
dbb91639e9
Revert weird changes in tests. 2022-04-11 21:33:22 +00:00
Nikita Mounier
20b9f6377c
Fix f64 ambiguity in test. 2022-04-11 19:43:21 +00:00
Nikita Mounier
799c05f183
Fix test. 2022-04-11 17:56:43 +00:00
Nikita Mounier
1d5ab1d79c
Merge remote-tracking branch 'origin/trunk' into div-no-result 2022-04-11 17:51:38 +00:00
Nikita Mounier
8206f345c7 Merge remote-tracking branch 'origin/trunk' into div-no-result 2022-04-11 11:45:06 +00:00
Nikita Mounier
4ecf2a8c24 Modify division behaviour to panic when dividing by 0, and add divChecked, divFloorChecked and divCeilingChecked` for safe alternatives which return a Result, mimicking the previous behaviour. 2022-04-11 11:23:33 +00:00
Ayaz Hafiz
a102a7497e
Support box/unbox for types that are typically only on the stack
Closes #2786
2022-04-09 16:22:01 -04:00
Folkert de Vries
5dc8c852e9
Merge pull request #2815 from rtfeldman/i/2811
Specialize polymorphic values before binding to pattern
2022-04-08 21:44:11 +02:00
Richard Feldman
4dc7e61f3f
Move conversion tests to test_gen 2022-04-07 16:27:01 -04:00
Ayaz
23bc8aab49
Merge pull request #2805 from rtfeldman/type-vs-value-defs
Split up Defs into TypeDef and ValueDef
2022-04-07 14:04:05 -04:00
Ayaz Hafiz
a12e40a310
Specialize polymorphic values before binding to pattern
Closes #2811
2022-04-07 14:03:29 -04:00
Ayaz Hafiz
c7d439136b
Flip refcount test symbols 2022-04-07 08:54:07 -04:00
Brian Carroll
2b74e55240 Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-higher-order-calls 2022-04-07 09:03:34 +01:00
Ayaz
d58300e016
Merge pull request #2799 from rtfeldman/i/2583
Unify type alias "real variables"
2022-04-05 18:40:02 -04:00
Folkert de Vries
d3a3b6456a
Merge pull request #2800 from rtfeldman/parse-out-dec-suffix
Make sure float suffixes are parsed out after can
2022-04-05 23:43:15 +02:00
Ayaz Hafiz
9fbc525d02
Make sure float suffixes are parsed out after can
Before we hit mono, we need to make sure the suffixes of numeric
literals are parsed out from the literal string, so that we don't try to
parse something whose type we already know but has the extraneous
suffix.

Co'ed with @tagraves
2022-04-05 11:32:34 -04:00
Ayaz Hafiz
163c6b39d6
Unify type alias "real variables"
Turns out that we can't always assume that a successful unification of
type alias type variables means that those aliases had the same real
type from the start. Because type variables may contain unbound type
variables and grow during their unification (for example,
`[InvalidNumStr]a ~ [ListWasEmpty]b` unify to give `[InvalidNumStr,
ListWasEmpty]`), the real type may grow as well.

For this reason, continue to explicitly unify alias real types for now.
We can get away with not having to do so when the type variable
unification causes no changes to the unification tree at all, but we
don't have a great way to detect that right now (maybe snapshots?)

Closes #2583
2022-04-05 11:21:52 -04:00
Brian Carroll
e342b21d43 wasm: enable some List.map tests 2022-04-05 00:02:05 +01:00
Brian Carroll
ab3a75b754 wasm: fix WasmLayout for LambdaSet 2022-04-05 00:02:05 +01:00
Brian Carroll
a63e55e023 wasm: fix stack order in higher-order wrapper 2022-04-05 00:02:05 +01:00
Folkert
bd46103f0c
use RocResult for some tests 2022-03-30 19:21:18 +02:00
Folkert
de77748dd5
add additonal tests 2022-03-30 19:08:23 +02:00
Folkert
ddde5694ec
use Normal optlevel in debug builds 2022-03-30 17:35:21 +02:00
Folkert
b9adbf66a0
use RocResult for some tests 2022-03-30 17:34:04 +02:00
Folkert
fd209f90ff
fix bug where incorrect stack size is given 2022-03-30 17:25:28 +02:00
Folkert
c73c01aa34
Merge remote-tracking branch 'origin/trunk' into list-str-capacity 2022-03-30 14:07:17 +02:00
Folkert
53d426300e
add additonal tests 2022-03-26 12:46:31 +01:00
Folkert
311e464b70
add load_internal 2022-03-23 15:18:22 +01:00
Richard Feldman
381acbf734
Merge pull request #2765 from rtfeldman/simplify-stdlib-use
Simplify stdlib use
2022-03-22 20:14:38 -04:00
Brian Carroll
3c9d624a73
Merge pull request #2757 from rtfeldman/fix_shift_filling
Fix (flip) `Num.shiftRight*` builtins
2022-03-23 00:07:19 +00:00
Brian Carroll
faaa1ca8f9 test_gen: crazy conditional compilation options for right-shift tests! 2022-03-22 22:55:00 +00:00
Brian Carroll
24e6cd80e7 wasm: fix argument order for shiftRightBy & disable tests with 8-bit values 2022-03-22 22:28:18 +00:00
Folkert
d8fa2b8d92
stop passing stdlib (use lazy_static) 2022-03-22 19:53:02 +01:00
Folkert de Vries
5e9e7f3ad5
Merge pull request #2760 from rtfeldman/wasm-reset-reuse
Wasm reset & reuse
2022-03-21 23:02:28 +01:00
Brendan Hansknecht
42f49c1d79 also add test for overshifting to make sure we don't get bits from higher up in the type 2022-03-20 22:09:11 -07:00
Brendan Hansknecht
20ed4cbacb cleanup test type sizes and add more cases for i8 2022-03-20 22:01:13 -07:00
Jan Van Bruggen
46fc305d56 Fix Num.shiftRight* tests 2022-03-20 21:39:39 -06:00
Jan Van Bruggen
9fb3549c24 Enable Num.shiftRight* tests 2022-03-20 21:39:39 -06:00
Brian Carroll
9b6b81a438 WIP 2022-03-20 11:17:34 +00:00
hafiz
3f07afe3b5
Merge pull request #2750 from rtfeldman/delay-instantiating-aliases-fix-limitations
Delay instantiating aliases fix limitations
2022-03-19 20:41:14 -04:00
Folkert
0b74fcd07b
add test of alias of alias with type variables but without lambda set 2022-03-18 20:10:49 +01:00
Folkert
6134e57921
Merge remote-tracking branch 'origin/trunk' into list-str-capacity 2022-03-18 18:13:55 +01:00
Brian Carroll
549b4be907 test_gen: change styling in wasm test debugger 2022-03-18 14:58:48 +00:00
Brian Carroll
21ee531e8c wasm: Add Roc procedure names to Names section for debug 2022-03-18 14:46:53 +00:00
ayazhafiz
17029cff7e Link aliased lambdas to the partial procs of the original symbol
This ensures that we use the correct specialized variable at the call
site of a function. In #2725 what happened was that a generalized
function was aliased, causing it to undergo generalization again. Then,
we lost the variable used to specialize at the call site. Instead, just
link to the partial proc being aliased directly.

There is an added benefit here, which is that we can avoid the
possibly-quadratic replacement of symbols in the generated statement.

Closes #2725
2022-03-14 16:42:53 -05:00
ayazhafiz
2d01c21b5c Codegen tags that are polymorphic because of rigids
Closes #2724
2022-03-14 15:25:25 -05:00