From eab99a1c3d229f7e73b91b5a28e5ebf53a24671b Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Wed, 6 Nov 2013 10:47:36 +0200 Subject: Better fix for #343 We can in fact lift sequences, but only if the operation is assignment and the left-hand side has no side effects nor property access -- that should guarantee that whatever we place before it cannot affect the sense of the assignment. Dropped contrived test case (too hard to support it now), added a more meaningful one. --- test/compress/sequences.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/compress') diff --git a/test/compress/sequences.js b/test/compress/sequences.js index 6f63ace4..46695714 100644 --- a/test/compress/sequences.js +++ b/test/compress/sequences.js @@ -101,10 +101,12 @@ lift_sequences_1: { lift_sequences_2: { options = { sequences: true, evaluate: true }; input: { - q = 1 + (foo(), bar(), 5) + 7 * (5 / (3 - (a(), (QW=ER), c(), 2))) - (x(), y(), 5); + foo.x = (foo = {}, 10); + bar = (bar = {}, 10); } expect: { - foo(), bar(), a(), QW = ER, c(), x(), y(), q = 36 + foo.x = (foo = {}, 10), + bar = {}, bar = 10; } } -- cgit v1.2.3