19 Commits

Author SHA1 Message Date
jtenner
783dd32c2e Implement TypedArray#forEach (#530) 2019-03-06 19:07:10 +01:00
Daniel Wirtz
e8b0767143
Infer function expressions in matching contexts (#514)
* 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 (#422) 2019-02-22 15:26:30 +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
jtenner
3b1852bc37 Implement TypedArray#every/some/findIndex and improve map/reduce/reduceRight (#433) 2019-01-24 08:33:22 +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
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
Max Graey
d93ca84aed Correct TypedArray#byteOffset handling and fix TypedArray#subarray (#328) 2018-11-08 23:19:41 +01:00
Max Graey
d7c1c608bd Implement itoa32/64 for base 10 (#151) 2018-07-13 15:40:37 +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
dcodeIO
8465776a1d Use 'super' in Uint8ClampedArray#__set 2018-04-24 00:42:17 +02:00
Max Graey
ddde13a648 Implement Uint8ClampedArray (#82) 2018-04-24 00:33:21 +02:00
Daniel Wirtz
623597c23a
Make the transition to ArrayBuffer backed Arrays (#70)
* Traverse base classes when resolving overloads
* Implement preliminary TypedArray accessors
* Extract decorator flags from common flags to make space
* Add '**' overload
* Implement basic explicit inlining
* Support inlining of instance methods
* Reduce number of required locals when inlining
* Implement inlining of operator overloads
* Fix issues when inlining generic functions
2018-04-11 23:35:19 +02:00
dcodeIO
8770f7b548 New ArrayBuffer/TypedArray; Stdlib restructure; Fix importing stdlib in stdlib; Traverse constructors; Allow initialization of readonly instance fields in constructors 2018-04-07 03:27:22 +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
dcodeIO
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