343 Commits

Author SHA1 Message Date
Daniel Wirtz
f318d68383
Add isFunction and isNullable builtins (#504) 2019-02-22 01:11:05 +01:00
Aaron Turner
11ea78bc13 Add a test for wildcard exports (#499) 2019-02-21 11:38:56 +01:00
dcode
34d86a0d6a Replace more workarounds with actual lazy compilation in stdlib 2019-02-21 05:42:33 +01:00
dcode
8d2194f045 Require exact type in instanceof basicType, fixes #493 2019-02-21 02:09:06 +01:00
Max Graey
6b495f71d0 Ensure Math.clz32/imul compatibility with JS (#474) 2019-02-21 00:32:58 +01:00
Max Graey
0041572052 Reuse respective opposite overload in std/string comparisions (#479) 2019-02-21 00:30:05 +01:00
Max Graey
2c365ada5b Improve operator overload typings (#480) 2019-02-21 00:23:46 +01:00
Daniel Wirtz
0c64f21250
Rework resolver (#489)
* Rework IR and resolver to use nested lookup tables
* Integrate types into IR
* Make components prefer IR, slimmed down AST
* Implement `export *`
* Add `@lazy` annotation and remove `--noTreeShaking`
* Add `@start` annotation and remove magic `main`
* Related refactoring, cleanup and docs
2019-02-21 00:11:22 +01:00
Daniel Wirtz
2f1a6c44ce
Add SIMD prerequisites (#469) 2019-02-07 15:26:26 +01:00
Max Graey
41a89fa773 Fix default comparator for strings (#462) 2019-02-07 12:26:45 +01:00
Daniel Wirtz
f551bc78e1
Implement bulk memory operations (#467) 2019-02-07 11:40:23 +01:00
Daniel Wirtz
831054dfd3
Rework inlining logic (#463) 2019-02-06 23:42:43 +01:00
dcode
cd1cfe6957 Update Binaryen to latest and rebuild dist files 2019-02-05 17:12:10 +01:00
Max Graey
4829f3a3e4 Add ArrayBuffer.isView and rework Array.isArray (#431) 2019-02-03 10:41:04 +01:00
Daniel Wirtz
2131c51932
Rework constructor handling (#446) 2019-02-02 16:03:21 +01:00
Daniel Wirtz
75328f3feb
Implement calls to 'super()' (#445) 2019-01-31 10:35:49 +01:00
dcode
7877661f35 Emit an error when declaring a nullable basic type (for now) 2019-01-30 10:22:15 +01:00
Daniel Wirtz
d843772314
Implement non-null assertions (#443) 2019-01-30 09:56:13 +01:00
Max Graey
c7441066dc Minor math tweaks + ipow32f/ipow64f (#428) 2019-01-24 23:17:44 +01:00
jtenner
3b1852bc37 Implement TypedArray#every/some/findIndex and improve map/reduce/reduceRight (#433) 2019-01-24 08:33:22 +01:00
Max Graey
d3715688fc Fix Math.imul and add tests (#432) 2019-01-24 01:23:53 +01:00
Max Graey
54b02c287c Fix functional Array & String methods and avoid buffer caching (#415) 2019-01-17 01:34:09 +01:00
Max Graey
72dc26e255 Optimize builtin abs for integers (#420) 2019-01-15 18:22:24 +01:00
LiaoPeng
201bd5f2b1 Implement String#slice (#404) 2019-01-10 12:10:23 +01:00
Max Graey
d82995c686 Improve mandelbort example (#308) 2019-01-09 17:26:31 +01:00
LiaoPeng
9ec226de1b Fix possible use after free in Array#forEach if the array resizes halfway (#408) 2019-01-09 13:06:34 +01:00
dcode
20f4092eb2 Update Binaryen and other dependencies; Update dist files 2019-01-09 13:02:47 +01:00
Daniel Wirtz
f714afab3c
Implement explicit this type (#373)
* Add backing classes for basic types (I32...)
* Move standard numeric constants to backing classes
2019-01-09 12:45:29 +01:00
Max Graey
8e61e0ead8 Improve reallocateUnsafe and properly free unmanaged objects (#368) 2018-12-08 23:54:45 +01:00
dcodeIO
3ed83ef3ae Use macro style for more internal helpers; Update dist files 2018-12-08 23:38:49 +01:00
jtenner
117cc1629b Implement TypedArray#map (#365)
* Also cleans up TypedArray#reduce/reduceRight test cases
* Also fixes the (what needs to be) overloads on Uint8ClampedArray
2018-12-07 19:40:21 +01:00
Max Graey
934f05eed9 Optimize array functional loops (#359) 2018-12-07 15:37:33 +01:00
Daniel Wirtz
ebae7cbd73
Implement optional type parameters (#360)
* Add a NATIVE<T> macro type to simplify use of a native WebAssembly type
* Add default type parameters for internal helpers for explicit loads and stores
* Unify loadUnsafe/loadUnsafeWithOffset etc. into one
* Renamed loadUnsafe etc. into just LOAD, like a macro
* Implement parsing of index signatures, but ignore them, for properly linting code
* Refactor TypedArray<T> to use macros
2018-12-07 14:33:32 +01:00
jtenner
d7f4874650 Implement TypedArray#reduce/reduceRight (#352) 2018-12-05 17:53:31 +01:00
dcodeIO
a661ff7d89 Update Binaryen to latest 2018-12-01 03:09:43 +01:00
dcodeIO
bf7dd1a64f Document the use of two type parameters in loadUnsafe, TypedArray etc., see #349 2018-11-30 01:12:01 +01:00
Max Graey
3c5c2cef80 Fix implementation of Array#splice (#347) 2018-11-29 15:41:42 +01:00
dcodeIO
7596d73284 Shortcut f32/f64/i64 conversions to bool 2018-11-23 16:01:50 +01:00
Daniel Wirtz
c30c62e383
Cast to bool by comparing to zero (#343) 2018-11-23 15:20:52 +01:00
Max Graey
6393921c12 Fix unsafeCompare (#336) 2018-11-19 12:23:45 +01:00
Max Graey
4944280cdc Add Math.signbit (#333) 2018-11-18 11:46:48 +01:00
Max Graey
1928404f3b Add ArrayBuffer/DataView/Symbol#toString and improve Errors (#332) 2018-11-18 11:43:44 +01:00
dcodeIO
d62d84521e Reduce inlining verbosity
With debug info and source maps in place there is not much value anymore in emitting explicitly named blocks.
2018-11-12 14:54:08 +01:00
dcodeIO
04a0cb8de7 Remove left-over line in std Array 2018-11-12 12:45:44 +01:00
dcodeIO
c93f02df69 Update dist files 2018-11-12 09:15:16 +01:00
dcodeIO
84ffa91db9 Add bounds checks to DataView and fix some lint issues 2018-11-12 09:11:04 +01:00
Max Graey
1882679807 Implement Array.isArray and Array#copyWithin (#331) 2018-11-12 07:45:40 +01:00
Max Graey
4e89456dcb Add more numeric builtins (#330) 2018-11-12 07:42:28 +01:00
Linus Unnebäck
3f9758f35a Add DataView to standard library (#316) 2018-11-12 07:41:04 +01:00
dcodeIO
9ab7384122 Improve date binding compatibility 2018-11-11 10:43:17 +01:00