Commit Graph

2065 Commits

Author SHA1 Message Date
Ayaz Hafiz
c2d042eba2
Stray dbg 2022-08-31 14:53:52 -05:00
Ayaz Hafiz
95765bcb1e
Intern the lambda set representation 2022-08-31 14:50:56 -05:00
Ayaz Hafiz
1e49622b61
Clippy 2022-08-31 14:36:44 -05:00
Ayaz Hafiz
3b4b1838b8
Push layout interner further through Layout 2022-08-31 14:33:52 -05:00
Ayaz Hafiz
ed04c2040a
Push the layout interner through the backends 2022-08-31 14:33:52 -05:00
Ayaz Hafiz
c5466810a4
Add LayoutInterner to LayoutCache
Adds a thread-local interner of layouts to LayoutCache, and updates all
references appropriately.

This is a bit suboptimal for single-threaded workloads that will look at
creating layout caches again, like the REPL, but I think that's okay for
now - since the global interner will be uncontested for those workloads, it
should still be plenty fast to access the interner, even behind a lock.
2022-08-31 14:33:51 -05:00
Ayaz Hafiz
9d170be5c7
Add layout interner to load_internal 2022-08-31 14:33:51 -05:00
Ayaz Hafiz
14291c4ebc
Add an interner crate 2022-08-31 14:33:51 -05:00
Ayaz Hafiz
261cd75a71
Invalidate layout-cached variables correctly after merging 2022-08-31 14:33:50 -05:00
Ayaz Hafiz
7a7a4fa680
Use fnv hasher for layout cache 2022-08-31 14:26:16 -05:00
Ayaz Hafiz
c57fe24805
Use OptVariable rather than Option<Variable> 2022-08-31 14:23:50 -05:00
Ayaz Hafiz
9b1f3e6fde
Remove unused marker 2022-08-31 14:17:38 -05:00
Ayaz Hafiz
9fb9ca4cbc
return result, not cacheable 2022-08-31 14:17:15 -05:00
Ayaz Hafiz
7c215f9273
Remove stray dbgs 2022-08-31 14:17:15 -05:00
Ayaz Hafiz
ea2e5d171a
Invalidate layout-cached variables correctly after merging 2022-08-31 14:17:14 -05:00
Ayaz Hafiz
66e65714b9
Fix release errors 2022-08-31 14:16:44 -05:00
Ayaz Hafiz
d13b556295
Trace stats for layout cache 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
c2a0b878d3
Clippy 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
22a4a4dfbc
Relay metadata back when using cached result 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
7b8e1e1d53
Even more inline aggression 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
c53719eb95
Debug non-reused recursive structures 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
e24cdb8272
Be far more aggressive about cache inlining 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
a64d9d97c5
Do not reuse cached entries for recursive structures that are being reconstructed 2022-08-31 14:16:43 -05:00
Ayaz Hafiz
caf4a80542
Clippy 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
3ce4c6c77d
Typo 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
3856ea6199
Implement a cache policy - don't cache recursive pointers without a recursive layout 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
eb5ec2bd98
Don't account for recursive unions in non-recursive layout gen 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
d757701426
First pass at layout caching 2022-08-31 14:16:42 -05:00
Ayaz Hafiz
8b0f7dc82f
Propagate layout_cache throughout Env in generating layout
Sets up actually using the LayoutCache to get cached layouts.
2022-08-31 14:16:42 -05:00
Bryce Miller
55688e8fa2
move WebAssembly example 2022-08-31 14:20:25 -04:00
Bryce Miller
bc7d62e94c
move Zig example 2022-08-31 14:09:34 -04:00
Bryce Miller
6ccd00abf4
move C example 2022-08-31 14:05:43 -04:00
Bryce Miller
841af10f36
move Swift example 2022-08-31 13:39:24 -04:00
Bryce Miller
ec548d9143
Move Rust example 2022-08-31 13:21:53 -04:00
Ayaz Hafiz
593d609c2b
Check for unifiability of lambda sets without a subs snapshot
Gives nice performance wins, in particular avoiding clones of
unification tables, which can grow quite large.

