diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-06-23 15:06:40 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-06-26 10:00:24 -0700 |
commit | 0da770d9660919b03553374d36ce1d5ca93cf78f (patch) | |
tree | 3bf08d56bd4886bf067f77b8152c7e00817231d8 /src/parsing.h | |
parent | a88f8f275e068d6cdfb8879dc3bab1fe3201efbc (diff) | |
download | binaryen-0da770d9660919b03553374d36ce1d5ca93cf78f.tar.gz binaryen-0da770d9660919b03553374d36ce1d5ca93cf78f.tar.bz2 binaryen-0da770d9660919b03553374d36ce1d5ca93cf78f.zip |
add shared-constants.h for wasm constants
Diffstat (limited to 'src/parsing.h')
-rw-r--r-- | src/parsing.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/parsing.h b/src/parsing.h index 6745ad7cd..f5df77bad 100644 --- a/src/parsing.h +++ b/src/parsing.h @@ -21,6 +21,7 @@ #include <sstream> #include <string> +#include "shared-constants.h" #include "asmjs/shared-constants.h" #include "mixed_arena.h" #include "support/utilities.h" @@ -34,7 +35,7 @@ inline Expression* parseConst(cashew::IString s, WasmType type, MixedArena& allo auto ret = allocator.alloc<Const>(); ret->type = type; if (isWasmTypeFloat(type)) { - if (s == INFINITY_) { + if (s == _INFINITY) { switch (type) { case f32: ret->value = Literal(std::numeric_limits<float>::infinity()); break; case f64: ret->value = Literal(std::numeric_limits<double>::infinity()); break; @@ -52,7 +53,7 @@ inline Expression* parseConst(cashew::IString s, WasmType type, MixedArena& allo //std::cerr << "make constant " << str << " ==> " << ret->value << '\n'; return ret; } - if (s == NAN_) { + if (s == _NAN) { switch (type) { case f32: ret->value = Literal(float(std::nan(""))); break; case f64: ret->value = Literal(double(std::nan(""))); break; |