Commit graph

1143 commits

Author SHA1 Message Date
Lars Frogner
560171c238
Add Num.[f32,f64,dec]_[to,from]_bits builtins and deprecate Num.[f32,f64]_[to,from]_parts (#7741)
* Add `Num.[f32,f64,dec]_[to,from]_bits` builtins

* Update mono tests

* Deprecate `Num.[f32,f64]_[to,from]_parts`
2025-04-18 10:10:45 +02:00
Sam Mohr
cf1cfefadb
Merge pull request #7543 from HajagosNorbert/ascii
add with_ascii_uppercased and caseless_ascii_equals to Str
2025-01-24 10:58:22 -08:00
Norbert Hajagos
fc0a9ec4cf
add with_ascii_uppercased and caseless_ascii_equals to Str 2025-01-23 15:21:11 +01:00
shua
d67d94b15c
merge wasm_str tests into gen_str
This change merges the wasm_str.rs and gen_str.rs tests.
Any tests that could be run on all three backends now are, in addition some
tests were added that just fail whenever some unimplemented things get implemented
so the implementer will be forced to start testing the new code.
2025-01-22 22:59:43 +01:00
shua
6c29d7aa1f
Merge branch 'main' into fromutf-roc 2025-01-20 19:16:38 +01:00
Norbert Hajagos
06640edb63
Use parens, not WSA in tests, add docs linebreaks, factor calls into a var. 2025-01-20 10:58:44 +01:00
Norbert Hajagos
41fafc1497
run formatter, change Str.dropPrefix to snake_case in failing test. 2025-01-20 10:58:44 +01:00
Norbert Hajagos
8403f1ea19
with_ascii_lowercased zig builtin 2025-01-20 10:58:41 +01:00
Luke Boswell
c8467b1fe0
Merge pull request #7454 from roc-lang/ayaz/error-on-invalid-generalized-types
Restrict usages of type variables in non-generalized contexts
2025-01-20 11:30:52 +11:00
Sam Mohr
317f04354f
Fix WASM test 2025-01-17 21:24:23 -08:00
shua
17624a9d2c
Merge branch 'main' into fromutf-roc 2025-01-18 01:58:14 +01:00
Sam Mohr
a292e070d4
Prefer and and or for boolean operators 2025-01-17 16:15:31 -08:00
Ian McLerran
14d99c6907
update solve_expr and test_gen tests with map_ok 2025-01-15 21:30:19 -06:00
shua
414fecd14d
add fromUtf16 and 32, as well as lossy variants 2025-01-15 00:17:09 +01:00
Brendan Hansknecht
7643f89781
Merge branch 'main' into simplify-refcount
Signed-off-by: Brendan Hansknecht <Brendan.Hansknecht@gmail.com>
2025-01-10 20:34:52 -08:00
Ayaz Hafiz
89700b491c
Fix some tests 2025-01-10 20:49:53 -05:00
Sam Mohr
eb1b5ffa26
Move to new interpolation syntax 2025-01-10 10:29:20 -08:00
Luke Boswell
d9d2ce83d6
Merge remote-tracking branch 'remote/main' into annotate-type-signatures 2025-01-09 14:21:37 +11:00
Sam Mohr
2150ee2219
Remove Task from Roc 2025-01-08 17:00:40 -08:00
Luke Boswell
37cd04c002
Merge branch 'main' into simplify-refcount 2025-01-09 10:18:00 +11:00
Sam Mohr
7a2f8bfa71
Merge branch 'main' into auto-snake-case 2025-01-07 13:18:41 -08:00
Luke Boswell
8540aa1a14
Merge pull request #7321 from shua/fromutf8
DO NOT MERGE update Str.fromUtf8 error type
2025-01-08 07:56:40 +11:00
Sam Mohr
b56fbd38e1
Progress on updating entire compiler for snake_case 2025-01-05 03:48:03 -08:00
Brendan Hansknecht
4b8693537a
Simplify Refcounting
Instead of -max_size to -1 for regular refcounts, use 1 to max_size.
0 still means constant refcount.
The highest bit is used to signify atomic refcounting required.
This does not turn on any sort of atomic refcounting.
2025-01-01 11:00:18 -08:00
Jared Ramirez
7daa008a9a
Add Num.fromBool 2024-12-24 10:10:20 -05:00
Anton-4
63abc4bb01
Merge branch 'main' into fromutf8 2024-12-23 11:29:59 +01:00
Brendan Hansknecht
6ecf25bd3e
revert wasm_linking_test_host changes 2024-12-12 19:22:26 -08:00
Brendan Hansknecht
5a326f1a80
ensure sorting in wasm linker test 2024-12-12 18:23:29 -08:00
Brendan Hansknecht
d74a3c0746
Merge remote-tracking branch 'origin/main' into upgrade-llvm-zig 2024-12-12 13:29:10 -08:00
faldor20
a7308130cf
clippy on everything 2024-12-12 20:54:25 +10:00
Brendan Hansknecht
2475feeb2f
more wasm fixes 2024-12-11 21:47:18 -08:00
Brendan Hansknecht
87537b800e
merge llvm ir optimization locations 2024-12-11 17:33:20 -08:00
Brendan Hansknecht
0a573ca557
Merge remote-tracking branch 'origin/main' into upgrade-llvm-zig 2024-12-11 16:38:34 -08:00
Brendan Hansknecht
37c6330c6f
cleanup when expects are run 2024-12-11 15:15:46 -08:00
shua
f90e63b484
update test_gen str tests 2024-12-09 20:17:13 +01:00
Ayaz
793a95264d
Merge branch 'main' into wrapped 2024-12-08 13:54:43 -05:00
shua
def796f146
PR: refac tests, add all int cases for *wrap tests 2024-12-07 16:27:25 +01:00
Asher Frost
61512701b0
Merge branch 'main' into int_overflow 2024-12-04 19:04:53 -05:00
Richard Feldman
bc0c9250f9
Convert unused dbg!()s to eprintln!()s
This makes it nicer to work with dbg! normally,
because grepping the code base for dbg!() reveals
only the usages of it that are currently active.
2024-12-01 23:10:35 -05:00
Asher Frost
c2d06e3658
Made test pass 2024-12-01 16:03:40 -05:00
Asher Frost
7055253564
Merge branch 'main' into int_overflow 2024-12-01 15:32:39 -05:00
Luke Boswell
d7556be7bf
Merge pull request #7264 from shua/saturated
gen-dev: complete Num{Mul,Add,Sub}Saturated impls
2024-12-01 14:01:48 +11:00
shua
8fd2fbc3a1
gen-dev: complete Num{Mul,Add,Sub}Saturated impls
MulSaturated and AddSaturated are now implemented for u128, i128
SubSaturated is now implemented for Dec even if it's a little strange to
saturate at a decimal value:

```
» Num.subSaturated -170_141_183_460_469_231_731dec 1

-170141183460469231731.687303715884105728 : Dec
```

I decided to rm the `build_num_{mul,add}_saturated` methods because
they don't require any asm-specifics. They either call out to bitcode, or
use the non-saturated version for floats.
2024-11-30 23:01:44 +01:00
shua
6dfa458e6c
Num.powInt: panic on overflow 2024-11-30 11:26:42 +01:00
Luke Boswell
656a7bcd87
Merge remote-tracking branch 'remote/main' into upgrade-llvm-zig 2024-11-30 10:18:11 +11:00
wizard7377
7866331f67
Merge branch 'main' into int_overflow 2024-11-28 21:26:38 -05:00
Luke Boswell
fdaaca8c8b
replace cargo deps with workspace in lower_parms, module, mono, parse, problem, roc_target, serialize, solve, solve_problem, specialize_types, test_* 2024-11-29 11:29:04 +11:00
Luke Boswell
1ecb003887
Merge pull request #7250 from shua/fracdec
implement Num.isNaN,isFinite,isInfinite for Dec
2024-11-29 10:16:17 +11:00
Luke Boswell
2feb5d3c2e
Merge remote-tracking branch 'remote/main' into upgrade-llvm-zig 2024-11-29 08:58:47 +11:00
Asher Frost
0eb11932d9
Re-added tests 2024-11-28 10:11:05 -05:00