diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-19 20:17:35 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-19 20:17:35 -0700 |
commit | 6346adec3b5f59415d9eb9650eeefd4120f32763 (patch) | |
tree | bd5ee4932c7640879bdc5712f738c64a5e3efa55 | |
parent | d312b3291c0656ccf76811a3d738c265d406708a (diff) |
export imul through closure
-rw-r--r-- | src/preamble.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/preamble.js b/src/preamble.js index d10771e3..dbe5e655 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -777,7 +777,7 @@ Module['writeArrayToMemory'] = writeArrayToMemory; {{{ reSign }}} #if PRECISE_I32_MUL -if (!Math.imul) Math.imul = function(a, b) { +if (!Math['imul']) Math['imul'] = function(a, b) { var ah = a >>> 16; var al = a & 0xffff; var bh = b >>> 16; @@ -785,7 +785,7 @@ if (!Math.imul) Math.imul = function(a, b) { return (al*bl + ((ah*bl + al*bh) << 16))|0; }; #else -Math.imul = function(a, b) { +Math['imul'] = function(a, b) { return (a*b)|0; // fast but imprecise }; #endif |