Brian Carroll
e7dc442af0
Wasm: fix double-counting bug in dead function replacement
2022-01-14 18:20:52 +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
3d00217b53
Wasm: rename build_module_help -> build_module_without_test_wrapper
2022-01-14 18:20:52 +00:00
Brian Carroll
22d7ccfbd7
Wasm: Comment explaining DCE
2022-01-14 18:20:52 +00:00
Brian Carroll
6b204d11a2
Wasm: sort and deduplicate on each round of live function tracing
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
ca2597973e
Wasm: store function_count on the ImportSection
2022-01-14 18:20:52 +00:00
Brian Carroll
7a4593170c
Wasm: reuse existing SkipBytes code for opcodes
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
98400cae1b
Wasm: Move code around
2022-01-14 18:20:52 +00:00
Brian Carroll
61d46be923
Wasm: Parse the Code section to collect metadata for dead function elimination
2022-01-14 18:20:52 +00:00
Brian Carroll
48f14f9a83
Wasm: Implement SkipBytes for OpCode
2022-01-14 18:20:52 +00:00
Brian Carroll
2ade357ea9
Wasm: Specify the format of immediate operands for each opcode
2022-01-14 18:20:52 +00:00
Brian Carroll
7f5b8c7296
Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-pre-linking
2022-01-14 18:20:24 +00:00
Folkert de Vries
e1d990896a
Merge branch 'trunk' into mono-display
2022-01-14 13:55:52 +01:00
Folkert de Vries
8bff36faeb
Merge pull request #2346 from rtfeldman/fix-expansion-assignments
...
Fix bug that caused extraneous assignment in IR generation
2022-01-14 13:44:52 +01:00
Joshua Warner
6e67b77fa1
Remove awkward split between header_sources and defs sources
2022-01-13 19:34:17 -08:00
ayazhafiz
6ea7d63380
Make sure line offsets are generated properly for external programs
...
Closes #2329
2022-01-13 20:59:03 -05:00
ayazhafiz
9f78eb2e01
Fix bug that caused extraneous assignment in IR generation
...
Previously we would expand optional record fields to assignments when
converting record patterns to "when" expressions. This resulted in
incorrect code being generated.
2022-01-13 18:34:25 -05:00
ayazhafiz
72ee2d6327
Mark pretty_print_ir_symbols public
2022-01-13 16:35:09 -05:00
hafiz
5f216122d6
Update dev.rs
2022-01-13 16:33:26 -05:00
ayazhafiz
c38ca2dfa4
Anything for you mr paperclippy
2022-01-13 16:33:26 -05:00
ayazhafiz
8d372edda1
Add config variables for printing IR during mono stages
2022-01-13 16:33:26 -05:00
ayazhafiz
e655ab7d3b
Module comments for reset-reuse
...
Figuring out what this module was doing, and why, took me a bit less
than half an hour. We should document what's happening for others in the
future so they don't need to follow up on Zulip necessarily.
2022-01-13 16:33:23 -05:00
Brian Carroll
535927a85e
Wasm: fix test_wrapper function index
2022-01-13 05:41:52 +00:00
Brian Carroll
b46124234f
Wasm: Add mock functions to HTML debugger for the full set of WASI imports
2022-01-13 05:41:52 +00:00
Brian Carroll
dd79a9b35a
Clippy fixes
2022-01-13 05:41:52 +00:00
Brian Carroll
4f15fb3967
Wasm: Adjust funciton index for test_wrapper export declaration
2022-01-13 05:41:52 +00:00
Brian Carroll
c8181c3a19
Wasm: use parsed data from object file in the backend
2022-01-13 05:41:52 +00:00
Brian Carroll
8a384ffa88
Wasm: parse just enough of the Import section to count functions
2022-01-13 05:41:52 +00:00
Brian Carroll
9f8f31b2b6
Wasm: adjust function indices for preloading
2022-01-13 05:41:52 +00:00
Brian Carroll
9f0e0d5099
Wasm: create a hashmap of exported functions
2022-01-13 05:41:52 +00:00
Brian Carroll
fa46ab95fc
Wasm: rename some constants
2022-01-13 05:41:52 +00:00
Brian Carroll
f9fbe461d1
Wasm: Fix section parsing bug
2022-01-13 05:41:52 +00:00
Brian Carroll
3067358a33
Wasm: test for LEB-128 decoder
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
fd79613f0d
Wasm: load platform object file in tests and pass the bytes to the backend
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
f4ac5bffa3
Wasm: replace builtins imports with a hashmap
2022-01-13 05:41:52 +00:00
Brian Carroll
fb5ac05155
Wasm: Optional debug code in test_gen build script
2022-01-13 05:41:52 +00:00
Brian Carroll
56316da870
Wasm: skip linking step in tests
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
d88b86e884
Wasm: change TypeSection tests to unit tests rather than integration tests
2022-01-13 05:41:52 +00:00
Brian Carroll
8e7f398e50
Wasm: Remove code to adjust function indices based on imports
...
With pre-linking we don't need this anymore. Pure Roc code can't add Imports.
2022-01-13 05:41:52 +00:00
Brian Carroll
5de9581b62
Wasm: pre-link app-independent code before running tests (builtins, plaform & libc)
2022-01-13 05:41:52 +00:00
Richard Feldman
d0e3c45986
Merge pull request #2328 from rtfeldman/wasm-module-refactor
...
Wasm module refactor
2022-01-12 11:28:12 -05:00
Richard Feldman
f83f50a9a7
Merge pull request #2337 from rtfeldman/i/2331
...
Use unsigned LLVM intrinsic arithmetic for unsigned integers
2022-01-12 08:29:30 -05:00
Brian Carroll
98e9146f01
Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-module-refactor
2022-01-12 07:57:56 +00:00