Daniel Wirtz
2f1a6c44ce
Add SIMD prerequisites ( #469 )
2019-02-07 15:26:26 +01:00
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
Max Graey
4829f3a3e4
Add ArrayBuffer.isView and rework Array.isArray ( #431 )
2019-02-03 10:41:04 +01:00
Daniel Wirtz
2131c51932
Rework constructor handling ( #446 )
2019-02-02 16:03:21 +01:00
Daniel Wirtz
75328f3feb
Implement calls to 'super()' ( #445 )
2019-01-31 10:35:49 +01:00
Daniel Wirtz
f714afab3c
Implement explicit this type ( #373 )
...
* Add backing classes for basic types (I32...)
* Move standard numeric constants to backing classes
2019-01-09 12:45:29 +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
aedc821c09
Process backlog once more after Transform#afterParse, see #356
2018-12-03 17:22:01 +01:00
dcodeIO
4c35dd6f7c
Fix partial function prototypes not sharing their instances
...
This also made it necessary to extend the internal per-function instances map by one level for the respective class instance key so functions on differnt class instances with the same own type arguments don't collide.
2018-12-01 19:46:10 +01:00
dcodeIO
0e33806cf6
Add a way to ensure that lazy globals are resolved, fixes #355
...
This only affects static fields that currently must have a type annotation, while it wouldn't work if there wasn't an annotated type, like on normal globals, which aren't compiled lazily, though. Must be revisted if requirements on type annotations on fields ever become relaxed.
2018-12-01 13:31:37 +01:00
Daniel Wirtz
c30c62e383
Cast to bool by comparing to zero ( #343 )
2018-11-23 15:20:52 +01:00
dcodeIO
4498b28442
Use outer-most identifier when resolving queued exports, fixes #248
2018-09-09 03:51:29 +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
41ad2f8a70
Add a more convenient tracing utility for debugging; Fix basic GC test
2018-07-20 16:49:27 +02:00
dcodeIO
66cc359849
Emit an error when trying to inline a mutable variable
2018-07-19 16:38:09 +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
cd14b296ce
Refactor resolve infrastructure to its own file
...
This has become a little clumsy over time. Doesn't hurt to have it in its own place to get a grasp of it more easily.
2018-07-13 00:22:22 +02:00
dcodeIO
27dbbd1d75
Support a bit more interface syntax when parsing, see #160
2018-07-10 00:34:40 +02:00
dcodeIO
c4ebc8c291
Fix missing dependency in asc, see #157 ; Downgrade ts-node to v6
2018-07-04 21:47:58 +02:00
dcodeIO
82da2d1f6d
Add compiler hints
2018-06-29 00:14:42 +02:00
dcodeIO
9c16363796
Initial external decorator for annotating explicit import names; Use file name as default module name in imports; Emit empty memory if there are no static segments; Update TLSF and examples accordingly
2018-06-28 01:44:32 +02:00
dcodeIO
27e61f8f67
Remove noMemory option; Omit 'start' if 'main' is present; Unwrap more unnecessary blocks
2018-06-27 19:03:39 +02:00
dcodeIO
0d64c9661a
Flow improvements
...
Makes the internal API for working with flows more explicit in an attempt to avoid further issues. Also tackles remaining issues with 'continue' statements in 'for' loops.
2018-06-27 02:53:45 +02:00
dcodeIO
188b4e48ce
Try parsing signatures only if node is callable, see #149 ; Minor refactoring
2018-06-24 01:04:24 +02:00
dcodeIO
dd4be7b693
Fix some map issues; Simplify internal ArrayBuffer API a bit
2018-06-20 15:51:47 +02:00
dcodeIO
c102fc9848
Minor CLI and README cleanup
2018-06-14 15:57:04 +02:00
dcodeIO
25b433dca9
Support 'import * as' directives, see #27
2018-06-12 00:45:19 +02:00
dcodeIO
47f2e0950a
Make 'instanceof' behave like TS if the lhs is nullable
2018-06-09 02:01:45 +02:00
dcodeIO
cea69a6de1
Unify operator overloading and reuse arguments where possible; Update Binaryen; Update dist files
2018-06-05 23:09:08 +02:00
Max Graey
567a5fb064
Implement unary operator overloads ( #124 )
2018-06-04 17:23:09 +02:00
dcodeIO
f69bccfe09
Add @operator.binary
, @operator.prefix
, @operator.postfix
decorators for #124
2018-06-01 14:17:27 +02:00
dcodeIO
9d25f78fc1
Implement 'this' context parsing and serialization; Other minor improvements
2018-05-30 16:22:56 +02:00
dcodeIO
d0244a9b0f
Add an error for missing initializers on default params, fixes #121 ; Fix detection of terminated switch cases and improve tests, fixes #122
2018-05-27 12:24:16 +02:00
dcodeIO
7ad13f9d65
Add a 'call_indirect' builtin to emit arbitrary calls (might trap at runtime); Optimize 'for' loop compilation a bit
2018-05-25 15:59:17 +02:00
dcodeIO
33b10e347b
Properly resolve top level enums to i32s, see #116
2018-05-22 12:06:03 +02:00
dcodeIO
ea0eb7f1a5
Add a simple UTF8 converter, i.e. for calling C++ APIs; Fix disabling 'abort' entirely
2018-05-21 23:14:47 +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
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
dcodeIO
1f3bb61fae
Fix issues with more than 64 locals, see #99
2018-05-08 22:16:12 +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
06f99406be
Experimenting with inline-assembler-ish explicit builtins
...
Starting with explicit loads and stores as part of the respective type namespaces. Might become handy for use with portable code, because these can be polyfilled, while load<T> and store<T> can't.
2018-04-27 00:08:41 +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
4929fca363
Move some numeric builtins to stdlib; Minor refactoring
2018-04-17 02:50:38 +02:00
dcodeIO
81223977d0
Fix external names of class exports and similar; Support a few more kinds in TSDBuilder, see #74
2018-04-15 00:34:19 +02:00
dcodeIO
748e811137
Proper isNaN/isFinite without a temp. local
2018-04-12 20:40:00 +02:00