66 Commits

Author SHA1 Message Date
dcodeIO
1bf0ca6525 Add a mechanism to enable additional (experimental) features and start with sign extension operations; Hashing experimentation 2018-05-08 00:36:19 +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
Max Graey
d445608467 Fix deprecation warning in node 10 (#85) 2018-04-26 02:18:39 +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
f1b00c90be Fix browser asc 2018-04-07 16:37:39 +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
dcodeIO
5e20bed09a Unify / simplify asc API (in browsers) 2018-04-04 14:39:40 +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
59a22c1842 A little 'asinit' CLI tool for quickly setting up a project; Minor refactoring 2018-04-01 23:46:41 +02:00
dcodeIO
6ff69394f0 Minor cleanup 2018-03-31 18:18:55 +02:00
dcodeIO
72063577f3 Also implement buffer toString in asc 2018-03-31 00:16:12 +02:00
dcodeIO
2e5077da2d Remove unnecessary dependencies in asc bundle; Update dependencies 2018-03-31 00:03:02 +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
792202ac5a Add an option to alias global objects
This for example allows to switch the default 'Math' implementation a program will use. Uses 'NativeMath' by default.
2018-03-26 16:54:25 +02:00
dcodeIO
e75d006d26 Implement Math/Mathf.pow 2018-03-26 03:50:06 +02:00
dcodeIO
ec5bb7ad51 Export function table by default and add an option to import it 2018-03-23 15:12:03 +01:00
dcodeIO
8cfc479cc0 Fix asc not printing text format to console by default 2018-03-21 23:34:40 +01:00
dcodeIO
00e6d613a9 Fix an issue with asc not finding bundled library files in the browser; Minor cleanup 2018-03-21 23:27:53 +01:00
Norton Wang
3a8f9f1576 Add compileString convenience function to asc (#47) 2018-03-21 02:56:24 +01:00
dcodeIO
0fef69e445 Set up documentation generation 2018-03-19 01:12:18 +01:00
Norton Wang
9511e2618d Fix an issue with the --lib argument in asc and allow specifying files (#42) 2018-03-18 14:11:27 +01:00
dcodeIO
faac3c31eb AST cleanup; Definition generators scaffolding 2018-03-17 01:37:05 +01:00
dcodeIO
081ac768ae Give some love to the linter 2018-03-13 14:03:57 +01:00
dcodeIO
f754b24819 Fix asc bundle with webpack 4, see #36; Function expression progress 2018-03-03 18:38:38 +01:00
dcodeIO
eef8ef2cd8 Fix asc bundle AMD usage 2018-03-01 22:57:35 +01:00
dcodeIO
02dce5a518 Add importMemory option to asc, see #36 2018-02-28 18:38:42 +01:00
dcodeIO
8dc517e352 Cleanup; Initial tslint integration 2018-02-25 00:13:39 +01:00
dcodeIO
e50a23bf75 Rename wast to wat 2018-02-17 11:09:22 +01:00
dcodeIO
6b459259f9 Add memoryBase compiler option
This allows having fixed-size application-specific memory in front, followed by compiler-generated static memory and the heap.
2018-02-17 00:16:08 +01:00
dcodeIO
d31e484b15 Cleanup; Fix an issue with 'let' declarations reusing a local 2018-02-14 19:21:31 +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
9e9284955d Clean up asc a bit 2018-02-12 18:54:17 +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
9678ce839e Also bundle definition files with asc 2018-02-10 17:25:31 +01:00
dcodeIO
08d9ba12aa Improve bundled asc example a bit, see #25 2018-02-09 16:40:53 +01:00
dcodeIO
60728c38fd Initial asc browser bundle, see #25 2018-02-09 15:43:57 +01:00
dcodeIO
ad92d91f01 Move built-in declarations to actual sources; Remove declaration is null checks; Resolve calls 2018-02-09 02:31:48 +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
349de60129 First pass on a programmatic asc API 2018-02-03 02:36:20 +01:00
dcodeIO
8d4be9a714 Remove intermediate debugging from asc 2018-02-02 03:14:27 +01:00
dcodeIO
4736227879 Update binaryen to latest nightly; Source map support 2018-02-02 03:07:54 +01:00
dcodeIO
a8da04404a New TLSF, see #15 2018-02-01 17:43:45 +01:00
dcodeIO
cae89e0b1f Accept custom library paths in asc, see #19 2018-01-30 01:20:20 +01:00
dcodeIO
896810859e Make memory allocators pluggable 2018-01-28 19:33:05 +01:00
dcodeIO
219ee81bc9 Rename heap to memory; Allocator strategies 2018-01-28 15:30:49 +01:00
dcodeIO
1c4b0ddc57 Moved noEmit to compiler frontend; Added I/O and compile time measuring 2018-01-18 15:45:34 +01:00
dcodeIO
27a66c1a7a Minor improvements to help asc -h 2018-01-18 06:55:30 +01:00
dcodeIO
fc40ed80f7 Update Binaryen and add optimize levels to asc 2018-01-18 05:56:45 +01:00