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
54b02c287c
Fix functional Array & String methods and avoid buffer caching ( #415 )
2019-01-17 01:34:09 +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
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
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
Max Graey
1882679807
Implement Array.isArray and Array#copyWithin ( #331 )
2018-11-12 07:45:40 +01:00
Daniel Wirtz
2bdc2a72f1
Use stack IR when emitting text format ( #312 )
2018-11-08 08:04:24 +01:00
dcodeIO
6f8a0fe03a
Rework compileUnaryPostfixExpression
...
Previously this tried to reuse too much code, making it hard to implement operator overloading
2018-10-29 20:06:21 +01:00
Daniel Wirtz
f7c734789e
Update Binaryen to latest; Various fixes
2018-10-11 08:49:08 +02:00
Max Graey
53b030fed5
Add Array#join and Array#toString + dtoa ( #275 )
2018-10-01 22:57:56 +02:00
dcodeIO
16d1a833dd
Always add a null function at table index zero
...
This allows function references (a table index internally) to be nullable
2018-09-17 01:48:35 +02:00
Max Graey
947cee08c7
Implement <TypedArray>#sort and improve default comparator ( #208 )
2018-08-04 15:30:03 +02:00
dcodeIO
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
Daniel Wirtz
dc0f271fc2
Initial GC integration ( #196 )
2018-08-02 18:23:02 +02:00
dcodeIO
26e46f6f86
Reintroduce builtin decorator so these can appear anywhere in stdlib again
...
Avoids wrapping an undocumented function within 'memory.size' for example.
2018-07-19 02:10:04 +02:00
dcodeIO
a1b75b69b7
Rename memory instructions; Rework constant handling
2018-07-18 23:49:32 +02:00
dcodeIO
7a8995b18b
Properly inline getters; Simplify blocks when last statement returns
2018-06-22 15:26:59 +02:00
dcodeIO
73417a9a06
Move 'abort' out of builtins and make it overridable
...
Now defaults to 'env.abort' as imported in lib/env.ts, but can be overridden through '--use abort=someThingElseOrNothingAtAll'
2018-05-21 18:48:29 +02:00
dcodeIO
ef9b43740d
Eliminate leftover temporary function types using latest Binaryen
2018-05-09 16:33:42 +02:00
dcodeIO
25a1f6230a
Suppress some unnecessary blocks and nops; Fix compilation of always 'break'ing 'do's
2018-05-06 05:46:35 +02:00
Daniel Wirtz
50f6c1c460
Update internal ABI to zero/sign-extend where necessary only ( #87 )
2018-05-06 00:00:54 +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
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
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
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
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
Max Graey
c45a35b1c1
Implement Array#sort ( #57 )
2018-04-04 00:42:23 +02:00
dcodeIO
5823e35f37
Progress and a tiny WASM binary parser
2018-04-03 23:56:48 +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
be66abbd78
Initial static arrays of basic element types; Fixed member names in generic contexts
2018-03-20 23:41:37 +01:00