Brian Carroll
efef2be958
Rename mono IR code gen helpers
2021-12-16 16:52:47 +00:00
Brian Carroll
71de2289ae
Rename helper proc generator struct
2021-12-16 16:52:47 +00:00
Brian Carroll
0547647341
Rename code gen helper file in mono
2021-12-16 16:52:47 +00:00
Brian Carroll
c290bbe7a7
Move layout calculations to layout module
2021-12-12 12:22:10 +00:00
Brian Carroll
c53b3c3686
Skip refcounting on unimplemented layouts
2021-12-11 20:33:11 +00:00
Brian Carroll
211a5d9bf3
Fix apparent bug in Layout::is_refcounted
...
It contradicts build_tag in compiler/gen_llvm/src/llvm/build.rs,
where we create a NonNullableUnwrapped by calling
reserve_with_refcount_union_as_block_of_memory
2021-12-11 20:33:11 +00:00
Brian Carroll
031dce61c9
Add a stack_size_and_alignment method to Layout
2021-12-11 20:33:11 +00:00
Brian Carroll
7b6ba79eee
Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-tags
2021-12-10 11:48:56 +00:00
Richard Feldman
1ce648ac27
Merge pull request #2116 from rtfeldman/str_to_num
...
Str.toNum
2021-12-09 09:48:38 -05:00
Brian Carroll
2f4225eec6
Add more doc comments to UnionLayout enum
2021-12-08 20:30:26 +00:00
Brendan Hansknecht
b8a287d1ba
Merge remote-tracking branch 'origin/trunk' into refcount-gen-dev
2021-12-08 11:22:36 -08:00
Folkert
28b4388488
remove unneeded field
2021-12-05 15:25:46 +01:00
Folkert
d7045b037f
use param_map instead of localcontext
2021-12-05 15:21:25 +01:00
Folkert
eaefb56994
make some helper functions non-mut
2021-12-03 21:50:39 +01:00
Anton-4
c63c69f1ef
prep merge with Folkert's branch
2021-12-01 19:42:22 +01:00
Anton-4
eaf4e57759
started on Str.toNum
2021-12-01 15:15:30 +01:00
Richard Feldman
e6bec46898
Merge pull request #2109 from rtfeldman/refactor-passed-function
...
refactor passed (to higher order lowlevel) funcion
2021-12-01 08:17:39 -05:00
Brian Carroll
a3827d6636
Merge pull request #2071 from rtfeldman/refcount-mono-ir
...
Start generating refcounting code as mono IR
2021-12-01 12:59:16 +00:00
Folkert
834ba77046
missed a bool
2021-12-01 12:53:47 +01:00
Chelsea Troy
0e5f82526a
Account for SingleQuote in the case statements for the cli, plus some errata
...
+ Evidently I failed to finish fixing merge conflicts
+ Some of the types that the SingleQuote code mentioned didn't exist according to the build step. I looked around and switched them out for types it LOOKED like they were supposed to be, but someone should probably check this
+ Don't make commits like this; it's multiple unrelated changes thrown together. I'm still figuring out my way around here
2021-12-01 00:13:15 -06:00
Folkert
bec74c36c5
refactor passed (to higher order lowlevel) funcion
2021-11-30 21:50:27 +01:00
rvcas
f995a07029
feat: Num.toStr
...
* add type for Num.toStr
* create new lowlevel
* delete types and Symbol for fromInt and fromFloat
* leave LowLevel::{StrFromFloat,StrFromInt}
* match on LowLevel::NumToStr and figure out the layout to decide
which build function to delegate to
2021-11-30 14:52:06 -05:00
Brian Carroll
2bb49f55f8
Doc comment for RefcountProcGenerator
2021-11-30 15:48:35 +00:00
Brian Carroll
1c3b76ba03
Fix a bug in generated refcount proc for str
2021-11-30 12:59:22 +00:00
Brian Carroll
22ccb6eca4
Prefix string constants with REFCOUNT_MAX
2021-11-30 09:57:31 +00:00
Brian Carroll
c2a2ff2957
Create Expr::to_pretty in mono IR
2021-11-30 09:57:26 +00:00
Brian Carroll
3581c7f5be
Use readable debug names throughout refcount proc generator
2021-11-30 09:57:00 +00:00
Brian Carroll
820d9e0ab4
Register debug names for new Symbols, and refactor to avoid borrow-checker issues
2021-11-30 09:57:00 +00:00
Brian Carroll
e7d8c7c895
Make gen_wasm's Env mutable
2021-11-30 09:57:00 +00:00
Brian Carroll
f4d52f7084
Add alignment argument to Zig decref call
2021-11-30 09:57:00 +00:00
Brian Carroll
38e3386b80
Formatting & comments
2021-11-30 09:57:00 +00:00
Brian Carroll
9bb5335c8d
Delete unused tests
2021-11-30 09:57:00 +00:00
Brian Carroll
2ad032f894
Integrate refcount proc generator with Wasm backend
2021-11-30 09:57:00 +00:00
Brian Carroll
61575cea7e
Generate calls to refcount procs from Wasm backend
2021-11-30 09:57:00 +00:00
Brian Carroll
985fa9dade
Generate refcounting code as IR
2021-11-30 09:57:00 +00:00
Brian Carroll
6e5acadfea
Create new lowlevels for refcounting
2021-11-30 09:57:00 +00:00
Chelsea Troy
6cf755ad8d
Resolve a bunnnch of merge conflicts
2021-11-29 23:14:29 -06:00
Folkert
ab1787937d
shrink CallSpecId and UpdateModeId to u32; assuming a 4GiB file that should be more than enough
2021-11-28 22:59:23 +01:00
Folkert
5b8c63d292
move the heap cell out of the union
2021-11-28 17:51:43 +01:00
Folkert
92cca127b1
refactor
2021-11-28 16:08:11 +01:00
Folkert
8bcb985a80
always also add heap cell to nulled tags
2021-11-28 15:53:05 +01:00
Folkert
537cf69344
add helper for adding a heap cell to values
2021-11-28 15:41:46 +01:00
Folkert
aefe719e56
hook up update mode for reset/reuse
2021-11-28 14:25:51 +01:00
Folkert
0bdda2506c
add update mode to reset and reuse
2021-11-28 14:13:02 +01:00
Folkert
1241d5ccbd
make UpdateModeIds a proper type
2021-11-28 14:03:48 +01:00
Folkert de Vries
8eb74da0f3
Merge pull request #2083 from rtfeldman/layout-soa
...
Layout Struct of Arrays
2021-11-28 12:43:37 +01:00
Folkert
3d1035a11f
fix bug with lists and * type variables
2021-11-27 16:57:50 +01:00
Folkert
79d5c82dfb
cleanup
2021-11-27 16:36:43 +01:00
Folkert
a1fd34feef
remove empty layout types (list,str,dict,set)
2021-11-27 14:05:16 +01:00
Folkert
48368f4fba
fix imports
2021-11-26 22:33:10 +01:00