summaryrefslogtreecommitdiff
path: root/test/unit.asm.js
Commit message (Collapse)AuthorAgeFilesLines
* Reflect instruction renaming in code (#2128)Heejin Ahn2019-05-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reflected new renamed instruction names in code and tests: - `get_local` -> `local.get` - `set_local` -> `local.set` - `tee_local` -> `local.tee` - `get_global` -> `global.get` - `set_global` -> `global.set` - `current_memory` -> `memory.size` - `grow_memory` -> `memory.grow` - Removed APIs related to old instruction names in Binaryen.js and added APIs with new names if they are missing. - Renamed `typedef SortedVector LocalSet` to `SetsOfLocals` to prevent name clashes. - Resolved several TODO renaming items in wasm-binary.h: - `TableSwitch` -> `BrTable` - `I32ConvertI64` -> `I32WrapI64` - `I64STruncI32` -> `I64SExtendI32` - `I64UTruncI32` -> `I64UExtendI32` - `F32ConvertF64` -> `F32DemoteI64` - `F64ConvertF32` -> `F64PromoteF32` - Renamed `BinaryenGetFeatures` and `BinaryenSetFeatures` to `BinaryenModuleGetFeatures` and `BinaryenModuleSetFeatures` for consistency.
* Emscripten stack simplification (#1870)Alon Zakai2019-01-161-0/+3
| | | | | | This takes advantage of the recent memory simplification in emscripten, where JS static allocation is done at compile time. That means we know the stack's initial location at compile time, and can apply it. This is the binaryen side of that: * asm2wasm support for asm.js globals with an initial value var X = Y; where Y is not 0 (which is what the stack now is). * wasm-emscripten-finalize support for a flag --initial-stack-pointer=X, and remove the old code to import the stack's initial location.
* fix sign detection of a floating-point mod ; fixes kripken/emscripten#7123 ↵Alon Zakai2018-09-151-0/+8
| | | | (#1681)
* optimize helper funcs (like i32-div) if created in asm2wasm, so they are ↵Alon Zakai2017-10-041-1/+6
| | | | consistently handled regardless of whether we optimize in parallel or not (#1208)
* precompute-propagate pass (#1179)Alon Zakai2017-09-121-11/+50
| | | | | | | Implements #1172: this adds a variant of precompute, "precompute-propagate", which also does constant propagation. Precompute by itself just runs the interpreter on each expression and sees if it is in fact a constant; precompute-propagate also looks at the graph of connections between get and set locals, and propagates those constant values. This helps with cases as noticed in #1168 - while in most cases LLVM will do this already, it's important when inlining, e.g. inlining of the clamping math functions. This new pass is run when inlining, and otherwise only in -O3/-Oz, as it does increase compilation time noticeably if run on everything (and for almost no benefit if LLVM has run). Most of the code here is just refactoring out from the ssa pass the get/set graph computation, so it can now be used by both the ssa pass and precompute-propagate.
* Improve and enable inlining pass (#966)Alon Zakai2017-08-071-0/+1
| | | | | | | | * improve inlining pass to inline single-use functions that are fairly small, which makes it useful for removing unnecessary global constructors from clang. add an inlining-optimizing pass that also optimizes where it inlined, as new opportunities arise. enable that it by default in O2+ * fix a bug where we didn't run all passes properly - refactor addDefaultGlobalOptimizationPasses() into a pre and post version. we can only run the post version in incremental optimizing builds (functions appear one by one, we optimize them first, and do global stuff when all are done), but can run both when doing a full optimize * copy in inlining, allowing multiple inlinings of the same function in the future
* fix import type detection of calls in comma operators; when the parent is a ↵Alon Zakai2017-07-271-0/+7
| | | | comma, it can't be a coersion (or that would have been the parent), so there is no coercion, so the result type is none (#1115)
* fix f32 frem in asm2wasm #1105 (#1106)Alon Zakai2017-07-201-1/+4
|
* fix merge-blocks logic in call, call_indirect, select, we need to avoid any ↵Alon Zakai (kripken)2017-07-141-0/+7
| | | | danger of moving something past a side effect ; also fix an asm2wasm bug with call_indirect fixups; the call target may be a block, which we need to look through
* asm2wasm: properly infer return type of a call inside a sequence (#1006)Alon Zakai2017-05-091-0/+12
|
* fix autoDrop, now that we properly set block types, unreachable can easily ↵Alon Zakai2017-05-091-0/+15
| | | | happen, and autoDrop wasn't handling it (#1005)
* add test for f64-to-int signed/unsignedAlon Zakai (kripken)2017-04-181-0/+11
|
* add sqrt test (#912)Alon Zakai2017-02-161-1/+11
|
* lower min and max in asm2wasm in wasm f*.min/maxAlon Zakai2016-12-071-0/+9
|
* make legalizeJSInterface handle f32s as well, which are not valid in asm.js ffisAlon Zakai2016-12-071-1/+8
|
* convert ftCall_* and mftCall_* into table callsAlon Zakai2016-12-071-1/+7
|
* support asm.js numeric exports by creating a global and exporting thatAlon Zakai2016-12-071-1/+1
|
* support assigns of f32 to HEAP64 in asm2wasm (#830)Alon Zakai2016-11-071-1/+6
|
* handle a label setting inside the if-body of a label value in ↵Alon Zakai2016-11-061-1/+32
| | | | RelooperJumpThreading
* Fixes fround of an unsigned integer (#821)Alon Zakai2016-11-041-0/+9
| | | | | | | | * fix fround of unsigned * add testing for f32 ops, and remove a duplicate test (now that f32 is on by default in wasm, we don't need to check with and without PRECISE_F32) * update wasm.js and binaryen.js
* fix large f32 consts, fixes #817 (#820)Alon Zakai2016-11-011-0/+4
|
* Optimize out bool & 1 (#804)Alon Zakai2016-10-251-24/+33
| | | | | | * asm.js corrections to unit.asm.js test * optimize out bool&1
* run remove-unused-functions by defaultAlon Zakai2016-10-141-1/+1
|
* optimize if(const)Alon Zakai2016-09-241-6/+6
|
* precompute void expressions tooAlon Zakai2016-09-241-2/+2
|
* replace two drops in an if-else with one on the ifAlon Zakai2016-09-231-0/+14
|
* autoDrop fixAlon Zakai2016-09-231-0/+15
|
* drop if-else arms as necessaryAlon Zakai2016-09-131-0/+15
|
* update br type when turning it into a br_if in remove-unused-brsAlon Zakai2016-09-131-0/+17
|
* thread relooper jumpsAlon Zakai2016-09-121-11/+115
|
* run another optimize-expressions at the end of asm2wasmAlon Zakai2016-09-101-0/+21
|
* sort locals by number of total copiesAlon Zakai2016-09-101-0/+24
|
* take into account removed copies even when number of locals is the same, in ↵Alon Zakai2016-09-091-0/+22
| | | | coalesce-locals
* autodrop if body if no elseAlon Zakai2016-09-071-0/+5
|
* add a testAlon Zakai2016-09-071-1/+5
|
* track globals in EffectAnalyzerAlon Zakai2016-09-071-0/+13
|
* optimize loads+shifts into signed loadsAlon Zakai2016-09-071-0/+12
|
* Add a ReFinalize helper, and use that to properly handle asm.js imports ↵Alon Zakai2016-09-071-0/+6
| | | | whose return value is polymorphic
* support HEAP8[x | 0| notation in asm2wasmAlon Zakai2016-09-071-0/+5
|
* when replacing an if with its condition (when it has no body), we must drop itAlon Zakai2016-09-071-0/+11
|
* add a test for loop finalizationAlon Zakai2016-09-071-0/+16
|
* handle asm.js globals that are set and the return value usedAlon Zakai2016-09-071-0/+11
|
* set type of calls to their target, instead of the previous behavior where ↵Alon Zakai2016-09-071-0/+10
| | | | the asm.js context informed us. this lets us add drops where necessary
* add drop and tee expressionsAlon Zakai2016-09-071-0/+10
|
* handle param overloading in asm2wasm ffis (#629)Alon Zakai2016-07-121-0/+2
|
* fix br_if with value optimization in remove-unused-brsAlon Zakai2016-06-111-0/+12
|
* if we use the zero-init value of a local, we cannot coalesce it with a param ↵Alon Zakai2016-06-011-0/+13
| | | | (#556)
* handle duplicate exports in asm2wasmAlon Zakai2016-05-311-1/+8
|
* move blocks outside in merge-blocks so that they can be merged laterAlon Zakai2016-05-241-1/+7
|
* don't depend on asm.js type detection in binary formation in asm2wasm, use ↵Alon Zakai2016-05-221-0/+7
| | | | the full asm global info we have (#535)