summaryrefslogtreecommitdiff
path: root/test/unit.asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-05-24 16:07:11 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-05-24 16:07:11 -0700
commite89c819e741f3a2059a24b30c8eaa1c8e213b924 (patch)
tree6bf190afe424af9a7bd566db397ab7aaf45b8d89 /test/unit.asm.js
parent3a993f98daefc9a851824f5099b76b4a427f81ed (diff)
parentf1384f6c98765de6ac9777ae44661c1a713a6e11 (diff)
downloadbinaryen-e89c819e741f3a2059a24b30c8eaa1c8e213b924.tar.gz
binaryen-e89c819e741f3a2059a24b30c8eaa1c8e213b924.tar.bz2
binaryen-e89c819e741f3a2059a24b30c8eaa1c8e213b924.zip
Merge pull request #540 from WebAssembly/merge-blocks
Merge blocks improvements
Diffstat (limited to 'test/unit.asm.js')
-rw-r--r--test/unit.asm.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index 77fbe408b..8fb28b990 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -214,11 +214,17 @@ function asm(global, env, buffer) {
(HEAPF32[tempDoublePtr >> 2] = f, HEAP32[tempDoublePtr >> 2] | 0); // f32->i32
(HEAPF32[tempDoublePtr >> 2] = d, HEAP32[tempDoublePtr >> 2] | 0); // f64 with implict f32 conversion, ->i32
}
+ function recursiveBlockMerging(x) {
+ x = x | 0;
+ lb((1, x) + (2, 3) + (((4, 5), 6), 7) + (8, (9, (10, (11, 12))))) | 0;
+ x = (lb(1) | 0, x) + (lb(2) | 0, lb(3) | 0) + (((lb(4) | 0, lb(5) | 0), lb(6) | 0), lb(7) | 0) + (lb(8) | 0, (lb(9) | 0, (lb(10) | 0, (lb(11) | 0, lb(12) | 0)))) | 0;
+ return x | 0;
+ }
function lb(a) {
a = a | 0;
HEAP32[a >> 2] = n + 136 + 8;
- return;
+ return 0;
}
function z() {