Commit graph

998 commits

Author SHA1 Message Date
Ayaz
9d05bcd9d8
Merge pull request #4237 from snprajwal/str-withcapacity
builtin(str): implement Str.withCapacity
2022-10-08 14:31:30 -05:00
Anton-4
54fb1bc32f
Merge remote-tracking branch 'upstream/main' into str-withprefix 2022-10-08 19:58:51 +02:00
Prajwal S N
cbceeff902
builtin(list): implement List.walkBackwardsUntil
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-08 14:23:06 +05:30
Prajwal S N
d6526fa425
builtin(str): add withPrefix
Closes #4142

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-08 12:52:10 +05:30
Ayaz
fae90c9fd2
Merge pull request #4187 from roc-lang/ranged-char-literal
Single-quote literals behave like ranged numbers
2022-10-07 15:05:09 -05:00
Prajwal S N
9013e4ce11
builtin(str): implement withCapacity
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-08 00:24:46 +05:30
Ayaz
0b57b00235
Merge pull request #4205 from roc-lang/more-hash-derivers
Support deriving `Hash` for inductive records
2022-10-05 17:30:02 -05:00
Ayaz Hafiz
7064d1c060
Gen test for char pattern matching 2022-10-05 17:28:01 -05:00
Ayaz Hafiz
33d007a17b
Exercise both dispatch branches in test 2022-10-05 17:25:12 -05:00
Ayaz Hafiz
ed9f37a756
Add gen test for tag function dispatch 2022-10-05 17:25:12 -05:00
Ayaz
4f1d7fca9a
Merge pull request #4218 from roc-lang/rollup-10-05
Misc bugfixes 10-05
2022-10-05 14:52:11 -05:00
Ayaz
596f14d173
Merge pull request #4203 from roc-lang/shift-signature
Have `Num.shift*By` functions shift by a `U8`
2022-10-05 13:26:36 -05:00
Ayaz Hafiz
f849bab6f1
Ignore large bit abs on wasm 2022-10-05 13:06:44 -05:00
Ayaz Hafiz
cb96a64259
Implement hashing tag discriminants in derivers, rather than using low-level
This makes it so we can decide the discriminant in the front-end. With
this, we can also now revert the `LowLevel::TagDiscriminant`
introductions.
2022-10-05 12:58:04 -05:00
Ayaz Hafiz
a308ebb38c
Optimize derived hash implementation for newtypes
When we have a newtype tag union, there is no reason to hash its
discriminant.
2022-10-05 12:19:35 -05:00
Ayaz Hafiz
2517695ce4
Fix deriving of hash ability for recursive tag unions 2022-10-05 12:01:02 -05:00
Ayaz Hafiz
657346a057
Support Num.abs for non-64 bit integer types
Closes #4210
2022-10-05 08:39:45 -05:00
Ayaz
02b02901bc
Update crates/compiler/test_gen/src/gen_abilities.rs
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-10-04 18:58:30 -05:00
Ayaz Hafiz
725054b8f3
Add TODO recursive tag union hashing test 2022-10-04 18:17:35 -05:00
Ayaz Hafiz
5389cdd87f
Add gen test for newtype, byte union, unit tag union hash deriving 2022-10-04 18:11:41 -05:00
Ayaz Hafiz
00ca8f2f80
Add gen test for deriving hash for heterogenous tags 2022-10-04 17:28:35 -05:00
Ayaz Hafiz
5870de54ae
Add gen tests for record hash deriving 2022-10-04 15:29:20 -05:00
Ayaz Hafiz
fd421c005d
Refactor hash immediate tests 2022-10-04 14:40:53 -05:00
Ayaz Hafiz
6d7f664194
Add test for hashing list of lists 2022-10-04 14:40:21 -05:00
Ayaz Hafiz
c2c15d3ee1
Skip pending test on wasm 2022-10-04 14:39:55 -05:00
Ayaz Hafiz
42ddcb70df
Add derive test for List of strings 2022-10-04 14:09:40 -05:00
Ayaz Hafiz
5b833e57b5
Support derivation of Hash for Str and List 2022-10-04 14:09:40 -05:00
Ayaz Hafiz
715d88510c
Add tests for immediates of the Hash ability 2022-10-04 14:09:40 -05:00
Ayaz Hafiz
dea7661068
Have Num.shift*By functions shift by a U8
302305020
2022-10-04 12:28:33 -05:00
Ayaz Hafiz
1c8ed27e58
Avoid Hash shadowing in abilities tests 2022-10-04 10:23:09 -05:00
Ayaz Hafiz
877714e9c0
Unused imports in gen-abilities 2022-09-30 14:24:06 -05:00
Ayaz Hafiz
92aa0912ea
Report unused imports in modules 2022-09-30 13:40:34 -05:00
Ayaz Hafiz
06bef34829
Import Decode by default in all modules 2022-09-21 12:29:07 -05:00
Ayaz Hafiz
f10c47ec20
Update gen_abilities tests 2022-09-21 12:29:06 -05:00
Ayaz
211c297230
Merge pull request #4041 from KilianVounckx/opaque-bool
Opaque bool
2022-09-21 11:15:41 -05:00
Ayaz Hafiz
0bcbc065c2
Update wasm-str tests 2022-09-20 14:53:46 -05:00
Ayaz Hafiz
fd7b4ec9fc
Turn off gen-dev test for now 2022-09-20 14:42:09 -05:00
kilianv
222f0e8870
Fix typo 2022-09-20 14:42:08 -05:00
kilianv
9717747a54
Update tests
not all tests pass yet. Will look at them with Ayaz.
2022-09-20 14:42:03 -05:00
Ayaz Hafiz
7f54c0fd94
FIx gen-wasm tests 2022-09-20 11:38:23 -05:00
Ayaz Hafiz
f41936d5e5
Unwrap layouts containing void layouts as newtypes
Addresses the attempt to do so in https://github.com/roc-lang/roc/pull/3465

Co-authored-by: Folkert <folkert@folkertdev.nl>
2022-09-19 16:50:49 -05:00
Ayaz Hafiz
ac752adc7c
Check in some more work 2022-09-16 16:09:21 -05:00
Ayaz Hafiz
8cd4281173
Complex bitcast recursive tag union pointers when we need them to be opaque
Resolves a discussion on Zulip: https://roc.zulipchat.com/#narrow/stream/231635-compiler-development/topic/When.20recursive.20structs.20aren't.20recursive
2022-09-14 20:58:54 -05:00
Folkert
fbc5412161
ignore another test 2022-09-09 23:20:11 +02:00
Folkert
b8a5d69578
ignore another test on windows 2022-09-09 23:20:11 +02:00
Folkert
5d60ffeebf
disable a segfaulting test on windows 2022-09-09 23:20:11 +02:00
Folkert
57201db2f6
windows: temporarily do not drop gen_test results 2022-09-09 23:20:10 +02:00
Richard Feldman
3e1ca37b9e
Merge pull request #3950 from roc-lang/keep-dll-loaded
keep dll loaded
2022-09-09 14:19:35 -07:00
Ayaz Hafiz
eebe5234f6
Correctly perform record updates that come from thunks
Closes #3908
2022-09-06 18:07:22 -05:00
Richard Feldman
eac04dfbc7
Merge pull request #3957 from roc-lang/dev-backend-bitwise-logical
dev backend: bitwise logical operators
2022-09-05 20:28:56 -07:00