Commit graph

708 commits

Author SHA1 Message Date
Brian Carroll
74f946b1aa
Create new operator Num.mulSaturated 2022-06-23 22:08:37 +01:00
Brian Carroll
320bdcc13b
wasm: implement all multiplication operators 2022-06-22 23:36:01 +01:00
Brian Carroll
f4ec2617fa
wasm: implement all subtraction operators (checked, wrapping, panicking, and saturated) 2022-06-22 22:54:09 +01:00
Brian Carroll
bbccaf4cd2
wasm: refactor wrapping addition 2022-06-22 22:11:47 +01:00
Brian Carroll
b1193e4134
wasm: implement all addition operators (wrapping, panicking, saturating, and checked) 2022-06-22 22:11:46 +01:00
Brian Carroll
10676d3ce9
wasm: implement checked addition 2022-06-22 22:11:39 +01:00
Brian Carroll
37395a00ef
wasm: add support for NumToIntChecked 2022-06-22 00:27:38 +01:00
Brian Carroll
7a050949ef
wasm: support 128-bit numbers as arguments to Roc procedures 2022-06-22 00:27:38 +01:00
Brian Carroll
f5b46bf650
wasm: implement sin, cos, tan, sqrt, log, and pow 2022-06-21 23:59:38 +01:00
Brian Carroll
dbb4b31ebe
wasm: implement bytes_to_u16 and bytes_to_u32 2022-06-19 18:29:06 +01:00
Brian Carroll
0e6ee6a6ee
wasm: simplify == for Dec 2022-06-19 17:59:47 +01:00
Brian Carroll
f1cadbcc05
Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-linking-test-improvements 2022-06-17 23:20:05 +01:00
Brian Carroll
ba7f336e53
wasm: Fix linking bug in calls from Roc to JS 2022-06-17 23:18:18 +01:00
Brian Carroll
e416b70e08
wasm: fix double-counting of host-to-app linking dummies 2022-06-17 22:04:18 +01:00
Brian Carroll
7f47bd8ced
wasm: better comment for call_indirect DCE 2022-06-17 08:18:24 +01:00
Brian Carroll
c12098bffd
wasm: create NameSection::from_imports_and_linking_data 2022-06-17 07:51:07 +01:00
Brian Carroll
3d8d184901
wasm: fix some out-of-bounds errors in DCE 2022-06-16 00:27:51 +01:00
Brian Carroll
328eaaa861
wasm: link host-to-app calls after creating the name section rather than before 2022-06-16 00:27:10 +01:00
Brian Carroll
6452961ea4
wasm: Don't crash if debug names are missing 2022-06-16 00:24:09 +01:00
Brian Carroll
0fef1e1576
Create to_exposed_symbol_string helper function for all backends 2022-06-15 22:30:10 +01:00
Brian Carroll
6e30811b0c
wasm: use a BitVec for called host functions 2022-06-15 21:31:10 +01:00
Brian Carroll
c1aa9f229a
wasm: move linking tests to test_gen and execute the module 2022-06-15 20:20:55 +01:00
Brian Carroll
115c2b524e
wasm: add some more assertions to linking DCE test 2022-06-15 20:20:55 +01:00
Brian Carroll
87e020fcca
wasm: tweak comments 2022-06-15 20:20:54 +01:00
Folkert
71ae32e55a
use bitwise or to mark functions as live 2022-06-15 15:48:22 +02:00
Folkert
edb801c094
use a bitvec to store indices of functions in a pass 2022-06-15 15:36:23 +02:00
Brian Carroll
ffec060490
clippy 2022-06-14 10:20:28 +01:00
Brian Carroll
c6b5f4934f
wasm: swap instead of copying, during DCE call graph tracing 2022-06-14 09:50:10 +01:00
Brian Carroll
6e098d9d63
wasm: dead code elimination for indirect calls 2022-06-14 09:46:32 +01:00
Brian Carroll
c34b278402
wasm: generate debug names separately from host lookup, including local symbols 2022-06-13 18:20:15 +01:00
Brian Carroll
71225ee5f2
wasm: tidy up after self-review 2022-06-13 17:40:45 +01:00
Brian Carroll
8493c8cfca
Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-dce-imports 2022-06-13 08:41:41 +01:00
Brian Carroll
e8069bf256
wasm: Bugfix: don't forget to include code section length during preload DCE 2022-06-13 00:32:47 +01:00
Brian Carroll
acebdee3dd
wasm: fix DCE for signatures and debug names 2022-06-13 00:32:47 +01:00
Brian Carroll
c169815c9e
wasm: fix some DCE bugs 2022-06-13 00:32:47 +01:00
Brian Carroll
a224d89050
wasm: Start preloaded_bytes at the section start for better consistency 2022-06-13 00:32:44 +01:00
Brian Carroll
f6f7672e1c
wasm: rename DEBUG_LOG_SETTINGS->DEBUG_SETTINGS and add skip_dead_code_elim 2022-06-12 20:45:43 +01:00
Brian Carroll
6d39f50bcc
wasm: use linking data to implement call graph tracing for DCE 2022-06-12 20:42:09 +01:00
Brian Carroll
9b15a9b99b
wasm: Don't create a _start if we already have one! 2022-06-11 23:40:49 +01:00
Brian Carroll
c6e982e5c0
wasm: if we have no debug info, get it from the linker symbol table 2022-06-11 23:21:18 +01:00
Brian Carroll
f926650b10
wasm: remove some roc_ prefixes from host symbols 2022-06-10 21:53:51 +01:00
Brian Carroll
89811d5ae3
wasm: linking tests with and without DCE 2022-06-10 21:49:45 +01:00
Brian Carroll
323e628d17
wasm: Use a Vec instead of an Iter 2022-06-10 21:48:57 +01:00
Brian Carroll
3c0e1d75e5
wasm: linking test working 2022-06-10 18:09:42 +01:00
Brian Carroll
59c0d531c6
wasm: Get linker test to run (without asserting anything yet) 2022-06-10 10:49:22 +01:00
Brian Carroll
2dfe318329
wasm: Don't fail if Name section is missing, it's only debug info 2022-06-10 10:48:03 +01:00
Brian Carroll
d354c3a730
wasm: Don't fail if DataCount section is missing 2022-06-10 10:47:28 +01:00
Brian Carroll
d455efeab0
wasm: only panic on missing __heap_base if app actually allocates 2022-06-10 10:46:13 +01:00
Brian Carroll
da17df09df
wasm: build a linking test app in mono IR 2022-06-10 00:02:45 +01:00
Brian Carroll
5c15fc1629
wasm: Implement ForeignCall 2022-06-09 22:53:15 +01:00