Commit graph

12 commits

Author SHA1 Message Date
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
Renamed from compiler/gen_wasm/src/code_builder.rs (Browse further)