47 Commits

Author SHA1 Message Date
dcode
cdec865bef Update Binaryen to latest nightly 2019-03-08 16:19:46 +01:00
Daniel Wirtz
8e5b9c734b
Add atomic definitions (#524) 2019-03-02 10:14:09 +01:00
Daniel Wirtz
e1f1a3b49c
Implement v128 instructions (#508) 2019-02-28 17:36:22 +01:00
Daniel Wirtz
e8b0767143
Infer function expressions in matching contexts (#514)
* legalizes omitting types on function expressions within function type contexts
* legalizes omitting any number of arguments
2019-02-27 21:45:36 +01:00
Daniel Wirtz
0c64f21250
Rework resolver (#489)
* Rework IR and resolver to use nested lookup tables
* Integrate types into IR
* Make components prefer IR, slimmed down AST
* Implement `export *`
* Add `@lazy` annotation and remove `--noTreeShaking`
* Add `@start` annotation and remove magic `main`
* Related refactoring, cleanup and docs
2019-02-21 00:11:22 +01:00
dcodeIO
5c39043f9e Add a test suite option to also generate binaries 2018-11-30 17:51:49 +01:00
dcodeIO
84ffa91db9 Add bounds checks to DataView and fix some lint issues 2018-11-12 09:11:04 +01:00
dcodeIO
1fad3d26c7 Add initial Date bindings
Doesn't do much, yet, because we can't get the timezone with a plain binding, but it's at least something.
2018-11-10 14:40:58 +01:00
dcodeIO
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
Daniel Wirtz
f7c734789e
Update Binaryen to latest; Various fixes 2018-10-11 08:49:08 +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
5ca5df3dc7 Restructure types; Add a use-case specific options parser; Allow (re)creation of specific parser fixtures 2018-07-03 03:06:01 +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
48e96cbcf5 Add initial map implementation to tests, see #17 2018-06-19 04:23:22 +02:00
dcodeIO
e18165bbbc Remove chalk dependency and replace it with something simpler, fixes #138 2018-06-12 18:34:39 +02:00
dcodeIO
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
dcodeIO
c9ed03028d Add CLI definitions; CLI restructure 2018-05-28 18:55:51 +02:00
Alan Pierce
558ed78cc9 Add a more helpful error message when you haven't defined an allocator (#108)
Also adds a system for writing tests that assert that certain error codes are triggered so that I could test this.
2018-05-22 12:09:05 +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
Daniel Wirtz
164f134053
Even more math (#56)
Remaining implementations of JavaScript's Math functions (except sin/cos/tan), both double (Math) and single (Mathf) precision, ported from musl incl. tests from libc-test, plus some changes to match JS semantics. Also binds fmod to `%` and pow to `**`.
2018-03-30 17:25:54 +02:00
dcodeIO
e75d006d26 Implement Math/Mathf.pow 2018-03-26 03:50:06 +02:00
dcodeIO
721d77012b Math scaffolding 2018-03-24 17:18:15 +01:00
dcodeIO
31633899f9 Use untouched/optimized naming scheme in tests as well 2018-02-17 11:14:41 +01:00
dcodeIO
e50a23bf75 Rename wast to wat 2018-02-17 11:09:22 +01:00
dcodeIO
b1c6ccab2a Use long.js in JS and native i64 in WASM; Compile literals more thoroughly 2018-02-14 09:18:43 +01:00
dcodeIO
74f8189ac1 Fix CRLF issues in tests; Include common tsc options in asc bundle 2018-02-10 18:34:29 +01:00
dcodeIO
60728c38fd Initial asc browser bundle, see #25 2018-02-09 15:43:57 +01:00
dcodeIO
41c0f2c6c3 Test formatting; Wire webpack loader to asc 2018-02-05 17:10:14 +01:00
dcodeIO
819d79889d Second pass on the programmatic asc API; Make compiler tests use asc directly 2018-02-04 07:51:40 +01:00
dcodeIO
4736227879 Update binaryen to latest nightly; Source map support 2018-02-02 03:07:54 +01:00
dcodeIO
9e3b6f202d Naive parseFloat 2018-01-29 07:42:40 +01:00
dcodeIO
219ee81bc9 Rename heap to memory; Allocator strategies 2018-01-28 15:30:49 +01:00
dcodeIO
64c939fdc4 Initial implementation of 'new'
This doesn't yet call the constructor or use provided parameters and just allocates raw memory
2018-01-19 16:13:14 +01:00
dcodeIO
ef7a095494 Report if a function isn't guaranteed to return 2018-01-19 04:16:18 +01:00
dcodeIO
7be4f9fabb Control flow evaluator; Support for block-level let/const variables 2018-01-18 23:34:12 +01:00
dcodeIO
49d29fc9f2 More std array 2018-01-14 21:17:43 +01:00
dcodeIO
ad469ca445 Polyfill move_memory and set_memory and remove Heap 2018-01-14 02:30:20 +01:00
dcodeIO
2c009c67d3 Initial element access compilation; Carefully approaching std array 2018-01-13 23:38:07 +01:00
dcodeIO
3980e53bb7 Let the optimizer decide what it takes to become a select 2018-01-12 05:03:25 +01:00
dcodeIO
fc777b3a89 Builtins rewrite with type parameter inference; Small integer math optimizations; Switchify 2018-01-10 13:09:05 +01:00
dcodeIO
ae99adefce Better resolve infrastructure; Instance fields 2018-01-03 18:33:27 +01:00
dcodeIO
7795d48d98 Namespaced imports 2017-12-27 22:38:32 +01:00
dcodeIO
ba61a5e414 Getters & setters (static); Instantiate compiler tests; Cleanup 2017-12-27 02:37:53 +01:00
dcodeIO
666ba54e42 Heap fill/compare; Std string experiments 2017-12-21 10:14:53 +01:00
dcodeIO
85a9fb1eb5 Stdlib preparations 2017-12-16 02:27:39 +01:00
dcodeIO
8085a02df3 Elements can be namespaces; Static properties and methods 2017-12-15 02:50:55 +01:00
dcodeIO
d0b189b437 CString/CArray was an illusion; Update and test tsconfig files 2017-12-11 02:03:15 +01:00