aboutsummaryrefslogtreecommitdiff
path: root/tools/js-optimizer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-07 15:10:36 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 15:10:36 -0800
commit92a1c1e242fa6b49573a1f92ac5155400f81cd2f (patch)
tree6f341d61f34df02171dafa97308c40e6829155f7 /tools/js-optimizer.js
parent73eff601dabda042afcd9d80b4b290d7ca6858fc (diff)
forward in Math_* from Math.* and correct the compiled code to align to that
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r--tools/js-optimizer.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 5f21d87d..7ceade86 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -1278,6 +1278,12 @@ function normalizeAsm(func) {
traverse(stats[i], function(node, type) {
if (type == 'var') {
unVarify(node[1], node);
+ } else if (type == 'dot') {
+ if (node[1][0] == 'name' && node[1][1] == 'Math') {
+ // transform Math.max to Math_max; we forward in the latter version
+ node[0] = 'name';
+ node[1] = 'Math_' + node[2];
+ }
}
});
i++;