dcodeIO
6949cf9f9e
Switch signed/unsigned instructions when upcasting 32- to 64-bit integers, fixes #247
...
Matches C semantics now. Turns around some instructions in tests, especially libm, but doesn't break anything.
2018-09-10 14:25:33 +02:00
Daniel Wirtz
dc0f271fc2
Initial GC integration ( #196 )
2018-08-02 18:23:02 +02:00
dcodeIO
34839353fd
Inline isNaN and isFinite
...
Looking at our existing tests it seems that inlining these can be performed by reusing locals most of the time, and sometimes enables erasing quite a bit of unnecessary code when optimizing.
2018-07-19 04:12:40 +02:00
dcodeIO
26e46f6f86
Reintroduce builtin decorator so these can appear anywhere in stdlib again
...
Avoids wrapping an undocumented function within 'memory.size' for example.
2018-07-19 02:10:04 +02:00
dcodeIO
9c16363796
Initial external decorator for annotating explicit import names; Use file name as default module name in imports; Emit empty memory if there are no static segments; Update TLSF and examples accordingly
2018-06-28 01:44:32 +02:00
dcodeIO
7a8995b18b
Properly inline getters; Simplify blocks when last statement returns
2018-06-22 15:26:59 +02:00
dcodeIO
7ad13f9d65
Add a 'call_indirect' builtin to emit arbitrary calls (might trap at runtime); Optimize 'for' loop compilation a bit
2018-05-25 15:59:17 +02:00
dcodeIO
829af2285c
Fix continue labels in 'for' loops skipping the incrementor
2018-05-23 11:32:12 +02:00
dcodeIO
6c0a5c47d9
Update Binaryen and take care of WebAssembly/binaryen#1547
2018-05-14 16:55:55 +02:00
dcodeIO
e415377cda
Avoid trampolines where optional arguments are constant literals, see #102 ; Fix temporary local flags not being cleared; Fix inlined temporary locals not being free'd; Fix inlined flows not breaking after returns; Allow changetype of u32s, i.e. function pointers
2018-05-11 16:31:56 +02:00
dcodeIO
ef9b43740d
Eliminate leftover temporary function types using latest Binaryen
2018-05-09 16:33:42 +02:00
dcodeIO
25a1f6230a
Suppress some unnecessary blocks and nops; Fix compilation of always 'break'ing 'do's
2018-05-06 05:46:35 +02:00
Daniel Wirtz
50f6c1c460
Update internal ABI to zero/sign-extend where necessary only ( #87 )
2018-05-06 00:00:54 +02:00
dcodeIO
6d6d1dddcf
Improve inlining where locals can be aliased; Add a crude mechanism for explicit unchecked array accesses
...
The `unchecked` builtin should be handled with ultimate care and it would be a lot better if there'd be a mechanism doing this automatically.
2018-04-25 05:04:35 +02:00
dcodeIO
391db28fe2
Always try to eliminate branches if tree-shaking is enabled
2018-04-24 23:11:11 +02:00
Max Graey
a15457d8b9
Simplify isFinite & isNaN ( #78 )
2018-04-18 15:14:24 +02:00
dcodeIO
4929fca363
Move some numeric builtins to stdlib; Minor refactoring
2018-04-17 02:50:38 +02:00
dcodeIO
748e811137
Proper isNaN/isFinite without a temp. local
2018-04-12 20:40:00 +02:00
dcodeIO
06198a3723
Rename lib prefix to '~lib' (parens aren't valid); Add built-in alignof<T>; Prepare for ArrayBufferView
2018-04-02 19:05:26 +02:00
Daniel Wirtz
164f134053
Even more math ( #56 )
...
Remaining implementations of JavaScript's Math functions (except sin/cos/tan), both double (Math) and single (Mathf) precision, ported from musl incl. tests from libc-test, plus some changes to match JS semantics. Also binds fmod to `%` and pow to `**`.
2018-03-30 17:25:54 +02:00
dcodeIO
31633899f9
Use untouched/optimized naming scheme in tests as well
2018-02-17 11:14:41 +01:00