diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-12-13 17:13:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-13 17:13:12 -0800 |
commit | 8b45c14420764a2eeefbf756cadc0a3599d325c8 (patch) | |
tree | 174034dc70be052009013dfa4439487d6787dd4e /test/decompile | |
parent | b238f211161c38b8b92eecd43aa057e8fb60f01a (diff) | |
download | wabt-8b45c14420764a2eeefbf756cadc0a3599d325c8.tar.gz wabt-8b45c14420764a2eeefbf756cadc0a3599d325c8.tar.bz2 wabt-8b45c14420764a2eeefbf756cadc0a3599d325c8.zip |
wabt-decompile: cleaned up string composition. (#1265)
The code had 3 ways of doing string composition:
- Using + and += on string/string_view
- ostringstream
- wabt::Stream
Of these, the first was by far the most widely used, simply
because decompilation is a hierarchical process, which requires
storing intermediate strings before knowing what surrounds them
(thus unsuitable for streams).
To make the code more uniform, everything was converted to use
the first approach. To not get further performance degradations,
some more efficient concatenation methods were added, that also
work with wabt::string_view.
Diffstat (limited to 'test/decompile')
-rw-r--r-- | test/decompile/basic.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/decompile/basic.txt b/test/decompile/basic.txt index d0c8ba0e..df60c55c 100644 --- a/test/decompile/basic.txt +++ b/test/decompile/basic.txt @@ -80,9 +80,9 @@ import function ns_fi(); export function f(a:int, b:int):int { var c:long = 8L; - var d:float = 6f; - var e:double = 7d; - if (e < 10d) { 1[4]:int = (2[3]:int + 5) } + var d:float = 6.0f; + var e:double = 7.0; + if (e < 10.0) { 1[4]:int = (2[3]:int + 5) } f(a + g_b, 9); loop L_b { block B_c { |