Closes #3940
2022-08-31 08:56:45 -05:00
Brian Carroll
9e96241e3e
get static-site-gen working with surgical linker 2022-08-31 09:00:45 +01:00
Folkert de Vries
7e31f67910
Merge pull request #3919 from roc-lang/surgical-no-break-caching
surgical linker: don't generate dynhost if it's unchanged
2022-08-31 09:04:13 +02:00
Brian Carroll
f1cb7d735b
try to use legacy linker on static-site-gen in example tests 2022-08-30 23:57:38 +01:00
Folkert
ab2163b800
sort symbols 2022-08-30 15:00:58 +02:00
dependabot[bot]
048766cb3a
Bump memmap2 from 0.5.5 to 0.5.7
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.5 to 0.5.7.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.5...v0.5.7)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 12:34:16 +00:00
dependabot[bot]
3745bdeb8a
Bump glyph_brush from 0.7.4 to 0.7.5
Bumps [glyph_brush](https://github.com/alexheretic/glyph-brush) from 0.7.4 to 0.7.5.
- [Release notes](https://github.com/alexheretic/glyph-brush/releases)
- [Commits](https://github.com/alexheretic/glyph-brush/compare/glyph-brush-0.7.4...glyph-brush-0.7.5)

---
updated-dependencies:
- dependency-name: glyph_brush
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 12:33:54 +00:00
Folkert de Vries
00772c3315
Merge pull request #3932 from roc-lang/dependabot/cargo/futures-0.3.24
Bump futures from 0.3.21 to 0.3.24
2022-08-30 14:32:54 +02:00
Folkert de Vries
5c7acf8f72
Merge pull request #3933 from roc-lang/dependabot/cargo/clap-3.2.18
Bump clap from 3.2.11 to 3.2.18
2022-08-30 14:32:41 +02:00
Folkert
a274da62d3
use the windows builtins .obj when cross-compiling 2022-08-30 14:27:16 +02:00
Folkert
e8f6f69bff
make filenames cross-platform 2022-08-30 14:16:20 +02:00
Folkert
42ef5d1977
build a builtins .obj file for windows cross-compilation 2022-08-30 13:49:47 +02:00
Folkert
3e78395237
changes after review 2022-08-30 12:32:19 +02:00
Folkert de Vries
18b45069b3
Merge pull request #3862 from roc-lang/dependabot/cargo/bytemuck-1.12.1
Bump bytemuck from 1.11.0 to 1.12.1
2022-08-30 12:18:31 +02:00
dependabot[bot]
492eff3556
Bump clap from 3.2.11 to 3.2.18
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.11 to 3.2.18.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.18/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.11...v3.2.18)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 10:17:11 +00:00
dependabot[bot]
52b4aecb4c
Bump futures from 0.3.21 to 0.3.24
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.21 to 0.3.24.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.24)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 10:15:46 +00:00
Folkert de Vries
3dbf6cc99b
Merge pull request #3859 from roc-lang/dependabot/cargo/insta-1.19.0
Bump insta from 1.18.2 to 1.19.0
2022-08-30 12:14:24 +02:00
Folkert de Vries
938c55ee1e
Merge pull request #3872 from raleng/fix_formatting_multiline_strings
Fix multiline string formatting
2022-08-30 11:31:53 +02:00
Folkert de Vries
30df869f9b
Merge pull request #3929 from roc-lang/chased-ext-custom-type
chased ext custom type
2022-08-30 11:10:57 +02:00
Brendan Hansknecht
ed7f066d33
Merge pull request #3916 from roc-lang/surgical-text-surgeries
surgical linker: extract finding surgeries in text
2022-08-30 03:00:26 +00:00
Folkert
d93d42da8c
make chasing an ext return a custom type 2022-08-30 00:51:24 +02:00
Folkert de Vries
acb71d6007
Merge pull request #3835 from roc-lang/ext-vars-in-derivers
Support bound and unbound extension variables in deriving
2022-08-30 00:34:50 +02:00
Folkert
d9db0b7096
fix shared object file extension 2022-08-30 00:15:48 +02:00
Folkert
835d3b9eb0
move stuff into files 2022-08-30 00:10:44 +02:00
Folkert
62a818883a
generate a minimal, fake .dll with the host-exposed symbols 2022-08-29 23:58:05 +02:00
Folkert de Vries
f918f16b0f
Merge pull request #3922 from roc-lang/i3722
Only compile and run expects that belong to the same package
2022-08-29 23:21:17 +02:00
Brian Carroll
1a8419e9e6
cli_run: support examples with more than one path argument 2022-08-29 22:13:08 +01:00
Brian Carroll
5d6037d888
cli_run: add test for static-site-gen example and print more to stdout 2022-08-29 22:05:35 +01:00
isaacthefallenapple
4c5e89f46c
replace unsound MaybeUninit deref with ptr::copy
Signed-off-by: isaacthefallenapple <isaacthefallenapple@gmail.com>
2022-08-29 17:00:03 +02:00
Ayaz Hafiz
b44d68aac5
Handle Roc's return by pointer flowing into a C ABI return by pointer 2022-08-29 08:56:22 -05:00
Folkert de Vries
1db7c3664d
Merge pull request #3877 from roc-lang/dev-backend-add-checked
dev backend add checked
2022-08-29 09:47:20 +02:00
Brendan Hansknecht
3895abd540
Merge pull request #3915 from roc-lang/surgical-use-struct-syntax
surgical linker: use struct initialization syntax
2022-08-29 03:00:34 +00:00
Brian Carroll
6cada1ab6e
Try (unsuccessfully) to fix an LLVM code gen bug
We still get a panic as follows:

cargo run run --debug examples/static-site-gen/app.roc -- examples/static-site-gen/input examples/static-site-gen/output

 Stored value type does not match pointer operand type!
  store { [0 x i64], [24 x i8], i8, [7 x i8] }* %result_value, { [0 x i64], [24 x i8], i8, [7 x i8] }* %0, align 8
 { [0 x i64], [24 x i8], i8, [7 x i8] }*
2022-08-28 23:58:42 +01:00
Richard Feldman
c6516acdb4
Drop unused ExecutionMode 2022-08-28 16:01:37 -04:00
ayazhafiz
3456a44742
Only compile and run expects that belong to the same package
In particular, don't run expects that come from modules with a different
package qualification (including subpackages; we can loosen this
restriction later), or builtins when run on userspace apps/interfaces.

Closes #3722
2022-08-28 10:16:55 -05:00
Folkert
d433448d6f
don't regenerate the dynhost file if it is unchanged 2022-08-28 13:17:50 +02:00
Jan Van Bruggen
a53819cad1
Refer to the user with explicit 2nd-person voice 2022-08-28 01:39:30 -06:00
Jan Van Bruggen
626fe7787d
Remove trailing periods & add newlines, for consistency 2022-08-28 01:39:29 -06:00
Jan Van Bruggen
bdc9246db0
Rephrase to imperative tense, for consistency 2022-08-28 01:13:33 -06:00
Richard Feldman
3ca9202e3b
Merge pull request #3834 from roc-lang/rust-1.63-clippy
rust 1.63 clippy
2022-08-27 21:15:36 -04:00
Richard Feldman
adb89bbf82
Merge pull request #3734 from roc-lang/decoding-optional-record-fields-illegal
Report errors for attempting to derive decoding of records with optional field types
2022-08-27 21:12:44 -04:00
Richard Feldman
395105ae54
Merge pull request #3904 from roc-lang/fix-as-into-glue
Fix glue for into_ and as_ on single-tag unions
2022-08-27 20:57:00 -04:00
Folkert
0ca79c7a60
add some comments 2022-08-28 00:12:48 +02:00
Folkert
764b9f656e
simplify pattern 2022-08-28 00:08:07 +02:00
Folkert
2bc809503a
extract looking at the text sections 2022-08-28 00:07:29 +02:00
Folkert
e009f7888e
prettify 2022-08-27 23:30:00 +02:00
Folkert
476521e7b7
use struct initialization syntax 2022-08-27 23:23:08 +02:00
Brendan Hansknecht
6e19ca1da6
Merge pull request #3911 from roc-lang/surgical-symbol-tests
surgical symbol tests
2022-08-27 16:50:08 +00:00
Richard Feldman
7e3a10906c
Merge pull request #3888 from roc-lang/windows-cross-compilation
windows cross compilation
2022-08-27 07:59:05 -04:00
Folkert
57c12b009b
find the undefined symbols 2022-08-27 12:21:49 +02:00
Folkert
0238471241
add a test for extracting symbols from a dynhost 2022-08-27 12:19:06 +02:00
Folkert
c4d25e0180
extract symbol collecting logic 2022-08-27 12:17:29 +02:00
Folkert
45b32106ec
add an example dynhost elf file 2022-08-27 12:16:28 +02:00
Folkert de Vries
4cfe99c598
Merge pull request #3901 from roc-lang/windows-build-cli
windows build cli
2022-08-27 00:15:00 +02:00
Brian Carroll
1603927507
Always skip subs cache on Windows 2022-08-26 21:28:09 +01:00
Richard Feldman
282a31ae8b
Fix glue for into_ and as_ on single-tag unions 2022-08-26 11:28:26 -04:00
Richard Feldman
641f089384
Use repr(transparent) for single-tag union glue 2022-08-26 09:18:20 -04:00
Anton-4
e917f1066f
Merge pull request #3817 from roc-lang/www-repl-nightly
ci: create a CI script to include the web REPL in nightly builds
2022-08-26 13:13:26 +02:00
raleng
85eda83398
Enable and add multi-line string formatting tests 2022-08-26 12:19:14 +02:00
raleng
1c8bc7d969
Fix formatting block string containing quotes
Single-line block strings are parsed as PlainLines. When the string
contains quotes, this leads to invalid formatted strings. This commit
special cases strings containing quotes the same as strings containing
newlines and formats them to multiple lines using triple-quotes.
2022-08-26 11:36:54 +02:00
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
601090b0bb
Get rid of Rust warnings in repl_expect on Windows 2022-08-26 08:44:32 +01:00
Brian Carroll
6bae249a71
Add dummy roc_alloc in roc_docs_cli for Windows 2022-08-26 08:44:31 +01:00
Brian Carroll
7caca140b0
Further disable roc_repl_expect on Windows 2022-08-26 08:44:31 +01:00
Brian Carroll
4a4c7b7a11
Fix Rust warnings in roc_cli on Windows 2022-08-26 08:44:30 +01:00
Folkert
1f778db26c
define roc_alloc and friends in cli/src/lib.rs on windows 2022-08-26 08:44:30 +01:00
Folkert
f2b2adb550
attempt to disable roc_repl_expect on windows 2022-08-26 08:44:26 +01: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
6a70db7fee
ci: create a CI script to include the web REPL in nightly builds 2022-08-25 08:41:26 +01:00
Brian Carroll
10e88a002d
Fix warnings in roc_load on Windows 2022-08-25 08:30:52 +01:00
Folkert de Vries
a8b83cfe37
Merge pull request #3858 from roc-lang/surgical-generate-dylib
Surgical generate dylib
2022-08-25 09:03:52 +02: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
Brian Carroll
6038a5da0d
cli: use memexec crate to execute raw bytes on Windows without spawning a process 2022-08-24 21:36:49 +01: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
Richard Feldman
7ca0b5e190
Merge pull request #3884 from dit7ya/fix/3875/repl-quit-instructions
Change repl behavior and instructions around quit
2022-08-24 13:36:04 -04: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
430c783859
add windows target to the cli 2022-08-24 15:51:54 +02: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
Mostly Void
c5aa453071
Change repl behavior and instructions around quit 2022-08-24 17:34:01 +05:30
Folkert
87988a301b
cleanup 2022-08-24 12:34:08 +02:00
Ayaz Hafiz
eec16fc0ff
Remove old file if it was present 2022-08-23 15:42:54 -05:00
Ayaz Hafiz
3b2e3d515f
Include var in lambda set size traces 2022-08-23 15:42:01 -05:00
Ayaz Hafiz
963911814f
Print traces to files with ROC_LOGTO 2022-08-23 15:37:33 -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
0a2ffc8ba4
rename 2022-08-23 21:20:44 +02:00
Folkert
e609919f39
cleanup 2022-08-23 21:20:23 +02:00
Folkert
daee025ff6
more hardcoding 2022-08-23 21:15:32 +02: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
d016d5eeb9
Refine message 2022-08-23 10:39:51 -05:00
Ayaz Hafiz
92ce0c0662
Fix opaque typo 2022-08-23 10:39:51 -05:00
Ayaz Hafiz
cfc46c05ae
Turn on reporting test that works now 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
Ayaz Hafiz
958f64c8fc
Turn on reporting test for underivable record 2022-08-23 10:38:02 -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
Folkert
df77b8bac1
simplify reserving of alloc sections 2022-08-23 16:09:25 +02:00
Folkert
3431182ac9
simplify dynamic section hack 2022-08-23 15:37:12 +02:00
Folkert
9cef677674
refactor 2022-08-23 15:35:44 +02:00
Folkert
d3db9a0fef
more hardcoding 2022-08-23 15:32:47 +02:00
Folkert
0fb137cc93
hardcode the dynamic section content 2022-08-23 15:14:42 +02:00
Folkert
164265f315
strip hash some more 2022-08-23 14:48:13 +02:00
Folkert
9b2a43639b
unroll a loop 2022-08-23 14:34:26 +02:00
Folkert
d7499ce928
hardcode some hash table properties 2022-08-23 14:17:30 +02:00
Folkert
fd5e9a9b48
stop sorting symbols before hashing 2022-08-23 14:12:06 +02:00
Folkert
597b4752dc
rename MySection -> Section 2022-08-23 14:05:57 +02:00
Folkert
f4a388ce90
cleanup 2022-08-23 14:02:19 +02:00
Folkert
fcead21c17
remove .ehframe section from the dylib 2022-08-23 14:00:54 +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
4ba132f7d0
Make sure inferring decode into nested function type is an error 2022-08-22 17:06:22 -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]
22ba03f72f
Bump bytemuck from 1.11.0 to 1.12.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.11.0 to 1.12.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.11.0...v1.12.1)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 05:24:59 +00: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
a8964f87aa
Add roc dev command to CLI 2022-08-21 18:07:59 -04:00
Richard Feldman
3a1f2a2fcf
clippy 2022-08-21 18:06:32 -04:00
Richard Feldman
3b9c65aefe
Disable more clippy checks in glue 2022-08-21 18:06:31 -04:00
Richard Feldman
e829d2af5b
Revert "Ignore all clippy lints in glue"
This reverts commit 436d2359f5352eed18b91022cf5d86a00dd0c6b4.
2022-08-21 18:06:31 -04:00
Richard Feldman
c1aee72c73
Ignore all clippy lints in glue 2022-08-21 18:06:31 -04:00
Richard Feldman
32f4546518
Skip rustfmt on glue 2022-08-21 18:06:31 -04:00
Richard Feldman
cd01e7fe76
Add #![allow(unused_unsafe)] to Rust glue header 2022-08-21 18:06:31 -04:00
Richard Feldman
64cea0e7ff
Don't glue ManuallyDrop for types that are Copy 2022-08-21 18:06:31 -04:00
Richard Feldman
577128d410
Check in initial glue for RocType etc 2022-08-21 18:06:30 -04:00
Richard Feldman
fa1f2f87ae
Fix glue generation for keywords 2022-08-21 18:06:30 -04:00
Richard Feldman
ace37cf613
Glue 2-tag unions w/ no payloads (but aren't Bool) 2022-08-21 18:06:30 -04:00
Richard Feldman
539429f16b
Add RocType.roc to glue 2022-08-21 18:06:29 -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
Folkert
a7ab08b2ba
cleanup 2022-08-21 21:10:40 +02:00
Folkert
88c8ee6c93
use our section iterator instead of in_sections 2022-08-21 21:06:30 +02:00
Folkert
4e9bff9eb6
don't add our symbols to the eh_frame section; it's not needed 2022-08-21 20:41:31 +02: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
5261005096
more cleanup 2022-08-21 15:50:12 +02:00
Folkert
5035d022e0
cleanup 2022-08-21 15:36:48 +02:00
Folkert
0005635899
refactor section reserving 2022-08-21 15:30:46 +02:00
Folkert
729e556534
fake it well enough that cli tests all pass 2022-08-21 15:19:39 +02:00
Folkert
08e4abbf0a
reorder section writing to be correct 2022-08-21 14:21:02 +02: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
Folkert
9efa02c569
add more sections 2022-08-20 21:18:08 +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
Folkert
51a187c717
cleanup 2022-08-20 17:18:21 +02:00
Folkert
207e65bfa3
able to link hello world 2022-08-20 17:16:58 +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
Folkert
17e9866a5f
strip out what we don't need 2022-08-20 15:07:16 +02:00
Folkert de Vries
8937e2fecc
Merge pull request #3838 from roc-lang/i1745
Add polymorphic expression reproduction cases from #1745
2022-08-20 13:49:29 +02:00
Ayaz
b050c57665
Merge pull request #3839 from roc-lang/roclist-from-array
Allow creating RocList from sized array
2022-08-19 22:22:04 -05: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