summaryrefslogtreecommitdiff
path: root/test/binaryen.js/zero-filled-memory.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-10-26 11:38:18 -0700
committerGitHub <noreply@github.com>2021-10-26 18:38:18 +0000
commitc0e17235ad0a6da2100835e7719be6295028698a (patch)
tree2deb935ec596b4ab1ef3472517593363c4b496ac /test/binaryen.js/zero-filled-memory.js
parentf1f4acfa7c69f14d415a3fe0eef8439c9bde1cb4 (diff)
downloadbinaryen-c0e17235ad0a6da2100835e7719be6295028698a.tar.gz
binaryen-c0e17235ad0a6da2100835e7719be6295028698a.tar.bz2
binaryen-c0e17235ad0a6da2100835e7719be6295028698a.zip
GlobalTypeOptimization: Handle side effects in removed fields in struct.new (#4263)
If struct.new operands have side effects, and we are removing the operand as the field is removed, we must keep the side effects. To handle that, store all the operands in locals and read from the locals, and then removing a local.get is always safe to do, and nothing has been reordered: (struct.new (A) (side effect) ;; this field will be removed (B) ) => (local.set $a (A)) (local.set $t (side effect)) (local.set $b (B)) (struct.new (local.get $a) (local.get $b) ) Later passes can remove unneeded local operations etc. This is necessary before enabling this pass, as this corner case occurs on j2wasm.
Diffstat (limited to 'test/binaryen.js/zero-filled-memory.js')
0 files changed, 0 insertions, 0 deletions