Commit graph

9669 commits

Author SHA1 Message Date
Agus Zubiaga
90b76db5b1
Specialize number patterns 2024-12-14 18:56:16 -03:00
Agus Zubiaga
3948f485a0
Implement dbg for when mono exprs 2024-12-14 18:14:09 -03:00
Agus Zubiaga
222af2e484
Use MaybeUninit in WhenBranches 2024-12-13 18:46:28 -03:00
Agus Zubiaga
30532bf565
Specialize when idents 2024-12-12 22:28:41 -03:00
Agus Zubiaga
8f1f4a8c2a
Add MonoExpr::When type 2024-12-12 19:21:42 -03:00
Brendan Hansknecht
109cafcafe
fix how benchmark script is loaded on main
To get #6921 working, we need the benchmark script to pull glue.zig correctly on main.
As such, we need to load it into a lib dir such that it is found in the correct relative path.
This hopefully will get the benchmarking working on the other PR.

Also, switch over to `lib` dir first cause that is what is seen in the wide.
2024-12-12 09:54:36 -08:00
Eli Dowling
27b36a8f1f
Merge pull request #7335 from faldor20/add-lsp-range-info-for-file-load-errors-
Add lsp range info for file load errors
2024-12-12 21:41:22 +10:00
faldor20
c731c5daae
resolve comments 2024-12-12 20:54:25 +10:00
faldor20
a7308130cf
clippy on everything 2024-12-12 20:54:25 +10:00
faldor20
7eb81fbcf3
drilling into every error type when getting region 2024-12-12 20:54:25 +10:00
faldor20
81f2095e61
basic working
compiling, but still missing positions from expression errors
2024-12-12 20:54:25 +10:00
Richard Feldman
aaf82dd417
Merge branch 'main' into specialize-exprs-bools 2024-12-11 23:09:35 -05:00
Richard Feldman
45cf580031
Apply suggestions from code review
Reuse some variables in tests.

Signed-off-by: Richard Feldman <oss@rtfeldman.com>
2024-12-11 22:09:32 -05:00
Joshua Warner
3f2117403e
Fix bug found in the wild via fuzzing, move fuzzing job to the end 2024-12-11 18:39:15 -08:00
Brendan Hansknecht
146710a129
Merge pull request #7338 from roc-lang/dbg-and-expect
Dbg and Expect Fixes and Improvements
2024-12-11 16:23:27 -08:00
Agus Zubiaga
5c24972a2a
Add PairSlice.is_empty 2024-12-11 21:03:11 -03:00
Brendan Hansknecht
37c6330c6f
cleanup when expects are run 2024-12-11 15:15:46 -08:00
Brendan Hansknecht
8068fa6d1b
still run in BinaryDev mode with roc main.roc for expect messages 2024-12-11 14:56:12 -08:00
Brendan Hansknecht
4cf5683ee8
Always generate dbg expressions 2024-12-11 14:55:32 -08:00
Agus Zubiaga
92aeee445b
Clean up unwraps in dbg_mono_expr_help 2024-12-11 18:32:09 -03:00
Agus Zubiaga
8156272438
Remove statement/block concept from mono_ir 2024-12-11 18:16:28 -03:00
Agus Zubiaga
0585f32039
Specialize if 2024-12-11 18:09:54 -03:00
Agus Zubiaga
2ca829aaa8
Handle RangedNumber 2024-12-11 18:09:44 -03:00
Agus Zubiaga
18d817246e
Specialize lookups and bool types 2024-12-11 16:53:58 -03:00
Agus Zubiaga
9868c5cfac
Do not return Option from monomorphize_var 2024-12-11 15:26:40 -03:00
Agus Zubiaga
4b28136143
Do not discard empty types in specialize_types
Currently, `to_mono_expr` returns `Nothing` when it encounters
an empty record and it discards fields that are empty.

