Luke Boswell
1519e5f833
fix warnings from deprecated llvm ptr type
2024-08-04 12:52:44 +10:00
Brendan Hansknecht
ee7f1e39c7
move all allocas to the entry block
2024-07-20 19:17:11 -07:00
Brendan Hansknecht
3c842196fa
Update LLVM to properly increment and decrement lists
2024-07-13 10:39:51 -07:00
Brendan Hansknecht
6dc5bfb1b7
Use roc_target over target_lexicon
...
Tailors a target class for our needs.
Replaces tons of uses across the entire compiler.
This is a base for later adding new targets like thumb.
2024-03-31 10:50:26 -07:00
Brendan Hansknecht
a2fcf76164
make sure that union refcounting branches to the decrement block
2024-01-06 08:34:46 -08:00
Folkert
f3abb3b466
add instructions to the right block
2024-01-06 15:52:53 +01:00
Brendan Hansknecht
88bac5eba7
ensure unions get freed even if they have no RC fields (hit when using box)
2024-01-05 22:20:58 -08:00
Brendan Hansknecht
f262102299
cleanup list and str builtin naming from refcount to allocation
2023-12-10 19:52:28 -08:00
Brendan Hansknecht
05c1b6c583
more debug info corrections
2023-12-04 14:27:02 -08:00
Brendan Hansknecht
398bf2f96c
update rust code to llvm-16 and fix build
...
also update:
- llvm frame address
- erased function type
- dec passing to zig
- gen dev storage size
2023-10-23 13:50:31 -07:00
Folkert
334253f47f
check inside a lambda set for whether it is reference counted
2023-07-26 20:06:37 +02:00
Ayaz Hafiz
3a3ee4dedf
Elide lifetimes
2023-07-12 16:10:59 -05:00
Ayaz Hafiz
3e23699bb4
Build easy refcounter for erased
2023-07-12 14:45:02 -05:00
Ayaz Hafiz
bc4c91a68f
Easy mode refcounter
2023-07-12 14:45:02 -05:00
Ayaz Hafiz
7ea85e44d2
Add Layout::Erased
2023-07-12 14:43:24 -05:00
Ayaz Hafiz
6312d75ee0
Add FunctionPointer layout
2023-07-12 13:59:50 -05:00
Folkert
ef39bad7c6
auto clippy fixes
2023-07-10 18:27:08 +02:00
Folkert
6d2d65bb1e
remove Boxed layout
2023-07-09 15:47:28 +02:00
Folkert
fc3004da58
free or reuse unconditionally when value is unique
2023-06-27 17:37:45 +02:00
Folkert
17512873e8
add LayoutRepr::Ptr
2023-06-24 14:49:45 +02:00
Ayaz Hafiz
41597cbab7
Do not make LayoutInterner mutable
2023-06-17 18:13:03 -05:00
Ayaz Hafiz
61e28bc1d8
No need to insert into interner
2023-06-17 18:13:02 -05:00
Ayaz Hafiz
6139918e3b
Remove insert_direct_no_semantic in compare eq
2023-06-17 18:13:02 -05:00
Ayaz Hafiz
7ab044d79f
argument_type_from_layout takes layoutrepr
2023-06-17 18:13:02 -05:00
Ayaz Hafiz
ee25735731
LayoutIds use LayoutRepr
2023-06-17 18:13:02 -05:00
Ayaz Hafiz
390e9f8648
load_roc_value by layoutrepr
2023-06-17 18:13:01 -05:00
Ayaz Hafiz
bc41db2a34
Get rid of passing target_info a bunch
2023-06-17 18:13:00 -05:00
Ayaz Hafiz
8495f3b085
Have basic_type_from_layout take LayoutRepr
2023-06-17 18:12:17 -05:00
Ayaz Hafiz
053816c081
Fix inc/dec for struct-by-reference
2023-06-16 10:30:42 -05:00
Ayaz Hafiz
5274dbcd00
Add a Newtype variant to LayoutWrapper
2023-06-06 16:03:52 -05:00
Ayaz Hafiz
457cdabc5c
Make repr private and accessible only via the interner
2023-06-06 16:01:27 -05:00
Ayaz Hafiz
a67c148be7
Convert LayoutRepr::Struct into a tuple variant
2023-05-16 11:58:16 -05:00
Ayaz Hafiz
4296d5a349
Drop Layout::struct_no_name_order
2023-05-10 15:58:51 -05:00
Ayaz Hafiz
6714a6fd92
Use LayoutRepr directly when possible
2023-05-10 15:28:11 -05:00
Ayaz Hafiz
f100e8753c
Introduce the concept of SemanticRepr
2023-05-10 13:51:04 -05:00
Ayaz Hafiz
c3eeb5e2cc
Wrap layouts in a LayoutRepr
constructor
...
Part 1 of support semantic layout representations.
2023-05-10 13:22:10 -05:00
J.Teeuwissen
b8a2ea1bf2
Merge branch 'main' into drop_specialization
2023-04-29 18:31:12 +02:00
Folkert
25d2d090e8
make box decrement its contents when free'ing
2023-04-28 18:11:39 +02:00
Folkert
cf54304cf4
add lowlevel to inc/dec a data pointer
2023-04-28 15:30:23 +02:00
Anton-4
9748e4a4dc
many clippy fixes
2023-04-24 16:21:46 +02:00
Brendan Hansknecht
8d5a182f83
fmt
2023-03-15 13:25:45 -07:00
Brendan Hansknecht
dbead004c5
clippy
2023-03-15 13:25:45 -07:00
Brendan Hansknecht
782411cfcb
correct passing str to sub function
2023-03-15 13:25:44 -07:00
Brendan Hansknecht
3dd16d2114
fix pushing to alloca
2023-03-15 13:25:44 -07:00
Brendan Hansknecht
3978059aa2
add seamless slices for str
2023-03-15 13:23:34 -07:00
Brendan Hansknecht
b94a046b0d
make sure to check raw capacity when decrementing refcounts
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
dfb748fb03
misc cleanup + change refcount pointer to avoid branching
2023-03-13 14:08:24 -07:00
Brendan Hansknecht
146dff5446
add llvm refcounting and fix memory leak
2023-03-13 14:08:23 -07:00
Ayaz Hafiz
94c2c47da4
Handle case where only other tag of nullable unwrapped needs no refcount
...
It's possible to have a nullable unwrapped code where the only material
payload does not need refcounting operations. In this case the
refcounting function is the trivial one.
2023-02-16 09:38:49 -06:00
Folkert
0072192897
prepare for llvm 15
2023-01-28 14:51:47 +01:00