diff options
author | Jeff Terrace <jterrace@gmail.com> | 2011-10-13 14:32:05 -0400 |
---|---|---|
committer | Jeff Terrace <jterrace@gmail.com> | 2011-10-13 14:32:05 -0400 |
commit | 02c582ce57c7466ddbf327645b1d9d8ab93cfb21 (patch) | |
tree | 8282f1be0f142891aa497b55e222f48c95c773e8 | |
parent | 8db994d1596ff691c2d603ebc6206bdfc73b2a4d (diff) | |
parent | 02163f9957c1e0ee02b1c7d0936a084ffb592cff (diff) |
Merge branch 'master' of https://github.com/kripken/emscripten
-rw-r--r-- | src/intertyper.js | 16 | ||||
-rwxr-xr-x | tools/emmaken.py | 7 | ||||
-rw-r--r-- | tools/file2json.py | 3 |
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 |