1
0
mirror of https://github.com/fluencelabs/assemblyscript synced 2025-07-11 04:21:52 +00:00
Commit Graph

130 Commits

Author SHA1 Message Date
cd1cfe6957 Update Binaryen to latest and rebuild dist files 2019-02-05 17:12:10 +01:00
4829f3a3e4 Add ArrayBuffer.isView and rework Array.isArray () 2019-02-03 10:41:04 +01:00
c7441066dc Minor math tweaks + ipow32f/ipow64f () 2019-01-24 23:17:44 +01:00
d3715688fc Fix Math.imul and add tests () 2019-01-24 01:23:53 +01:00
54b02c287c Fix functional Array & String methods and avoid buffer caching () 2019-01-17 01:34:09 +01:00
d82995c686 Improve mandelbort example () 2019-01-09 17:26:31 +01:00
9ec226de1b Fix possible use after free in Array#forEach if the array resizes halfway () 2019-01-09 13:06:34 +01:00
20f4092eb2 Update Binaryen and other dependencies; Update dist files 2019-01-09 13:02:47 +01:00
8e61e0ead8 Improve reallocateUnsafe and properly free unmanaged objects () 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
934f05eed9 Optimize array functional loops () 2018-12-07 15:37:33 +01:00
ebae7cbd73 Implement optional type parameters ()
* 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
a661ff7d89 Update Binaryen to latest 2018-12-01 03:09:43 +01:00
3c5c2cef80 Fix implementation of Array#splice () 2018-11-29 15:41:42 +01:00
c30c62e383 Cast to bool by comparing to zero () 2018-11-23 15:20:52 +01:00
6393921c12 Fix unsafeCompare () 2018-11-19 12:23:45 +01:00
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
04a0cb8de7 Remove left-over line in std Array 2018-11-12 12:45:44 +01:00
1882679807 Implement Array.isArray and Array#copyWithin () 2018-11-12 07:45:40 +01:00
410036e445 Use mixed Horner scheme in Math.exp/expm1 to improve instruction parallelization () 2018-11-09 17:56:42 +01:00
4f95dce6e2 Do not emit debug info by default
This basically flips the --noDebug flag to become a --debug flag, so some optimizations, like inlining, aren't skipped by default, which might be unexpected.
2018-11-09 12:28:10 +01:00
2bdc2a72f1 Use stack IR when emitting text format () 2018-11-08 08:04:24 +01:00
d864977a1a Add Array#concat and add a return type for Array#push () 2018-10-30 15:07:53 +01:00
83fa12164f Add TypedArray#fill () 2018-10-26 18:28:31 +02:00
376afd45fc Improve Math routines; Add Mathf-specific prng () 2018-10-26 00:10:17 +02:00
711f73b15d Implement String#split () 2018-10-18 19:05:35 +02:00
f7c734789e Update Binaryen to latest; Various fixes 2018-10-11 08:49:08 +02:00
53b030fed5 Add Array#join and Array#toString + dtoa () 2018-10-01 22:57:56 +02:00
3f035395cd Add Array#fill () 2018-09-19 00:59:22 +02:00
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
d90cd085e5 Update Binaryen 2018-09-13 23:10:49 +02:00
4498b28442 Use outer-most identifier when resolving queued exports, fixes 2018-09-09 03:51:29 +02:00
947cee08c7 Implement <TypedArray>#sort and improve default comparator () 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 () 2018-08-02 18:23:02 +02:00
671121bf70 Implement String#padStart/padEnd; Refactor internal string copy, compare and repeat () 2018-07-25 16:25:53 +02:00
298a8f1688 Add String.fromCodePoint and 16-bit string compare () 2018-07-23 14:32:55 +02:00
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
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 () 2018-07-14 14:56:05 +02:00
d7c1c608bd Implement itoa32/64 for base 10 () 2018-07-13 15:40:37 +02:00
365884ff73 Add String#lastIndexOf and improve tests () 2018-07-10 03:31:51 +02:00
7a8995b18b Properly inline getters; Simplify blocks when last statement returns 2018-06-22 15:26:59 +02:00
c6ec5e2832 Utilize Binaryen's -O4
When specifying -O3 or -Oz, asc now automatically increases the optimize level to 4, then including costly non-LLVM optimizations for blocky code, in turn achieving similar results as an LLVM-based generator.
2018-06-09 14:05:33 +02:00
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
829af2285c Fix continue labels in 'for' loops skipping the incrementor 2018-05-23 11:32:12 +02:00
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
6c0a5c47d9 Update Binaryen and take care of 2018-05-14 16:55:55 +02:00
e415377cda Avoid trampolines where optional arguments are constant literals, see ; 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
50f6c1c460 Update internal ABI to zero/sign-extend where necessary only () 2018-05-06 00:00:54 +02:00