Brian Carroll
9594b05c96
Add some debug features to gen_wasm
2021-12-11 20:33:54 +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
a25101b378
Remove unusable variants from Align enum
...
I discovered today that Wasmer throws an error if you use
"higher than natural" alignment in a store instruction.
So let's take them out of the enum.
2021-12-08 21:55:14 +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
a08633fd36
Debugging improvements
2021-11-30 10:58:03 +00:00
Brian Carroll
dcd4914ac1
Fix and enable tests involving empty records
2021-11-29 00:57:28 +00:00
Brian Carroll
27af5897d1
Handle zero-size structs
2021-11-28 21:04:40 +00:00
Brian Carroll
7ac1c7a72f
Get long string literals working in gen_wasm
2021-11-15 15:22:07 +00:00
Brian Carroll
d34f5050cb
formatting
2021-11-14 13:35:25 +00:00
Brian Carroll
f121d6f599
Fix formatting
2021-11-14 13:21:56 +00:00
Brian Carroll
a2abf9c3d2
More accurate model of the Wasm VM's stack machine, with control flow blocks
2021-11-14 12:29:54 +00:00
Brian Carroll
39263b0ab1
Shorter name: VmSymbolState
2021-11-14 10:57:19 +00:00
Brian Carroll
daf6771bf5
Shorten the name of the Symbol for temporary Wasm values
2021-11-12 17:51:50 +00:00
Brian Carroll
4b3538dc58
Simplify CodeBuilder::call
2021-11-12 17:51:50 +00:00
Brian Carroll
7f633c107f
Fix a bug in our model of the Wasm VM stack
2021-11-12 17:44:31 +00:00
Brian Carroll
830003c9a3
Change wasm opcodes to an enum
2021-11-10 20:18:55 +00:00
Brian Carroll
7c95189e4a
Get lots of Num lowlevel ops working
2021-11-10 14:21:32 +00:00
Brian Carroll
a61987e032
Rename CodeBuilder::finalize -> CodeBuilder::build_fn_header
...
We actually have a few more steps to go after this one!
2021-11-09 14:28:15 +00:00
Brian Carroll
38d9fc5bbd
Add linker data for strings, and deduplicate them
...
For references to addresses of constant strings, we make an entry in
reloc.CODE and configure the relocation type to say it points at a
memory address. (At least I think this is right, I can't test it yet!)
The same info can also be used for de-duplication.
It turns out we don't need reloc.DATA. I had misunderstood it.
The use case for that would be constant nested data structures,
where constant data would contain pointers to other constant data.
I don't think we're doing this in Roc at all, but not sure.
2021-11-07 11:20:32 +00:00
Brian Carroll
5f998f3707
Minor refactor in CodeBuilder
2021-11-05 12:26:05 +00:00
Brian Carroll
7fdd6cf952
rust-fmt
2021-11-03 11:59:49 +00:00
Brian Carroll
b432d923b1
Create a linking module
2021-11-03 11:46:46 +00:00
Brian Carroll
d87db20478
clippy
2021-11-03 11:31:12 +00:00
Brian Carroll
ad9b761fce
Move wasm file format code into a submodule
2021-11-03 11:20:16 +00:00