aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/intertyper.js16
-rwxr-xr-xtools/emmaken.py7
-rw-r--r--tools/file2json.py3
3 files changed, 11 insertions, 15 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 9fd03bbc..8b889b80 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -424,12 +424,14 @@ function intertyper(data, parseFunctions, baseLineNum) {
item.tokens[3] = item.tokens[3].item.tokens[0];
}
var subTokens = item.tokens[3].tokens;
- subTokens.push({text:','});
- while (subTokens[0]) {
- var stop = 1;
- while ([','].indexOf(subTokens[stop].text) == -1) stop ++;
- fields.push(combineTokens(subTokens.slice(0, stop)).text);
- subTokens.splice(0, stop+1);
+ if (subTokens) {
+ subTokens.push({text:','});
+ while (subTokens[0]) {
+ var stop = 1;
+ while ([','].indexOf(subTokens[stop].text) == -1) stop ++;
+ fields.push(combineTokens(subTokens.slice(0, stop)).text);
+ subTokens.splice(0, stop+1);
+ }
}
}
return [{
@@ -862,7 +864,7 @@ 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 || item.tokens[1].text in LLVM.VISIBILITIES) {
+ 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[1].text in LLVM.CALLING_CONVENTIONS) {
item.tokens.splice(1, 1);
}
var params = parseParamTokens(item.tokens[3].item.tokens);
diff --git a/tools/emmaken.py b/tools/emmaken.py
index f54f38f1..4984435a 100755
--- a/tools/emmaken.py
+++ b/tools/emmaken.py
@@ -76,12 +76,7 @@ try:
#f.write('Args: ' + ' '.join(sys.argv) + '\nCMake? ' + str(CMAKE_CONFIG) + '\n')
#f.close()
- # If no provided compiler, use LLVM_GCC from ~/.emscripten.
- # Or, use the provided one; if it is 'clang', then use CLANG from ~/.emscripten
- cxx = os.environ.get('EMMAKEN_COMPILER')
- if cxx and cxx == 'clang':
- cxx = CLANG
- CXX = cxx or LLVM_GCC
+ CXX = CLANG
CC = to_cc(CXX)
# If we got here from a redirection through emmakenxx.py, then force a C++ compiler here
diff --git a/tools/file2json.py b/tools/file2json.py
index 19f32e17..65547e72 100644
--- a/tools/file2json.py
+++ b/tools/file2json.py
@@ -22,6 +22,5 @@ while len(sdata) > 0:
if len(sdata) > 0:
lined += ['\n']
json = '[' + ''.join(lined) + ']'
-
-print 'var ' + sys.argv[2] + '=' + json + ';'
+print json