aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-14 14:18:47 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-14 14:18:47 -0800
commitabeaf415d53fde1197b7591ca9b6f85a69e45034 (patch)
tree887ac8eec4522f771e36bf065f2691e1df908257 /src
parente8094fac16be99709470f89c81fdf7bfc52aadeb (diff)
fix asm var defs of illegals
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index b9209dd2..1501c04d 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -606,10 +606,12 @@ function JSify(data, functionsOnly, givenFunctions) {
}
for (i = 0; i < chunks.length; i++) {
func.JS += ' var ' + chunks[i].map(function(v) {
- if (v.type != 'i64') {
+ if (!isIllegalType(v.type) || v.ident.indexOf('$', 1) > 0) { // not illegal, or a broken up illegal
return v.ident + ' = ' + asmInitializer(v.type); //, func.variables[v.ident].impl);
} else {
- return v.ident + '$0 = 0, ' + v.ident + '$1 = 1';
+ return range(Math.ceil(getBits(v.type)/32)).map(function(i) {
+ return v.ident + '$' + i + '= 0';
+ }).join(',');
}
}).join(', ') + ';\n';
}