Commit graph

1091 commits

Author SHA1 Message Date
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
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
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
JRI98
61ca278e31
Fix division of zero by zero for Dec 2024-11-27 23:38:21 +00:00
Agus Zubiaga
1dc9dd0a90
Merge branch 'main' into specialize-exprs 2024-11-27 11:35:14 -03:00
shua
10f04f1d94
implement Num.isNaN,isFinite,isInfinite for Dec 2024-11-27 00:36:54 +01:00
Brendan Hansknecht
e40b3cd6a9
Merge pull request #7235 from shua/devneg
impl Num.neg for Dec,F32,F64 in repl
2024-11-26 13:29:19 -08:00
shua
a98acff0b9
gen-dev: impl Num.neg for Dec,F32,F64
Dec negation was implemented across gen-dev, gen-llvm, gen-wasm as a call
to the compiled zig function `bitcode::DEC_NEGATE`.

f32 and f64 negation were implemented already for gen-llvm, gen-wasm.

for gen-dev x86_64, float negation is implemented by flipping the sign
bit, which means `xorps` for f32, and `xorpd` for f64

for gen-dev aarch64, there is conveniently a `fneg` instruction
2024-11-23 19:17:55 +01:00
Agus Zubiaga
2e96aca0fd
Merge branch 'main' into specialize-exprs 2024-11-23 01:48:51 -03:00
Sam Mohr
f857872903
Properly type constrain all function types 2024-11-21 04:09:47 -08:00
Sam Mohr
7ca305b5dc
Merge branch 'main' into constrain-early-return-functions 2024-11-18 15:04:34 -08:00
Isaac Van Doren
d99c347998
rename Str.split 2024-11-15 21:12:23 -06:00
Isaac Van Doren
ec59acea89
add List.splitOnList 2024-11-10 18:34:34 -06:00
Isaac Van Doren
0a7e98ab65
add List.splitOn 2024-11-10 18:20:31 -06:00
Isaac Van Doren
45b50bd131
add List.splitAt 2024-11-09 17:16:21 -06:00
Sam Mohr
9a2b99c148
Constrain early returns in functions in addition to closures 2024-11-08 00:05:56 -08:00
Sam Mohr
66cc96edbb
Address PR comments from @ayazhafiz 2024-10-29 15:58:35 -07:00
Sam Mohr
c19cfb0a34
Fix test_gen incorrect macro invocations 2024-10-26 18:22:19 -07:00
Sam Mohr
346a2d9467
Simplify tail-call checks 2024-10-26 16:29:14 -07:00
Sam Mohr
8a0cc10c93
Add test_gen tests for early returns 2024-10-24 23:41:53 -07:00
Richard Feldman
44d00e1f13
Updates for making soa no_std 2024-10-21 22:10:43 -04:00
Richard Feldman
98535bfbce
wip 2024-10-20 11:00:58 -04:00
Brendan Hansknecht
5646f829dc
Merge pull request #7146 from HajagosNorbert/hajagosnorbert/neg_int
gen_dev-x86_64 extend Num.neg to all Signed and Unsigned int sizes
2024-10-11 08:57:46 -07:00
Brendan Hansknecht
e6a149642d
minor fix 2024-10-07 21:16:30 -07:00
Brendan Hansknecht
a9d1327dd1
Enable multiple functions exposed to the host 2024-10-07 21:16:30 -07:00
Norbert Hajagos
72863daa7e
gen_dev-x86_64 extend Num.neg to all Signed and Unsigned int sizes 2024-10-07 23:43:58 +02:00
Luke Boswell
81f007940c
fix test_gen gen_str tests 2024-09-29 14:43:20 +10:00
Luke Boswell
760af4a04e
Merge remote-tracking branch 'remote/main' into str-dropping 2024-09-29 14:31:04 +10:00
Aurélien Geron
033d87034c
Add a test case for List.dropAt at an index located in the middle of the list 2024-09-19 10:05:48 +12:00
Sam Mohr
12df3a04de
Merge attempt 2024-08-19 23:34:05 -07:00
Luke Boswell
4be6c5d4ce
implement Str.dropPrefix and Str.dropSuffix 2024-08-17 17:21:37 +10:00
Sam Mohr
b1a972ab21
Implement &foo record updater syntax sugar 2024-08-16 01:41:59 -07:00
Luke Boswell
6bae15c467
resolve review comments 2024-08-14 17:24:12 +10:00
Luke Boswell
7aebee8c94
implement Result.mapBoth and Result.map2 builtins 2024-08-14 13:16:24 +10:00
Luke Boswell
eca453d07f
Merge remote-tracking branch 'remote/main' into builtin-task 2024-07-29 16:05:51 +10:00
Joshua Warner
4f32f43048
Implement block / indent based parsing
... and enforce that defs can only occur in blocks (or, inside parenthesized expressions)
2024-07-27 13:34:16 -07:00
Brendan Hansknecht
a81d4b8b16
add extra test case from issue 2024-07-20 20:31:29 -07:00
Brendan Hansknecht
c5a74bdc12
for referenced values, use allocas instead of phi nodes 2024-07-20 19:52:11 -07:00
Luke Boswell
b489c44b19
Merge remote-tracking branch 'remote/main' into builtin-task 2024-07-19 19:51:50 +10:00
Brendan Hansknecht
f6c231e259
disable some previous and still failing tests 2024-07-15 19:01:40 -07:00
Brendan Hansknecht
1f5f0956b7
add basic_cli parsing based refcount test 2024-07-15 09:12:23 -07:00
Brendan Hansknecht
507d339691
fix infinite recursion in dev rc generation 2024-07-15 09:04:50 -07:00
Brendan Hansknecht
0533578562
add missed RocRefcounted 2024-07-13 10:39:58 -07:00
Brendan Hansknecht
9052fbd09c
fix List.sublist and add some more refcounting tests 2024-07-13 10:39:58 -07:00
Brendan Hansknecht
0d083bc192
fix dev-wasm ListGetUnsafe refcounting 2024-07-13 10:39:57 -07:00
Brendan Hansknecht
5d613cd5f5
add more refcounting test cases 2024-07-13 10:39:57 -07:00
Brendan Hansknecht
f4117c99d5
add more refcounting test cases 2024-07-13 10:39:57 -07:00