From 1f3825ea4fd717de015705651b9911a47751f13c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 30 Oct 2015 10:29:08 -0700 Subject: parse large negative literals properly --- test/unit.asm.js | 11 +++++++++++ test/unit.wast | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/unit.asm.js create mode 100644 test/unit.wast (limited to 'test') diff --git a/test/unit.asm.js b/test/unit.asm.js new file mode 100644 index 000000000..fd05746d6 --- /dev/null +++ b/test/unit.asm.js @@ -0,0 +1,11 @@ +function () { + "use asm"; + function big_negative() { + var temp = 0.0; + temp = -2147483648; + temp = -2147483648.0; + temp = -21474836480.0; + } + return { big_negative: big_negative }; +} + diff --git a/test/unit.wast b/test/unit.wast new file mode 100644 index 000000000..b5e054593 --- /dev/null +++ b/test/unit.wast @@ -0,0 +1,19 @@ +(module + (memory 16777216) + (export "big_negative" $big_negative) + (func $big_negative + (local $temp f64) + (block + (set_local $temp + (i32.const -2147483648) + ) + (set_local $temp + (f64.const -2147483648) + ) + (set_local $temp + (f64.const -21474836480) + ) + ) + ) +) + -- cgit v1.2.3