aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 3fd6506a..7df0ba86 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -384,14 +384,9 @@ function JSify(data) {
});
}
makeFuncLineZyme('store', function(item) {
- //print('// zzqqzz ' + dump(item.value) + ' :::: ' + dump(item.pointer) + ' :::: ');
var ident = toNiceIdent(item.ident);
var value;
- if (item.value.intertype in PARSABLE_LLVM_FUNCTIONS) {
- value = finalizeLLVMFunctionCall(item.value);
- } else {
- value = toNiceIdent(item.value.ident);
- }
+ value = finalizeLLVMParameter(item.value);
if (pointingLevels(item.pointerType.text) == 1) {
value = parseNumerical(value, removePointing(item.pointerType.text));
}
@@ -639,6 +634,15 @@ function JSify(data) {
}
}
+ // From parseLLVMSegment
+ function finalizeLLVMParameter(param) {
+ if (param.intertype in PARSABLE_LLVM_FUNCTIONS) {
+ return finalizeLLVMFunctionCall(param);
+ } else {
+ return parseNumerical(param.ident);
+ }
+ }
+
makeFuncLineZyme('bitcast', function(item) {
// XXX Don't we need to copy ptr - i.e. create new ones (at least if uses > just the next line)?
// XXX hardcoded ptr impl - as ptrs are ints, we don't need to copy