diff options
author | Brion Vibber <brion@pobox.com> | 2019-12-23 15:37:23 -0800 |
---|---|---|
committer | Alon Zakai <azakai@google.com> | 2019-12-23 15:37:23 -0800 |
commit | aab879d12576177ae4ff3114adcf8f768544b704 (patch) | |
tree | 2150f23d166465e4c9a2bd9b729f8c3d59b29a32 /src/ir/ReFinalize.cpp | |
parent | 604cda7fffadee6cc414121396f48e0192084785 (diff) | |
download | binaryen-aab879d12576177ae4ff3114adcf8f768544b704.tar.gz binaryen-aab879d12576177ae4ff3114adcf8f768544b704.tar.bz2 binaryen-aab879d12576177ae4ff3114adcf8f768544b704.zip |
Fix for binaryen.js getExpressionInfo on switch names (#2553)
Switch label names for br_table instructions were corrupted in the
binaryen.js API layer, with each label cropped down to the number of
characters that it is an index into the list.
This was due to passing UTF8ToString as a callback method to
Array.prototype.map, which passes the index as second parameter. The
second parameter of UTF8ToString is the max number of bytes to copy,
so the initial label came out as '', then 'l', then 'la', 'lab', etc.
Corrected an existing test case that had the wrong output in it.
Diffstat (limited to 'src/ir/ReFinalize.cpp')
0 files changed, 0 insertions, 0 deletions