summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* update testsAlon Zakai2016-09-071-4/+4
|
* don't depend on order of operations in calls, it varies by compilerAlon Zakai2016-09-0712-1416/+1416
|
* select values must be validAlon Zakai2016-09-071-16/+16
|
* move drop into blocks, dropping all the breaks as well, when possibleAlon Zakai2016-09-071-274/+224
|
* loops no longer have an out label and other upstream loop updatesAlon Zakai2016-09-0738-40507/+41619
|
* call_indirect now has the target at the endAlon Zakai2016-09-0722-302/+303
|
* add drop and tee expressionsAlon Zakai2016-09-0783-11054/+16397
|
* remove lower-if-else, as it's no longer neededAlon Zakai2016-09-072-71/+0
|
* Improvements to build-js.sh and JS API (#679)Rasmus2016-09-022-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Update waterfall build to 10372 (#689)Derek Schuff2016-08-31464-38736/+41076
| | | | | | | This brings in LLVM changes up to r28025, which includes a fix for PR29127 and includes disabling the store-result optimization. * remove extraneous wasm-interpreter.h change
* asm.js-style setjmp/longjmp handling for wasm: add handling foraheejin2016-08-302-12/+24
| | | | emscripten_longjmp_jmpbuf name
* Asm.js-style setjmp/longjmp support for wasm (#681)Heejin Ahn2016-08-262-0/+14
| | | | | | | This needs to export realloc as well, in addition to malloc and free handled in #4469. To support asm.js style setjmp/longjmp, wasm needs to export realloc as well, in addition to malloc and free handled in #4469. saveSetjmp() uses realloc within it, and realloc is not implemented in JS glue code.
* Merge pull request #682 from loganchien/fix-empty-deadlockAlon Zakai2016-08-265-0/+20
|\ | | | | Fix asm2wasm dead lock caused by empty module
| * Fix asm2wasm dead lock caused by empty modules.Logan Chien2016-08-265-0/+20
| | | | | | | | | | | | | | | | | | This commit fixes an asm2wasm dead lock when asm2wasm is compiling an empty module, i.e. a module without any functions. Without this commit, worker threads are likely to leave `workerMain()` and decrease `liveWorkers` early. Consequently, `waitUntilAllReady()` will never observe `liveWorkers == numWorkers`.
* | Fix alignment bug in .lcomm (#680)Heejin Ahn2016-08-262-0/+40
|/ | | | | | | | | | | | When parsing .lcomm directives, s2wasm does not parse the alignment number and skip it. This causes alignment bugs in some cases. (In the test case attached, 'buf' should be 4 bytes aligned, but it does not align it properly, so this code was generated: ``` (call $foo (i32.const 13) ) ``` 13 is not 4-bytes aligned. This patch fixes this bug.
* offset support in tableAlon Zakai2016-08-1531-36/+36
|
* support function table initial and max sizes, and new printing formatAlon Zakai2016-08-1231-35/+70
|
* support expressions in segment offsetsAlon Zakai2016-08-1269-237/+169
|
* Implement asm.js style exception handling for Wasm (#664)Heejin Ahn2016-08-115-1/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement asm.js style exception handling for Wasm Converts invoke wrapper names generated by LLVM backend to real invoke wrapper names that are expected by JavaScript glue code. This is required to support wasm exception handling (asm.js style). LLVM backend lowers invoke @func(arg1, arg2) to label %invoke.cont unwind label %lpad into ... (some code) call @invoke_SIG(func, arg1, arg2) ... (some code) SIG is a mangled string generated based on the LLVM IR-level function signature. In LLVM IR, types are not lowered yet, so this mangling scheme simply takes LLVM's string representtion of parameter types and concatenate them with '_'. For example, the name of an invoke wrapper for function void foo(struct mystruct*, int) will be "__invoke_void_%struct.mystruct*_int". This function converts the names of invoke wrappers based on their lowered argument types and a return type. In the example above, the resulting new wrapper name becomes "invoke_vii". * Address comments Change variable names to camelcase Add a small (semi-)handwritten test case * Export malloc and free from wasm when available * Add a test case for exporting malloc/free feature + cosmetic 'file' name change in text_before_type.s * fixInvokeWrapper -> fixEmExceptionInvoke * Add a TODO
* in DemoteFloat64, if the truncated value is exactly at the limit, return it ↵Alon Zakai2016-08-081-0/+0
| | | | | (#665) and update spec tests
* Fix a parsing bug introduced by #615 (#661)Heejin Ahn2016-08-052-0/+31
| | | | | | | | | | | | | | | Name lhs = getStrToSep(); if (!skipEqual()){ s = strchr(s, '\n'); if (!s) break; continue; } The above code snippet introduced by #615 has a bug when there is only one word (e.g. ".text") in a line. If there is only one word in a line, skipEqual() also skips the newline character at the end of the line, and strchr(s, '\n') moves the cursor to the end of the next line, effectively skipping the whole next line.
* Update waterfall build revision to 9397 (#662)Derek Schuff2016-08-0452-3722/+3604
| | | Includes torture tests and new expected passes
* Create a dummy function to prevent NULL miscomparisons, if necessary (#658)Dominic Chen2016-08-038-28/+49
| | | Resolves WebAssembly/spec#312
* support pre-assigning indexes for functions that are called indirectly (#616)Dominic Chen2016-08-022-0/+150
| | | This patch adds support for an ".indidx" primitive that pre-assigns table indexes for functions that are called indirectly. It is used by the upstream LLVM WebAssembly backend to support fine-grained control-flow integrity for indirect function calls by emitting instrumentation at each indirect call site to check that the destination index is within certain ranges that correspond to disjoint equivalence classes of indirect call targets. The reason that this primitive is necessary is because the layout of the table section isn't determined until the WebAssembly linker is executed, but indirect function to table index mappings need to be known when opt is executed to generate the correct range checking in the LLVM IR.
* wast function type name desugaring is changing in spec:301 (#654)Alon Zakai2016-07-2826-316/+428
|
* Merge pull request #648 from WebAssembly/relooper-optsAlon Zakai2016-07-2017-6777/+8897
|\ | | | | Relooper improvements
| * more RemoveUnusedName opts: merge names when possible, and do block/loop ↵Alon Zakai2016-07-208-5407/+5403
| | | | | | | | merging based on their names
| * remove unused labels from loops too, and general clean ups for RemoveUnusedNamesAlon Zakai2016-07-2010-5520/+5560
| |
| * avoid label variable usage in relooper for forward branches, just use a ↵Alon Zakai2016-07-204-977/+841
| | | | | | | | stack of blocks for them. after this change, only irreducible control flow should cause label variable usage
| * add more relooper testing and improve existingAlon Zakai2016-07-207-342/+2562
| |
* | Update waterfall to build 8774 (#649)Derek Schuff2016-07-201236-6147/+6342
|/ | | Also update torture test .s files
* try natural and reverse order in coalese-localsAlon Zakai2016-07-172-2868/+2938
|
* optimize to remove as many copies as possible in coalesce-localsAlon Zakai2016-07-168-6960/+6086
|
* fix dce bug in non-parallel mode, which happens in debug mode, and add debug ↵Alon Zakai2016-07-162-0/+13
| | | | testing
* eq/ne are ok to optimize even if they are nans (#640)Alon Zakai2016-07-154-34/+47
|
* don't simplify using de-morgan's rules on floats, because of nans (#638)Alon Zakai2016-07-154-26/+91
|
* emit safe calls for i32 div/rem when in precise mode in asm2wasm, as they ↵Alon Zakai2016-07-148-53/+84
| | | | can trap (#637)
* Fix waterfall submodule (#634)Dominic Chen2016-07-141-0/+0
| | | This brings in the updates for the renaming of the binaries from 5936f05
* Merge pull request #632 from WebAssembly/tooAlon Zakai2016-07-131-0/+0
|\ | | | | Tool renaming and refactoring
| * separate wasm-opt out from wasm-shell: opt optimizes, shell runs wast shell ↵Alon Zakai2016-07-131-0/+0
| | | | | | | | tests
* | Don't emit empty array literals in trace output (#631)Alon Zakai2016-07-131-39/+39
|/ | | | * don't emit empty array literals in trace output
* Handle aliases without size (e.g. weak symbol), add redefinition warnings (#630)Dominic Chen2016-07-131-6/+10
|
* handle param overloading in asm2wasm ffis (#629)Alon Zakai2016-07-125-16/+62
|
* relooper tracing + fixesAlon Zakai2016-07-123-236/+1369
|
* allow multiple tracesAlon Zakai2016-07-122-9/+6
|
* add a tracing option to the c api, which logs out a runnable program from c ↵Alon Zakai2016-07-124-0/+1070
| | | | api calls
* add support for symbol assignments, closes #4422 (#615)Dominic Chen2016-07-112-9/+36
| | | Adds support for aliases to objects, to go along with the existing support for aliases to functions.
* add a relooper test for duff's device, showing irreducible control flow and ↵Alon Zakai2016-07-072-0/+106
| | | | helper var use
* update spec tests, and handle some flux in call_indirect in upstreamAlon Zakai2016-07-061-0/+0
|
* validate set_local types against the function #618 (#620)Alon Zakai2016-07-062-1/+33
|