Commit graph

61 commits

Author SHA1 Message Date
Brian Carroll
d220ed7a23 Refactor module section serialization 2021-11-05 12:11:33 +00:00
Brian Carroll
4dcb65cc46 Fix data count section for the case where data section is empty 2021-11-05 08:36:18 +00:00
Brian Carroll
c5d99433f7 Fix build error
And slightly improve efficiency by exiting early from an iteration
2021-11-04 23:21:48 +00:00
Brian Carroll
09f2ce327c Change some comments after self-review 2021-11-04 21:19:23 +00:00
Brian Carroll
0d1946a782 Don't generate a DataSection unless we actually need it! 2021-11-04 20:50:32 +00:00
Brian Carroll
414c9e6f86 Move WasmModule initialisation into WasmBackend
It helps to coordinate different sections with related values,
based on knowledge of Roc rather than Wasm.
2021-11-04 20:41:23 +00:00
Brian Carroll
1b91fd9533 Get rid of some overcomplicated Data section stuff
Currently a Wasm module can only have one memory
The Data Segment spec allows for more in future
But the format is confusing enough already without that!
Let's just get rid of that complexity, we don't need it.
2021-11-04 19:44:10 +00:00
Brian Carroll
c57d99c1ac Create types for DataSection 2021-11-04 18:58:17 +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/module_builder.rs (Browse further)