Commit graph

701 commits

Author SHA1 Message Date
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
Richard Feldman
bfbc9ceef0
Merge pull request #7258 from JRI98/remove_unused_typedhole_variant
Remove unused code
2024-11-29 00:19:49 -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
shua
039e5dd3d7
fix gen-llvm 2024-11-27 22:41:56 +01: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
shua
33e8a7a439
implement Str.concatUtf8 2024-06-07 19:05:52 +02:00
Brendan Hansknecht
dc539f759d
Improve OptSize implementation in Roc
1. Use the llvm `Oz` pipeline.
2. Avoid adding extra optimization passes.

This shrunk rocci-bird by ~16%.
2024-05-01 08:25:34 -07:00
Anton-4
3d2a5897e5
roc_bitcode false positive 2024-04-09 20:01:33 +02:00
Anton-4
f085b96f78
removed unused deps, added CI test 2024-04-09 19:47:31 +02:00
Fabian Schmalzried
4066d56b24
fix clippy errors 2024-04-02 00:04:59 +02:00
Fabian Schmalzried
313a3d37e6
move finctions 2024-04-01 21:08:17 +02:00
Fabian Schmalzried
376202c6e8
fix from parts 2024-04-01 21:08:16 +02:00
Fabian Schmalzried
9a91597b27
Windows to parts 2024-04-01 21:08:16 +02:00
Fabian Schmalzried
a1bd36812d
fix for llvm-wasm 2024-04-01 21:08:15 +02:00
Anton-4
ae2506469c
added comment
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-04-01 21:08:15 +02:00