Commit graph

648 commits

Author SHA1 Message Date
Brian Carroll
c00b43c36b
wasm: Move some of the DCE code from CodeSection to WasmModule 2022-06-07 23:52:33 +01:00
Brian Carroll
dfda992d93
wasm: first draft DCE for imports 2022-06-07 22:01:17 +01:00
Brian Carroll
87deb1c13c
wasm: fix bug in dead code elimination 2022-06-06 23:17:47 +01:00
Brian Carroll
87cb9298d9
wasm: insert _start function to call host main 2022-06-06 23:17:46 +01:00
Brian Carroll
27ecf4424f
wasm: get hello-world to build (but not run yet!) 2022-06-06 15:23:36 +01:00
Brian Carroll
e660add064
wasm: Don't bail after the first symbol exposed to JS 2022-06-06 14:43:49 +01:00
Brian Carroll
882640b20d
clippy 2022-06-06 12:47:55 +01:00
Brian Carroll
24d5e06ca6
wasm: PR review changes 2022-06-06 11:59:55 +01:00
Brian Carroll
eaae7f1004
wasm: Deal with hosts where Roc main is called from JS (also test_gen & REPL!) 2022-06-06 11:37:44 +01:00
Brian Carroll
84aab36284
wasm: more linking improvements 2022-06-06 10:55:57 +01:00
Brian Carroll
8606c070d2
wasm: Remove imported tables and memories, and make sure stack pointer is the only imported global 2022-06-06 10:54:56 +01:00
Brian Carroll
376cbbc4b2
wasm: Make NameSection easier to manipulate 2022-06-06 10:54:56 +01:00
Brian Carroll
66c0c423b3
wasm: Rework host-to-app linking code 2022-06-06 10:54:56 +01:00
Brian Carroll
57998491da
wasm: Make FunctionSection easier to manipulate, rather than opaque bytes 2022-06-05 20:38:19 +02:00
Brian Carroll
3253f8a976
wasm: Rename some linking symbol variants to be more accurate 2022-06-05 20:38:19 +02:00
Brian Carroll
8aa3cd7fcf
wasm: delete some unused code 2022-06-05 16:08:37 +02:00
Brian Carroll
a1ef2d913d
wasm: README notes and diagram for linking 2022-06-05 08:48:25 +02:00
Brian Carroll
19dc07f01e
wasm: Implement function index relocations 2022-06-04 20:42:34 +02:00
Brian Carroll
1d585e6732
wasm: link host-to-app calls 2022-06-04 20:26:11 +02:00
Brian Carroll
b4e139a799
wasm: store Imports in deserialized form for easier manipulation 2022-06-04 20:24:10 +02:00
Brian Carroll
0900481ec8
wasm: try to link Roc main to the test platform 2022-06-04 20:24:08 +02:00
Brian Carroll
0c077e1b66
wasm: do relocations by name only, without specifying symbol type 2022-06-04 20:21:20 +02:00
Brian Carroll
5c3e95f099
wasm: better comments for SectionSymbol 2022-06-04 20:12:51 +02:00
Brian Carroll
163d1f2426
wasm: delete Serialize instances for linker sections 2022-06-04 20:02:35 +02:00
Brian Carroll
16c2d64d17
wasm: use linker data rather than debug data to lookup builtins & host fns 2022-06-04 19:39:10 +02:00
Brian Carroll
36daa50a9a
wasm: remove obsolete code for *emitting* linker info 2022-06-04 14:44:16 +02:00
Brian Carroll
4de7490c96
wasm: Make serialization functions more consistent 2022-06-03 09:59:37 +02:00
Brian Carroll
aa8c05d535
wasm: address PR feedback 2022-06-03 09:59:37 +02:00
Brian Carroll
86d14b9391
wasm: initialise the heap with one page of memory (otherwise some tests crash) 2022-06-03 09:51:33 +02:00
Brian Carroll
f063064e01
wasm: make sure the host's extern globals are exposed to JS 2022-06-03 09:51:33 +02:00
Brian Carroll
32db70d661
wasm: ensure output debug data is valid when we have duplicate names 2022-06-03 09:51:33 +02:00
Brian Carroll
19a47cb384
wasm: Configure and export the module's memory 2022-06-03 09:51:33 +02:00
Brian Carroll
32d1e0b50b
wasm: relocations must account for offset of preloaded bytes in code section 2022-06-03 09:51:33 +02:00
Brian Carroll
b1d3bac1c4
wasm: fix relocation bug 2022-06-03 09:51:33 +02:00
Brian Carroll
ddf1fe3977
wasm: Fix ImportSection bug 2022-06-03 09:51:33 +02:00
Brian Carroll
9b47dada6a
wasm: implement relocations to set memory layout 2022-06-03 09:51:33 +02:00
Brian Carroll
73f0a7c96c
wasm: Create a global for __stack_pointer 2022-06-03 09:51:33 +02:00
Brian Carroll
78cae6c3b3
wasm: extract end address from Data section 2022-06-03 09:51:33 +02:00
Brian Carroll
f493fcb1e4
wasm: parse the remainder of the 'linking' section 2022-06-03 09:51:33 +02:00
Brian Carroll
16333b823a
wasm: parse some of the linking section 2022-06-03 09:51:33 +02:00
Brian Carroll
155dcefd00
wasm: parse relocation data 2022-06-03 09:51:33 +02:00
Brian Carroll
73d79d68b0
wasm: add some utility Parser instances and todos 2022-06-03 09:51:33 +02:00
Brian Carroll
2732d46f37
wasm: fix section order for a file with linking data 2022-06-03 09:51:33 +02:00
Brian Carroll
4a22d22515
wasm: treat wrong section ID as empty section 2022-06-03 09:51:32 +02:00
Richard Feldman
1ef5d785c0
Remove no-longer-necessary ReferenceCount uses in wasm 2022-05-26 11:18:06 -04:00
Brian Carroll
44bca1c8c5
clippying & fmt'ing 2022-05-26 00:27:18 +01:00
Brian Carroll
11c1c92cc1
wasm: self-review edits 2022-05-25 23:11:37 +01:00
Brian Carroll
4300ef8b47
wasm: cleanup Section trait 2022-05-25 22:40:46 +01:00
Brian Carroll
da4529ab16
Clippyyy, Clippyyy, Clippyyy, the bush kangaroo... 2022-05-25 22:17:48 +01:00
Brian Carroll
07b83b1999
wasm: delete preload functions 2022-05-25 22:04:59 +01:00