Commit graph

711 commits

Author SHA1 Message Date
Brendan Hansknecht
37c6330c6f
cleanup when expects are run 2024-12-11 15:15:46 -08:00
Brendan Hansknecht
4cf5683ee8
Always generate dbg expressions 2024-12-11 14:55:32 -08:00
Luke Boswell
f6f2830bac
clippy 2024-12-07 20:37:57 +11:00
Ayaz Hafiz
6ddb65d529 Fix pass by reference for compare fn
https://roc.zulipchat.com/#narrow/channel/463736-bugs/topic/LLVM.20IR.20output.20in.20compiler.20crash.20during.20AOC!
2024-12-07 02:02:00 -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
shua
5712e265ae
patch: macos arm64, fix gen-llvm i128 bitcode call 2024-12-01 00:02:49 +01: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
Richard Feldman
0e550a7f68
Merge pull request #7265 from roc-lang/workspace-deps
Update cargo dependencies to use workspace
2024-11-29 17:38:03 -05:00
wizard7377
a81d07f19c
Merge branch 'main' into int_overflow 2024-11-29 15:45:12 -05:00
Richard Feldman
bfbc9ceef0
Merge pull request #7258 from JRI98/remove_unused_typedhole_variant
Remove unused code
2024-11-29 00:19:49 -05:00
wizard7377
7866331f67
Merge branch 'main' into int_overflow 2024-11-28 21:26:38 -05:00
Luke Boswell
3c394028d1
replace cargo deps with workspace in derive_key, exhaustive, fmt, gen_dev, gen_llvm 2024-11-29 11:17:42 +11:00
JRI98
75f13d3f2e
Remove unused RuntimeErrorFunction variant from roc_mono::ir::Expr 2024-11-28 20:11:56 +00:00
wizard7377
62db49f7d2
Merge branch 'roc-lang:main' into int_overflow 2024-11-28 08:35:17 -05:00
shua
039e5dd3d7
fix gen-llvm 2024-11-27 22:41:56 +01:00
Asher Frost
bddd2a0f57 Fixed casts from integer to integer 2024-11-26 17:32:11 -05: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
Joshua Warner
9ead801536
Remove expect-fx syntax and handling
This was never fully hooked up in platforms, and the plan is to replace the need for this with doing purity-inference on normal `expect` statements.

On the other hand, fuzzing is finding some bugs caused by having a hyphenated keyword, so this is a great time to go ahead and remove it!
2024-11-17 20:25:37 -08:00
Isaac Van Doren
d99c347998
rename Str.split 2024-11-15 21:12:23 -06:00
Agus Zubiaga
e3c6b756d3
Make sure to drop suffix from symbols exposed to the host 2024-11-07 18:54:23 -03:00
Brendan Hansknecht
5b8b781bad
remove single entrypoint 2024-10-07 21:16:30 -07:00
Ayaz
cef2c8ae87
Update build.rs
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2024-09-21 09:50:17 -04:00
Ayaz
9c656dd28e
Merge branch 'main' into ayaz/optimize-list-literal-alloc 2024-09-21 09:44:50 -04:00
Luke Boswell
49dedf0b7b
Merge branch 'main' into ayaz/optimize-list-literal-alloc 2024-09-17 19:44:02 +10:00
Brendan Hansknecht
4e3ec97d7a
generate array of alignment type to enforce tag data alignment 2024-09-16 17:10:49 -07:00
Brendan Hansknecht
a7eae239f0
Avoid explicit tag padding
Explicit padding changes the c-abi when passed to/returned from functions.
This is leading to incorrect loading of types like `Task U64 {}`.
2024-09-16 16:47:20 -07:00
Brendan Hansknecht
7997cf95e7
ensure alignment is never 0. Must be at least 1. 2024-08-25 11:48:46 -07:00
Brendan Hansknecht
cf5cd84d60
fix alignment of 16 bytes 2024-08-21 09:04:07 -07:00
Brendan Hansknecht
6b04318e27
handle float types 2024-08-09 19:27:47 -07:00
Brendan Hansknecht
462872551e
fix up list literal constant loading 2024-08-09 19:07:01 -07:00
Ayaz Hafiz
9abbcfaafc
Optimize literal list construction in LLVM backend
Currently, list literals are always heap-allocated and their elements
are stored by emitting a GEP and store for each item in the literal.
This produces huge quantities of IR, causing compile times for e.g.
programs with large literals or ingested files to blow up.

Instead, if a list literal consists entirely of literal values, create a
global section for the literal and return a pointer to it.
2024-08-09 18:51:17 -07:00
Brendan Hansknecht
82764dc697
switch to passing the copy function into zig (implement llvm) 2024-07-21 19:04:57 -07:00
Brendan Hansknecht
bccab34833
correct comment 2024-07-20 21:30:25 -07:00
Brendan Hansknecht
e804501a92
clippy 2024-07-20 21:21:43 -07:00
Brendan Hansknecht
703224b275
fix alloca args overwriting eachother 2024-07-20 21:14:31 -07:00
Brendan Hansknecht
c5a74bdc12
for referenced values, use allocas instead of phi nodes 2024-07-20 19:52:11 -07:00
Brendan Hansknecht
ee7f1e39c7
move all allocas to the entry block 2024-07-20 19:17:11 -07:00
Brendan Hansknecht
c734a27b59
move List.map* into roc 2024-07-13 10:39:56 -07:00
Brendan Hansknecht
94cb4fb8ff
remove inc functions from list.map*, the closure will inc in necessary 2024-07-13 10:39:56 -07:00
Brendan Hansknecht
e92cf1be42
Revert "attempt to correct list refcount generation in dev backends"
This reverts commit 0854a1a53a2db441c648140bdd24de91125ec645.
2024-07-13 10:39:54 -07:00
Brendan Hansknecht
36bc8bfac4
attempt to correct list refcount generation in dev backends 2024-07-13 10:39:54 -07:00
Brendan Hansknecht
48eb9c31a9
update list generated refcounting functions for dev and wasm 2024-07-13 10:39:53 -07:00
Brendan Hansknecht
0d0a4a8806
Update refcounting of list builtins to the new system. 2024-07-13 10:39:53 -07:00
Brendan Hansknecht
f87c32ca7d
clippy 2024-07-13 10:39:52 -07:00
Brendan Hansknecht
9b6798ead1
Correct refcounting check to be recursive through aggregate types 2024-07-13 10:39:52 -07:00
Brendan Hansknecht
951cb1ef3d
Correct list replace bitcode arg order 2024-07-13 10:39:52 -07:00
Brendan Hansknecht
3c842196fa
Update LLVM to properly increment and decrement lists 2024-07-13 10:39:51 -07:00
shua
a2c800452e
add branch on ptr width back
apple arm tests are failing, maybe this will fix it?
2024-06-10 23:16:33 +02:00
shua
f7bec802c0
PR: rename to List.concatUtf8 2024-06-08 13:36:20 +02:00