diff options
-rw-r--r-- | src/modules.js | 4 |
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 = ''; |