From 257ddc3bdb37efdb48fc23371f5f523e2044afd8 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 1 Apr 2017 03:02:14 +0800 Subject: improve compression of undefined, NaN & Infinitiy (#1748) - migrate transformation logic from `OutputStream` to `Compressor` - always turn `undefined` into `void 0` (unless `unsafe`) - always keep `NaN` except when avoiding local variable redefinition - introduce `keep_infinity` to suppress `1/0` transform, except when avoiding local variable redefinition supersedes #1723 fixes #1730 --- test/compress/conditionals.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/compress/conditionals.js') diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js index 54d4264d..e7ea2bb2 100644 --- a/test/compress/conditionals.js +++ b/test/compress/conditionals.js @@ -840,8 +840,8 @@ equality_conditionals_false: { f(0, true, 0), f(1, 2, 3), f(1, null, 3), - f(0/0), - f(0/0, "foo"); + f(NaN), + f(NaN, "foo"); } expect_stdout: true } @@ -888,8 +888,8 @@ equality_conditionals_true: { f(0, true, 0), f(1, 2, 3), f(1, null, 3), - f(0/0), - f(0/0, "foo"); + f(NaN), + f(NaN, "foo"); } expect_stdout: true } -- cgit v1.2.3