9ec226de1b
Fix possible use after free in Array#forEach if the array resizes halfway ( #408 )
2019-01-09 13:06:34 +01:00
3ed83ef3ae
Use macro style for more internal helpers; Update dist files
2018-12-08 23:38:49 +01:00
934f05eed9
Optimize array functional loops ( #359 )
2018-12-07 15:37:33 +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
3c5c2cef80
Fix implementation of Array#splice ( #347 )
2018-11-29 15:41:42 +01:00
04a0cb8de7
Remove left-over line in std Array
2018-11-12 12:45:44 +01:00
1882679807
Implement Array.isArray and Array#copyWithin ( #331 )
2018-11-12 07:45:40 +01:00
d864977a1a
Add Array#concat and add a return type for Array#push ( #214 )
2018-10-30 15:07:53 +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
3f035395cd
Add Array#fill ( #250 )
2018-09-19 00:59:22 +02:00
947cee08c7
Implement <TypedArray>#sort and improve default comparator ( #208 )
2018-08-04 15:30:03 +02:00
631478c7c9
Rework static memory segment creation; Fix stdlib gc hooks not marking own fields; Align everything to 8 bytes that might be touched by GC
2018-08-04 00:36:59 +02:00
dc0f271fc2
Initial GC integration ( #196 )
2018-08-02 18:23:02 +02:00
a1b75b69b7
Rename memory instructions; Rework constant handling
2018-07-18 23:49:32 +02:00
29081b6323
Assert that comparator is not null in Array#sort ( #155 )
2018-07-14 14:56:05 +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
63aa648ace
Slim down indexed access as far as currently possible
...
Interestingly, the same code written as statements is significantly slower. See notes.
2018-04-23 23:57:15 +02:00
fac0fc59b5
Implement Array#map, Array#forEach, Array#filter, Array#reduceRight ( #81 )
2018-04-22 22:15:38 +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
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
c45a35b1c1
Implement Array#sort ( #57 )
2018-04-04 00:42:23 +02:00
710fcefd72
Add array methods: findIndex, reduce, some, every ( #49 )
2018-03-25 13:13:53 +02:00
4adb69f73a
Binary expression operator overloads for +/==; Check allocation flow in ternary expressions; Cache empty array buffers; Sealed decorator for non-derivable internals
2018-03-23 12:45:29 +01:00
162096bcd6
Add Array#includes and improve compatibility of Array#indexOf ( #41 )
2018-03-17 17:02:15 +01:00
23a7db4dc3
Ensure consistent variable modifiers
...
'var' is a distinct local or mutable global, 'let' a shared local
2018-03-13 02:32:10 +01:00
4633fdab96
Update binary expression inference, see #35 ; Update dependencies
2018-03-01 19:42:07 +01:00
d4c00eaba3
Revised implicit type conversions; Initial function expression compilation
2018-02-28 01:48:01 +01:00
9ef8b162a9
Also lint stdlib
2018-02-25 23:21:32 +01:00
de066fc128
Preliminary strings
...
While not well-wrought, it's at least possible now to log some stuff when debugging
2018-01-27 05:35:14 +01:00
49d29fc9f2
More std array
2018-01-14 21:17:43 +01:00
827bb4afe8
Use move_memory in std Array#unshift
2018-01-14 02:41:13 +01:00
ad469ca445
Polyfill move_memory and set_memory and remove Heap
2018-01-14 02:30:20 +01:00
2c009c67d3
Initial element access compilation; Carefully approaching std array
2018-01-13 23:38:07 +01:00
2df318a7ec
Implicitly alias stdlib exports as program globals, see #8
2018-01-12 15:36:17 +01:00
d8fa04f910
Operator overload preparations
2018-01-06 10:20:38 +01:00
9846f6c033
Add showcase compiler test incl. respective features and fixes
2018-01-05 18:19:32 +01:00
2d0f5f3087
Comma expressions fwiw
2018-01-05 01:55:59 +01:00
1221ff129d
More built-in constants; Get/set parsing fixes; I64.toF64 fixes
2018-01-02 21:41:25 +01:00
3add4624c5
Initial instance methods and field layout; More cleanup
2018-01-01 20:27:21 +01:00
4207f6460d
Warn on constant locals not being actual constants; Simplify changetype
2017-12-28 17:16:37 +01:00
ad298c7bea
Asterisk imports parsing; Pussyfooting around stdlib
2017-12-23 00:48:54 +01:00
2720515982
More stdlib setup
2017-12-16 17:54:53 +01:00
85a9fb1eb5
Stdlib preparations
2017-12-16 02:27:39 +01:00
b5cc2f9924
Fix unsigned ops; Fix parenthesized conversion; Minor restructure
2017-12-11 18:46:11 +01:00