Commit graph

629 commits

Author SHA1 Message Date
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
Brian Carroll
adc16e1db1
wasm: convert CodeSection preload to parse 2022-05-25 21:57:04 +01:00
Brian Carroll
6ef445dc3f
wasm: delete ImportSection::append, which can never be called 2022-05-25 21:36:15 +01:00
Brian Carroll
731a227c61
Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-parser-trait 2022-05-25 21:15:08 +01:00
Brian Carroll
db9881bbfb
wasm: use Parse instances for most sections (CodeSection todo) 2022-05-25 08:35:05 +01:00
Brian Carroll
1219af2664
wasm: implement Parse for Function section 2022-05-25 08:21:50 +01:00
Brian Carroll
2313ee2259
Parse ImportSection 2022-05-24 08:12:56 +01:00
Brian Carroll
cbf8c841f7
Parse TypeSection 2022-05-24 08:12:55 +01:00
Brian Carroll
dccdce839e
wasm: Create Parse instances for all Sections in the wasm file 2022-05-23 23:12:10 +01:00
Richard Feldman
4eec34becf
Update to use new square brace formatting 2022-05-22 23:15:54 -04:00
Brian Carroll
873d9d4e06
wasm: create separate steps for parsing the host and compiling the app 2022-05-22 20:49:16 +01:00
Brian Carroll
84a3ac2ef6
Replace byte slices with str 2022-05-22 19:37:06 +01:00
Brian Carroll
c16a5ad8ae
wasm: Create ParseError type 2022-05-22 15:37:47 +01:00
Brian Carroll
66c78ceed5
Replace some helper functions with Parse trait instances 2022-05-22 15:37:47 +01:00
Brian Carroll
8114ec60c1
Start using Result to handle Wasm module parse failures 2022-05-22 09:36:33 +01:00
Brian Carroll
fc5d71c20c
wasm: Create parse module and move SkipBytes trait into it 2022-05-21 10:53:50 +01:00
Richard Feldman
49aea9d639
Use [u8; 16] to avoid number alignment bumps 2022-05-21 00:53:47 -04:00
Anton-4
0f59f3097a
cargo fix --edition 2022-05-16 17:04:17 +02:00
Brian Carroll
aaea254e8f
Pass precompiled host bytes to gen_wasm in CLI 2022-05-15 11:11:08 +01:00
Richard Feldman
fd40fed937
Fix a bunch of errors from clippy --tests 2022-05-10 15:21:48 -04:00