From 91920dc8cbbfe3a055489a3f26b70d4119f6061d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 27 Jun 2013 11:11:53 -0700 Subject: do not collapse & inside a FUNCTION_TABLE call, we need the mask --- tools/js-optimizer.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/js-optimizer.js') diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 151e573a..4829fec8 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -584,6 +584,8 @@ function simplifyExpressionsPre(ast) { node[3] = value[2]; } } + } else if (type == 'sub' && node[1][0] == 'name' && /^FUNCTION_TABLE.*/.exec(node[1][1])) { + return null; // do not traverse subchildren here, we should not collapse 55 & 126. TODO: optimize this into a nonvirtual call (also because we lose some other opts here)! } }); -- cgit v1.2.3-18-g5258