Commit graph

28 commits

Author SHA1 Message Date
Brian Carroll
fc5d71c20c
wasm: Create parse module and move SkipBytes trait into it 2022-05-21 10:53:50 +01:00
Brian Carroll
c950f6d834 Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-linking-zig9 2022-04-11 18:34:43 +01:00
Brian Carroll
1e5f659be1 wasm: Use Export section to initialise Name section
Works even if the preloaded Name section is missing.
2022-04-09 16:50:22 +01:00
Brian Carroll
b1f15799e3 wasm: Ensure TableSection matches ElementSection 2022-04-05 00:02:05 +01:00
Brian Carroll
7958158d89 wasm: comments & renaming 2022-02-27 23:42:05 +00:00
Brian Carroll
4c7be277c2 wasm: Keep exported global variables from the preloaded object file 2022-02-14 08:45:46 +00:00
Brian Carroll
b46690ecf2 wasm: Custom Debug impl for NameSection 2022-02-13 12:42:50 +00:00
Brian Carroll
63c33d82e3 wasm: Improve dead code elimination to handle indirect calls 2022-02-12 00:09:35 +00:00
Brian Carroll
54788b0357 wasm: Create a full model of the ElementSection 2022-02-11 18:44:47 +00:00
Brian Carroll
55465d15a0 wasm: include Name section in output binary, for debugging 2022-02-10 10:15:19 +00:00
Mats Sigge
71f359fbdc Move macros from roc_reporting to new roc_error_macros module
The `internal_error!` and `user_error!´ macros can't be used everywhere
when they live in `roc_reporting` due to circular dependencies.
2022-01-23 18:40:04 +01:00
Brian Carroll
4311b5a410 Wasm: Make dead functions unreachable, and the same for all return types 2022-01-14 18:21:13 +00:00
Brian Carroll
c7da7ca689 Wasm: Parse the Name section, export init_refcount_test, and don't DCE exports 2022-01-14 18:20:52 +00:00
Brian Carroll
9dabc2db15 Wasm: adjust dead code elimination to account for import function indices 2022-01-14 18:20:52 +00:00
Brian Carroll
8a01c3f98a Wasm: implement dead code elimination 2022-01-14 18:20:52 +00:00
Brian Carroll
dd79a9b35a Clippy fixes 2022-01-13 05:41:52 +00:00
Brian Carroll
9c0abcd0da Wasm: Preload WasmModule from object file bytes 2022-01-13 05:41:52 +00:00
Brian Carroll
d3554b2ac0 Wasm: Create Section trait for common functionality between module sections 2022-01-13 05:41:52 +00:00
Brian Carroll
5d5e0eca96 Wasm: Convert remaining sections to store bytes, and add .size() methods 2022-01-13 05:41:52 +00:00
Brian Carroll
5a39002e8b Wasm: Serialize WasmModule without linking info 2022-01-13 05:41:52 +00:00
Brian Carroll
b8ab6af203 Wasm: move WasmModule definition to mod.rs 2022-01-13 05:41:52 +00:00
Brian Carroll
738434329e Wasm: refactor the model of the Linking section 2022-01-10 10:26:42 +00:00
Brian Carroll
471e2c3143 Completely delete Wasm BlockType 2021-12-21 23:14:55 +00:00
Brian Carroll
39263b0ab1 Shorter name: VmSymbolState 2021-11-14 10:57:19 +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
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
ad9b761fce Move wasm file format code into a submodule 2021-11-03 11:20:16 +00:00