Ayaz Hafiz
5eda760f1c
Fix bug in loading host-exposed list pointers
2023-01-12 10:20:11 -06:00
Folkert
6ead631c82
generate the RocFunction struct
2023-01-11 23:05:32 +01:00
Ayaz Hafiz
03ece6e274
Update llvm backend
2023-01-11 14:39:10 -06:00
Folkert
98ba49baf6
WIP
2023-01-08 14:49:13 +01:00
Folkert
1c1112ec35
Merge remote-tracking branch 'origin/main' into glue-getters-rtfeldman
2023-01-04 20:45:01 +01: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
972046445b
Lift Niche from just captures-niche to generic niche
2022-12-29 18:43:26 -06:00
Ayaz Hafiz
14ea3518dc
Unnecessary reference
2022-12-29 11:42:51 -06:00
Ayaz Hafiz
0011636ba9
Allow all the arguments
2022-12-29 11:42:24 -06:00
Ayaz Hafiz
759f8d86af
Fix lifetime errors due to interner
...
In the llvm backend, there are the lifetimes `'a` (lifetime of the
global arena) and `'ctx` (lifetime of constructed LLVM values). `'a`
lives longer than `'ctx`, but the compiler didn't enforce this until
the layout interner was introduced, for some reason. We have to make
sure that containers of lifetime `'a` have no `'ctx` references.
2022-12-29 11:38:34 -06:00
Ayaz Hafiz
512a1721ae
Push mutable layout interner through llvm backend
2022-12-29 10:04:43 -06:00
Folkert
f76df8a356
make dbg transparent to refcounting
2022-12-22 01:03:03 +01:00
Folkert
d765cae620
remove get_element_type in some C abi functions
2022-12-20 16:09:59 +01: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
Folkert
bc9c813fec
already do some of the llvm struct_gep conversion work
2022-12-19 19:57:31 +01:00
Folkert
0f46ea83d0
standardize WhenRecursive
2022-12-19 19:05:25 +01:00
Folkert
3720c38e2b
convert to pointer_cast where we can
2022-12-17 23:21:19 +01:00
Folkert de Vries
f550f049db
Merge pull request #4768 from roc-lang/expects-store-specialized-variable
...
Support using dbg/expect in polymorphic functions
2022-12-16 00:10:40 +01:00
Ayaz Hafiz
fe90355265
Store specialized variables of expect lookups in expect frames
2022-12-14 17:00:36 -06:00
Ayaz Hafiz
16209ef866
Store specialized lookup variables in expects
2022-12-14 16:59:05 -06:00
Folkert
d287eafa3a
remove F128
2022-12-14 23:28:38 +01:00
Ayaz Hafiz
1962f2045e
Remove layouts from the mono AST for expects
...
This actually isn't needed, because the backends must lookup the layout
from the environment anyway. So it's enough to lookup the symbol and
find its layout, there is no need to additionally store it.
2022-12-14 14:10:02 -06:00
Folkert
a72556b927
refactor entry point
2022-12-09 15:10:25 +01:00
Folkert
95fe9cbccd
pass the pointer to shared memory around, instead of using a global
2022-12-08 23:22:26 +01:00
Ayaz Hafiz
3685ad2ed2
Ensure that llvm gen_ wrappers account different recursive pointers
...
Closes #2551
2022-12-02 13:38:32 -06:00
Ayaz Hafiz
803d7e30e3
Eliminate Stmt::RuntimeError in favor of crash
2022-11-24 14:46:53 -06:00
Ayaz Hafiz
f3a03ef6eb
Pass roc_panic msg by ref on 32 bit plats
2022-11-24 14:46:53 -06:00
Ayaz Hafiz
12d013c062
Remove unneeded param
2022-11-24 14:46:53 -06:00
Ayaz Hafiz
4202352b19
Update panic tags of builtins
2022-11-24 14:46:52 -06:00
Ayaz Hafiz
a8122662c2
Return panic tag from roc_panic to test platform
2022-11-24 14:46:52 -06:00
Ayaz Hafiz
c8accc90e8
Implement user crash in llvm backend
2022-11-24 14:46:52 -06:00
Ayaz Hafiz
c7ef1668d4
Implement mono of crash
2022-11-24 14:46:51 -06:00
Ayaz Hafiz
72ff0cc800
rename default panic tag to roc panic tag
2022-11-24 14:46:51 -06:00
Ayaz Hafiz
6d851ec5e2
men i trust, lints i dont need
2022-11-24 14:46:51 -06:00
Ayaz Hafiz
4709f9a0de
roc_panic is passed a RocStr
2022-11-24 14:46:50 -06:00
Ayaz Hafiz
a9f8c2ddec
Factor out build_string_literal
2022-11-24 14:46:50 -06:00
Folkert
5cb47939e2
don't try to run dbg with roc run
2022-11-24 11:19:41 +01:00
Richard Feldman
36178b5f59
REVERT ME - add some debug info
2022-11-16 17:07:04 -05:00
Richard Feldman
58e672749c
Fix glue getter name synchronization
2022-11-16 17:06:21 -05:00
Folkert
5aa29c4e8b
morphic + reset/reuse
2022-11-15 22:06:09 +01:00
Richard Feldman
d3d21630e8
Merge remote-tracking branch 'origin/main' into glue-getters-rtfeldman
2022-11-15 12:16:19 -05:00
Ayaz Hafiz
3723071c15
Collect deeply nested type names in alias analysis
...
Previously we only collected type names that appeared on the surface of
a type during alias analysis, but certain types that need to be named
(i.e. recursive types) may be observed only when we actually convert the IR
to the morphic IR. Make sure we collect those appropriately.
This is a cherry pick of the relevant changes in #4121 .
2022-11-15 09:23:28 -06:00
Folkert
031866799a
use inkwell's FunctionIterator
2022-11-13 14:51:24 +01:00
Richard Feldman
99420f65ed
Merge branch 'glue-exposed' into glue-getters
2022-11-11 17:02:27 -05:00
Folkert
653741ccde
refactor llvm lowlevel code into its own file
2022-11-09 17:40:40 +01:00
Folkert
06a49e0255
use some macros
2022-11-09 17:40:39 +01:00
Folkert
19a8b95c42
codegen getters
2022-11-06 14:56:51 +01:00
Folkert
5ae4ccad5e
refactor
2022-11-06 13:36:58 +01:00
Folkert
94cc2971a3
don't use a global on the zig side (surgical linking can't do those yet)
2022-11-05 14:08:19 +01:00