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
Ayaz Hafiz
f451ba49f1
Toss out when-recursive from llvm backend
2023-01-25 12:48:06 -06:00
Ayaz Hafiz
37d9307fbf
Call insert_recursive for union layouts
2023-01-23 15:40:40 -06:00
Ayaz Hafiz
8750127111
Begin support for looping-back recursive pointers to their source layouts
2023-01-23 14:37:48 -06:00
Folkert
437498b7ac
list decrement must use capacity, not length
2023-01-14 13:14:37 +01:00
Ayaz Hafiz
03ece6e274
Update llvm backend
2023-01-11 14:39:10 -06:00
Richard Feldman
94ccb0fd8d
Merge pull request #4849 from roc-lang/intern-layouts-5-lambda-set-layout-cache
...
Reduce layout intern allocations
2023-01-10 20:35:09 -05:00
Ayaz Hafiz
066bc7d953
Make sure to bump index of nullable-wrapped tag indices after null variants
...
Fixes a bug in ref-counting.
2023-01-10 10:01:50 -06:00
Ayaz Hafiz
ce717dca8b
Do not require allocating Layouts in arena before interning
...
This should reduce memory spend, the interner has its own effective
arena anyway
2023-01-10 09:47:13 -06:00
Ayaz Hafiz
50826d1a83
Inline interners into the layout interner module
...
I realized that we'll need to make the layout interner more complicated
to support things like recursive pointers pointing to their parents and
to support lambda set layout caching. Since the layout interner is the
only user of intern crate right now anyway, just inline the whole thing.
2023-01-03 14:19:39 -06:00
Ayaz Hafiz
512a1721ae
Push mutable layout interner through llvm backend
2022-12-29 10:04:43 -06:00
Ayaz Hafiz
e4b5252e51
List takes interned element
2022-12-29 08:52:37 -06:00
Ayaz Hafiz
7ab7fdfa7b
Push interned layouts as mut throughout the backend, and intern box layouts
2022-12-28 18:51:26 -06:00
Folkert
9bf8d65170
upgrade most build_load usages
2022-12-20 00:11:45 +01:00
Folkert
f2d0953e0a
upgrade build_in_bounds_gep
2022-12-19 20:21:27 +01:00