diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-05-08 07:57:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-08 07:57:49 -0700 |
commit | a5d33e7faaa965565f9ca1d0c23c3077389f2389 (patch) | |
tree | a28b5671771b43e05058ce18395bff4fac2d8c9c /test/binaryen.js | |
parent | 691cde4c8bed1a3694b6ae97160843736a204a1e (diff) | |
download | binaryen-a5d33e7faaa965565f9ca1d0c23c3077389f2389.tar.gz binaryen-a5d33e7faaa965565f9ca1d0c23c3077389f2389.tar.bz2 binaryen-a5d33e7faaa965565f9ca1d0c23c3077389f2389.zip |
More reducer improvements (#1533)
* Add a helper class to iterate over all a node's children, and use that when attempting to replace a node with its children.
* If a child has a different type than the parent, try to replace the parent with a conversion + the child (for example, a call may receive two f32 inputs and return an i32; we can try to replace the call with one of those f32s and a conversion to an i32).
* When possible, try to replace the function body with a child even if the child has a different type, by changing the function return value.
Diffstat (limited to 'test/binaryen.js')
-rw-r--r-- | test/binaryen.js/kitchen-sink.js.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index f5d76899d..5eed6c26f 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -29,8 +29,8 @@ BinaryenReturnId: 20 BinaryenHostId: 21 BinaryenNopId: 22 BinaryenUnreachableId: 23 -BinaryenAtomicCmpxchgId: 24 -BinaryenAtomicRMWId: 25 +BinaryenAtomicCmpxchgId: 25 +BinaryenAtomicRMWId: 24 BinaryenAtomicWaitId: 26 BinaryenAtomicWakeId: 27 getExpressionInfo={"id":16,"type":3,"op":6} |