diff options
-rwxr-xr-x | emcc | 3 | ||||
-rw-r--r-- | src/jsifier.js | 9 | ||||
-rw-r--r-- | src/library.js | 41 | ||||
-rw-r--r-- | src/library_browser.js | 5 | ||||
-rw-r--r-- | src/shell.js | 1 | ||||
-rw-r--r-- | system/include/emscripten/emscripten.h | 8 | ||||
-rw-r--r-- | system/include/libcxx/exception | 2 | ||||
-rwxr-xr-x | tests/runner.py | 244 | ||||
-rw-r--r-- | tools/eliminator/asm-eliminator-test-output.js | 4605 | ||||
-rw-r--r-- | tools/eliminator/asm-eliminator-test.js | 6087 | ||||
-rw-r--r-- | tools/js-optimizer.js | 102 | ||||
-rw-r--r-- | tools/shared.py | 1 | ||||
-rw-r--r-- | tools/test-js-optimizer-asm-regs-output.js | 81 | ||||
-rw-r--r-- | tools/test-js-optimizer-asm-regs.js | 84 |
14 files changed, 11226 insertions, 47 deletions
@@ -1002,8 +1002,7 @@ try: assert opt_level >= 1, 'asm.js requires -O1 or above' if bind: - shared.Settings.ASM_JS = 0 - logging.warning('disabling asm.js because it is not compatible with embind yet') + shared.Settings.RESERVED_FUNCTION_POINTERS = max(shared.Settings.RESERVED_FUNCTION_POINTERS, 10) if shared.Settings.CORRECT_SIGNS != 1: logging.warning('setting CORRECT_SIGNS to 1 for asm.js code generation') shared.Settings.CORRECT_SIGNS = 1 diff --git a/src/jsifier.js b/src/jsifier.js index 2c83d036..bcc179d7 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -12,6 +12,8 @@ var RELOOP_IGNORED_LASTS = set('return', 'unreachable', 'resume'); var addedLibraryItems = {}; var asmLibraryFunctions = []; +var SETJMP_LABEL = -1; + // JSifier function JSify(data, functionsOnly, givenFunctions) { var mainPass = !functionsOnly; @@ -730,7 +732,7 @@ function JSify(data, functionsOnly, givenFunctions) { }).join('\n') + '\n'; if (func.setjmpTable && ASM_JS) { // emit a label in which we write to the proper local variable, before jumping to the actual label - ret += ' case -1111: '; + ret += ' case ' + SETJMP_LABEL + ': '; ret += func.setjmpTable.map(function(triple) { // original label, label we created for right after the setjmp, variable setjmp result goes into return 'if ((setjmpLabel|0) == ' + getLabelId(triple.oldLabel) + ') { ' + triple.assignTo + ' = threwValue; label = ' + triple.newLabel + ' }\n'; }).join(' else '); @@ -1160,6 +1162,7 @@ function JSify(data, functionsOnly, givenFunctions) { return ret + ';'; }); makeFuncLineActor('resume', function(item) { + if (DISABLE_EXCEPTION_CATCHING) return 'abort()'; if (item.ident == 0) { // No exception to resume, so we can just bail. // This is related to issue #917 and http://llvm.org/PR15518 @@ -1488,9 +1491,9 @@ function JSify(data, functionsOnly, givenFunctions) { } if (ASM_JS && funcData.setjmpTable) { - // check if a longjmp was done. If a setjmp happened, check if ours. If ours, go to -111 to handle it. + // check if a longjmp was done. If a setjmp happened, check if ours. If ours, go to a special label to handle it. // otherwise, just return - the call to us must also have been an invoke, so the setjmp propagates that way - ret += '; if (((__THREW__|0) != 0) & ((threwValue|0) != 0)) { setjmpLabel = ' + asmCoercion('_testSetjmp(' + makeGetValue('__THREW__', 0, 'i32') + ', setjmpTable)', 'i32') + '; if ((setjmpLabel|0) > 0) { label = -1111; break } else return ' + (funcData.returnType != 'void' ? asmCoercion('0', funcData.returnType) : '') + ' } __THREW__ = threwValue = 0;\n'; + ret += '; if (((__THREW__|0) != 0) & ((threwValue|0) != 0)) { setjmpLabel = ' + asmCoercion('_testSetjmp(' + makeGetValue('__THREW__', 0, 'i32') + ', setjmpTable)', 'i32') + '; if ((setjmpLabel|0) > 0) { label = ' + SETJMP_LABEL + '; break } else return ' + (funcData.returnType != 'void' ? asmCoercion('0', funcData.returnType) : '') + ' } __THREW__ = threwValue = 0;\n'; } return ret; diff --git a/src/library.js b/src/library.js index d897556f..e65754ba 100644 --- a/src/library.js +++ b/src/library.js @@ -3918,7 +3918,14 @@ LibraryManager.library = { str++; } } - } + } else if (finalBase==16) { + if ({{{ makeGetValue('str', 0, 'i8') }}} == {{{ charCode('0') }}}) { + if ({{{ makeGetValue('str+1', 0, 'i8') }}} == {{{ charCode('x') }}} || + {{{ makeGetValue('str+1', 0, 'i8') }}} == {{{ charCode('X') }}}) { + str += 2; + } + } + } if (!finalBase) finalBase = 10; // Get digits. @@ -3969,13 +3976,14 @@ LibraryManager.library = { #if USE_TYPED_ARRAYS == 2 _parseInt64__deps: ['isspace', '__setErrNo', '$ERRNO_CODES', function() { Types.preciseI64MathUsed = 1 }], _parseInt64: function(str, endptr, base, min, max, unsign) { - var start = str; + var isNegative = false; // Skip space. while (_isspace({{{ makeGetValue('str', 0, 'i8') }}})) str++; - + // Check for a plus/minus sign. if ({{{ makeGetValue('str', 0, 'i8') }}} == {{{ charCode('-') }}}) { str++; + isNegative = true; } else if ({{{ makeGetValue('str', 0, 'i8') }}} == {{{ charCode('+') }}}) { str++; } @@ -3991,12 +3999,19 @@ LibraryManager.library = { str += 2; } else { finalBase = 8; - str++; ok = true; // we saw an initial zero, perhaps the entire thing is just "0" } } - } + } else if (finalBase==16) { + if ({{{ makeGetValue('str', 0, 'i8') }}} == {{{ charCode('0') }}}) { + if ({{{ makeGetValue('str+1', 0, 'i8') }}} == {{{ charCode('x') }}} || + {{{ makeGetValue('str+1', 0, 'i8') }}} == {{{ charCode('X') }}}) { + str += 2; + } + } + } if (!finalBase) finalBase = 10; + start = str; // Get digits. var chr; @@ -4009,6 +4024,7 @@ LibraryManager.library = { ok = true; } } + if (!ok) { ___setErrNo(ERRNO_CODES.EINVAL); {{{ makeStructuralReturn(['0', '0']) }}}; @@ -4020,7 +4036,8 @@ LibraryManager.library = { } try { - i64Math.fromString(Pointer_stringify(start, str - start), finalBase, min, max, unsign); + var numberString = isNegative ? '-'+Pointer_stringify(start, str - start) : Pointer_stringify(start, str - start); + i64Math.fromString(numberString, finalBase, min, max, unsign); } catch(e) { ___setErrNo(ERRNO_CODES.ERANGE); // not quite correct } @@ -5088,7 +5105,13 @@ LibraryManager.library = { return _malloc(size); }, __cxa_free_exception: function(ptr) { - return _free(ptr); + try { + return _free(ptr); + } catch(e) { // XXX FIXME +#if ASSERTIONS + Module.printErr('exception during cxa_free_exception: ' + e); +#endif + } }, __cxa_throw__sig: 'viii', __cxa_throw__deps: ['llvm_eh_exception', '_ZSt18uncaught_exceptionv', '__cxa_find_matching_catch'], @@ -6813,7 +6836,7 @@ LibraryManager.library = { }, __errno_state: 0, __setErrNo__deps: ['__errno_state'], - __setErrNo__postset: '___errno_state = Runtime.staticAlloc(4);', + __setErrNo__postset: '___errno_state = Runtime.staticAlloc(4); {{{ makeSetValue("___errno_state", 0, 0, "i32") }}};', __setErrNo: function(value) { // For convenient setting and returning of errno. {{{ makeSetValue('___errno_state', '0', 'value', 'i32') }}} @@ -7578,7 +7601,7 @@ LibraryManager.library = { }, emscripten_run_script_int: function(ptr) { - return eval(Pointer_stringify(ptr)); + return eval(Pointer_stringify(ptr))|0; }, emscripten_run_script_string: function(ptr) { diff --git a/src/library_browser.js b/src/library_browser.js index 2e6c9150..1a79a49b 100644 --- a/src/library_browser.js +++ b/src/library_browser.js @@ -754,6 +754,11 @@ mergeInto(LibraryManager.library, { } }, + emscripten_exit_with_live_runtime: function() { + Module['noExitRuntime'] = true; + throw 'SimulateInfiniteLoop'; + }, + emscripten_hide_mouse: function() { var styleSheet = document.styleSheets[0]; var rules = styleSheet.cssRules; diff --git a/src/shell.js b/src/shell.js index c8f3644a..20db25a7 100644 --- a/src/shell.js +++ b/src/shell.js @@ -1,5 +1,6 @@ try { this['Module'] = Module; + Module.test; } catch(e) { this['Module'] = Module = {}; } diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index 61634b0e..77aa1df2 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -136,6 +136,14 @@ inline void emscripten_async_call(void (*func)(void *), void *arg, int millis) { #endif /* + * Exits the program immediately, but leaves the runtime alive + * so that you can continue to run code later (so global destructors + * etc. are not run). This is implicitly performed when you do + * an asynchronous operation like emscripten_async_call. + */ +extern void emscripten_exit_with_live_runtime(); + +/* * Hide the OS mouse cursor over the canvas. Note that SDL's * SDL_ShowCursor command shows and hides the SDL cursor, not * the OS one. This command is useful to hide the OS cursor diff --git a/system/include/libcxx/exception b/system/include/libcxx/exception index 37bfc57e..4b5770b7 100644 --- a/system/include/libcxx/exception +++ b/system/include/libcxx/exception @@ -91,7 +91,7 @@ class _LIBCPP_EXCEPTION_ABI exception { public: _LIBCPP_INLINE_VISIBILITY exception() _NOEXCEPT {} - virtual ~exception() _NOEXCEPT; + virtual ~exception() _NOEXCEPT {}; // XXX EMSCRIPTEN inline in destructor virtual const char* what() const _NOEXCEPT; }; diff --git a/tests/runner.py b/tests/runner.py index 667ec180..720f434e 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -3029,6 +3029,28 @@ setjmp exception execution path, level: 0, prev_jmp: -1 Exiting setjmp function, level: 0, prev_jmp: -1 ''') + def test_std_exception(self): + if self.emcc_args is None: return self.skip('requires emcc') + Settings.DISABLE_EXCEPTION_CATCHING = 0 + self.emcc_args += ['-s', 'SAFE_HEAP=0'] + + src = r''' + #include <stdio.h> + #include <exception> + + int main() + { + std::exception e; + try { + throw e; + } catch(std::exception e) { + printf("caught std::exception\n"); + } + return 0; + } + ''' + self.do_run(src, 'caught std::exception') + def test_exit_stack(self): if self.emcc_args is None: return self.skip('requires emcc') if Settings.ASM_JS: return self.skip('uses report_stack without exporting') @@ -4071,7 +4093,7 @@ def process(filename): int main( int argc, const char *argv[] ) { unsigned int x = 0xfffffff1; - x >>= 0; // force it to be unsigned for purpose of checking our switch comparison in signed/unsigned + x >>= (argc-1); // force it to be unsigned for purpose of checking our switch comparison in signed/unsigned printf("*%d,%d,%d,%d,%d,%d*\\n", switcher('a'), switcher('b'), switcher('c'), switcher(x), switcher(-15), switcher('e')); return 0; } @@ -4510,6 +4532,204 @@ The current type of b is: 9 self.do_run(src, '*1*', force_c=True) + def test_strtoll_hex(self): + # tests strtoll for hex strings (0x...) + src = r''' + #include <stdio.h> + #include <stdlib.h> + + int main() { + const char *STRING = "0x4 -0x3A +0xDEADBEEF"; + char *end_char; + + // undefined base + long long int l1 = strtoll(STRING, &end_char, 0); + long long int l2 = strtoll(end_char, &end_char, 0); + long long int l3 = strtoll(end_char, NULL, 0); + + // defined base + long long int l4 = strtoll(STRING, &end_char, 16); + long long int l5 = strtoll(end_char, &end_char, 16); + long long int l6 = strtoll(end_char, NULL, 16); + + printf("%d%d%d%d%d%d\n", l1==0x4, l2==-0x3a, l3==0xdeadbeef, l4==0x4, l5==-0x3a, l6==0xdeadbeef); + return 0; + } + ''' + self.do_run(src, '111111') + + def test_strtoll_dec(self): + # tests strtoll for decimal strings (0x...) + src = r''' + #include <stdio.h> + #include <stdlib.h> + + int main() { + const char *STRING = "4 -38 +4711"; + char *end_char; + + // undefined base + long long int l1 = strtoll(STRING, &end_char, 0); + long long int l2 = strtoll(end_char, &end_char, 0); + long long int l3 = strtoll(end_char, NULL, 0); + + // defined base + long long int l4 = strtoll(STRING, &end_char, 10); + long long int l5 = strtoll(end_char, &end_char, 10); + long long int l6 = strtoll(end_char, NULL, 10); + + printf("%d%d%d%d%d%d\n", l1==4, l2==-38, l3==4711, l4==4, l5==-38, l6==4711); + return 0; + } + ''' + self.do_run(src, '111111') + + def test_strtoll_bin(self): + # tests strtoll for binary strings (0x...) + src = r''' + #include <stdio.h> + #include <stdlib.h> + + int main() { + const char *STRING = "1 -101 +1011"; + char *end_char; + + // defined base + long long int l4 = strtoll(STRING, &end_char, 2); + long long int l5 = strtoll(end_char, &end_char, 2); + long long int l6 = strtoll(end_char, NULL, 2); + + printf("%d%d%d\n", l4==1, l5==-5, l6==11); + return 0; + } + ''' + self.do_run(src, '111') + + def test_strtoll_oct(self): + # tests strtoll for decimal strings (0x...) + src = r''' + #include <stdio.h> + #include <stdlib.h> + + int main() { + const char *STRING = "0 -035 +04711"; + char *end_char; + + // undefined base + long long int l1 = strtoll(STRING, &end_char, 0); + long long int l2 = strtoll(end_char, &end_char, 0); + long long int l3 = strtoll(end_char, NULL, 0); + + // defined base + long long int l4 = strtoll(STRING, &end_char, 8); + long long int l5 = strtoll(end_char, &end_char, 8); + long long int l6 = strtoll(end_char, NULL, 8); + + printf("%d%d%d%d%d%d\n", l1==0, l2==-29, l3==2505, l4==0, l5==-29, l6==2505); + return 0; + } + ''' + self.do_run(src, '111111') + + def test_strtol_hex(self): + # tests strtoll for hex strings (0x...) + src = r''' + #include <stdio.h> + #include <stdlib.h> + + int main() { + const char *STRING = "0x4 -0x3A +0xDEAD"; + char *end_char; + + // undefined base + long l1 = strtol(STRING, &end_char, 0); + long l2 = strtol(end_char, &end_char, 0); + long l3 = strtol(end_char, NULL, 0); + + // defined base + long l4 = strtol(STRING, &end_char, 16); + long l5 = strtol(end_char, &end_char, 16); + long l6 = strtol(end_char, NULL, 16); + + printf("%d%d%d%d%d%d\n", l1==0x4, l2==-0x3a, l3==0xdead, l4==0x4, l5==-0x3a, l6==0xdead); + return 0; + } + ''' + self.do_run(src, '111111') + + def test_strtol_dec(self): + # tests strtoll for decimal strings (0x...) + src = r''' + #include <stdio.h> + #include <stdlib.h> + + int main() { + const char *STRING = "4 -38 +4711"; + char *end_char; + + // undefined base + long l1 = strtol(STRING, &end_char, 0); + long l2 = strtol(end_char, &end_char, 0); + long l3 = strtol(end_char, NULL, 0); + + // defined base + long l4 = strtol(STRING, &end_char, 10); + long l5 = strtol(end_char, &end_char, 10); + long l6 = strtol(end_char, NULL, 10); + + printf("%d%d%d%d%d%d\n", l1==4, l2==-38, l3==4711, l4==4, l5==-38, l6==4711); + return 0; + } + ''' + self.do_run(src, '111111') + + def test_strtol_bin(self): + # tests strtoll for binary strings (0x...) + src = r''' + #include <stdio.h> + #include <stdlib.h> + + int main() { + const char *STRING = "1 -101 +1011"; + char *end_char; + + // defined base + long l4 = strtol(STRING, &end_char, 2); + long l5 = strtol(end_char, &end_char, 2); + long l6 = strtol(end_char, NULL, 2); + + printf("%d%d%d\n", l4==1, l5==-5, l6==11); + return 0; + } + ''' + self.do_run(src, '111') + + def test_strtol_oct(self): + # tests strtoll for decimal strings (0x...) + src = r''' + #include <stdio.h> + #include <stdlib.h> + + int main() { + const char *STRING = "0 -035 +04711"; + char *end_char; + + // undefined base + long l1 = strtol(STRING, &end_char, 0); + long l2 = strtol(end_char, &end_char, 0); + long l3 = strtol(end_char, NULL, 0); + + // defined base + long l4 = strtol(STRING, &end_char, 8); + long l5 = strtol(end_char, &end_char, 8); + long l6 = strtol(end_char, NULL, 8); + + printf("%d%d%d%d%d%d\n", l1==0, l2==-29, l3==2505, l4==0, l5==-29, l6==2505); + return 0; + } + ''' + self.do_run(src, '111111') + def test_atexit(self): # Confirms they are called in reverse order src = r''' @@ -8681,6 +8901,28 @@ def process(filename): Settings.ALIASING_FUNCTION_POINTERS = 1 - Settings.ALIASING_FUNCTION_POINTERS # flip the test self.do_run(src, '''Hello 7 from JS!''') + def test_embind(self): + if self.emcc_args is None: return self.skip('requires emcc') + Building.COMPILER_TEST_OPTS += ['--bind'] + + src = r''' + #include<stdio.h> + #include<emscripten/val.h> + + using namespace emscripten; + + int main() { + val Math = val::global("Math"); + + // two ways to call Math.abs + printf("abs(-10): %d\n", Math.call<int>("abs", -10)); + printf("abs(-11): %d\n", Math["abs"](-11).as<int>()); + + return 0; + } + ''' + self.do_run(src, 'abs(-10): 10\nabs(-11): 11'); + def test_scriptaclass(self): if self.emcc_args is None: return self.skip('requires emcc') diff --git a/tools/eliminator/asm-eliminator-test-output.js b/tools/eliminator/asm-eliminator-test-output.js index 8da7a5bc..41a2c2b6 100644 --- a/tools/eliminator/asm-eliminator-test-output.js +++ b/tools/eliminator/asm-eliminator-test-output.js @@ -107,10 +107,9 @@ function label() { } } function switchy() { - var no = 0, yes = 0, a = 0, b = 0; + var yes = 0; while (1) switch (label | 0) { case 1: - no = 100; break; case 2: yes = 111; @@ -120,8 +119,6 @@ function switchy() { print(yes / 2); continue; case 3: - a = 5; - b = a; break; } } @@ -364,4 +361,4604 @@ function __ZN23b2EdgeAndPolygonContact8EvaluateEP10b2ManifoldRK11b2TransformS4_( STACKTOP = __stackBase__; return; } +function _java_nio_charset_Charset_forNameInternal___java_lang_String($n1) { + $n1 = $n1 | 0; + var $_r0_sroa_0 = 0, $_r0_sroa_1 = 0, $_r1_sroa_0 = 0, $_r2_sroa_0 = 0, $_r3_sroa_0 = 0, $_r3_sroa_1 = 0, $_r5_sroa_0 = 0, $local_env_w4567aaac23b1b6 = 0, $local_env_w4567aaac23b1c16 = 0, $local_env_w4567aaac23b1c22 = 0, $local_env_w4567aaac23b1c24 = 0, $local_env_w4567aaac23b1c26 = 0, $local_env_w4567aaac23b1c29 = 0, $local_env_w4567aaac23b1c31 = 0, $local_env_w4567aaac23b1c35 = 0, $local_env_w4567aaac23b1c40 = 0, $local_env_w4567aaac23b1c42 = 0, $local_env_w4567aaac23b1c44 = 0, $local_env_w4567aaac23b1c48 = 0, $local_env_w4567aaac23b1c50 = 0, $5 = 0, $16 = 0, $18 = 0, $19 = 0, $21 = 0, $25 = 0, $40 = 0, $52 = 0, $57 = 0, $61 = 0, $tib1_0_ph_i543 = 0, $72 = 0, $tib1_0_lcssa_i546 = 0, $dimension_tib1_0_lcssa_i547 = 0, $77 = 0, $79 = 0, $dimension_tib1_029_i549 = 0, $82 = 0, $83 = 0, $86 = 0, $88 = 0, $dimension_tib2_024_i551 = 0, $91 = 0, $92 = 0, $95 = 0, $tib2_0_lcssa_in_i553 = 0, $dimension_tib2_0_lcssa_i554 = 0, $tib2_0_lcssa_i555 = 0, $tib1_121_i558 = 0, $i_0_i561 = 0, $113 = 0, $_r1_sroa_0_0_load600 = 0, $119 = 0, $122 = 0, $139 = 0, $145 = 0, $149 = 0, $151 = 0, $153 = 0, $155 = 0, $159 = 0, $170 = 0, $175 = 0, $179 = 0, $tib1_0_ph_i521 = 0, $190 = 0, $tib1_0_lcssa_i524 = 0, $dimension_tib1_0_lcssa_i525 = 0, $195 = 0, $197 = 0, $dimension_tib1_029_i527 = 0, $200 = 0, $201 = 0, $204 = 0, $206 = 0, $dimension_tib2_024_i529 = 0, $209 = 0, $210 = 0, $213 = 0, $tib2_0_lcssa_in_i531 = 0, $dimension_tib2_0_lcssa_i532 = 0, $tib2_0_lcssa_i533 = 0, $tib1_121_i536 = 0, $i_0_i539 = 0, $231 = 0, $238 = 0, $240 = 0, $_r1_sroa_0_0_load = 0, $246 = 0, $249 = 0, $266 = 0, $273 = 0, $275 = 0, $284 = 0, $286 = 0, $290 = 0, $305 = 0, $310 = 0, $323 = 0, $328 = 0, $332 = 0, $tib1_0_ph_i500 = 0, $343 = 0, $tib1_0_lcssa_i503 = 0, $dimension_tib1_0_lcssa_i504 = 0, $348 = 0, $350 = 0, $dimension_tib1_029_i506 = 0, $353 = 0, $354 = 0, $357 = 0, $359 = 0, $dimension_tib2_024_i508 = 0, $362 = 0, $363 = 0, $366 = 0, $tib2_0_lcssa_in_i510 = 0, $dimension_tib2_0_lcssa_i511 = 0, $tib2_0_lcssa_i512 = 0, $tib1_121_i515 = 0, $i_0_i518 = 0, $384 = 0, $392 = 0, $394 = 0, $395 = 0, $397 = 0, $401 = 0, $416 = 0, $424 = 0, $426 = 0, $427 = 0, $429 = 0, $433 = 0, $446 = 0, $451 = 0, $455 = 0, $tib1_0_ph_i479 = 0, $466 = 0, $tib1_0_lcssa_i482 = 0, $dimension_tib1_0_lcssa_i483 = 0, $471 = 0, $473 = 0, $dimension_tib1_029_i485 = 0, $476 = 0, $477 = 0, $480 = 0, $482 = 0, $dimension_tib2_024_i487 = 0, $485 = 0, $486 = 0, $489 = 0, $tib2_0_lcssa_in_i489 = 0, $dimension_tib2_0_lcssa_i490 = 0, $tib2_0_lcssa_i491 = 0, $tib1_121_i494 = 0, $i_0_i497 = 0, $507 = 0, $519 = 0, $521 = 0, $525 = 0, $534 = 0, $539 = 0, $542 = 0, $546 = 0, $548 = 0, $557 = 0, $562 = 0, $566 = 0, $tib1_0_ph_i458 = 0, $577 = 0, $tib1_0_lcssa_i461 = 0, $dimension_tib1_0_lcssa_i462 = 0, $582 = 0, $584 = 0, $dimension_tib1_029_i464 = 0, $587 = 0, $588 = 0, $591 = 0, $593 = 0, $dimension_tib2_024_i466 = 0, $596 = 0, $597 = 0, $600 = 0, $tib2_0_lcssa_in_i468 = 0, $dimension_tib2_0_lcssa_i469 = 0, $tib2_0_lcssa_i470 = 0, $tib1_121_i473 = 0, $i_0_i476 = 0, $618 = 0, $623 = 0, $625 = 0, $629 = 0, $632 = 0, $643 = 0, $644 = 0, $649 = 0, $653 = 0, $tib1_0_ph_i437 = 0, $664 = 0, $tib1_0_lcssa_i440 = 0, $dimension_tib1_0_lcssa_i441 = 0, $669 = 0, $671 = 0, $dimension_tib1_029_i443 = 0, $674 = 0, $675 = 0, $678 = 0, $680 = 0, $dimension_tib2_024_i445 = 0, $683 = 0, $684 = 0, $687 = 0, $tib2_0_lcssa_in_i447 = 0, $dimension_tib2_0_lcssa_i448 = 0, $tib2_0_lcssa_i449 = 0, $tib1_121_i452 = 0, $i_0_i455 = 0, $705 = 0, $711 = 0, $716 = 0, $720 = 0, $tib1_0_ph_i416 = 0, $731 = 0, $tib1_0_lcssa_i419 = 0, $dimension_tib1_0_lcssa_i420 = 0, $736 = 0, $738 = 0, $dimension_tib1_029_i422 = 0, $741 = 0, $742 = 0, $745 = 0, $747 = 0, $dimension_tib2_024_i424 = 0, $750 = 0, $751 = 0, $754 = 0, $tib2_0_lcssa_in_i426 = 0, $dimension_tib2_0_lcssa_i427 = 0, $tib2_0_lcssa_i428 = 0, $tib1_121_i431 = 0, $i_0_i434 = 0, $772 = 0, $780 = 0, $782 = 0, $783 = 0, $785 = 0, $789 = 0, $798 = 0, $808 = 0, $809 = 0, $814 = 0, $818 = 0, $tib1_0_ph_i395 = 0, $829 = 0, $tib1_0_lcssa_i398 = 0, $dimension_tib1_0_lcssa_i399 = 0, $834 = 0, $836 = 0, $dimension_tib1_029_i401 = 0, $839 = 0, $840 = 0, $843 = 0, $845 = 0, $dimension_tib2_024_i403 = 0, $848 = 0, $849 = 0, $852 = 0, $tib2_0_lcssa_in_i405 = 0, $dimension_tib2_0_lcssa_i406 = 0, $tib2_0_lcssa_i407 = 0, $tib1_121_i410 = 0, $i_0_i413 = 0, $870 = 0, $876 = 0, $881 = 0, $885 = 0, $tib1_0_ph_i374 = 0, $896 = 0, $tib1_0_lcssa_i377 = 0, $dimension_tib1_0_lcssa_i378 = 0, $901 = 0, $903 = 0, $dimension_tib1_029_i380 = 0, $906 = 0, $907 = 0, $910 = 0, $912 = 0, $dimension_tib2_024_i382 = 0, $915 = 0, $916 = 0, $919 = 0, $tib2_0_lcssa_in_i384 = 0, $dimension_tib2_0_lcssa_i385 = 0, $tib2_0_lcssa_i386 = 0, $tib1_121_i389 = 0, $i_0_i392 = 0, $937 = 0, $945 = 0, $947 = 0, $948 = 0, $950 = 0, $954 = 0, $_r0_sroa_0_0_load607 = 0, $969 = 0, $974 = 0, $978 = 0, $tib1_0_ph_i353 = 0, $989 = 0, $tib1_0_lcssa_i356 = 0, $dimension_tib1_0_lcssa_i357 = 0, $994 = 0, $996 = 0, $dimension_tib1_029_i359 = 0, $999 = 0, $1000 = 0, $1003 = 0, $1005 = 0, $dimension_tib2_024_i361 = 0, $1008 = 0, $1009 = 0, $1012 = 0, $tib2_0_lcssa_in_i363 = 0, $dimension_tib2_0_lcssa_i364 = 0, $tib2_0_lcssa_i365 = 0, $tib1_121_i368 = 0, $i_0_i371 = 0, $1030 = 0, $1036 = 0, $1038 = 0, $1042 = 0, $1050 = 0, $1056 = 0, $1064 = 0, $1066 = 0, $1067 = 0, $1069 = 0, $1073 = 0, $1083 = 0, $1084 = 0, $1089 = 0, $1093 = 0, $tib1_0_ph_i332 = 0, $1104 = 0, $tib1_0_lcssa_i335 = 0, $dimension_tib1_0_lcssa_i336 = 0, $1109 = 0, $1111 = 0, $dimension_tib1_029_i338 = 0, $1114 = 0, $1115 = 0, $1118 = 0, $1120 = 0, $dimension_tib2_024_i340 = 0, $1123 = 0, $1124 = 0, $1127 = 0, $tib2_0_lcssa_in_i342 = 0, $dimension_tib2_0_lcssa_i343 = 0, $tib2_0_lcssa_i344 = 0, $tib1_121_i347 = 0, $i_0_i350 = 0, $1145 = 0, $1151 = 0, $1156 = 0, $1160 = 0, $tib1_0_ph_i311 = 0, $1171 = 0, $tib1_0_lcssa_i314 = 0, $dimension_tib1_0_lcssa_i315 = 0, $1176 = 0, $1178 = 0, $dimension_tib1_029_i317 = 0, $1181 = 0, $1182 = 0, $1185 = 0, $1187 = 0, $dimension_tib2_024_i319 = 0, $1190 = 0, $1191 = 0, $1194 = 0, $tib2_0_lcssa_in_i321 = 0, $dimension_tib2_0_lcssa_i322 = 0, $tib2_0_lcssa_i323 = 0, $tib1_121_i326 = 0, $i_0_i329 = 0, $1212 = 0, $1222 = 0, $1232 = 0, $1233 = 0, $1238 = 0, $1242 = 0, $tib1_0_ph_i290 = 0, $1253 = 0, $tib1_0_lcssa_i293 = 0, $dimension_tib1_0_lcssa_i294 = 0, $1258 = 0, $1260 = 0, $dimension_tib1_029_i296 = 0, $1263 = 0, $1264 = 0, $1267 = 0, $1269 = 0, $dimension_tib2_024_i298 = 0, $1272 = 0, $1273 = 0, $1276 = 0, $tib2_0_lcssa_in_i300 = 0, $dimension_tib2_0_lcssa_i301 = 0, $tib2_0_lcssa_i302 = 0, $tib1_121_i305 = 0, $i_0_i308 = 0, $1294 = 0, $1300 = 0, $1305 = 0, $1309 = 0, $tib1_0_ph_i269 = 0, $1320 = 0, $tib1_0_lcssa_i272 = 0, $dimension_tib1_0_lcssa_i273 = 0, $1325 = 0, $1327 = 0, $dimension_tib1_029_i275 = 0, $1330 = 0, $1331 = 0, $1334 = 0, $1336 = 0, $dimension_tib2_024_i277 = 0, $1339 = 0, $1340 = 0, $1343 = 0, $tib2_0_lcssa_in_i279 = 0, $dimension_tib2_0_lcssa_i280 = 0, $tib2_0_lcssa_i281 = 0, $tib1_121_i284 = 0, $i_0_i287 = 0, $1361 = 0, $1369 = 0, $1371 = 0, $1372 = 0, $1374 = 0, $1378 = 0, $_r0_sroa_0_0_load604 = 0, $1391 = 0, $1400 = 0, $1401 = 0, $1406 = 0, $1410 = 0, $tib1_0_ph_i248 = 0, $1421 = 0, $tib1_0_lcssa_i251 = 0, $dimension_tib1_0_lcssa_i252 = 0, $1426 = 0, $1428 = 0, $dimension_tib1_029_i254 = 0, $1431 = 0, $1432 = 0, $1435 = 0, $1437 = 0, $dimension_tib2_024_i256 = 0, $1440 = 0, $1441 = 0, $1444 = 0, $tib2_0_lcssa_in_i258 = 0, $dimension_tib2_0_lcssa_i259 = 0, $tib2_0_lcssa_i260 = 0, $tib1_121_i263 = 0, $i_0_i266 = 0, $1462 = 0, $1468 = 0, $1473 = 0, $1477 = 0, $tib1_0_ph_i227 = 0, $1488 = 0, $tib1_0_lcssa_i230 = 0, $dimension_tib1_0_lcssa_i231 = 0, $1493 = 0, $1495 = 0, $dimension_tib1_029_i233 = 0, $1498 = 0, $1499 = 0, $1502 = 0, $1504 = 0, $dimension_tib2_024_i235 = 0, $1507 = 0, $1508 = 0, $1511 = 0, $tib2_0_lcssa_in_i237 = 0, $dimension_tib2_0_lcssa_i238 = 0, $tib2_0_lcssa_i239 = 0, $tib1_121_i242 = 0, $i_0_i245 = 0, $1529 = 0, $1536 = 0, $1538 = 0, $1539 = 0, $1541 = 0, $1545 = 0, $1551 = 0, $1553 = 0, $_r0_sroa_0_0_load602 = 0, $1570 = 0, $1575 = 0, $1579 = 0, $tib1_0_ph_i185 = 0, $1590 = 0, $tib1_0_lcssa_i188 = 0, $dimension_tib1_0_lcssa_i189 = 0, $1595 = 0, $1597 = 0, $dimension_tib1_029_i191 = 0, $1600 = 0, $1601 = 0, $1604 = 0, $1606 = 0, $dimension_tib2_024_i193 = 0, $1609 = 0, $1610 = 0, $1613 = 0, $tib2_0_lcssa_in_i195 = 0, $dimension_tib2_0_lcssa_i196 = 0, $tib2_0_lcssa_i197 = 0, $tib1_121_i200 = 0, $i_0_i203 = 0, $1631 = 0, $1638 = 0, $1640 = 0, $1641 = 0, $1643 = 0, $1647 = 0, $1653 = 0, $1655 = 0, $_r2_sroa_0_0_load = 0, $1666 = 0, $1668 = 0, $1684 = 0, $1689 = 0, $1693 = 0, $tib1_0_ph_i = 0, $1704 = 0, $tib1_0_lcssa_i = 0, $dimension_tib1_0_lcssa_i = 0, $1709 = 0, $1711 = 0, $dimension_tib1_029_i = 0, $1714 = 0, $1715 = 0, $1718 = 0, $1720 = 0, $dimension_tib2_024_i = 0, $1723 = 0, $1724 = 0, $1727 = 0, $tib2_0_lcssa_in_i = 0, $dimension_tib2_0_lcssa_i = 0, $tib2_0_lcssa_i = 0, $tib1_121_i = 0, $i_0_i = 0, $1745 = 0, label = 0, __stackBase__ = 0, setjmpLabel = 0, setjmpTable = 0; + __stackBase__ = STACKTOP; + STACKTOP = STACKTOP + 536 | 0; + label = 1; + setjmpLabel = 0; + setjmpTable = STACKTOP; + STACKTOP = STACKTOP + 168 | 0; + HEAP32[setjmpTable >> 2] = 0; + while (1) switch (label | 0) { + case 1: + $_r0_sroa_1 = __stackBase__ | 0; + $_r3_sroa_1 = __stackBase__ + 8 | 0; + $local_env_w4567aaac23b1b6 = __stackBase__ + 16 | 0; + $local_env_w4567aaac23b1c16 = __stackBase__ + 56 | 0; + $local_env_w4567aaac23b1c22 = __stackBase__ + 96 | 0; + $local_env_w4567aaac23b1c24 = __stackBase__ + 136 | 0; + $local_env_w4567aaac23b1c26 = __stackBase__ + 176 | 0; + $local_env_w4567aaac23b1c29 = __stackBase__ + 216 | 0; + $local_env_w4567aaac23b1c31 = __stackBase__ + 256 | 0; + $local_env_w4567aaac23b1c35 = __stackBase__ + 296 | 0; + $local_env_w4567aaac23b1c40 = __stackBase__ + 336 | 0; + $local_env_w4567aaac23b1c42 = __stackBase__ + 376 | 0; + $local_env_w4567aaac23b1c44 = __stackBase__ + 416 | 0; + $local_env_w4567aaac23b1c48 = __stackBase__ + 456 | 0; + $local_env_w4567aaac23b1c50 = __stackBase__ + 496 | 0; + if ((HEAP32[(98772 | 0) >> 2] | 0 | 0) == 0) { + label = 2; + break; + } else { + label = 3; + break; + } + case 2: + invoke_v(702); + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + label = 3; + break; + case 3: + $_r5_sroa_0 = $n1; + $5 = invoke_ii(556, 709 | 0) | 0; + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + $_r0_sroa_0 = $5; + if ((HEAP32[(98772 | 0) >> 2] | 0 | 0) == 0) { + label = 4; + break; + } else { + label = 5; + break; + } + case 4: + invoke_v(702); + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + label = 5; + break; + case 5: + $_r1_sroa_0 = HEAP32[136048 >> 2] | 0; + invoke_ii(202, $_r1_sroa_0 | 0) | 0; + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + if ((HEAP32[(105500 | 0) >> 2] | 0 | 0) == 0) { + label = 6; + break; + } else { + label = 7; + break; + } + case 6: + invoke_v(30); + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + label = 7; + break; + case 7: + $16 = invoke_i(70) | 0; + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + $18 = invoke_iii(364, $16 | 0, 0 | 0) | 0; + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + $19 = $local_env_w4567aaac23b1b6; + $21 = $18 + 16 | 0; + _memcpy($19 | 0, HEAP32[$21 >> 2] | 0 | 0, 40); + $25 = _saveSetjmp(HEAP32[$21 >> 2] | 0 | 0, label, setjmpTable) | 0; + label = 413; + break; + case 413: + if (($25 | 0) == 0) { + label = 8; + break; + } else { + label = 11; + break; + } + case 8: + if ((HEAP32[(98772 | 0) >> 2] | 0 | 0) == 0) { + label = 9; + break; + } else { + label = 10; + break; + } + case 9: + invoke_v(702); + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + label = 10; + break; + case 10: + $_r0_sroa_0 = HEAP32[140056 >> 2] | 0; + $40 = invoke_iii(HEAP32[((HEAP32[($_r0_sroa_0 | 0) >> 2] | 0) + 160 | 0) >> 2] | 0 | 0, $_r0_sroa_0 | 0, $_r5_sroa_0 | 0) | 0; + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + $_r0_sroa_0 = $40; + $_r0_sroa_0 = $_r0_sroa_0; + _memcpy(HEAP32[$21 >> 2] | 0 | 0, $19 | 0, 40); + if (($_r0_sroa_0 | 0) == 0) { + label = 32; + break; + } else { + label = 28; + break; + } + case 11: + _memcpy(HEAP32[$21 >> 2] | 0 | 0, $19 | 0, 40); + if ((HEAP32[(107740 | 0) >> 2] | 0 | 0) == 0) { + label = 12; + break; + } else { + label = 13; + break; + } + case 12: + invoke_v(374); + if ((__THREW__ | 0) != 0 & (threwValue | 0) != 0) { + setjmpLabel = _testSetjmp(HEAP32[__THREW__ >> 2] | 0, setjmpTable) | 0; + if ((setjmpLabel | 0) > 0) { + label = -1111; + break; + } else return 0 | 0; + } + __THREW__ = threwValue = 0; + label = 13; + break; + case 13: + $52 = HEAP32[($18 + 20 | 0) >> 2] | 0; + if (($52 | 0) == 0) { + label = 27; + break; + } else { + label = 14; + break; + } + case 14: + $57 = HEAP32[$52 >> 2] | 0; + $61 = HEAP32[((HEAP32[137616 >> 2] | 0) + 8 | 0) >> 2] | 0; + if (($57 | 0) == 82712) { + label = 15; + break; + } else { + $tib1_0_ph_i543 = $57; + label = 16; + break; + } + case 15: + $tib1_0_ph_i543 = HEAP32[((HEAP32[($52 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; + label = 16; + break; + case 16: + $72 = HEAP32[($tib1_0_ph_i543 + 56 | 0) >> 2] | 0; + if (($72 | 0) == 0) { + $dimension_tib1_0_lcssa_i547 = 0; + $tib1_0_lcssa_i546 = $tib1_0_ph_i543; + label = 18; + break; + } else { + $dimension_tib1_029_i549 = 0; + $79 = $72; + label = 19; + break; + } + case 17: + $dimension_tib1_0_lcssa_i547 = $83; + $tib1_0_lcssa_i546 = $82; + label = 18; + break; + case 18: |