{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/4066","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/4066/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/4066/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/4066/events","html_url":"https://github.com/kripken/emscripten/pull/4066","id":129635434,"number":4066,"title":"Simd js intrinsics update","user":{"login":"juj","id":225351,"avatar_url":"https://avatars.githubusercontent.com/u/225351?v=3","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kripken/emscripten/labels/SIMD","name":"SIMD","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-29T01:27:17Z","updated_at":"2016-01-29T01:31:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kripken/emscripten/pulls/4066","html_url":"https://github.com/kripken/emscripten/pull/4066","diff_url":"https://github.com/kripken/emscripten/pull/4066.diff","patch_url":"https://github.com/kripken/emscripten/pull/4066.patch"},"body":"SIMD.js updates:\r\n  - Update SIMD.js polyfill to latest version as of today (2016/29/01)\r\n  - Work around SIMD.js polyfill bug https://github.com/tc39/ecmascript_simd/issues/313\r\n  - Work around SIMD.js polyfill bug https://github.com/tc39/ecmascript_simd/issues/314\r\n  - Add support for unsigned SIMD types Uint32x4, Uint16x8 and Uint8x16.\r\n  - Remove remains of old shiftRightArithmeticByScalar() and shiftRightLogicalByScalar() that no longer exist.\r\n  - Remove use of old Float32x4.signmask() function which no longer exists.\r\n  - Complete Emscripten vector.h intrinsics file to include all the functions exposed in the SIMD.js API so far.\r\n  - Closes https://github.com/kripken/emscripten/issues/3982.\r\n  - Related to https://github.com/kripken/emscripten/issues/4011 and https://github.com/kripken/emscripten/issues/4051."},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/176511907","html_url":"https://github.com/kripken/emscripten/pull/4066#issuecomment-176511907","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/4066","id":176511907,"user":{"login":"juj","id":225351,"avatar_url":"https://avatars.githubusercontent.com/u/225351?v=3","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T01:31:22Z","updated_at":"2016-01-29T01:31:22Z","body":"All core tests pass in node.js, except for the `asm2i` suite, which fails in some other way that I don't understand. I added the unsigned types to the optimizer in the same pattern as before, but that does not seem to be enough. The error message I am getting is\r\n\r\n    C:\\code\\emsdk\\emscripten\\incoming>em++ tests\\test_sse2_full.cpp -o a.html -O2 -g2 -msse2 -s EMTERPRETIFY=1\r\n\r\n    C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:6207\r\n                      default: throw 'bad';\r\n                               ^\r\n    bad\r\n    Traceback (most recent call last):\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\emterpretify.py\", line 824, in <module>\r\n        shared.Building.js_optimizer(infile, ['emterpretify'], extra_info={ 'emterpretedFuncs': list(emterpreted_funcs), 'externalEmterpretedFuncs': list(external_emterpreted_funcs), 'opcodes': OPCODES, 'ropcodes': ROPCODES, 'ASYNC': ASYNC, 'PROFILING': PROFILING, 'ASSERTIONS': ASSERTIONS }, output_filename=temp, just_concat=True)\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\shared.py\", line 1651, in js_optimizer\r\n    Stack: Error\r\n        at assertTrue (eval at globalEval (C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:114:8), <anonymous>:59:26)\r\n        at makeCall (C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:7057:9)\r\n        at getReg (C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:6428:24)\r\n        at C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:7046:19\r\n        at Array.forEach (native)\r\n        at makeCall (C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:7045:15)\r\n        at getReg (C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:6428:24)\r\n        at C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:7046:19\r\n        at Array.forEach (native)\r\n        at makeCall (C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:7045:15)\r\n\r\n    C:\\code\\emsdk\\emscripten\\incoming\\tools\\js-optimizer.js:6207\r\n                      default: throw 'bad';\r\n                               ^\r\n    ret = js_optimizer.run(filename, passes, NODE_JS, debug, extra_info, just_split, just_concat)\r\n\r\n    undefined:60\r\n        throw msg;\r\n        ^\r\n    bad\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\js_optimizer.py\", line 539, in run\r\n    Assertion failed: undefined\r\n        return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\tempfiles.py\", line 64, in run_and_clean\r\n        return func()\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\js_optimizer.py\", line 539, in <lambda>\r\n        return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\js_optimizer.py\", line 445, in run_on_js\r\n        filenames = pool.map(run_on_chunk, commands, chunksize=1)\r\n      File \"C:\\code\\emsdk\\python\\2.7.5.3_64bit\\lib\\multiprocessing\\pool.py\", line 250, in map\r\n        return self.map_async(func, iterable, chunksize).get()\r\n      File \"C:\\code\\emsdk\\python\\2.7.5.3_64bit\\lib\\multiprocessing\\pool.py\", line 554, in get\r\n        raise self._value\r\n    AssertionError: Error in optimizer (return code 1): // return type: [__Z10test_shiftv,v]\r\n\r\n    Traceback (most recent call last):\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\\\em++\", line 13, in <module>\r\n        emcc.run()\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\emcc.py\", line 1701, in run\r\n        JSOptimizer.flush()\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\emcc.py\", line 1544, in flush\r\n        run_passes(chunks[0], title, just_split=False, just_concat=False)\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\emcc.py\", line 1517, in run_passes\r\n        final = shared.Building.js_optimizer(final, passes, debug_level >= 4, JSOptimizer.extra_info, just_split=just_split, just_concat=just_concat)\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\shared.py\", line 1651, in js_optimizer\r\n        ret = js_optimizer.run(filename, passes, NODE_JS, debug, extra_info, just_split, just_concat)\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\js_optimizer.py\", line 539, in run\r\n        return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\tempfiles.py\", line 64, in run_and_clean\r\n        return func()\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\js_optimizer.py\", line 539, in <lambda>\r\n        return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))\r\n      File \"C:\\code\\emsdk\\emscripten\\incoming\\tools\\js_optimizer.py\", line 297, in run_on_js\r\n        js = open(filename).read()\r\n    IOError: [Errno 2] No such file or directory: 'c:\\\\users\\\\jukka\\\\appdata\\\\local\\\\temp\\\\tmplv7jcctmpeh4cjw.jsfunc_5.js.jo.js.jo.js.em.js'\r\n\r\nApart from that, things should be smooth. @kripken: could you take a peek at the `asm2i` mode? (or should we finally let go of the old optimizer + SIMD support?)\r\n\r\nI will test latest Spidermonkey as well before merging, could not do that today, as it looks like on Windows mozilla-central build is broken at the moment, so currently tested only node.js and polyfill."}}