summaryrefslogtreecommitdiff
path: root/test/wasm2js/switch.2asm.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-01-03 16:31:42 -0800
committerGitHub <noreply@github.com>2023-01-03 16:31:42 -0800
commitce267f5b800a906b9556657bf98ad92166d3f431 (patch)
tree2a96880567c15067e1b6f7879b801e026c8436f2 /test/wasm2js/switch.2asm.js
parent6a52a44255d57efd27b3979bd7b2ef3ad132f54a (diff)
downloadbinaryen-ce267f5b800a906b9556657bf98ad92166d3f431.tar.gz
binaryen-ce267f5b800a906b9556657bf98ad92166d3f431.tar.bz2
binaryen-ce267f5b800a906b9556657bf98ad92166d3f431.zip
[Wasm GC] Fix GlobalStructInference reasoning on unoptimizability (#5381)
We have a data structure there, typeGlobals, which maps types to the list of globals for that type. Previously we used the convention of not having an entry in the map to mean that a type is unoptimizable. However, this was not used consistently, and in fact one place could insert to the map in a dangerous way: a subtype's global is added to the list of globals of the super, and typeGlobals[super].add(sub-global) would then effectively make an unoptimizable super into an optimizable one. To fix that, check for unoptimizability before propagating sub-globals. We do still use the convention of not keeping data in typeGlobals for unoptimizable things as it is a minor optimization to avoid wasted work. Fixes #5379
Diffstat (limited to 'test/wasm2js/switch.2asm.js')
0 files changed, 0 insertions, 0 deletions