summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorWill Cohen <willcohen@users.noreply.github.com>2023-01-04 18:02:14 -0500
committerGitHub <noreply@github.com>2023-01-04 15:02:14 -0800
commitf92350d2949934c0e0ce4a27ec8b799ac2a85e45 (patch)
tree5cedc4d7a7ede518efb572b4278ffb8ef8102cb6 /src/tools
parentfb434f95de125bbd1c3f145880d32395d86cfef2 (diff)
downloadbinaryen-f92350d2949934c0e0ce4a27ec8b799ac2a85e45.tar.gz
binaryen-f92350d2949934c0e0ce4a27ec8b799ac2a85e45.tar.bz2
binaryen-f92350d2949934c0e0ce4a27ec8b799ac2a85e45.zip
wasm2js: Stop emitting nan and infinity (#5391)
As noted in #4739, legacy language emitting nan and infinity exists, with the observation that it can be removed once asm.js is no longer used and global NaN is available. This commit removes that asm.js-specific code accordingly.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/wasm2js.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/tools/wasm2js.cpp b/src/tools/wasm2js.cpp
index a6430fe12..79eee56a0 100644
--- a/src/tools/wasm2js.cpp
+++ b/src/tools/wasm2js.cpp
@@ -788,13 +788,6 @@ void AssertionEmitter::fixCalls(Ref asmjs, Name asmModule) {
}
void AssertionEmitter::emit() {
- // TODO: nan and infinity shouldn't be needed once literal asm.js code isn't
- // generated
- out << R"(
- var nan = NaN;
- var infinity = Infinity;
- )";
-
// When equating floating point values in spec tests we want to use bitwise
// equality like wasm does. Unfortunately though NaN makes this tricky. JS
// implementations like Spidermonkey and JSC will canonicalize NaN loads from