diff options
author | Will Cohen <willcohen@users.noreply.github.com> | 2023-01-04 18:02:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-04 15:02:14 -0800 |
commit | f92350d2949934c0e0ce4a27ec8b799ac2a85e45 (patch) | |
tree | 5cedc4d7a7ede518efb572b4278ffb8ef8102cb6 /test/wasm2js/float_literals-modified.2asm.js.opt | |
parent | fb434f95de125bbd1c3f145880d32395d86cfef2 (diff) | |
download | binaryen-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 'test/wasm2js/float_literals-modified.2asm.js.opt')
-rw-r--r-- | test/wasm2js/float_literals-modified.2asm.js.opt | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/test/wasm2js/float_literals-modified.2asm.js.opt b/test/wasm2js/float_literals-modified.2asm.js.opt index 613e52a40..f1290f96f 100644 --- a/test/wasm2js/float_literals-modified.2asm.js.opt +++ b/test/wasm2js/float_literals-modified.2asm.js.opt @@ -25,8 +25,6 @@ function asmFunc(imports) { var Math_ceil = Math.ceil; var Math_trunc = Math.trunc; var Math_sqrt = Math.sqrt; - var nan = NaN; - var infinity = Infinity; var env = imports.env; var setTempRet0 = env.setTempRet0; var i64toi32_i32$HIGH_BITS = 0; @@ -104,7 +102,7 @@ function asmFunc(imports) { function legalstub$30() { var $0_1 = 0, $1 = 0; - wasm2js_scratch_store_f64(nan); + wasm2js_scratch_store_f64(NaN); $0_1 = wasm2js_scratch_load_i32(1) | 0; $1 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $0_1; @@ -114,7 +112,7 @@ function asmFunc(imports) { function legalstub$32() { var $0_1 = 0, $1 = 0; - wasm2js_scratch_store_f64(-nan); + wasm2js_scratch_store_f64(-NaN); $0_1 = wasm2js_scratch_load_i32(1) | 0; $1 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $0_1; @@ -124,7 +122,7 @@ function asmFunc(imports) { function legalstub$34() { var $0_1 = 0, $1 = 0; - wasm2js_scratch_store_f64(nan); + wasm2js_scratch_store_f64(NaN); $0_1 = wasm2js_scratch_load_i32(1) | 0; $1 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $0_1; @@ -134,7 +132,7 @@ function asmFunc(imports) { function legalstub$35() { var $0_1 = 0, $1 = 0; - wasm2js_scratch_store_f64(-nan); + wasm2js_scratch_store_f64(-NaN); $0_1 = wasm2js_scratch_load_i32(1) | 0; $1 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $0_1; @@ -144,7 +142,7 @@ function asmFunc(imports) { function legalstub$36() { var $0_1 = 0, $1 = 0; - wasm2js_scratch_store_f64(nan); + wasm2js_scratch_store_f64(NaN); $0_1 = wasm2js_scratch_load_i32(1) | 0; $1 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $0_1; @@ -154,7 +152,7 @@ function asmFunc(imports) { function legalstub$37() { var $0_1 = 0, $1 = 0; - wasm2js_scratch_store_f64(nan); + wasm2js_scratch_store_f64(NaN); $0_1 = wasm2js_scratch_load_i32(1) | 0; $1 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $0_1; @@ -164,7 +162,7 @@ function asmFunc(imports) { function legalstub$38() { var $0_1 = 0, $1 = 0; - wasm2js_scratch_store_f64(-nan); + wasm2js_scratch_store_f64(-NaN); $0_1 = wasm2js_scratch_load_i32(1) | 0; $1 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $0_1; @@ -174,7 +172,7 @@ function asmFunc(imports) { function legalstub$39() { var $0_1 = 0, $1 = 0; - wasm2js_scratch_store_f64(infinity); + wasm2js_scratch_store_f64(Infinity); $0_1 = wasm2js_scratch_load_i32(1) | 0; $1 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $0_1; @@ -184,7 +182,7 @@ function asmFunc(imports) { function legalstub$41() { var $0_1 = 0, $1 = 0; - wasm2js_scratch_store_f64(-infinity); + wasm2js_scratch_store_f64(-Infinity); $0_1 = wasm2js_scratch_load_i32(1) | 0; $1 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $0_1; |