aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/intertyper.js3
-rw-r--r--src/jsifier.js2
-rw-r--r--src/parseTools.js1
3 files changed, 3 insertions, 3 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index ed8d5099..b02e3f33 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -791,10 +791,9 @@ function intertyper(data, parseFunctions, baseLineNum) {
// external function stub
substrate.addActor('External', {
processItem: function(item) {
- if (item.tokens[1].text in LLVM.LINKAGES || item.tokens[1].text in LLVM.PARAM_ATTR) {
+ if (item.tokens[1].text in LLVM.LINKAGES || item.tokens[1].text in LLVM.PARAM_ATTR || item.tokens[1].text in LLVM.VISIBILITIES) {
item.tokens.splice(1, 1);
}
-
var params = parseParamTokens(item.tokens[3].item.tokens);
return [{
intertype: 'functionStub',
diff --git a/src/jsifier.js b/src/jsifier.js
index ab381a03..6720e77b 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -585,7 +585,7 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
makeFuncLineActor('store', function(item) {
var value = finalizeLLVMParameter(item.value);
if (pointingLevels(item.pointerType) == 1) {
- value = parseNumerical(value, removePointing(item.pointerType));
+ value = parseNumerical(value, item.valueType);
}
var impl = VAR_EMULATED;
if (item.pointer.intertype == 'value') {
diff --git a/src/parseTools.js b/src/parseTools.js
index edf8384d..1c3f4dee 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -143,6 +143,7 @@ function isFunctionDef(token) {
}
function isFunctionType(type) {
+ type = type.replace(/"[^"]+"/g, '".."');
var parts = type.split(' ');
if (pointingLevels(type) !== 1) return false;
var text = removeAllPointing(parts.slice(1).join(' '));