diff options
author | Sam Clegg <sbc@chromium.org> | 2017-06-11 16:45:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-11 16:45:59 -0700 |
commit | 3b81197bd37484a43921076f6592950734d4f3f4 (patch) | |
tree | a1f1b191a843b225ea77947d7f9c958172ace163 | |
parent | e82a9c4602a42c674155594e73595488bc5b9720 (diff) | |
parent | 07b104d9aefe4ccaf3a6452587cffde8232f783b (diff) | |
download | binaryen-3b81197bd37484a43921076f6592950734d4f3f4.tar.gz binaryen-3b81197bd37484a43921076f6592950734d4f3f4.tar.bz2 binaryen-3b81197bd37484a43921076f6592950734d4f3f4.zip |
Merge pull request #1046 from WebAssembly/inf_symbol
Output inf/-inf rather than infinity/-infinity
-rw-r--r-- | src/wasm/literal.cpp | 2 | ||||
-rw-r--r-- | test/llvm_autogenerated/immediates.wast | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index 1cc083220..d6d7848d0 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -145,7 +145,7 @@ void Literal::printDouble(std::ostream& o, double d) { return; } if (!std::isfinite(d)) { - o << (std::signbit(d) ? "-infinity" : "infinity"); + o << (std::signbit(d) ? "-inf" : "inf"); return; } const char* text = cashew::JSPrinter::numToString(d); diff --git a/test/llvm_autogenerated/immediates.wast b/test/llvm_autogenerated/immediates.wast index 9b4715433..6dce33aeb 100644 --- a/test/llvm_autogenerated/immediates.wast +++ b/test/llvm_autogenerated/immediates.wast @@ -105,12 +105,12 @@ ) (func $inf_f32 (result f32) (return - (f32.const infinity) + (f32.const inf) ) ) (func $neginf_f32 (result f32) (return - (f32.const -infinity) + (f32.const -inf) ) ) (func $custom_nan_f32 (result f32) @@ -155,12 +155,12 @@ ) (func $inf_f64 (result f64) (return - (f64.const infinity) + (f64.const inf) ) ) (func $neginf_f64 (result f64) (return - (f64.const -infinity) + (f64.const -inf) ) ) (func $custom_nan_f64 (result f64) |