Brendan Hansknecht
266fe4bdc8
fix zig tests
2024-07-13 10:39:56 -07:00
Brendan Hansknecht
1e04668ee4
remove ld_classic and fix dev backend missing layout
2024-07-13 10:39:56 -07:00
Brendan Hansknecht
0f7964cc9c
get runtime representation within a pointer instead of of pointers to correctly find refcount functions
2024-07-13 10:39:55 -07:00
Brendan Hansknecht
a8bef30392
fix gen_refcount tests
2024-07-13 10:39:55 -07:00
Brendan Hansknecht
ad76fa2a4e
use calloc to make wasm tests consistent
2024-07-13 10:39:55 -07:00
Brendan Hansknecht
f92d1934d4
add missing symbol in call
2024-07-13 10:39:55 -07:00
Brendan Hansknecht
ba9b15f7d6
generate elem refcount function and pass it into decref lowlevel
2024-07-13 10:39:55 -07:00
Brendan Hansknecht
516afaff41
minor arg correction
2024-07-13 10:39:55 -07:00
Brendan Hansknecht
7529883451
correct list.dropAt arguments in dev wasm
2024-07-13 10:39:55 -07:00
Brendan Hansknecht
927eff0bf4
generate indirect refcount calls in wasm backend
2024-07-13 10:39:55 -07:00
Brendan Hansknecht
0ad638b17d
minor cleanup
2024-07-13 10:39:54 -07:00
Brendan Hansknecht
b381271150
tiny bit of minor cleanup
2024-07-13 10:39:54 -07:00
Brendan Hansknecht
d0b564360b
correct low level calling for list incref/decref
2024-07-13 10:39:54 -07:00
Brendan Hansknecht
23154c41aa
Revert "start correct list refcount function generation"
...
This reverts commit a8b4d0ef7f492215ce2228a34c6046c4790cc6db.
2024-07-13 10:39:54 -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
175255cf86
remove accidental .zig-cache
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
94fe0820d5
start correct list refcount function generation
2024-07-13 10:39:54 -07:00
Brendan Hansknecht
61784629e7
update todos around list refcount func generation
2024-07-13 10:39:54 -07:00
Brendan Hansknecht
6b761f6f81
fix zig builtin compilation and warnings
2024-07-13 10:39:53 -07:00
Brendan Hansknecht
669daad33d
wasm backend call into zig to allocate with refcount correctly
2024-07-13 10:39:53 -07:00
Brendan Hansknecht
54d0409396
correct some gen dev layouts
2024-07-13 10:39:53 -07:00
Brendan Hansknecht
9e70308952
cleanup misc minor issues
2024-07-13 10:39:53 -07:00
Brendan Hansknecht
48eb9c31a9
update list generated refcounting functions for dev and wasm
2024-07-13 10:39:53 -07:00
Brendan Hansknecht
3238ee7d0d
correct UTILS_FREE_DATA_PTR function calls
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
d5e91ed61e
Update dev and wasm backend to use new list bitcode args
2024-07-13 10:39:52 -07:00
Brendan Hansknecht
f87c32ca7d
clippy
2024-07-13 10:39:52 -07:00
Brendan Hansknecht
44cd1ee9c4
Avoid accessing unallocated bytes in list.incref
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
a1d08702a4
Update roc_std List to handle size on the heap
...
This increased the number of failing tests for some reason (more segfaults).
That said, I think it is correct.
Probably just exposing errors from elsewher that haven't been addressed (maybe causing a double free).
2024-07-13 10:39:51 -07:00
Brendan Hansknecht
93fab26c01
Add a RocRefcounted trait in roc_std
...
This is required to properly handle refcounting of RocList.
Without it, we can't tell if we need to get the length from the heap.
That said, it isn't a pretty solution.
I think dealing with generating bespoke type in glue would feel nicer than this but be much more work.
It also would deal with the issue of implementations in the bitcode not matching external libraries.
That said, it would require exposing way more symbols from roc for each monomophorphized list variant.
2024-07-13 10:39:51 -07:00
Brendan Hansknecht
3c842196fa
Update LLVM to properly increment and decrement lists
2024-07-13 10:39:51 -07:00
Brendan Hansknecht
255cc31ad9
change zig bitcode refcounting to require whether or not an element is refcounted
...
This also requires zig bitcode to have access to the dec functions for elements.
This is needed so that zig will be able to free elements in lists.
2024-07-13 10:39:51 -07:00
Anton-4
42a366481b
fix wasm repl warnings
2024-07-13 18:45:01 +02:00
Anton-4
b702cb634f
better mono repl error
2024-07-12 17:02:34 +02:00
Anton-4
3a36d84c45
update to basic-cli 0.12
2024-07-10 20:07:03 +02:00
Anton-4
15a7ed2e95
added error tip
2024-07-09 19:46:33 +02:00
Anton-4
0d9db5bf2d
Merge pull request #6881 from roc-lang/empty-open-union
...
fix openness inference for empty tag
2024-07-09 16:46:54 +02:00
Anton-4
4341c37b99
cleanup
2024-07-09 13:55:39 +02:00
Sam Mohr
b9a17f4a49
Merge pull request #6883 from smores56/new-builder-syntax
...
Implement new builder syntax alongside old one
2024-07-08 11:19:01 -07:00
Anton-4
0502734293
fmt
2024-07-08 14:14:36 +02:00
Anton-4
6b2d2e3406
minor improvements
2024-07-08 14:11:22 +02:00
Kiryl Dziamura
2cad4b3e21
update test snapshots
2024-07-08 11:51:29 +02:00
Kiryl Dziamura
3f22c55dda
fix suffixed tests
2024-07-08 11:39:04 +02:00
Kiryl Dziamura
ebf55fa793
fix region calculation
2024-07-08 11:39:03 +02:00
Kiryl Dziamura
b2484f144c
fix def replace
2024-07-08 11:39:03 +02:00
Kiryl Dziamura
8163de02f3
refactor unique ident generator
2024-07-08 09:44:36 +02:00
Kiryl Dziamura
64220567e5
better documentation for underscore pattern
2024-07-08 09:44:36 +02:00