87 Commits

Author SHA1 Message Date
Daniel Wirtz
527d73ece8
Use fully qualified names in generic types (#544)
* Also fixes infinite parser loops
* Also implements command line option forwarding to node.js
2019-03-25 21:58:19 +01:00
Daniel Wirtz
1ae7d03e8c
Enable source maps out of the box (#519) 2019-02-28 17:37:30 +01:00
dcode
918a40eb7d Make asinit understand '--help', fixes #427 2019-01-26 12:40:42 +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
dcodeIO
c102fc9848 Minor CLI and README cleanup 2018-06-14 15:57:04 +02:00
dcodeIO
e18165bbbc Remove chalk dependency and replace it with something simpler, fixes #138 2018-06-12 18:34:39 +02:00
dcodeIO
c9ed03028d Add CLI definitions; CLI restructure 2018-05-28 18:55:51 +02:00
dcodeIO
113925fa7e Add a mechanism to hook into the compilation process with custom transforms, see #20
A custom transform is a node module that exports hooks called by the compiler on specific occasions, then being able to modify the intermediate results. Starting with 'afterParse' to modify the AST before compilation is performed.
2018-05-26 13:13:39 +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
2a7f40953a Update README 2018-05-08 14:37:51 +02:00
dcodeIO
27f0621ee9 Add support for the 'mutable-global' proposal behind a feature flag 2018-05-08 09:27:56 +02:00
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
fe9d53329d Fix asinit tsconfig.json generation
This used to extend the .d.ts file instead of the base .json, which was wrong
2018-04-25 22:54:55 +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
3b50720603 Also create an 'index.js' to load the module when running asinit 2018-04-02 02:42:42 +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
2ed9fac171 Initial compile time type check builtins 2018-03-17 12:54:37 +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
c6486c461d Move TLSF to stdlib, see #15 2018-02-12 19:17:50 +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