diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-06-26 11:00:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-26 11:00:02 -0700 |
commit | 45b358706c86415c5982f9e777fa9e19a33b27a3 (patch) | |
tree | d1caa4180c8d0f4a76319fd11f8b18f9f446e6c3 /src/parsing.h | |
parent | c410d93d3af9813f889b4011f964d4becf43bc27 (diff) | |
parent | 87f3020cf4e666a6eb6620106e48ee042cd2f666 (diff) | |
download | binaryen-45b358706c86415c5982f9e777fa9e19a33b27a3.tar.gz binaryen-45b358706c86415c5982f9e777fa9e19a33b27a3.tar.bz2 binaryen-45b358706c86415c5982f9e777fa9e19a33b27a3.zip |
Merge pull request #602 from WebAssembly/dsl-nice
Use a DSL in OptimizeInstructions
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; |