Commit graph

6636 commits

Author SHA1 Message Date
Richard Feldman
a345fc4cfe
Merge pull request #3857 from KilianVounckx/bitshift-operator-argument-swap
Bitshift operator argument swap
2022-08-21 14:35:18 -04:00
Folkert
6b69e837a4
configure mul to use 'bigger' src registers when needed 2022-08-21 20:26:26 +02:00
Folkert
6aa168ee0b
more various clippy fixes 2022-08-21 16:43:58 +02:00
Folkert
f3f6f58d09
clippy fixes 2022-08-21 16:43:57 +02:00
Richard Feldman
ccd0d32332
Merge remote-tracking branch 'origin/main' into glue-dict 2022-08-21 09:51:22 -04:00
Folkert de Vries
2b0bf7839e
Merge pull request #3819 from roc-lang/deep-record-decoding
Mono fixes for supporting deep record decoding deriving
2022-08-21 13:33:40 +02:00
Folkert de Vries
b53fe24271
Merge pull request #3836 from roc-lang/turn-on-ability-tests
Turn on ability tests that work
2022-08-21 13:32:38 +02:00
Folkert de Vries
a726959461
Merge pull request #3837 from roc-lang/i3820
Don't suggest removing variable when it's bound in a branch pattern
2022-08-21 13:32:09 +02:00
kilianv
e3ae182235
Fix spelling mistakes 2022-08-20 22:27:54 +02:00
kilianv
f64eac6040
Remove roc tests
On my current build the expect tests don't work. So I will add them later.
The tests in rust work fine
2022-08-20 22:03:11 +02:00
kilianv
8ab725a736
Add roc tests with expect keyword 2022-08-20 21:51:31 +02:00
kilianv
3697092eca
Add documentation to bitwise shift operators 2022-08-20 21:40:17 +02:00
kilianv
731f10981e Swap the argument order in bitwise shift operators
The arguments were probably swapped in the first place because in Elm
they are swapped, because Elm is curried. The new order makes more sense
both with and without the pipe operator
2022-08-20 20:33:10 +02:00
Ayaz Hafiz
641169854e
Ignore unused branch patterns in tests 2022-08-20 10:05:22 -05:00
Ayaz Hafiz
31d9df96a1
Spellcheck 2022-08-20 10:00:34 -05:00
Brian Carroll
334bc7174f
Merge pull request #3742 from roc-lang/cleanup-mono-layout
Cleanup/refactoring of lambda set layout generation
2022-08-20 15:48:05 +01:00
Ayaz Hafiz
d1c21e3fcd
Add polymorphic expression reproduction cases from #1745
These work now that we have ways to compile polymorphic expressions.

Closes #1745
2022-08-19 22:21:50 -05:00
Ayaz Hafiz
b30c90b500
Don't suggest removing variable when it's bound in a branch pattern
Instead, suggest prefixing it with an underscore, or replacing with an
underscore.

Closes #3820
2022-08-19 22:21:44 -05:00
Ayaz Hafiz
81235b98d6
Turn on ability tests that work 2022-08-19 22:21:33 -05:00
Ayaz Hafiz
2f9f96b946
Turn on gen test that works again 2022-08-19 22:20:57 -05:00
Ayaz Hafiz
cc78d4d180
Start all make_specializations from the top, suspending not to FindSpecializations 2022-08-19 22:20:57 -05:00
Ayaz Hafiz
099fbf46eb
Suspend specialization of symbols that collide with an active specialization
It's possible to end up in a situation where you attempt to specialize a
symbol while it's being specialized for another type; see the examples
in the diff. In this case, we need to treat the later specialization as
suspended, and recover it later.
2022-08-19 22:20:57 -05:00
Ayaz Hafiz
3b78ebcf3a
Allow large enum variants 2022-08-19 22:20:38 -05:00
Ayaz Hafiz
7c6d811769
Report errors without mono when roc foo.roc has errors 2022-08-19 22:19:04 -05:00
Ayaz Hafiz
b809d6d452
Dynamically load find/make specializations graph if there are no type errors 2022-08-19 22:19:04 -05:00
Ayaz Hafiz
106f725c45
Ignore test on llvm wasm3 2022-08-19 22:18:45 -05:00
Ayaz Hafiz
79a5766854
Make method private 2022-08-19 22:16:47 -05:00
Ayaz Hafiz
b7c799702f
wasm: store closure data passed to higher-order low-level in struct, not box 2022-08-19 22:16:47 -05:00
Brian Carroll
1078badd58
wasm: comment on why we don't need to modify symbol storage after clone 2022-08-19 22:16:47 -05:00
Ayaz Hafiz
f08fc43210
Remove unneeded clone 2022-08-19 22:16:42 -05:00
Ayaz Hafiz
fb4282757a
gen-wasm: Do not repoint stack memory to locals upon copy
It is possible that other code paths will use the stack memory before a
copy to a local is done. For example, if the copy happens behind a branch,
the local variable may not be assigned the stack content.
2022-08-19 22:16:41 -05:00
Ayaz Hafiz
15ef517cf2
gen-wasm: box captured data before passing it to a higher-order lowlevel
Previously, when it existed, captured data would always be represented
as a struct, and hence implicitly boxed. That meant that passing
captured data would always pass a pointer. However, now, captured data
can live unwrapped. This poses a challenge for the higher-order
lowlevels, which always expect captures data to be passed as an opaque
pointer. As such, always box captured data.

It's possible to optimize this so that only unwrapped captures data
needs to be boxed; however, that is not attempted in this patch.
2022-08-19 22:16:41 -05:00
Ayaz Hafiz
cefbf3aa51
Unwrap lambda sets in cc type choosing 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
0606086eb6
Compare values with runtime representation 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
b18af7e1f3
Fix return type of closure 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
d8a8dff70d
Treat unwrapped capture sets as unwrapped directly 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
68bb03ec09
Update mono tests 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
64fc60f55f
Make lambda set set private 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
a93735473a
Describe how a enum lambda set should be switched in the representation 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
f5e3105b37
Use extend_argument_list to add lambda set arguments 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
c003b2d007
Simplify ClosureInfo and enum lambda set switching, which never captures 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
d6572ef3b7
Match over call options in determining whether to extend lambda set arg 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
d4a79780b3
Determine whether to extend lambda set arg to call args by checking call options 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
62dde549e6
Determine whether lambda set is represented as an arg 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
fc4979e2ce
Add ClosureCallOptions enum to describe how to switch calling lambda 2022-08-19 22:16:40 -05:00
Ayaz Hafiz
8d01e81aa7
Use tag union/recursive tag union layout function for lambda sets 2022-08-19 22:16:39 -05:00
Folkert
aacd90baff
split signed and unsigned tests 2022-08-19 21:28:50 +02:00
Folkert
d7f392bbea
another go at umul 2022-08-19 21:26:51 +02:00
Anton-4
9a715a0d4b
improve comments zig tests, set up zig tests in CI 2022-08-19 17:14:49 +02:00
Folkert
2a302cfc46
dev backend unsigned multiply: round 2 2022-08-18 23:11:54 +02:00