For simplicity, we decided to do this at a later stage, so this changes
it to return a new `MonoExpr::Unit` type instead.
2024-12-11 12:13:11 -03:00
Joshua Warner
a5bcf55d08
Implement initial version of fuzzing in CI (#7316)
* Implement initial version of fuzzing

* try nix config

* try rustup

* rustup run

* Fix syntax

* wip

* specific nightly

* wip

* specific nightly with+

* install

* locked
2024-12-11 12:57:24 +01:00
Brendan Hansknecht
d746e2a041
Merge pull request #7330 from roc-lang/sendsafe-refcounted
add RocRefcounted to SendSafe types and add ReadOnly types
2024-12-10 21:58:17 -08:00
Brendan Hansknecht
5d0947960c
fix small string handling 2024-12-10 20:29:46 -08:00
Brendan Hansknecht
5fbf8f5b1c
fmt and clippy 2024-12-10 20:11:28 -08:00
Brendan Hansknecht
98cde41439
add readonly roc list and roc str to roc_std 2024-12-10 20:03:08 -08:00
Brendan Hansknecht
0e162a767d
add RocRefcounted to SendSafe types 2024-12-10 19:34:54 -08:00
Joshua Warner
04612fb2cb
Fix as pattern formatting inside apply 2024-12-10 18:55:40 -08:00
Brendan Hansknecht
76cb2b09cd
Stop ignoring --optimize in roc --optimize main.roc
This is just inconvenient and does not make our api better.
Leads to users thinking that roc does not optimize well.
This also allows `roc dev --optimize` (which is the exact same as `roc --optimize`).
If a user wants to do that, it should be fine.

This will all eventually be replaced by the larger cli rewrite.
2024-12-10 08:51:28 -08:00
Joshua Warner
93c2ba3b22
Feedback: tuple types -> tuples 2024-12-09 21:24:10 -08:00
Joshua Warner
6b636d9539
Set up module ids properly 2024-12-09 21:24:10 -08:00
Joshua Warner
cbd6d50584
Give an error instead of panicking on an empty tuple type 2024-12-09 21:24:09 -08:00
Luke Boswell
861f9c5d47
Merge pull request #7323 from Elkiders99/Add-legacy-linker-recommendation
add legacy linker recommendation
2024-12-09 15:18:51 +11:00
Brendan Hansknecht
6e9f6843c4
Merge pull request #7319 from roc-lang/dec-mul
fix dec multiplication with overflow and saturation
2024-12-08 17:08:52 -08:00
Asustin Shotero
149b2d5099
add legacy linker recommendation
Signed-off-by: Asustin Shotero <56707055+Elkiders99@users.noreply.github.com>
2024-12-08 21:26:38 -03:00
Luke Boswell
6675734c16
Merge pull request #7314 from shua/wrapped
impl add/sub/mul wrapped for u128/i128
2024-12-09 11:19:58 +11:00
Brendan Hansknecht
562032e2d8
fix dec multiplication with overflow and saturation
fixes #7276
2024-12-08 11:14:38 -08:00
Ayaz
793a95264d
Merge branch 'main' into wrapped 2024-12-08 13:54:43 -05:00
Sam Mohr
01f4d4f3da
Merge branch 'main' into cleanup_unused 2024-12-08 10:14:47 -08:00
shua
8a35610c5f
add wasm impl 2024-12-08 13:30:24 +01:00
Luke Boswell
a4fd57e54f
Merge pull request #7310 from joshuawarner32/test_syntax_can
Extend test_syntax to check that canonicalization doesn't panic on the input
2024-12-08 21:26:42 +11:00
Luke Boswell
f0cc363b53
Merge pull request #7317 from roc-lang/ayaz/fix-pass-by-reference
Fix pass by reference for compare fn
2024-12-08 21:25:52 +11:00
Joshua Warner
519bf534b2
Remove commented import 2024-12-07 09:11:52 -08:00
shua
def796f146
PR: refac tests, add all int cases for *wrap tests 2024-12-07 16:27:25 +01:00
Alex Nuttall
7096531205
update search.js 2024-12-07 15:11:16 +00:00