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
dcodeIO
d5f72e32d7
Add initial definitions for SIMD ops
2018-12-14 08:17:08 +01:00
dcodeIO
b585703eae
Replace more RawGit links
2018-12-08 04:01:17 +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
6ed45bee98
Expose the full API for now, see #356
...
Some things might be more useful than others, but we can decide on that later.
2018-12-02 23:46:32 +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
dcodeIO
9744c319c7
Fix an issue with 'super' not being present when inlining
2018-12-01 00:07:44 +01:00
dcodeIO
1149abf824
Add 'instantiate<T>' builtin (like 'new' but from a type), see #349
2018-11-29 15:28:08 +01:00
dcodeIO
1d93877e7c
Fix unsupported element access on 'this', see #349
2018-11-29 13:12:06 +01:00
dcodeIO
7596d73284
Shortcut f32/f64/i64 conversions to bool
2018-11-23 16:01:50 +01:00
Daniel Wirtz
c30c62e383
Cast to bool by comparing to zero ( #343 )
2018-11-23 15:20:52 +01:00
dcodeIO
b723ff3e88
Update Binaryen to latest
2018-11-22 17:15:22 +01:00
dcodeIO
a79db87af9
Fix parsing of properties and field names using semi-reserved keywords
2018-11-13 08:48:10 +01:00
dcodeIO
4289683946
Handle the case where an inlined body is empty
2018-11-12 17:30:28 +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
Daniel Wirtz
2bdc2a72f1
Use stack IR when emitting text format ( #312 )
2018-11-08 08:04:24 +01:00
Max Graey
dc4e2060ba
Add unary postfix operator overloading ( #309 )
2018-10-30 15:23:18 +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
Andy Hanson
0bb5cb829e
Support definite assignment assertion x!: i32
( #260 )
2018-10-27 18:29:59 +02:00
Daniel Wirtz
f7c734789e
Update Binaryen to latest; Various fixes
2018-10-11 08:49:08 +02:00
dcodeIO
63d4579118
Fix some array function parsing and serialization issues
...
Quite similar to #256 and also uses its test, but also fixes the serializer and doesn't try to parse an untyped 'x => x'.
2018-10-04 09:53:47 +02:00
dcodeIO
eeb8a8fd6c
Make sure temp locals don't collide when allocating literal arrays, fixes #281
...
Originally part of #288
2018-10-03 01:32:28 +02:00
dcodeIO
9c770d801e
Add initial newArray and getArray helpers to loader
...
Essentially creates an unmanaged typed array in memory that one can work with and free again respectively obtain from the AS side. No support for GC or generic arrays yet, and is likely to change substentially once WASM GC becomes a thing.
2018-09-18 15:17:44 +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
dcodeIO
d90cd085e5
Update Binaryen
2018-09-13 23:10:49 +02:00
dcodeIO
6949cf9f9e
Switch signed/unsigned instructions when upcasting 32- to 64-bit integers, fixes #247
...
Matches C semantics now. Turns around some instructions in tests, especially libm, but doesn't break anything.
2018-09-10 14:25:33 +02:00
Andy Hanson
ef2c0c623e
Improve error message for accessing method like a field ( #253 )
2018-09-10 03:21:30 +02:00
Andy Hanson
3605630747
Support calling the result of a getter ( #252 )
2018-09-10 03:19:11 +02: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
00fb45fcad
Check for EOF on parse error in blocks, fixes #180
2018-07-21 03:11:33 +02:00
dcodeIO
2fa7d6678c
Make sure all roots are iterated by delaying builtin generation; Cleanup
2018-07-20 20:33:50 +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
96411c7398
Include a fix for #176
2018-07-19 00:01:00 +02:00
dcodeIO
a1b75b69b7
Rename memory instructions; Rework constant handling
2018-07-18 23:49:32 +02:00
dcodeIO
1928f46cb9
Also handle indirect recursive inlining
2018-07-14 18:21:11 +02:00
dcodeIO
4b8500355a
Skip inlining and emit a warning when trying to inline a function into itself
2018-07-14 18:01:19 +02:00
dcodeIO
3b0fd9aac2
Implement isDefined and isConstant builtins
2018-07-14 16:42:00 +02:00
dcodeIO
10a9f407bf
Support object literal shorthands
2018-07-14 15:18:45 +02:00
dcodeIO
9e508de69a
Implement object literal parsing; Instantiate classes from object literals
...
Essentially, if the contextual type is a class with a constructor that takes zero arguments or doesn't have a constructor at all, an object literal can be used to initialize a new instance of that class with preset values.
2018-07-14 04:00:04 +02:00
dcodeIO
72cb1e9008
Update dependencies; Regenerate dist files
2018-07-14 00:13:52 +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
585d246165
Fix infinite loop when skipping statements, see #167
2018-07-10 17:38:03 +02:00
dcodeIO
c4199673ef
Support parsing of class expressions, see #161
2018-07-10 03:03:59 +02:00
dcodeIO
27dbbd1d75
Support a bit more interface syntax when parsing, see #160
2018-07-10 00:34:40 +02:00