Commit graph

6629 commits

Author SHA1 Message Date
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
hafiz
3561576069
Merge pull request #2341 from rtfeldman/fix-doc-comments
Maybe-fix some maybe-incorrect doc-comments
2022-01-12 00:09:06 -05:00
Richard Feldman
efff7ff7b2
Merge pull request #2340 from rtfeldman/fastcc-wrapper-return-pointer
make fastcc wrapper return by pointer if return type is large
2022-01-11 22:56:26 -05:00
Jan Van Bruggen
6c4fcb6514 Maybe-fix some maybe-incorrect doc-comments
This might affect `roc docs ...` parsing, but probably not.
2022-01-11 20:00:15 -07:00
ayazhafiz
fefbb5312e Yet more quicksort bugs 2022-01-11 18:17:57 -05:00
Brian Carroll
92ec680a25 Fix clippy error on non-wasm test builds 2022-01-11 21:54:03 +00:00
Brian Carroll
54f2855349 Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-module-refactor 2022-01-11 21:51:03 +00:00
Folkert de Vries
c16506fc8d
Merge pull request #2315 from rtfeldman/wasm-refcount-union
Wasm: refcount for tag unions
2022-01-11 22:33:52 +01:00
Folkert
1b149d215d pass pointer to C as first argument 2022-01-11 22:08:58 +01:00
Folkert
b2e05b92d1 make fastcc wrapper return by pointer if return type is large 2022-01-11 21:03:57 +01:00
ayazhafiz
fe114e5e09 Improve test names 2022-01-10 23:42:15 -05:00
ayazhafiz
fba1c64c4b Fix another quicksort bug 2022-01-10 23:41:08 -05:00
ayazhafiz
2c41c43aea Implement saturated add/subtract 2022-01-10 22:37:08 -05:00
ayazhafiz
103e85f339 Pretty-print laayouts when PRETTY_PRINT_IR_SYMBOLS is true 2022-01-10 19:21:18 -05:00
ayazhafiz
abe42781d5 Use unsigned LLVM intrinsic arithmetic for unsigned integers
Closes #2331
2022-01-10 19:20:51 -05:00
Brian Carroll
c5653951a4 Wasm: improve the TypeSection preload test 2022-01-10 10:26:43 +00:00
Brian Carroll
8f73b722ff Wasm: fix release build 2022-01-10 10:26:43 +00:00
Brian Carroll
fc677e8d58 Wasm: add preloading logic for Types section 2022-01-10 10:26:43 +00:00
Brian Carroll
59278a02d6 Wasm: Create a LinkingSegment to keep string data aligned correctly 2022-01-10 10:26:43 +00:00
Brian Carroll
c89f74f7e8 Wasm: clippy fixes 2022-01-10 10:26:43 +00:00
Brian Carroll
a1f737d6d8 Wasm: Create OpaqueSection for sections that may be used in builtins but not by us 2022-01-10 10:26:43 +00:00
Brian Carroll
738434329e Wasm: refactor the model of the Linking section 2022-01-10 10:26:42 +00:00
Brian Carroll
8cf82ae1b3 Wasm: Delete old output files before compiling new ones 2022-01-10 10:26:42 +00:00
Brian Carroll
6db7dbed1c Wasm: Store DataSection as bytes and segment count 2022-01-10 10:26:42 +00:00
Brian Carroll
265171ad17 Wasm: Make sure string constants are placed at a properly aligned offset 2022-01-10 10:26:42 +00:00
Brian Carroll
b8f51fb1bb Wasm: add preloaded_bytes and preloaded_count to Code section 2022-01-10 10:26:42 +00:00
Brian Carroll
743e14148c Wasm: Store Function section as bytes and a count 2022-01-10 10:26:42 +00:00
Brian Carroll
7a6c6b675c Wasm: Store type signatures in serialized form 2022-01-10 10:26:42 +00:00
Richard Feldman
2f3919c870
Merge pull request #2327 from rtfeldman/expand-tutorial
Expand tutorial
2022-01-09 09:30:57 -05:00
Richard Feldman
46d36ed942 Fix tutorial table formatting 2022-01-07 19:48:43 -05:00
Richard Feldman
9cd27b72d7 Fix some links in Num docs 2022-01-07 19:48:43 -05:00
Brian Carroll
5560ecb63e Implement tail recursion for union refcounting procs 2022-01-06 22:43:02 +00:00