aboutsummaryrefslogtreecommitdiff
path: root/src/modules.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-20 20:04:39 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-20 20:04:39 -0800
commit684b00a029cd0713c04bae8af4c500b4647a2edd (patch)
tree642fcb7a07942356b9448fb72c88f19115937cf9 /src/modules.js
parent909c747f4f3eb56ba4423d2848cd5b0b301067c8 (diff)
fix varargs by pointer in asm
Diffstat (limited to 'src/modules.js')
-rw-r--r--src/modules.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules.js b/src/modules.js
index 3a0bf626..e7779b94 100644
--- a/src/modules.js
+++ b/src/modules.js
@@ -228,13 +228,14 @@ var Functions = {
blockAddresses: {}, // maps functions to a map of block labels to label ids
- getSignature: function(returnType, argTypes) {
+ getSignature: function(returnType, argTypes, hasVarArgs) {
var sig = returnType == 'void' ? 'v' : (isIntImplemented(returnType) ? 'i' : 'f');
for (var i = 0; i < argTypes.length; i++) {
var type = argTypes[i];
if (!type) break; // varargs
sig += isIntImplemented(type) ? (getBits(type) == 64 ? 'ii' : 'i') : 'f'; // legalized i64s will be i32s
}
+ if (hasVarArgs) sig += 'i';
return sig;
},