diff --git a/AUTHORS b/AUTHORS index 6cf860aba7867..7e10ceab31da8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -114,3 +114,4 @@ a license to everyone to use it as detailed in LICENSE.) * Vasilis Kalintiris * Adam C. Clifton * Volo Zyko +* Andre Weissflog diff --git a/emcc b/emcc index e02854bdb231f..bad118cd0f9a2 100755 --- a/emcc +++ b/emcc @@ -1210,6 +1210,7 @@ try: assert shared.Settings.NAMED_GLOBALS == 0, 'named globals not supported in fastcomp' assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp' assert shared.Settings.TARGET_LE32 == 1, 'fastcomp requires le32' + assert shared.Settings.USE_TYPED_ARRAYS == 2, 'fastcomp assumes ta2' assert not bind, 'embind not supported in fastcomp yet' if jcache: logging.warning('jcache is not supported in fastcomp (you should not need it anyhow), disabling') diff --git a/src/intertyper.js b/src/intertyper.js index b34d0c08b89ce..10822e487c9f9 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -241,7 +241,7 @@ function intertyper(lines, sidePass, baseLineNums) { if (mainPass && /^}.*/.test(line)) { inFunction = false; if (mainPass) { - var func = funcHeaderHandler({ tokens: tokenize(currFunctionLines[0], currFunctionLineNum) }); + var func = funcHeaderHandler({ tokens: tokenize(currFunctionLines[0]) }); if (SKIP_STACK_IN_SMALL && /emscripten_autodebug/.exec(func.ident)) { warnOnce('Disabling SKIP_STACK_IN_SMALL because we are apparently processing autodebugger data'); diff --git a/src/jsifier.js b/src/jsifier.js index d533e36b76058..8de20c809dec9 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -625,8 +625,8 @@ function JSify(data, functionsOnly) { } } - if (CLOSURE_ANNOTATIONS) func.JS += '/** @type {number} */'; if (!ASM_JS) { + if (CLOSURE_ANNOTATIONS) func.JS += '/** @type {number} */'; func.JS += INDENTATION + 'var label=0;\n'; } @@ -878,8 +878,8 @@ function JSify(data, functionsOnly) { function makeAssign(item) { var valueJS = item.JS; item.JS = ''; - if (CLOSURE_ANNOTATIONS) item.JS += '/** @type {number} */ '; if (!ASM_JS || item.intertype != 'alloca' || item.funcData.variables[item.assignTo].impl == VAR_EMULATED) { // asm only needs non-allocas + if (CLOSURE_ANNOTATIONS) item.JS += '/** @type {number} */ '; item.JS += ((ASM_JS || item.overrideSSA) ? '' : 'var ') + toNiceIdent(item.assignTo); } var value = parseNumerical(valueJS); diff --git a/src/library_glut.js b/src/library_glut.js index ba4d75abc4487..76a52b7354763 100644 --- a/src/library_glut.js +++ b/src/library_glut.js @@ -126,6 +126,8 @@ var LibraryGLUT = { return keycode - 106 + 42; // *,+-./ TODO handle shift? switch (keycode) { + case 9: // tab key + case 13: // return key case 27: // escape case 32: // space case 61: // equal diff --git a/src/parseTools.js b/src/parseTools.js index 874514b16fe40..1e680fd09be18 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -627,7 +627,7 @@ function parseLLVMSegment(segment) { } function cleanSegment(segment) { - while (segment.length >= 2 && ['noalias', 'sret', 'nocapture', 'nest', 'zeroext', 'signext'].indexOf(segment[1].text) != -1) { + while (segment.length >= 2 && ['noalias', 'sret', 'nocapture', 'nest', 'zeroext', 'signext', 'readnone'].indexOf(segment[1].text) != -1) { segment.splice(1, 1); } return segment; diff --git a/tests/openal_buffers.c b/tests/openal_buffers.c index 6f51a6858fea8..31104a33a2e87 100644 --- a/tests/openal_buffers.c +++ b/tests/openal_buffers.c @@ -26,7 +26,7 @@ unsigned int bits = 0; ALenum format = 0; ALuint source = 0; -void iter(void *arg) { +void iter() { ALuint buffer = 0; ALint buffersProcessed = 0; ALint buffersWereQueued = 0; @@ -180,7 +180,7 @@ int main(int argc, char* argv[]) { emscripten_set_main_loop(iter, 0, 0); #else while (1) { - iter(NULL); + iter(); usleep(16); } #endif diff --git a/tests/test_other.py b/tests/test_other.py index 4bdd889be4204..9c983f9f8e732 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -197,7 +197,7 @@ def test_emcc(self): #(['-O2', '-g4'], lambda generated: 'var b=0' not in generated and 'var b = 0' not in generated and 'function _main' in generated, 'same as -g3 for now'), (['-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' in generated, 'no inlining without opts'), (['-O3', '-s', 'INLINING_LIMIT=0', '--closure', '0'], lambda generated: 'function _dump' not in generated, 'lto/inlining'), - (['-Os', '--llvm-lto', '1', '-s', 'ASM_JS=0'], lambda generated: 'function _dump' in generated, '-Os disables inlining'), + (['-Os', '--llvm-lto', '1', '-s', 'ASM_JS=0', '-g2'], lambda generated: 'function _dump' in generated, '-Os disables inlining'), (['-s', 'USE_TYPED_ARRAYS=0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'), (['-s', 'USE_TYPED_ARRAYS=1'], lambda generated: 'IHEAPU = ' in generated, 'typed arrays 1 selected'), ([], lambda generated: 'Module["_dump"]' not in generated, 'dump is not exported by default'), @@ -209,6 +209,7 @@ def test_emcc(self): ]: print params, text self.clear() + if os.environ.get('EMCC_FAST_COMPILER') == '1' and ['disable typed arrays', 'typed arrays 1 selected']: continue output = Popen([PYTHON, compiler, path_from_root('tests', 'hello_world_loop.cpp'), '-o', 'a.out.js'] + params, stdout=PIPE, stderr=PIPE).communicate() assert len(output[0]) == 0, output[0] assert os.path.exists('a.out.js'), '\n'.join(output) diff --git a/tools/shared.py b/tools/shared.py index bd0626dc2fe23..90618a97493b8 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -337,7 +337,7 @@ def find_temp_directory(): # we re-check sanity when the settings are changed) # We also re-check sanity and clear the cache when the version changes -EMSCRIPTEN_VERSION = '1.8.3' +EMSCRIPTEN_VERSION = '1.8.4' def generate_sanity(): return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT @@ -1163,6 +1163,7 @@ def llvm_opt(filename, opts, out=None): if type(opts) is int: opts = Building.pick_llvm_opts(opts) #opts += ['-debug-pass=Arguments'] + opts += ['-disable-loop-vectorization', '-disable-slp-vectorization'] logging.debug('emcc: LLVM opts: ' + str(opts)) target = out or (filename + '.opt.bc') output = Popen([LLVM_OPT, filename] + opts + ['-o', target], stdout=PIPE).communicate()[0]