Commit graph

22 commits

Author SHA1 Message Date
Brian Carroll
72fa6217fb Refactor wasm lowlevels to make it easier to add more 128-bit ops 2021-12-01 15:09:23 +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
88bf6bf1b7 Clean up Wasm calling convention code 2021-11-29 00:17:45 +00:00
Folkert
a1fd34feef remove empty layout types (list,str,dict,set) 2021-11-27 14:05:16 +01:00
Folkert
f96d60a13e Merge remote-tracking branch 'origin/trunk' into layout-builtin-numbers-refactor 2021-11-21 23:19:55 +01:00
Brian Carroll
2e31350010 Logic to load 128-bit numbers 2021-11-21 20:44:16 +00: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
Brian Carroll
7c95189e4a Get lots of Num lowlevel ops working 2021-11-10 14:21:32 +00:00
Brian Carroll
ad9b761fce Move wasm file format code into a submodule 2021-11-03 11:20:16 +00:00
Brian Carroll
59757d638a Migrate the last sections: Type and Function 2021-11-03 10:24:03 +00:00
Brian Carroll
973626fe2d Rename FunctionBuilder back to CodeBuilder 2021-10-23 13:48:20 +02:00
Brian Carroll
74e3239a1c Switch over to function_builder 2021-10-23 13:39:54 +02:00
Brian Carroll
3aaafdefe1 Get Join/Jump working with VM storage 2021-10-09 16:46:59 +01:00
Brian Carroll
7ea59ad9d4 PR tidy-ups 2021-09-29 06:15:58 +01:00
Brian Carroll
02bb9028ef Returning records on the stack from Wasm dev backend! 2021-09-28 08:06:59 +01:00
Brian Carroll
c3b5ac6c82 Allocate stack memory to local variables 2021-09-18 13:39:38 +01:00
Brian Carroll
52a56bfa27 Optimise away a memory copy for returned structs in simple cases 2021-09-17 21:50:00 +01:00
Brian Carroll
036503c750 copy returned structs to caller stack 2021-09-17 19:42:29 +01:00
Brian Carroll
2be2e09ffd Merge branch 'trunk' of github.com:rtfeldman/roc into wasm_stack_memory 2021-09-14 14:57:17 +02:00
Brian Carroll
866d9f47a0 Move WasmLayout to its own module 2021-09-14 08:31:32 +02:00