raleng
4991adb05b
Fix multiline string formatting
...
This change adds the proper indentation when formatting multiline
strings to not end up with invalid code. This also make sure that
multiline strings are always formatted using multiple lines, regardless
of the string literal itself contains a newline.
2022-08-26 11:13:37 +02:00
Brian Carroll
35de4c6e6e
Merge pull request #3894 from roc-lang/windows-disable-subs-caching
...
windows disable subs caching statically
2022-08-25 20:50:10 +01:00
Folkert
42d26a20b6
pass return layout along to checked add
2022-08-25 19:35:47 +02:00
Ayaz Hafiz
1c6d423e52
Add comment for why we're ignoring deep specialization tests
2022-08-25 09:41:57 -05:00
Ayaz Hafiz
356ba91f19
Ignore tests that stack overflow on debug builds
2022-08-25 09:22:53 -05:00
Brian Carroll
10e88a002d
Fix warnings in roc_load on Windows
2022-08-25 08:30:52 +01:00
Folkert de Vries
51d5aa789a
Merge pull request #3870 from roc-lang/dev-backend-div
...
add int/float division to the dev backend
2022-08-25 09:03:19 +02:00
Folkert
71e78f77a2
disable subs caching on windows statically
2022-08-24 23:16:49 +02:00
Folkert
428b1edf5d
cross-compile hello world (it runs in wine!)
2022-08-24 22:43:09 +02:00
Ayaz
f5e1baffda
Merge pull request #3887 from roc-lang/lib-dir-erro
...
improved lib dir error msg
2022-08-24 12:55:20 -05:00
Folkert de Vries
c06e5cfa32
Merge pull request #3769 from roc-lang/expect-fx-codegen
...
expect fx codegen
2022-08-24 19:48:42 +02:00
Anton-4
53aa346f47
clippy
2022-08-24 17:32:36 +02:00
Folkert
8ca7ee1e14
build zig builtins for windows
2022-08-24 16:59:06 +02:00
Anton-4
25a5303923
improved lib dir error msg
2022-08-24 16:46:55 +02:00
Ayaz Hafiz
238464c505
Get rid of a redundant subs snapshot
2022-08-24 09:01:02 -05:00
Ayaz Hafiz
2afad0127f
Replace snapshot of subs/layout directly with "TypeState" snapshots
2022-08-24 08:53:21 -05:00
Folkert
7d060e82fc
Merge remote-tracking branch 'origin/main' into expect-fx-codegen
2022-08-24 14:56:46 +02:00
Folkert
592a219f5d
remove test that is not useful
2022-08-24 14:09:16 +02:00
Ayaz Hafiz
3b2e3d515f
Include var in lambda set size traces
2022-08-23 15:42:01 -05:00
Ayaz Hafiz
b3f8ead89d
Add tracing of lambda set sizes in mono layout
2022-08-23 15:20:39 -05:00
Ayaz Hafiz
e5034e7331
Add tracing for external specializations
2022-08-23 14:32:24 -05:00
Folkert
a3a4a5ff3c
some gen_num test cleanups
2022-08-23 20:36:12 +02:00
Folkert
6869c5d5c8
implement signed checked addition
2022-08-23 20:23:01 +02:00
Ayaz Hafiz
2b9013c5f5
Add roc_tracing to test_mono
2022-08-23 13:11:30 -05:00
Folkert
b43c0ac1e3
use RocResult in addChecked test
2022-08-23 20:10:05 +02:00
Folkert
a44afd1383
enable some result tests for the dev backend
2022-08-23 20:08:33 +02:00
Ayaz Hafiz
848facb386
Add roc_tracing crate and initial traces in mono
2022-08-23 12:47:41 -05:00
Ayaz Hafiz
a01583efff
Add derive key tests for able ext vars
2022-08-23 10:41:06 -05:00
Ayaz Hafiz
a8bd529664
Support derivers for tag unions with ext vars
2022-08-23 10:41:06 -05:00
Ayaz Hafiz
2f24c81dab
Support deriving decoder for record with arbitrary ext var
2022-08-23 10:41:06 -05:00
Ayaz Hafiz
b5e59d22e3
Support extension variables in record and tag union encoding derive keys
2022-08-23 10:41:06 -05:00
Ayaz Hafiz
a1d8f8392a
Include RigidOptional as optional field
2022-08-23 10:39:51 -05:00
Ayaz Hafiz
e77e53f37b
Enable optional record field underivable error
2022-08-23 10:39:51 -05:00
Ayaz Hafiz
55fe1df995
Add more context to derivability errors when they happen
2022-08-23 10:39:50 -05:00
Ayaz Hafiz
d2b9cc056f
Record with optionally-typed fields cannot be derived for decoding
2022-08-23 10:38:30 -05:00
Folkert
7eb24aa160
fix merge conflict
2022-08-23 16:47:35 +02:00
Folkert
a22e04361c
Merge remote-tracking branch 'origin/main' into expect-fx-codegen
2022-08-23 16:28:21 +02:00
raleng
1b2952bc70
Fix invalid multiline string output in REPL
...
If a PlainLine string contains a newline character, the REPL will print
the string using a triple-quoted block string.
2022-08-23 11:26:48 +02:00
Folkert
2d366acc6e
split out int and frac division into separate lowlevels
2022-08-23 11:07:38 +02:00
Folkert
2151891ecd
add disassembler tests for division
2022-08-23 10:48:10 +02:00
Folkert
8305d3b037
better comments for the DIV functions
2022-08-23 10:29:04 +02:00
Folkert de Vries
5e8faf64be
Merge pull request #3833 from roc-lang/dev-backend-mul
...
dev backend mul
2022-08-23 09:22:38 +02:00
Folkert de Vries
9f772d4ca2
Merge pull request #3826 from roc-lang/flex-ability-adhoc
...
Allow inferred flex vars inside type constructors bound to an ability
2022-08-23 09:21:55 +02:00
Ayaz Hafiz
0ddbc172d7
Add destructured inferred example
2022-08-22 17:06:23 -05:00
Ayaz Hafiz
142428a0bc
Add let-generalization example for decoding
2022-08-22 17:05:57 -05:00
Ayaz Hafiz
6417e75bda
Add gen example of inferred decoder
2022-08-22 17:05:57 -05:00
Ayaz Hafiz
6255332cee
Promote flex vars to flex-able in obligation checking
2022-08-22 17:05:56 -05:00
Folkert
e9f66a6385
Merge remote-tracking branch 'origin/main' into i3696
2022-08-22 23:02:35 +02:00
Folkert
4f84a120c5
add int/float division to the dev backend
2022-08-22 22:40:09 +02:00
Anton-4
172e58f96b
Merge pull request #3849 from roc-lang/small-ci-rebirth
...
set up small-ci again
2022-08-22 15:46:45 +02:00
dependabot[bot]
0f31f0f07a
Bump insta from 1.18.2 to 1.19.0
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.18.2 to 1.19.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.18.2...1.19.0 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 05:22:53 +00:00
Richard Feldman
e71b657662
Merge pull request #3821 from roc-lang/fix-roc-run2
...
Don't monomorphize if roc foo.roc has errors
2022-08-21 23:30:37 -04:00
Richard Feldman
f2f4fb59b5
Merge pull request #3815 from roc-lang/glue-dict
...
Generate glue for `Dict` and `Set`
2022-08-21 18:06:05 -04:00
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
Folkert
3f6f070042
add tests for mulsd and mulss
2022-08-18 22:37:31 +02:00
Folkert
271fbe69e8
attempt at unsigned multiplication
2022-08-17 14:14:46 +02:00
Folkert
d39de07b5a
implement float multiplication
2022-08-17 13:32:58 +02:00
Folkert
038ba47409
make integer multiplication work for quadwords and lower
2022-08-17 13:05:48 +02:00
raleng
4371905738
Fix file links in gen_dev readme
2022-08-17 12:40:28 +02:00
Ayaz Hafiz
abdc0d5689
Add an example for deeply nested record decoding
2022-08-16 08:11:14 -05:00
Ayaz Hafiz
0d763518f1
Make sure to push more symbols coming from Derived_synth to Derived_gen
2022-08-16 08:10:04 -05:00
Richard Feldman
0ba5b3cfc6
Merge pull request #3711 from roc-lang/record-decoding
...
Record decoding and their derivers
2022-08-15 22:06:34 -04:00
Brian Carroll
fa1a870d4b
Merge pull request #3791 from roc-lang/dependabot/cargo/indoc-1.0.7
...
Bump indoc from 1.0.6 to 1.0.7
2022-08-15 21:04:16 +01:00
Brian Carroll
2227b3d11d
Merge pull request #3813 from roc-lang/dependabot/cargo/crossbeam-0.8.2
...
Bump crossbeam from 0.8.1 to 0.8.2
2022-08-15 21:03:09 +01:00
Richard Feldman
0f179272d9
Add some Set builtin tests
2022-08-15 13:05:32 -04:00
Ayaz Hafiz
bed9b57b58
Add ignored empty record decoding test
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
21c3d0cafa
Add test for string and int record decoding
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
51faeaf9af
Fix doc comment
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
3770db5d70
Add test for underivable optional record
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
68441479b8
Add decoding record derive key tests
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
07cac2b4ce
Avoid non-consuming iterators
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
434e202580
Make sure to chase extension variable in record deriving
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
80c939f21e
Remove temporary
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
ed23461165
Only open extension variable when feature is turned on
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
9a7e280e9c
Add some more comments to record decoding
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
b698e7f391
Remove mono test
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
0f58328d3d
Use wrap_in_decode_custom_decode_with for decode record
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
23c6e6ea87
Add a wrap_in_decode_custom_decode_with helper for decode deriving
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
60ed17155c
Check in gen test for record decoding!
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
44a746b473
Update derive decoder test
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
634e9a2b69
Remove dbgs
2022-08-15 11:11:35 -05:00
Ayaz Hafiz
07392a35a7
Populate type of decoded record completely
2022-08-15 11:11:35 -05:00
Ayaz Hafiz
e93145180e
Better debug symbols for derivers
2022-08-15 11:11:35 -05:00
Richard Feldman
639df6c8c0
Unify this_decode_with_var
2022-08-15 11:11:35 -05:00
Richard Feldman
b3b6a7ee9f
Type-check lots of step_field
2022-08-15 11:11:35 -05:00
Richard Feldman
c34427bbf9
Rename record_var to initial_state_var
2022-08-15 11:11:34 -05:00
Ayaz Hafiz
d01c5c83b7
Check in gen tests that don't work yet
2022-08-15 11:11:33 -05:00
Ayaz Hafiz
f95c5aee12
Check in derived record impl
2022-08-15 11:11:33 -05:00
Ayaz Hafiz
66f75b86ee
Fix ROC_PRINT_UNIFICATIONS_DERIVED
2022-08-15 11:11:33 -05:00
Ayaz Hafiz
a276578642
Use some flex vars where they're needed for constraining
2022-08-15 11:11:33 -05:00
Ayaz Hafiz
e2e5faa28a
Rename to state_record_var
2022-08-15 11:11:33 -05:00
Ayaz Hafiz
1e1c44264f
Make sure to use result from inserting into subs, rather than uninit buffer
2022-08-15 11:11:33 -05:00
Richard Feldman
89f947f3ae
Finish setting up types for derived decoders
2022-08-15 11:11:33 -05:00
Richard Feldman
ddd462ec8b
Finish step
2022-08-15 11:11:33 -05:00
Richard Feldman
0579d84bf0
Set types for Keep/Skip
2022-08-15 11:11:32 -05:00
Richard Feldman
bccfa55179
Unify more derived decoder things
2022-08-15 11:11:32 -05:00
Richard Feldman
33548874d3
Drop some doc comments
2022-08-15 11:11:32 -05:00
Richard Feldman
8289458eee
Unify this_decode_with_var
2022-08-15 11:11:32 -05:00
Richard Feldman
13e3146ac1
Type-check lots of step_field
2022-08-15 11:11:32 -05:00
Richard Feldman
1587bfbeb5
Add type checking for finalizer
2022-08-15 11:11:32 -05:00
Richard Feldman
93d07079e1
Add type info to decoder_initial_state
2022-08-15 11:11:32 -05:00