diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-15 18:39:03 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-15 18:39:03 -0800 |
commit | 693dcd6d303554f8e5bf0278b2186d6acbee72b6 (patch) | |
tree | 02a53601c970d7a81f47a256646f1ac5f80b7c83 /tools/test-js-optimizer.js | |
parent | 8b1ee6dde83f6b4a10978b36a18c628dfa0a0ca8 (diff) |
js optimizer pass to simplify certain bit ops
Diffstat (limited to 'tools/test-js-optimizer.js')
-rw-r--r-- | tools/test-js-optimizer.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/test-js-optimizer.js b/tools/test-js-optimizer.js index e06ebd29..c59454e6 100644 --- a/tools/test-js-optimizer.js +++ b/tools/test-js-optimizer.js @@ -83,5 +83,8 @@ function ignoreLoopy() { function bits() { // TODO: optimize this! print((($s & 65535) + ((($f & 65535) << 16 >> 16) * (($f & 65535) << 16 >> 16) | 0 | 0) % 256 | 0) & 65535); } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits"] +function maths() { + __ZN6b2Vec2C1Ev(((((((($this1 + 20 | 0 | 0) + 8 | 0) + 8 | 0) + 8 | 0) + 8 | 0) + 8 | 0) + 8 | 0) + 8 | 0); +} +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths"] |