summaryrefslogtreecommitdiff
path: root/src/js
Commit message (Collapse)AuthorAgeFilesLines
* Expand "a.js" export check in binaryen.js to also work when running on ↵juj2016-10-131-1/+2
| | | | Windows. (#767)
* handle memory growth with native wasm support: the result of grow_memory ↵Alon Zakai2016-10-111-2/+12
| | | | tells us if it succeeded, and then the new buffer can be found on the Memory object
* wasmTableSize of 0 is allowedAlon Zakai2016-10-111-1/+2
|
* refactor memoryBase and tableBase init to a shared location, so it affects ↵Alon Zakai2016-10-111-7/+7
| | | | native builds too
* use wasmTableSize when providedAlon Zakai2016-10-111-1/+1
|
* use 0xc Memory and Table in JS glue (#752)Alon Zakai2016-10-071-5/+18
|
* Use new WebAssembly API (#724)Alon Zakai2016-10-031-2/+2
| | | | | | * use new WebAssembly.Instance/Module API * detect presence of wasm with WebAssembly object
* import memoryBase and tableBaseAlon Zakai2016-09-071-2/+5
|
* import tableAlon Zakai2016-09-071-1/+4
|
* import memory #684Alon Zakai2016-09-071-1/+6
|
* refactor reallocBuffer assignment location, it is not technically part of ↵Alon Zakai2016-09-071-6/+8
| | | | mergeMemory
* add asm2wasm option to import a mem init fileAlon Zakai2016-09-071-2/+9
| | | | | | | | apply memory segments only if there isn't a memory initializer (which we need for asmjs and asm2wasm modes) use wasm-opt to check recreated wasts for validity, as wasm-shell would try to execute them add testing for combined modes like asmjs,interpret-binary
* use globals in asm2wasmAlon Zakai2016-09-071-28/+0
|
* Improvements to build-js.sh and JS API (#679)Rasmus2016-09-024-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adds command-line argument to build-js.sh for specifying the location of Emscripten. Also spreads out program arguments on separate lines * Exposes WasmBinaryWriter and BufferWithRandomAccess in the JS API to allow writing WASM modules and access the produced bytes via the JS API * Updates bin/binaryen.js and bin/wasm.js from changes to build-js.sh * Adds exclude patterns to .gitignore for some files generated by build-js.sh and .DS_Store for macOS * Changes build-js.sh to use EMSCRIPTEN env var instead of a command-line argument to provide the path to emscripten * Improvements to JS builds - Adds -g flag to build-js.sh that will build unoptimized and unmangled versions of binaryen.js and wasm.js (output has a "-g.js" suffix to allow co-existence with regular optimized builds). - Enables closure compiler for non-debug builds - Adds browser test for s-expression parser + WASM code gen (requires wasm to be enabled in the browser.) - Adds iterator interface to BufferWithRandomAccess (when Symbol.iterator is available) - Adds toArrayBuffer to BufferWithRandomAccess (when TypedArray is available) - Adds compileWast(sourceText :string) :ArrayBuffer to the module, parsing & compiling s-expression code to a WASM module - Changes the way binaryen.js is exported to allow usage in CommonJS, AMD and UMD envionments. * Expose "Binaryen" global in a better way to work with a.js generated by check.py * Fix to binaryen.js to only export a global variable when running the test (a.js) while inside a module (avoids polluting global in e.g. nodejs). Also fixes a spelling mistake. * Better "no WASM detected" message in test/binaryen.js/browser.html * Small change to error message in build-js.sh where $EMSCRIPTEN does not point to a directory * Changes emcc args in build-js.sh after investingating a large number of argument combinations. Also adds a browser benchmark. The result of emcc arguments and the effect on performance is summarized in this doc: https://gist.github.com/rsms/e33c61a25a31c08260161a087be03169 * Enable inferring emscripten path by looking in PATH when EMSCRIPTEN is not set in env
* emit safe calls for i32 div/rem when in precise mode in asm2wasm, as they ↵Alon Zakai2016-07-141-0/+12
| | | | can trap (#637)
* make wasm.js safe in closure compiler (#438)Alon Zakai2016-05-051-1/+1
|
* fall back from wasm compilation errors, and add loggingAlon Zakai2016-04-281-3/+12
|
* refactor js/wasm glue to defer the wasm/wasm-polyfill/asmjs-fallback as late ↵Alon Zakai2016-04-281-96/+100
| | | | as possible. this lets us recover from wasm compilation failures and still do a fallback method
* Use Module instead of AllocatingModule in binaryen.js tests (#391)Jan Wolski2016-04-251-0/+1
| | | | | | * Use Module instead of AllocatingModule in binaryen.js tests * include compiled binaryen.js, too
* Removes wasm-s-parser debug logging from binaryen.idl. (#373)Yury Delendik2016-04-211-1/+1
| | | | | | | Continuation of #345 (see https://github.com/WebAssembly/binaryen/commit/2887883029de293458344a5d564039074d93246e#diff-499c4e70c8aadb9837261ebcc4725f78R262) Currently building of binaryen.js fails with "src/../glue.cpp:102:14: error: no matching constructor for initialization of 'wasm::SExpressionWasmBuilder'"
* remove the AllocatingModule class, and just make Module have allocations. ↵Alon Zakai2016-04-181-7/+1
| | | | the distinction is not really that useful, and passes do need to allocate, so we would need to pass around AllocatingModules all around anyhow. (#361)
* more idl additions fix idl testAlon Zakai2016-04-041-0/+3
|
* more idlAlon Zakai2016-04-041-0/+16
|
* add necessary idl constructorsAlon Zakai2016-04-041-0/+4
|
* add simpler constructor for SExpressionWasmBuilderAlon Zakai2016-04-041-0/+51
|
* fix reallocBuffer to send growWasmMemory a size in pagesAlon Zakai2016-04-011-1/+4
|
* if Module.asm is already set, use thatAlon Zakai2016-03-241-1/+4
|
* note when we are using wasmAlon Zakai2016-03-231-0/+2
|
* quote strings for closure compilerAlon Zakai2016-03-231-4/+4
|
* fix memory growth #270Alon Zakai2016-03-221-10/+9
|
* improve method namesAlon Zakai2016-03-181-15/+15
|
* finish wasm-binary method and update emscriptenAlon Zakai2016-03-121-3/+8
|
* refactor wasm.js and prepare for loading and interpreting binariesAlon Zakai2016-03-121-22/+37
|
* log failures in wasm/js integrationAlon Zakai2016-03-111-4/+16
|
* check for WasmJS in polyfill glueAlon Zakai2016-03-111-0/+2
|
* support a comma-separated list of methods in wasm/js integrationAlon Zakai2016-03-111-49/+83
|
* fix imports when arriving from wasm backend, which does not prefixAlon Zakai2016-03-091-0/+17
|
* use .exportsAlon Zakai2016-03-091-2/+2
|
* move to a cleaner way of emcc.py integrating with wasm.js-post.jsAlon Zakai2016-03-081-5/+9
|
* assume wasm binaries were preloaded on the web, where we lack sync binary readsAlon Zakai2016-03-061-1/+8
|
* warn when we should grow wasm memory in mergeMemoryAlon Zakai2016-03-051-1/+3
|
* fix global.Math importsAlon Zakai2016-03-051-1/+1
|
* place NaN and Infinity on globalAlon Zakai2016-03-041-1/+5
|
* send a typed array to instantiateMemoryAlon Zakai2016-03-041-1/+1
|
* move WasmTypes in integrateWasmJS to the right placeAlon Zakai2016-03-041-8/+8
|
* pass buffer to instantiateModuleAlon Zakai2016-03-041-1/+1
|
* WASM => WasmAlon Zakai2016-03-041-8/+2
|
* use lookupImport directlyAlon Zakai2016-03-041-1/+1
|
* move to more unification of import handling in interpreter and native pathsAlon Zakai2016-03-041-38/+28
|
* support memory segments in wasm modules, which we get if the wasm backend ↵Alon Zakai2016-03-041-2/+4
| | | | was used