34d86a0d6a
Replace more workarounds with actual lazy compilation in stdlib
2019-02-21 05:42:33 +01:00
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
41a89fa773
Fix default comparator for strings ( #462 )
2019-02-07 12:26:45 +01:00
3b1852bc37
Implement TypedArray#every/some/findIndex and improve map/reduce/reduceRight ( #433 )
2019-01-24 08:33:22 +01:00
8e61e0ead8
Improve reallocateUnsafe and properly free unmanaged objects ( #368 )
2018-12-08 23:54:45 +01:00
3ed83ef3ae
Use macro style for more internal helpers; Update dist files
2018-12-08 23:38:49 +01:00
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
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
d7f4874650
Implement TypedArray#reduce/reduceRight ( #352 )
2018-12-05 17:53:31 +01:00
bf7dd1a64f
Document the use of two type parameters in loadUnsafe, TypedArray etc., see #349
2018-11-30 01:12:01 +01:00
3c5c2cef80
Fix implementation of Array#splice ( #347 )
2018-11-29 15:41:42 +01:00
6393921c12
Fix unsafeCompare ( #336 )
2018-11-19 12:23:45 +01:00
63b64ba69e
Respect current byteOffset in Array#subarray ( #329 )
2018-11-09 12:29:39 +01:00
d93ca84aed
Correct TypedArray#byteOffset handling and fix TypedArray#subarray ( #328 )
2018-11-08 23:19:41 +01:00
83fa12164f
Add TypedArray#fill ( #274 )
2018-10-26 18:28:31 +02:00
53b030fed5
Add Array#join and Array#toString + dtoa ( #275 )
2018-10-01 22:57:56 +02:00
947cee08c7
Implement <TypedArray>#sort and improve default comparator ( #208 )
2018-08-04 15:30:03 +02:00
dc0f271fc2
Initial GC integration ( #196 )
2018-08-02 18:23:02 +02:00
671121bf70
Implement String#padStart/padEnd; Refactor internal string copy, compare and repeat ( #171 )
2018-07-25 16:25:53 +02:00
298a8f1688
Add String.fromCodePoint and 16-bit string compare ( #174 )
2018-07-23 14:32:55 +02:00
a1b75b69b7
Rename memory instructions; Rework constant handling
2018-07-18 23:49:32 +02:00
9dfe39c532
Concretize decimal counting in itoa ( #169 )
2018-07-13 23:37:27 +02:00
6228233e04
Minor itoa improvements ( #168 )
2018-07-13 21:45:39 +02:00
d7c1c608bd
Implement itoa32/64 for base 10 ( #151 )
2018-07-13 15:40:37 +02:00
365884ff73
Add String#lastIndexOf and improve tests ( #163 )
2018-07-10 03:31:51 +02:00
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
1bf0ca6525
Add a mechanism to enable additional (experimental) features and start with sign extension operations; Hashing experimentation
2018-05-08 00:36:19 +02:00
99bde3a5fa
Use insertion sort for references in Array#sort ( #90 )
...
This fixes that Weak Heap Sort isn't stable and thus might swap equal values, which sometimes results in not deep equal arrays of strings, for example. Insertion sort is stable, so it is used for references instead.
2018-05-02 19:33:17 +02:00
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
ddde13a648
Implement Uint8ClampedArray ( #82 )
2018-04-24 00:33:21 +02:00
2002e32c9c
Inline small stdlib functions ( #71 )
2018-04-12 14:17:29 +02:00
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
0f49e054d2
Minor optimizations to array sorting
...
...to get a handle on the code
2018-04-08 01:53:22 +02:00
ac2281b14b
Improve memory usage for weakHeap sorting ( #68 )
2018-04-08 01:03:26 +02:00
9731958738
Implement a mechanism to realloc array buffers; Trap when trying to allocate more than max size; Test allocators in CI
2018-04-08 00:52:19 +02:00
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