From 693dcd6d303554f8e5bf0278b2186d6acbee72b6 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 15 Dec 2011 18:39:03 -0800 Subject: js optimizer pass to simplify certain bit ops --- tools/test-js-optimizer-output.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools/test-js-optimizer-output.js') diff --git a/tools/test-js-optimizer-output.js b/tools/test-js-optimizer-output.js index fcd2380d..95426478 100644 --- a/tools/test-js-optimizer-output.js +++ b/tools/test-js-optimizer-output.js @@ -79,6 +79,9 @@ function ignoreLoopy() { } } function bits() { - print((($s & 65535) + ((($f & 65535) << 16 >> 16) * (($f & 65535) << 16 >> 16) | 0 | 0) % 256 | 0) & 65535); + print((($s & 65535) + (($f & 65535) << 16 >> 16) * (($f & 65535) << 16 >> 16) % 256 | 0) & 65535); } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits"] +function maths() { + __ZN6b2Vec2C1Ev($this1 + 20 + 8 + 8 + 8 + 8 + 8 + 8 + 8 | 0); +} +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths"] -- cgit v1.2.3-18-g5258