aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-11-04 14:07:02 +0200
committerJukka Jylänki <jujjyl@gmail.com>2013-11-04 14:07:02 +0200
commit8a419cd95dad82f649f16d339dbbe3de3bb0db32 (patch)
treeb029447e18f5dd13c9ff9777f92e594f3c6b6bb6 /src/preamble.js
parenta9ef49d8c97dcaed3cc7778acf61de978efdd5ff (diff)
Give names to most manually assigned functions in the .js files, in form "var x = function()" -> "function x()" so that error stack traces and profiling stack traces are more informative and do not contain anonymous functions.
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 9e72e7b8..c88e4052 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -1060,7 +1060,7 @@ Module['writeAsciiToMemory'] = writeAsciiToMemory;
{{{ reSign }}}
#if PRECISE_I32_MUL
-if (!Math['imul']) Math['imul'] = function(a, b) {
+if (!Math['imul']) Math['imul'] = function imul(a, b) {
var ah = a >>> 16;
var al = a & 0xffff;
var bh = b >>> 16;
@@ -1068,14 +1068,14 @@ 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 imul(a, b) {
return (a*b)|0; // fast but imprecise
};
#endif
Math.imul = Math['imul'];
#if TO_FLOAT32
-if (!Math['toFloat32']) Math['toFloat32'] = function(x) {
+if (!Math['toFloat32']) Math['toFloat32'] = function toFloat32(x) {
return x;
};
Math.toFloat32 = Math['toFloat32'];