summaryrefslogtreecommitdiff
path: root/test/wasm2js/emscripten.wast
Commit message (Collapse)AuthorAgeFilesLines
* Reflect instruction renaming in code (#2128)Heejin Ahn2019-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* wasm2js: more coercion optimization (#2109)Alon Zakai2019-05-151-0/+85
|
* wasm2js: optimize away unneeded load coercions (#2107)Alon Zakai2019-05-151-0/+36
|
* wasm2js: optimize booleans (#2090)Alon Zakai2019-05-071-0/+10
|
* wasm2js: optimize loads (#2085)Alon Zakai2019-05-031-0/+10
| | | | When loading a boolean, prefer the signed heap (which is more commonly used, and may be faster). We never use HEAPU32 (HEAP32 is always enough), just remove it.
* wasm2js: ignore implicit traps (#2079)Alon Zakai2019-05-021-0/+8
| | | | | We don't actually try to emit traps for loads, stores, invalid float to ints, etc., so when optimizing we may as well do so under the assumption those traps do not exist. This lets us emit nice code for a select whose operands are loads, for example - otherwise, the values seem to have side effects.
* wasm2js: optimize away casts going into a suitable store (#2069)Alon Zakai2019-04-301-0/+20
|
* wasm2js: more js optimization (#2050)Alon Zakai2019-04-241-1/+18
| | | | | | * Emit ints as signed, so -1 isn't a big unsigned number. * x - -c (where c is a constant) is larger than x + c in js (but not wasm) * +(+x) => +x * Avoid unnecessary coercions on calls, return, load, etc. - we just need coercions when entering or exiting "wasm" (not internally), and on actual operations that need them.
* wasm2js: start to optionally optimize the JS (#2046)Alon Zakai2019-04-241-1/+20
| | | Removes redundant | 0s and similar things. (Apparently closure compiler doesn't do that, so makes sense to do here.)
* wasm2js: support memory imports properly, updating their buffer too (#2013)Alon Zakai2019-04-161-0/+6
| | | | | * Emit an import statement for the memory. * Update the imported memory's buffer when we grow.
* wasm2js: emscripten glue option (#2000)Alon Zakai2019-04-111-0/+32
Add a wasm2js option for the glue to be in emscripten-compatible format (as opposed to ES6). This does a few things so far: * Emit START_FUNCTIONS, END_FUNCTIONS markers in the code, for future use in the optimizer. * Emit the glue as a function to be called from emscripten.