Folkert
9c85fb90d3
fix bugs
2023-06-24 14:49:47 +02:00
Folkert
17512873e8
add LayoutRepr::Ptr
2023-06-24 14:49:45 +02:00
Ayaz Hafiz
7ab044d79f
argument_type_from_layout takes layoutrepr
2023-06-17 18:13:02 -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
6c4f76c5c9
Pass tag target ptr rather than alloca
2023-06-16 21:06:49 -05:00
Ayaz Hafiz
465cee053e
Have RocUnion::as_struct_value return an alloca instead
...
Saves a useless store/load.
2023-06-16 17:54:17 -05:00
Ayaz Hafiz
f95cef8086
Add llvm_alignment_bytes and memcpy function
2023-06-16 10:30:44 -05:00
Ayaz Hafiz
2294f6994f
TERRIBLE HACK to support x86 compilation
2023-06-16 10:30:44 -05:00
Ayaz Hafiz
ea6330b48b
Make sure to memcpy with correct size and alignments
2023-06-16 10:30:43 -05:00
Folkert
9b0cc2a5fd
make tag union opaque space use more optimal instructions
2023-06-16 10:30:43 -05:00
Ayaz Hafiz
5ce4435911
Debug assert struct layout
2023-06-16 10:30:43 -05:00
Ayaz Hafiz
879a97ee4c
Fix compare for big structs
2023-06-16 10:30:41 -05:00
Ayaz Hafiz
130501eb6a
layout_interner does not need to be mutable
2023-06-16 10:30:41 -05:00
Ayaz Hafiz
65ca836ecb
layout_interner does not need to be mutable
2023-06-16 10:30:41 -05:00
Ayaz Hafiz
510b920701
argument_type_from_struct_layout
2023-06-16 10:30:41 -05:00
Ayaz Hafiz
c09a33f9f4
Inline RocStructType back in
2023-06-16 10:30:41 -05:00
Ayaz Hafiz
47fb9fe6f2
Implement struct-by-reference for structs over 4 machine words
2023-06-16 10:30:40 -05:00
Ayaz Hafiz
470ed119c2
Move roc struct operations to a new "struct" module
2023-06-16 10:30:38 -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
c3eeb5e2cc
Wrap layouts in a LayoutRepr
constructor
...
Part 1 of support semantic layout representations.
2023-05-10 13:22:10 -05:00
Anton-4
9748e4a4dc
many clippy fixes
2023-04-24 16:21:46 +02:00
Folkert
c0f49ce62c
correctly add padding between data and tag id
2023-03-28 19:46:26 +02:00
Ayaz Hafiz
3a960e7809
Properly recast nested recursion pointers to their expanded layouts as needed
...
When we load a structure with a nested recursive pointer, the pointer
may be loaded opaquely. We need to refine it to the concrete type wanted
by the layout.
This conversion can be removed after we upgrade to LLVM 15.
Closes #5162
2023-03-22 08:21:08 -05:00
Folkert
178e80fa9a
fix for when C has to return an empty tag union
2023-02-15 15:30:26 +01:00
Folkert
0072192897
prepare for llvm 15
2023-01-28 14:51:47 +01:00
Ayaz Hafiz
8750127111
Begin support for looping-back recursive pointers to their source layouts
2023-01-23 14:37:48 -06:00
Ayaz Hafiz
03ece6e274
Update llvm backend
2023-01-11 14:39:10 -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
7ab7fdfa7b
Push interned layouts as mut throughout the backend, and intern box layouts
2022-12-28 18:51:26 -06:00
Folkert
bb4ff34aaa
be more precise with zig return types
2022-12-20 15:43:11 +01:00
Folkert
9bf8d65170
upgrade most build_load usages
2022-12-20 00:11:45 +01:00
Folkert
bc9c813fec
already do some of the llvm struct_gep conversion work
2022-12-19 19:57:31 +01:00
Folkert
d287eafa3a
remove F128
2022-12-14 23:28:38 +01:00
Folkert
08b25cb935
fix dec calling convention for windows
2022-09-04 18:26:04 +02:00
Ayaz Hafiz
3b4b1838b8
Push layout interner further through Layout
2022-08-31 14:33:52 -05:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos
2022-08-12 15:24:09 -04:00
Folkert
d87c079620
change how tags are created
...
wasm in optimize mode just removed the whole tag creation
2022-07-24 15:50:54 +02:00
Folkert
6d88d4106f
remove dead code
2022-07-22 21:15:41 +02:00
Folkert
6cabf11cbc
gen tests with new tag layout
2022-07-22 21:13:55 +02:00
Folkert
90e3021904
make pub(crate)
2022-07-22 21:13:54 +02:00
Folkert
4977d1c65e
use RocUnion constants for tag index
2022-07-22 21:13:53 +02:00
Folkert
366429303c
add RocUnion
2022-07-22 21:13:53 +02:00
Folkert
4d55b756bb
remove dict/set layout
2022-07-13 11:41:19 +02:00
Anton-4
eee85fa45d
moved all crates into seperate folder + related path fixes
2022-07-01 17:37:43 +02:00