aboutsummaryrefslogtreecommitdiff
path: root/src/modules.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-08 14:59:48 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-08 14:59:48 -0700
commitb41b535aeac53740dec416f617378ec4e4e382ce (patch)
treec32927cb0cbabba1d5595de7c69abe0a0f06214c /src/modules.js
parent45a3601db61e796019ef0e6da6cf8d1378eb99af (diff)
fix FI_* of Math.*
Diffstat (limited to 'src/modules.js')
-rw-r--r--src/modules.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules.js b/src/modules.js
index a182e8fc..6b3c5ffb 100644
--- a/src/modules.js
+++ b/src/modules.js
@@ -259,7 +259,7 @@ var Functions = {
}
if (phase != 'post' && singlePhase) {
if (!doNotCreate) this.indexedFunctions[ident] = 0; // tell python we need this indexized
- return "'{{ FI_" + ident + " }}'"; // something python will replace later
+ return "'{{ FI_" + toNiceIdent(ident) + " }}'"; // something python will replace later
} else {
var ret = this.indexedFunctions[ident];
if (!ret) {
@@ -318,7 +318,7 @@ var Functions = {
if (ASM_JS) {
var curr = table[i];
if (curr && curr != '0' && !Functions.implementedFunctions[curr]) {
- curr = curr.replace('.', '_'); // fix Math.* to Math_*
+ curr = toNiceIdent(curr); // fix Math.* to Math_*
// This is a library function, we can't just put it in the function table, need a wrapper
if (!wrapped[curr]) {
var args = '', arg_coercions = '', call = curr + '(', retPre = '', retPost = '';