aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-28 17:51:27 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-10-02 17:31:36 -0700
commit911c1520b1253dcec525da333c83b0c96dd7038b (patch)
tree6152c4781f636ac0b3fe0a3822824fdc1f8988d9
parentd0ec198469a05fa4b8e024af8615fb890b89a471 (diff)
remove unnecessary function param coercion parens
-rw-r--r--src/jsifier.js2
-rw-r--r--src/parseTools.js5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 070513e1..1116c0d1 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -593,7 +593,7 @@ function JSify(data, functionsOnly, givenFunctions) {
if (ASM_JS) {
// spell out argument types
func.params.forEach(function(param) {
- func.JS += INDENTATION + param.ident + '=' + asmCoercion(param.ident, param.type) + ';\n';
+ func.JS += INDENTATION + param.ident + '=' + deParen(asmCoercion(param.ident, param.type)) + ';\n';
});
// spell out local variables
diff --git a/src/parseTools.js b/src/parseTools.js
index e88cafd6..d749fb0a 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -2553,3 +2553,8 @@ function parseAlign(text) { // parse ", align \d+"
return parseInt(text.substr(8));
}
+function deParen(text) {
+ if (text[0] === '(') return text.substr(1, text.length-2);
+ return text;
+}
+