aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 82642f6b..1c512581 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -741,12 +741,12 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
});
makeFuncLineActor('insertvalue', function(item) {
assert(item.indexes.length == 1); // TODO: see extractvalue
- var ret, ident;
+ var ret = '(', ident;
if (item.ident === 'undef') {
- ident = 'tempValue';
- ret += ident + ' = ' + makeEmptyStruct(item.type) + ', ';
+ item.ident = 'tempValue';
+ ret += item.ident + ' = [' + makeEmptyStruct(item.type) + '], ';
}
- return item.ident + '.f' + item.indexes[0][0].text + ' = ' + finalizeLLVMParameter(item.value) + ', ' + item.ident;
+ return ret + item.ident + '.f' + item.indexes[0][0].text + ' = ' + finalizeLLVMParameter(item.value) + ', ' + item.ident + ')';
});
makeFuncLineActor('indirectbr', function(item) {
return makeBranch(finalizeLLVMParameter(item.pointer), item.currLabelId, true);