Commit graph

467 commits

Author SHA1 Message Date
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
079a8311ec Delete HeapMemory variant of WasmLayout, just treat pointers as Primitive
When I created this (at the very beginning of the Wasm backend),
I didn't really have a clear reason for it. I just thought it might end up
making sense treat heap pointers differently from numbers, somehow.

But the semantic differences between pointers and other numbers is not relevant
to WasmLayout. The semantics are clear from where the Symbol appears in the IR.

Also we were storing heap pointers in locals, for no real reason.
And the fact that it's *different* meant a lot of new cases in match expressions,
to do the exact same thing as Primitives but with a pointless difference.

Until now, we haven't really used this variant in any of our tests.
But the refcount pointer needed it... and everything broke!
2021-11-30 09:57:00 +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
7b5fb2577b Delete unused bash scripts 2021-11-30 09:57:00 +00:00
Brian Carroll
38e3386b80 Formatting & comments 2021-11-30 09:57:00 +00:00
Brian Carroll
ebc1fd6880 Get rid of special ModuleId for refcounting code 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
264927fb85 Wasm code gen for new refcount lowlevels 2021-11-30 09:57:00 +00:00
Brian Carroll
6e5acadfea Create new lowlevels for refcounting 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
dcd4914ac1 Fix and enable tests involving empty records 2021-11-29 00:57:28 +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
Folkert
a1fd34feef remove empty layout types (list,str,dict,set) 2021-11-27 14:05:16 +01:00
Brian Carroll
44cf238a67
Merge pull request #2056 from rtfeldman/wasm-dec-add
Wasm dec add
2021-11-23 13:37:04 +00:00
Folkert
4e6568016d fix comment: rust thought it was code it should execute 2021-11-23 11:56:33 +01:00
Brian Carroll
8c3c01cd1f Reduce recursion for sequences of Let statements in gen_wasm 2021-11-23 09:22:41 +00:00
Folkert
44fdf8df18 remove unreachable cases 2021-11-22 21:40:44 +01: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
Brian Carroll
5a8c3d4f0f Fix it again, properly this time 2021-11-21 23:49:26 +00:00
Brian Carroll
bd2813f36c Fix loading of 128-bit numbers 2021-11-21 23:46:04 +00: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
dc44eaac97 cleanup 2021-11-21 14:11:18 +01:00
Folkert
ce8615fbbc wasm working 2021-11-21 00:41:37 +01:00
Folkert
c4ec9aa898 working mono 2021-11-20 23:25:30 +01:00
Michael Downey
d11bb93539
Merge branch 'trunk' into add_list_all 2021-11-18 16:09:24 -05:00
Michael Downey
12f7d4b458 fixing format 2021-11-18 16:04:38 -05:00
Michael Downey
9d587d37b4
Merge branch 'trunk' into add_list_all 2021-11-18 06:41:08 -05:00
Brian Carroll
be55582290 Enable some more gen_wasm string builtins 2021-11-18 09:59:52 +00:00
Brian Carroll
3d124b4122 Fix builtin calls for primitives 2021-11-17 16:51:42 +00:00
Brian Carroll
1134b6f45c Fix test_wrapper linking bug 2021-11-17 16:45:38 +00:00
Brian Carroll
e75a9ec281 Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-str-builtins 2021-11-17 13:51:11 +00:00
Brian Carroll
a3bfee5cd8 Leave other string builtins for later 2021-11-17 13:48:29 +00:00
Brian Carroll
03c19b727a String concatenation working in gen_wasm! 2021-11-17 13:38:50 +00:00