From 0da770d9660919b03553374d36ce1d5ca93cf78f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 23 Jun 2016 15:06:40 -0700 Subject: add shared-constants.h for wasm constants --- src/parsing.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/parsing.h') 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 #include +#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(); ret->type = type; if (isWasmTypeFloat(type)) { - if (s == INFINITY_) { + if (s == _INFINITY) { switch (type) { case f32: ret->value = Literal(std::numeric_limits::infinity()); break; case f64: ret->value = Literal(std::numeric_limits::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; -- cgit v1.2.3