1
0
mirror of https://github.com/fluencelabs/assemblyscript synced 2025-04-29 00:42:16 +00:00

222 Commits

Author SHA1 Message Date
Daniel Wirtz
5b58b9aa8d
Update Binaryen to latest () 2019-04-08 08:18:21 +02:00
Max Graey
abf3de9076 Fix implicit string to bool conversion () 2019-03-31 20:00:54 +02:00
Daniel Wirtz
85de20c4fc
Add WASI bindings () 2019-03-31 19:59:39 +02:00
jtenner
d411415060 Implement TypedArray#reverse () 2019-03-08 18:48:06 +01:00
Daniel Wirtz
252b843c4b
General cleanup ()
* Cleans up and trims the overly large builtins file by ~1600 lines
* Properly propagate inline assembler-like argument types
* Use https in examples
* Reformat README
2019-03-08 14:24:48 +01:00
Max Graey
f841f0fe1f Add portable sincos polyfill () 2019-03-06 20:20:18 +01:00
jtenner
783dd32c2e Implement TypedArray#forEach () 2019-03-06 19:07:10 +01:00
Max Graey
208dc2f1de Implement Mathf.sin/cos/tan () 2019-03-05 19:36:22 +01:00
Daniel Wirtz
8e5b9c734b
Add atomic definitions () 2019-03-02 10:14:09 +01:00
Daniel Wirtz
e1f1a3b49c
Implement v128 instructions () 2019-02-28 17:36:22 +01:00
Max Graey
cdf40578b6 Refactor slices for better compliance () 2019-02-27 21:51:07 +01:00
Max Graey
aad263e670 Add isArrayLike builtin () 2019-02-27 21:47:52 +01:00
Daniel Wirtz
e8b0767143
Infer function expressions in matching contexts ()
* legalizes omitting types on function expressions within function type contexts
* legalizes omitting any number of arguments
2019-02-27 21:45:36 +01:00
Max Graey
ed97672a8c Use faster clamping for Uint8ClampedArray () 2019-02-22 15:26:30 +01:00
dcode
06ee43e6ad Fix isFunction/isNullable typings 2019-02-22 08:25:00 +01:00
Daniel Wirtz
f318d68383
Add isFunction and isNullable builtins () 2019-02-22 01:11:05 +01:00
dcode
34d86a0d6a Replace more workarounds with actual lazy compilation in stdlib 2019-02-21 05:42:33 +01:00
Max Graey
6b495f71d0 Ensure Math.clz32/imul compatibility with JS () 2019-02-21 00:32:58 +01:00
Max Graey
0041572052 Reuse respective opposite overload in std/string comparisions () 2019-02-21 00:30:05 +01:00
Max Graey
2c365ada5b Improve operator overload typings () 2019-02-21 00:23:46 +01:00
Daniel Wirtz
0c64f21250
Rework resolver ()
* 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
1bd1d26152
Put atomics behind a feature flag () 2019-02-07 18:21:09 +01:00
Daniel Wirtz
2f1a6c44ce
Add SIMD prerequisites () 2019-02-07 15:26:26 +01:00
Nidin Vinayakan
7ce3296b5e Add atomic built-ins () 2019-02-07 15:25:49 +01:00
Max Graey
41a89fa773 Fix default comparator for strings () 2019-02-07 12:26:45 +01:00
Daniel Wirtz
f551bc78e1
Implement bulk memory operations () 2019-02-07 11:40:23 +01:00
Max Graey
4829f3a3e4 Add ArrayBuffer.isView and rework Array.isArray () 2019-02-03 10:41:04 +01:00
Max Graey
1867416236 Make TypedPropertyDescriptor less type strict () 2019-02-02 16:22:22 +01:00
Daniel Wirtz
2131c51932
Rework constructor handling () 2019-02-02 16:03:21 +01:00
Max Graey
c7441066dc Minor math tweaks + ipow32f/ipow64f () 2019-01-24 23:17:44 +01:00
Max Graey
d709cf3dff Improve decorator declarations ()
i.e. add a dummy `TypedPropertyDescriptor<T>`
2019-01-24 08:39:15 +01:00
jtenner
3b1852bc37 Implement TypedArray#every/some/findIndex and improve map/reduce/reduceRight () 2019-01-24 08:33:22 +01:00
Max Graey
d3715688fc Fix Math.imul and add tests () 2019-01-24 01:23:53 +01:00
Max Graey
54b02c287c Fix functional Array & String methods and avoid buffer caching () 2019-01-17 01:34:09 +01:00
LiaoPeng
201bd5f2b1 Implement String#slice () 2019-01-10 12:10:23 +01:00
LiaoPeng
9ec226de1b Fix possible use after free in Array#forEach if the array resizes halfway () 2019-01-09 13:06:34 +01:00
Daniel Wirtz
f714afab3c
Implement explicit this type ()
* 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 () 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 ()
* 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 () 2018-12-07 15:37:33 +01:00
Daniel Wirtz
ebae7cbd73
Implement optional type parameters ()
* 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 () 2018-12-05 17:53:31 +01:00
dcodeIO
d5a6bbca9b Add missing definitions for Uint8ClampedArray 2018-12-01 19:49:00 +01:00
dcodeIO
bf7dd1a64f Document the use of two type parameters in loadUnsafe, TypedArray etc., see 2018-11-30 01:12:01 +01:00
Max Graey
3c5c2cef80 Fix implementation of Array#splice () 2018-11-29 15:41:42 +01:00
dcodeIO
1149abf824 Add 'instantiate<T>' builtin (like 'new' but from a type), see 2018-11-29 15:28:08 +01:00
Max Graey
6393921c12 Fix unsafeCompare () 2018-11-19 12:23:45 +01:00
Max Graey
4944280cdc Add Math.signbit () 2018-11-18 11:46:48 +01:00
Max Graey
1928404f3b Add ArrayBuffer/DataView/Symbol#toString and improve Errors () 2018-11-18 11:43:44 +01:00