Commit graph

214 commits

Author SHA1 Message Date
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
594fe9124d Wasm support for 128-bit number literals, isFinite, ==, and != 2021-12-13 09:05:07 +00:00
Brian Carroll
c290bbe7a7 Move layout calculations to layout module 2021-12-12 12:22:10 +00:00
Brian Carroll
2a53e2711d formatting 2021-12-12 08:41:34 +00:00
Brian Carroll
044a2015bb Make better use of Layout methods for GetTagId 2021-12-12 08:35:02 +00:00
Brian Carroll
9594b05c96 Add some debug features to gen_wasm 2021-12-11 20:33:54 +00:00
Brian Carroll
9bf1b9aae3 Fix double-offset bug 2021-12-11 20:33:11 +00:00
Brian Carroll
c53b3c3686 Skip refcounting on unimplemented layouts 2021-12-11 20:33:11 +00:00
Brian Carroll
f3ca3be507 Add Wasm support for recursive tags, along with GetTagId and UnionAtIndex 2021-12-11 20:33:11 +00:00
rvcas
6ada59d7a1 feat(wasm): the beginnings of a real array 2021-12-10 14:44:19 -05:00
Brian Carroll
bab8a0b8a0 Fix alignment bug 2021-12-10 14:52:59 +00:00
Brian Carroll
3f7b3bef87 Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-tags 2021-12-09 09:28:11 +00:00
Brian Carroll
1dda8859c4 Update gen_wasm's error handling to remove Result and use macros consistently 2021-12-09 00:11:44 +00:00
Brian Carroll
8a1a164544 Prevent >8 bit alignment specifier in Wasm store instruction, which is not allowed 2021-12-08 21:42:48 +00:00
Brian Carroll
1ba654c5b2 Change round_up_to_alignment to a macro to work on more Rust types 2021-12-08 21:11:10 +00:00
Brian Carroll
6a801ebc7e gen_wasm: add support for non-recursive Tags 2021-12-08 20:45:49 +00:00
Brian Carroll
f6b6d91c56 More accurate comment for EmptyArray 2021-12-08 20:30:26 +00:00
Brian Carroll
73c9c7089a Fix gen_wasm Let statement for heap-allocating expressions
When we allocate on the heap we'll need to force LocalId storage.
In that case we don't want CodeBuilder to track the Symbol,
even though it has WasmLayout::Primitive.
So basically it was always the wrong condition to check, but we
got away with it when we had no heap allocations.
2021-12-08 20:30:26 +00:00
Brian Carroll
6b30ab79ac Fix release build of Wasm backend 2021-12-01 00:03:01 +00:00
Brian Carroll
ea64b6488c Add some disabled debugging statements 2021-11-30 12:59:03 +00:00
Brian Carroll
b1ba1d2db9 WasmBackend no longer needs any public fields, only methods 2021-11-30 10:58:03 +00:00
Brian Carroll
a08633fd36 Debugging improvements 2021-11-30 10:58:03 +00:00
Brian Carroll
8a137126fe Fix bug with linker info for refcount procs 2021-11-30 10:57:59 +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
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
rvcas
27e77f446f feat(wasm): implement EmptyArray 2021-11-29 15:08:52 -05:00
Brian Carroll
1f747e971f Clippy & fmt 2021-11-29 01:09:31 +00:00
Brian Carroll
88bf6bf1b7 Clean up Wasm calling convention code 2021-11-29 00:17:45 +00:00
Brian Carroll
27af5897d1 Handle zero-size structs 2021-11-28 21:04:40 +00:00
Brian Carroll
44cf238a67
Merge pull request #2056 from rtfeldman/wasm-dec-add
Wasm dec add
2021-11-23 13:37:04 +00:00
Brian Carroll
8c3c01cd1f Reduce recursion for sequences of Let statements in gen_wasm 2021-11-23 09:22:41 +00:00
Folkert
f2f4f3bd72 Merge remote-tracking branch 'origin/trunk' into wasm-dec-add 2021-11-22 21:25:01 +01:00
Folkert
78c26c6096 fix returning an aggregate value with ccc 2021-11-22 10:17:17 +01:00
Folkert
f96d60a13e Merge remote-tracking branch 'origin/trunk' into layout-builtin-numbers-refactor 2021-11-21 23:19:55 +01:00
Folkert
bceebc4f8f first pass at decimal addition in the wasm backend 2021-11-21 23:00:12 +01:00
Brian Carroll
0a5b0bdb0a Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-load-128bit-numbers 2021-11-21 20:53:38 +00:00
Brian Carroll
2e31350010 Logic to load 128-bit numbers 2021-11-21 20:44:16 +00:00
Folkert
fc635abe0b Revert "decimal add experiment"
This reverts commit bfd5ca623c.
2021-11-21 20:29:12 +01:00
Folkert
bfd5ca623c decimal add experiment 2021-11-21 20:02:33 +01:00
Folkert
5529841d68 Merge remote-tracking branch 'origin/trunk' into decimal-literals 2021-11-21 19:31:38 +01:00
Folkert
c4ec9aa898 working mono 2021-11-20 23:25:30 +01:00
Brian Carroll
3d124b4122 Fix builtin calls for primitives 2021-11-17 16:51:42 +00:00