Commit Graph

21 Commits

Author SHA1 Message Date
ee73a4d28f Initial type parameter inference, see #61
This catches the most common cases but doesn't yet implement inference involving the return type because some prequesites are not yet in place (see test case).
2018-04-13 12:25:27 +02:00
748e811137 Proper isNaN/isFinite without a temp. local 2018-04-12 20:40:00 +02:00
dcc0e284fb Make type checking builtins also accept just a type argument 2018-04-07 23:31:36 +02:00
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
c80bf35747 Move fmod/fmodf to builtins and bind them to the '%' operator 2018-03-24 18:39:20 +01:00
664f2a1c0d Add offsetof<T> builtin; Put a function's trampoline into the function table if a it has optional parameters; TypedArray scaffolding 2018-03-24 00:38:49 +01:00
49f4d3dff1 Eliminate @builtin decorator for compatibility with TS 2018-03-21 16:29:08 +01:00
83e96892f2 Statically eliminate unnecessary branches in generic contexts
In order to use the new compile time type checks in generics, untaken branches must be skipped because these might be invalid.
2018-03-17 14:40:58 +01:00
2ed9fac171 Initial compile time type check builtins 2018-03-17 12:54:37 +01:00
2fa7fc7885 Take advantage of smaller integer load and store ops 2018-01-23 15:44:25 +01:00
a257b6e529 Load/store constant offset utility 2018-01-21 16:34:50 +01:00
dd596b015d Simplify reinterpret to require one type argument only, fixes #9 2018-01-13 01:15:09 +01:00
1221ff129d More built-in constants; Get/set parsing fixes; I64.toF64 fixes 2018-01-02 21:41:25 +01:00
2888ba14ad PSON decoder example using namespaced imports 2017-12-30 05:11:58 +01:00
ad1fbcf5b2 A first take on imported built-ins 2017-12-12 01:35:48 +01:00
f045975a4b Built-in abs/min/max for integers; For-loop fixes 2017-12-05 22:47:20 +01:00
b7030d4dea reinterpret and select builtins 2017-12-04 22:47:08 +01:00
df3e34f2aa More options for asc 2017-12-04 19:26:50 +01:00
c6af2d1454 Implement ternary using if, see AssemblyScript/assemblyscript#123 2017-12-04 14:49:24 +01:00
63a67e7c67 sizeof, load and store builtins 2017-12-04 02:00:48 +01:00
017efc71b6 Fixes; Builtins; Testing in the interpreter 2017-12-03 23:04:33 +01:00