webruby 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/webruby +36 -0
- data/driver/driver.c +50 -0
- data/driver/main.c +40 -0
- data/lib/webruby/app.rb +13 -0
- data/lib/webruby/config.rb +61 -0
- data/lib/webruby/environment.rb +32 -0
- data/lib/webruby/rake/files.rake +66 -0
- data/lib/webruby/rake/general.rake +22 -0
- data/lib/webruby/rake/mruby.rake +44 -0
- data/lib/webruby/utility.rb +132 -0
- data/lib/webruby.rb +10 -0
- data/modules/emscripten/AUTHORS +89 -0
- data/modules/emscripten/LICENSE +68 -0
- data/modules/emscripten/README.markdown +14 -0
- data/modules/emscripten/cmake/Platform/Emscripten.cmake +61 -0
- data/modules/emscripten/cmake/Platform/Emscripten_unix.cmake +24 -0
- data/modules/emscripten/em++ +12 -0
- data/modules/emscripten/em++.bat +2 -0
- data/modules/emscripten/em-config +24 -0
- data/modules/emscripten/em-config.bat +2 -0
- data/modules/emscripten/emar +24 -0
- data/modules/emscripten/emar.bat +2 -0
- data/modules/emscripten/emcc +1744 -0
- data/modules/emscripten/emcc.bat +2 -0
- data/modules/emscripten/emcc.py +5 -0
- data/modules/emscripten/emconfigure +27 -0
- data/modules/emscripten/emconfigure.bat +2 -0
- data/modules/emscripten/emlibtool +11 -0
- data/modules/emscripten/emlibtool.bat +2 -0
- data/modules/emscripten/emlink.py +293 -0
- data/modules/emscripten/emmake +29 -0
- data/modules/emscripten/emmake.bat +2 -0
- data/modules/emscripten/emranlib +9 -0
- data/modules/emscripten/emranlib.bat +2 -0
- data/modules/emscripten/emscons +20 -0
- data/modules/emscripten/emscripten.py +835 -0
- data/modules/emscripten/patches/README +4 -0
- data/modules/emscripten/patches/series +2 -0
- data/modules/emscripten/scons-tools/closure.py +28 -0
- data/modules/emscripten/scons-tools/emscripten.py +359 -0
- data/modules/emscripten/scons-tools/llvm.py +33 -0
- data/modules/emscripten/src/analyzer.js +1695 -0
- data/modules/emscripten/src/compiler.html +48 -0
- data/modules/emscripten/src/compiler.js +298 -0
- data/modules/emscripten/src/corruptionCheck.js +98 -0
- data/modules/emscripten/src/determinstic.js +20 -0
- data/modules/emscripten/src/embind/embind.js +1677 -0
- data/modules/emscripten/src/embind/emval.js +283 -0
- data/modules/emscripten/src/experimental/allow_loopvars_from_memsetcpy_inasm.diff +97 -0
- data/modules/emscripten/src/experimental/batching.diff +44 -0
- data/modules/emscripten/src/experimental/functypeopt.diff +113 -0
- data/modules/emscripten/src/experimental/multiple_heaps.diff +175 -0
- data/modules/emscripten/src/experimental/noncallgraphprofiling.diff +197 -0
- data/modules/emscripten/src/experimental/optimize_memcpy_for_ta1.diff +124 -0
- data/modules/emscripten/src/experimental/remove__label__s.diff +140 -0
- data/modules/emscripten/src/experimental/renderer_cache_hash.diff +99 -0
- data/modules/emscripten/src/experimental/sdl_key_forwarding.diff +57 -0
- data/modules/emscripten/src/experimental/simplifyGeneratedFunctionsDetection.diff +336 -0
- data/modules/emscripten/src/experimental/stringCache.diff +147 -0
- data/modules/emscripten/src/fastLong.js +299 -0
- data/modules/emscripten/src/framework.js +257 -0
- data/modules/emscripten/src/gl-matrix.js +1952 -0
- data/modules/emscripten/src/headless.js +904 -0
- data/modules/emscripten/src/intertyper.js +1050 -0
- data/modules/emscripten/src/jsifier.js +1827 -0
- data/modules/emscripten/src/library.js +8270 -0
- data/modules/emscripten/src/library_browser.js +911 -0
- data/modules/emscripten/src/library_egl.js +491 -0
- data/modules/emscripten/src/library_gc.js +236 -0
- data/modules/emscripten/src/library_gl.js +4452 -0
- data/modules/emscripten/src/library_glfw.js +576 -0
- data/modules/emscripten/src/library_glut.js +449 -0
- data/modules/emscripten/src/library_jansson.js +320 -0
- data/modules/emscripten/src/library_openal.js +602 -0
- data/modules/emscripten/src/library_sdl.js +2024 -0
- data/modules/emscripten/src/library_strtok_r.c +97 -0
- data/modules/emscripten/src/library_xlib.js +23 -0
- data/modules/emscripten/src/long.js +1609 -0
- data/modules/emscripten/src/modules.js +491 -0
- data/modules/emscripten/src/parseTools.js +2474 -0
- data/modules/emscripten/src/postamble.js +170 -0
- data/modules/emscripten/src/postamble_sharedlib.js +16 -0
- data/modules/emscripten/src/preamble.js +914 -0
- data/modules/emscripten/src/preamble_sharedlib.js +25 -0
- data/modules/emscripten/src/relooper/README.markdown +14 -0
- data/modules/emscripten/src/relooper/Relooper.cpp +1236 -0
- data/modules/emscripten/src/relooper/Relooper.h +250 -0
- data/modules/emscripten/src/relooper/doit.sh +70 -0
- data/modules/emscripten/src/relooper/emscripten/glue.js +57 -0
- data/modules/emscripten/src/relooper/emscripten/test.js +44 -0
- data/modules/emscripten/src/relooper/fuzzer.py +116 -0
- data/modules/emscripten/src/relooper/ministring.h +35 -0
- data/modules/emscripten/src/relooper/paper.pdf +0 -0
- data/modules/emscripten/src/relooper/test.cpp +262 -0
- data/modules/emscripten/src/relooper/test.txt +155 -0
- data/modules/emscripten/src/relooper/test2.c +44 -0
- data/modules/emscripten/src/relooper/test2.txt +12 -0
- data/modules/emscripten/src/relooper/test3.c +42 -0
- data/modules/emscripten/src/relooper/test3.txt +27 -0
- data/modules/emscripten/src/relooper/test4.cpp +40 -0
- data/modules/emscripten/src/relooper/test4.txt +23 -0
- data/modules/emscripten/src/relooper/test5.cpp +40 -0
- data/modules/emscripten/src/relooper/test5.txt +32 -0
- data/modules/emscripten/src/relooper/test6.cpp +31 -0
- data/modules/emscripten/src/relooper/test6.txt +12 -0
- data/modules/emscripten/src/relooper/test_dead.cpp +28 -0
- data/modules/emscripten/src/relooper/test_dead.txt +9 -0
- data/modules/emscripten/src/relooper/test_debug.cpp +30 -0
- data/modules/emscripten/src/relooper/test_debug.txt +128 -0
- data/modules/emscripten/src/relooper/test_fuzz1.cpp +52 -0
- data/modules/emscripten/src/relooper/test_fuzz1.txt +32 -0
- data/modules/emscripten/src/relooper/test_fuzz2.cpp +34 -0
- data/modules/emscripten/src/relooper/test_fuzz2.txt +13 -0
- data/modules/emscripten/src/relooper/test_fuzz3.cpp +36 -0
- data/modules/emscripten/src/relooper/test_fuzz3.txt +9 -0
- data/modules/emscripten/src/relooper/test_fuzz4.cpp +38 -0
- data/modules/emscripten/src/relooper/test_fuzz4.txt +19 -0
- data/modules/emscripten/src/relooper/test_fuzz5.cpp +57 -0
- data/modules/emscripten/src/relooper/test_fuzz5.txt +52 -0
- data/modules/emscripten/src/relooper/test_fuzz6.cpp +322 -0
- data/modules/emscripten/src/relooper/test_fuzz6.txt +108 -0
- data/modules/emscripten/src/relooper/test_inf.cpp +813 -0
- data/modules/emscripten/src/relooper/test_inf.txt +385 -0
- data/modules/emscripten/src/relooper/testit.sh +62 -0
- data/modules/emscripten/src/relooper/updateit.sh +17 -0
- data/modules/emscripten/src/relooper.js +11516 -0
- data/modules/emscripten/src/relooper.js.raw.js +11511 -0
- data/modules/emscripten/src/runtime.js +546 -0
- data/modules/emscripten/src/settings.js +1284 -0
- data/modules/emscripten/src/shell.html +92 -0
- data/modules/emscripten/src/shell.js +153 -0
- data/modules/emscripten/src/shell_sharedlib.js +12 -0
- data/modules/emscripten/src/socket.io.js +3870 -0
- data/modules/emscripten/src/utility.js +379 -0
- data/modules/emscripten/src/wrtcp.js +821 -0
- data/modules/emscripten/system/include/AL/al.h +172 -0
- data/modules/emscripten/system/include/AL/alc.h +84 -0
- data/modules/emscripten/system/include/EGL/egl.h +329 -0
- data/modules/emscripten/system/include/EGL/eglext.h +398 -0
- data/modules/emscripten/system/include/EGL/eglplatform.h +141 -0
- data/modules/emscripten/system/include/GL/freeglut_std.h +628 -0
- data/modules/emscripten/system/include/GL/gl.h +2241 -0
- data/modules/emscripten/system/include/GL/glew.h +6 -0
- data/modules/emscripten/system/include/GL/glext.h +11127 -0
- data/modules/emscripten/system/include/GL/glfw.h +518 -0
- data/modules/emscripten/system/include/GL/glu.h +353 -0
- data/modules/emscripten/system/include/GL/glut.h +21 -0
- data/modules/emscripten/system/include/GLES/gl.h +770 -0
- data/modules/emscripten/system/include/GLES/glext.h +1278 -0
- data/modules/emscripten/system/include/GLES/glplatform.h +30 -0
- data/modules/emscripten/system/include/GLES2/gl2.h +621 -0
- data/modules/emscripten/system/include/GLES2/gl2ext.h +803 -0
- data/modules/emscripten/system/include/GLES2/gl2platform.h +30 -0
- data/modules/emscripten/system/include/KHR/khrplatform.h +277 -0
- data/modules/emscripten/system/include/SDL/COPYING +19 -0
- data/modules/emscripten/system/include/SDL/SDL.h +162 -0
- data/modules/emscripten/system/include/SDL/SDL_assert.h +241 -0
- data/modules/emscripten/system/include/SDL/SDL_atomic.h +318 -0
- data/modules/emscripten/system/include/SDL/SDL_audio.h +509 -0
- data/modules/emscripten/system/include/SDL/SDL_blendmode.h +60 -0
- data/modules/emscripten/system/include/SDL/SDL_clipboard.h +75 -0
- data/modules/emscripten/system/include/SDL/SDL_compat.h +365 -0
- data/modules/emscripten/system/include/SDL/SDL_config.h +48 -0
- data/modules/emscripten/system/include/SDL/SDL_config.h.in +297 -0
- data/modules/emscripten/system/include/SDL/SDL_config_android.h +133 -0
- data/modules/emscripten/system/include/SDL/SDL_config_iphoneos.h +148 -0
- data/modules/emscripten/system/include/SDL/SDL_config_macosx.h +172 -0
- data/modules/emscripten/system/include/SDL/SDL_config_minimal.h +74 -0
- data/modules/emscripten/system/include/SDL/SDL_config_nintendods.h +129 -0
- data/modules/emscripten/system/include/SDL/SDL_config_pandora.h +125 -0
- data/modules/emscripten/system/include/SDL/SDL_config_windows.h +207 -0
- data/modules/emscripten/system/include/SDL/SDL_config_wiz.h +119 -0
- data/modules/emscripten/system/include/SDL/SDL_copying.h +20 -0
- data/modules/emscripten/system/include/SDL/SDL_cpuinfo.h +150 -0
- data/modules/emscripten/system/include/SDL/SDL_endian.h +248 -0
- data/modules/emscripten/system/include/SDL/SDL_error.h +77 -0
- data/modules/emscripten/system/include/SDL/SDL_events.h +639 -0
- data/modules/emscripten/system/include/SDL/SDL_gesture.h +91 -0
- data/modules/emscripten/system/include/SDL/SDL_gfxPrimitives.h +246 -0
- data/modules/emscripten/system/include/SDL/SDL_haptic.h +1200 -0
- data/modules/emscripten/system/include/SDL/SDL_hints.h +206 -0
- data/modules/emscripten/system/include/SDL/SDL_image.h +138 -0
- data/modules/emscripten/system/include/SDL/SDL_input.h +87 -0
- data/modules/emscripten/system/include/SDL/SDL_joystick.h +208 -0
- data/modules/emscripten/system/include/SDL/SDL_keyboard.h +169 -0
- data/modules/emscripten/system/include/SDL/SDL_keycode.h +344 -0
- data/modules/emscripten/system/include/SDL/SDL_loadso.h +85 -0
- data/modules/emscripten/system/include/SDL/SDL_log.h +211 -0
- data/modules/emscripten/system/include/SDL/SDL_main.h +98 -0
- data/modules/emscripten/system/include/SDL/SDL_mixer.h +634 -0
- data/modules/emscripten/system/include/SDL/SDL_mouse.h +213 -0
- data/modules/emscripten/system/include/SDL/SDL_mutex.h +248 -0
- data/modules/emscripten/system/include/SDL/SDL_name.h +11 -0
- data/modules/emscripten/system/include/SDL/SDL_opengl.h +11116 -0
- data/modules/emscripten/system/include/SDL/SDL_opengles.h +38 -0
- data/modules/emscripten/system/include/SDL/SDL_opengles2.h +38 -0
- data/modules/emscripten/system/include/SDL/SDL_pixels.h +423 -0
- data/modules/emscripten/system/include/SDL/SDL_platform.h +160 -0
- data/modules/emscripten/system/include/SDL/SDL_power.h +79 -0
- data/modules/emscripten/system/include/SDL/SDL_quit.h +58 -0
- data/modules/emscripten/system/include/SDL/SDL_rect.h +136 -0
- data/modules/emscripten/system/include/SDL/SDL_render.h +615 -0
- data/modules/emscripten/system/include/SDL/SDL_revision.h +2 -0
- data/modules/emscripten/system/include/SDL/SDL_revision.h.orig +2 -0
- data/modules/emscripten/system/include/SDL/SDL_rotozoom.h +123 -0
- data/modules/emscripten/system/include/SDL/SDL_rwops.h +220 -0
- data/modules/emscripten/system/include/SDL/SDL_scancode.h +398 -0
- data/modules/emscripten/system/include/SDL/SDL_shape.h +147 -0
- data/modules/emscripten/system/include/SDL/SDL_stdinc.h +764 -0
- data/modules/emscripten/system/include/SDL/SDL_surface.h +499 -0
- data/modules/emscripten/system/include/SDL/SDL_syswm.h +241 -0
- data/modules/emscripten/system/include/SDL/SDL_thread.h +182 -0
- data/modules/emscripten/system/include/SDL/SDL_timer.h +108 -0
- data/modules/emscripten/system/include/SDL/SDL_touch.h +124 -0
- data/modules/emscripten/system/include/SDL/SDL_ttf.h +249 -0
- data/modules/emscripten/system/include/SDL/SDL_types.h +29 -0
- data/modules/emscripten/system/include/SDL/SDL_version.h +166 -0
- data/modules/emscripten/system/include/SDL/SDL_video.h +820 -0
- data/modules/emscripten/system/include/SDL/begin_code.h +135 -0
- data/modules/emscripten/system/include/SDL/close_code.h +37 -0
- data/modules/emscripten/system/include/X11/X.h +717 -0
- data/modules/emscripten/system/include/X11/Xatom.h +79 -0
- data/modules/emscripten/system/include/X11/Xfuncproto.h +127 -0
- data/modules/emscripten/system/include/X11/Xlib.h +4023 -0
- data/modules/emscripten/system/include/X11/Xosdefs.h +116 -0
- data/modules/emscripten/system/include/X11/Xutil.h +826 -0
- data/modules/emscripten/system/include/X11/keysym.h +73 -0
- data/modules/emscripten/system/include/X11/keysymdef.h +2389 -0
- data/modules/emscripten/system/include/bsd/float.h +91 -0
- data/modules/emscripten/system/include/bsd/readme.txt +2 -0
- data/modules/emscripten/system/include/bsd/sys/mman.h +180 -0
- data/modules/emscripten/system/include/bsd/sys/utsname.h +70 -0
- data/modules/emscripten/system/include/dlfcn.h +31 -0
- data/modules/emscripten/system/include/emscripten/bind.h +1210 -0
- data/modules/emscripten/system/include/emscripten/emscripten.h +388 -0
- data/modules/emscripten/system/include/emscripten/val.h +311 -0
- data/modules/emscripten/system/include/emscripten/wire.h +393 -0
- data/modules/emscripten/system/include/err.h +95 -0
- data/modules/emscripten/system/include/execinfo.h +44 -0
- data/modules/emscripten/system/include/features.h +3 -0
- data/modules/emscripten/system/include/gc.h +70 -0
- data/modules/emscripten/system/include/gfx/png.h +3798 -0
- data/modules/emscripten/system/include/gfx/pngconf.h +1665 -0
- data/modules/emscripten/system/include/gfx/tiff.h +654 -0
- data/modules/emscripten/system/include/gfx/tiffconf.h +104 -0
- data/modules/emscripten/system/include/gfx/tiffio.h +526 -0
- data/modules/emscripten/system/include/gfx/tiffvers.h +9 -0
- data/modules/emscripten/system/include/jansson.h +323 -0
- data/modules/emscripten/system/include/jansson_config.h +54 -0
- data/modules/emscripten/system/include/libc/_ansi.h +135 -0
- data/modules/emscripten/system/include/libc/_syslist.h +40 -0
- data/modules/emscripten/system/include/libc/alloca.h +21 -0
- data/modules/emscripten/system/include/libc/ar.h +69 -0
- data/modules/emscripten/system/include/libc/argz.h +33 -0
- data/modules/emscripten/system/include/libc/assert.h +46 -0
- data/modules/emscripten/system/include/libc/complex.h +124 -0
- data/modules/emscripten/system/include/libc/ctype.h +196 -0
- data/modules/emscripten/system/include/libc/dirent.h +16 -0
- data/modules/emscripten/system/include/libc/endian.h +3 -0
- data/modules/emscripten/system/include/libc/envlock.h +15 -0
- data/modules/emscripten/system/include/libc/envz.h +16 -0
- data/modules/emscripten/system/include/libc/errno.h +11 -0
- data/modules/emscripten/system/include/libc/fastmath.h +13 -0
- data/modules/emscripten/system/include/libc/fcntl.h +1 -0
- data/modules/emscripten/system/include/libc/fnmatch.h +55 -0
- data/modules/emscripten/system/include/libc/getopt.h +196 -0
- data/modules/emscripten/system/include/libc/glob.h +89 -0
- data/modules/emscripten/system/include/libc/grp.h +94 -0
- data/modules/emscripten/system/include/libc/iconv.h +62 -0
- data/modules/emscripten/system/include/libc/ieeefp.h +256 -0
- data/modules/emscripten/system/include/libc/ifaddrs.h +64 -0
- data/modules/emscripten/system/include/libc/inttypes.h +290 -0
- data/modules/emscripten/system/include/libc/iso646.h +43 -0
- data/modules/emscripten/system/include/libc/langinfo.h +316 -0
- data/modules/emscripten/system/include/libc/libgen.h +23 -0
- data/modules/emscripten/system/include/libc/limits.h +155 -0
- data/modules/emscripten/system/include/libc/locale.h +80 -0
- data/modules/emscripten/system/include/libc/machine/_default_types.h +121 -0
- data/modules/emscripten/system/include/libc/machine/_types.h +8 -0
- data/modules/emscripten/system/include/libc/machine/ansi.h +1 -0
- data/modules/emscripten/system/include/libc/machine/endian.h +31 -0
- data/modules/emscripten/system/include/libc/machine/fastmath.h +100 -0
- data/modules/emscripten/system/include/libc/machine/ieeefp.h +376 -0
- data/modules/emscripten/system/include/libc/machine/malloc.h +8 -0
- data/modules/emscripten/system/include/libc/machine/param.h +1 -0
- data/modules/emscripten/system/include/libc/machine/setjmp-dj.h +43 -0
- data/modules/emscripten/system/include/libc/machine/setjmp.h +361 -0
- data/modules/emscripten/system/include/libc/machine/stdlib.h +8 -0
- data/modules/emscripten/system/include/libc/machine/termios.h +1 -0
- data/modules/emscripten/system/include/libc/machine/time.h +19 -0
- data/modules/emscripten/system/include/libc/machine/types.h +30 -0
- data/modules/emscripten/system/include/libc/malloc.h +169 -0
- data/modules/emscripten/system/include/libc/math.h +594 -0
- data/modules/emscripten/system/include/libc/newlib.h +2 -0
- data/modules/emscripten/system/include/libc/paths.h +7 -0
- data/modules/emscripten/system/include/libc/process.h +44 -0
- data/modules/emscripten/system/include/libc/pthread.h +362 -0
- data/modules/emscripten/system/include/libc/pwd.h +78 -0
- data/modules/emscripten/system/include/libc/readme.txt +3 -0
- data/modules/emscripten/system/include/libc/reent.h +183 -0
- data/modules/emscripten/system/include/libc/regdef.h +7 -0
- data/modules/emscripten/system/include/libc/regex.h +102 -0
- data/modules/emscripten/system/include/libc/sched.h +97 -0
- data/modules/emscripten/system/include/libc/search.h +59 -0
- data/modules/emscripten/system/include/libc/setjmp.h +20 -0
- data/modules/emscripten/system/include/libc/signal.h +30 -0
- data/modules/emscripten/system/include/libc/stdarg.h +50 -0
- data/modules/emscripten/system/include/libc/stddef.h +64 -0
- data/modules/emscripten/system/include/libc/stdint.h +493 -0
- data/modules/emscripten/system/include/libc/stdio.h +694 -0
- data/modules/emscripten/system/include/libc/stdlib.h +230 -0
- data/modules/emscripten/system/include/libc/string.h +105 -0
- data/modules/emscripten/system/include/libc/strings.h +35 -0
- data/modules/emscripten/system/include/libc/sys/_default_fcntl.h +223 -0
- data/modules/emscripten/system/include/libc/sys/_types.h +93 -0
- data/modules/emscripten/system/include/libc/sys/cdefs.h +123 -0
- data/modules/emscripten/system/include/libc/sys/config.h +255 -0
- data/modules/emscripten/system/include/libc/sys/custom_file.h +2 -0
- data/modules/emscripten/system/include/libc/sys/dir.h +10 -0
- data/modules/emscripten/system/include/libc/sys/dirent.h +58 -0
- data/modules/emscripten/system/include/libc/sys/errno.h +190 -0
- data/modules/emscripten/system/include/libc/sys/fcntl.h +4 -0
- data/modules/emscripten/system/include/libc/sys/features.h +212 -0
- data/modules/emscripten/system/include/libc/sys/file.h +2 -0
- data/modules/emscripten/system/include/libc/sys/iconvnls.h +77 -0
- data/modules/emscripten/system/include/libc/sys/lock.h +24 -0
- data/modules/emscripten/system/include/libc/sys/param.h +25 -0
- data/modules/emscripten/system/include/libc/sys/queue.h +471 -0
- data/modules/emscripten/system/include/libc/sys/reent.h +843 -0
- data/modules/emscripten/system/include/libc/sys/resource.h +59 -0
- data/modules/emscripten/system/include/libc/sys/sched.h +67 -0
- data/modules/emscripten/system/include/libc/sys/signal.h +314 -0
- data/modules/emscripten/system/include/libc/sys/stat.h +222 -0
- data/modules/emscripten/system/include/libc/sys/stdio.h +27 -0
- data/modules/emscripten/system/include/libc/sys/string.h +2 -0
- data/modules/emscripten/system/include/libc/sys/syslimits.h +65 -0
- data/modules/emscripten/system/include/libc/sys/termios.h +280 -0
- data/modules/emscripten/system/include/libc/sys/time.h +85 -0
- data/modules/emscripten/system/include/libc/sys/timeb.h +39 -0
- data/modules/emscripten/system/include/libc/sys/times.h +28 -0
- data/modules/emscripten/system/include/libc/sys/ttydefaults.h +97 -0
- data/modules/emscripten/system/include/libc/sys/types.h +481 -0
- data/modules/emscripten/system/include/libc/sys/unistd.h +514 -0
- data/modules/emscripten/system/include/libc/sys/utime.h +26 -0
- data/modules/emscripten/system/include/libc/sys/wait.h +40 -0
- data/modules/emscripten/system/include/libc/tar.h +39 -0
- data/modules/emscripten/system/include/libc/termios.h +7 -0
- data/modules/emscripten/system/include/libc/time.h +273 -0
- data/modules/emscripten/system/include/libc/unctrl.h +46 -0
- data/modules/emscripten/system/include/libc/unistd.h +6 -0
- data/modules/emscripten/system/include/libc/utime.h +12 -0
- data/modules/emscripten/system/include/libc/utmp.h +8 -0
- data/modules/emscripten/system/include/libc/wchar.h +194 -0
- data/modules/emscripten/system/include/libc/wctype.h +47 -0
- data/modules/emscripten/system/include/libc/wordexp.h +53 -0
- data/modules/emscripten/system/include/libcxx/CREDITS.TXT +91 -0
- data/modules/emscripten/system/include/libcxx/LICENSE.txt +76 -0
- data/modules/emscripten/system/include/libcxx/__bit_reference +1268 -0
- data/modules/emscripten/system/include/libcxx/__config +485 -0
- data/modules/emscripten/system/include/libcxx/__debug +193 -0
- data/modules/emscripten/system/include/libcxx/__functional_03 +2130 -0
- data/modules/emscripten/system/include/libcxx/__functional_base +437 -0
- data/modules/emscripten/system/include/libcxx/__functional_base_03 +1087 -0
- data/modules/emscripten/system/include/libcxx/__hash_table +1945 -0
- data/modules/emscripten/system/include/libcxx/__locale +1435 -0
- data/modules/emscripten/system/include/libcxx/__mutex_base +438 -0
- data/modules/emscripten/system/include/libcxx/__split_buffer +654 -0
- data/modules/emscripten/system/include/libcxx/__sso_allocator +77 -0
- data/modules/emscripten/system/include/libcxx/__std_stream +317 -0
- data/modules/emscripten/system/include/libcxx/__tree +2293 -0
- data/modules/emscripten/system/include/libcxx/__tuple +305 -0
- data/modules/emscripten/system/include/libcxx/__tuple_03 +27 -0
- data/modules/emscripten/system/include/libcxx/__undef_min_max +19 -0
- data/modules/emscripten/system/include/libcxx/algorithm +5458 -0
- data/modules/emscripten/system/include/libcxx/array +341 -0
- data/modules/emscripten/system/include/libcxx/atomic +1521 -0
- data/modules/emscripten/system/include/libcxx/bitset +1081 -0
- data/modules/emscripten/system/include/libcxx/cassert +25 -0
- data/modules/emscripten/system/include/libcxx/ccomplex +29 -0
- data/modules/emscripten/system/include/libcxx/cctype +164 -0
- data/modules/emscripten/system/include/libcxx/cerrno +393 -0
- data/modules/emscripten/system/include/libcxx/cfenv +82 -0
- data/modules/emscripten/system/include/libcxx/cfloat +78 -0
- data/modules/emscripten/system/include/libcxx/chrono +898 -0
- data/modules/emscripten/system/include/libcxx/cinttypes +259 -0
- data/modules/emscripten/system/include/libcxx/ciso646 +25 -0
- data/modules/emscripten/system/include/libcxx/climits +48 -0
- data/modules/emscripten/system/include/libcxx/clocale +53 -0
- data/modules/emscripten/system/include/libcxx/cmath +1683 -0
- data/modules/emscripten/system/include/libcxx/codecvt +547 -0
- data/modules/emscripten/system/include/libcxx/complex +1526 -0
- data/modules/emscripten/system/include/libcxx/complex.h +35 -0
- data/modules/emscripten/system/include/libcxx/condition_variable +256 -0
- data/modules/emscripten/system/include/libcxx/csetjmp +52 -0
- data/modules/emscripten/system/include/libcxx/csignal +58 -0
- data/modules/emscripten/system/include/libcxx/cstdarg +48 -0
- data/modules/emscripten/system/include/libcxx/cstdbool +32 -0
- data/modules/emscripten/system/include/libcxx/cstddef +103 -0
- data/modules/emscripten/system/include/libcxx/cstdint +191 -0
- data/modules/emscripten/system/include/libcxx/cstdio +175 -0
- data/modules/emscripten/system/include/libcxx/cstdlib +172 -0
- data/modules/emscripten/system/include/libcxx/cstring +112 -0
- data/modules/emscripten/system/include/libcxx/ctgmath +29 -0
- data/modules/emscripten/system/include/libcxx/ctime +72 -0
- data/modules/emscripten/system/include/libcxx/cwchar +208 -0
- data/modules/emscripten/system/include/libcxx/cwctype +213 -0
- data/modules/emscripten/system/include/libcxx/deque +2846 -0
- data/modules/emscripten/system/include/libcxx/exception +250 -0
- data/modules/emscripten/system/include/libcxx/ext/__hash +46 -0
- data/modules/emscripten/system/include/libcxx/ext/hash_map +1003 -0
- data/modules/emscripten/system/include/libcxx/ext/hash_set +657 -0
- data/modules/emscripten/system/include/libcxx/forward_list +1636 -0
- data/modules/emscripten/system/include/libcxx/fstream +1415 -0
- data/modules/emscripten/system/include/libcxx/functional +2063 -0
- data/modules/emscripten/system/include/libcxx/future +2505 -0
- data/modules/emscripten/system/include/libcxx/initializer_list +105 -0
- data/modules/emscripten/system/include/libcxx/iomanip +504 -0
- data/modules/emscripten/system/include/libcxx/ios +988 -0
- data/modules/emscripten/system/include/libcxx/iosfwd +194 -0
- data/modules/emscripten/system/include/libcxx/iostream +60 -0
- data/modules/emscripten/system/include/libcxx/istream +1713 -0
- data/modules/emscripten/system/include/libcxx/iterator +1869 -0
- data/modules/emscripten/system/include/libcxx/limits +809 -0
- data/modules/emscripten/system/include/libcxx/list +2275 -0
- data/modules/emscripten/system/include/libcxx/locale +4591 -0
- data/modules/emscripten/system/include/libcxx/map +1924 -0
- data/modules/emscripten/system/include/libcxx/memory +5437 -0
- data/modules/emscripten/system/include/libcxx/mutex +566 -0
- data/modules/emscripten/system/include/libcxx/new +117 -0
- data/modules/emscripten/system/include/libcxx/numeric +197 -0
- data/modules/emscripten/system/include/libcxx/ostream +1286 -0
- data/modules/emscripten/system/include/libcxx/queue +717 -0
- data/modules/emscripten/system/include/libcxx/random +6750 -0
- data/modules/emscripten/system/include/libcxx/ratio +487 -0
- data/modules/emscripten/system/include/libcxx/readme.txt +1 -0
- data/modules/emscripten/system/include/libcxx/regex +6439 -0
- data/modules/emscripten/system/include/libcxx/scoped_allocator +578 -0
- data/modules/emscripten/system/include/libcxx/set +1025 -0
- data/modules/emscripten/system/include/libcxx/sstream +888 -0
- data/modules/emscripten/system/include/libcxx/stack +292 -0
- data/modules/emscripten/system/include/libcxx/stdexcept +162 -0
- data/modules/emscripten/system/include/libcxx/streambuf +564 -0
- data/modules/emscripten/system/include/libcxx/string +3987 -0
- data/modules/emscripten/system/include/libcxx/strstream +400 -0
- data/modules/emscripten/system/include/libcxx/support/solaris/floatingpoint.h +5 -0
- data/modules/emscripten/system/include/libcxx/support/solaris/wchar.h +38 -0
- data/modules/emscripten/system/include/libcxx/support/solaris/xlocale.h +146 -0
- data/modules/emscripten/system/include/libcxx/support/win32/limits_win32.h +79 -0
- data/modules/emscripten/system/include/libcxx/support/win32/locale_win32.h +116 -0
- data/modules/emscripten/system/include/libcxx/support/win32/math_win32.h +113 -0
- data/modules/emscripten/system/include/libcxx/support/win32/support.h +115 -0
- data/modules/emscripten/system/include/libcxx/system_error +636 -0
- data/modules/emscripten/system/include/libcxx/tgmath.h +29 -0
- data/modules/emscripten/system/include/libcxx/thread +459 -0
- data/modules/emscripten/system/include/libcxx/tuple +1092 -0
- data/modules/emscripten/system/include/libcxx/type_traits +3040 -0
- data/modules/emscripten/system/include/libcxx/typeindex +103 -0
- data/modules/emscripten/system/include/libcxx/typeinfo +124 -0
- data/modules/emscripten/system/include/libcxx/unordered_map +1864 -0
- data/modules/emscripten/system/include/libcxx/unordered_set +1144 -0
- data/modules/emscripten/system/include/libcxx/utility +583 -0
- data/modules/emscripten/system/include/libcxx/valarray +4779 -0
- data/modules/emscripten/system/include/libcxx/vector +3228 -0
- data/modules/emscripten/system/include/memory.h +10 -0
- data/modules/emscripten/system/include/mntent.h +23 -0
- data/modules/emscripten/system/include/net/arpa/inet.h +32 -0
- data/modules/emscripten/system/include/net/arpa/nameser.h +535 -0
- data/modules/emscripten/system/include/net/arpa/nameser_compat.h +187 -0
- data/modules/emscripten/system/include/net/if.h +87 -0
- data/modules/emscripten/system/include/net/netinet/in.h +166 -0
- data/modules/emscripten/system/include/net/netinet/tcp.h +246 -0
- data/modules/emscripten/system/include/net/resolv.h +389 -0
- data/modules/emscripten/system/include/netdb.h +94 -0
- data/modules/emscripten/system/include/nl_types.h +19 -0
- data/modules/emscripten/system/include/poll.h +3 -0
- data/modules/emscripten/system/include/pty.h +6 -0
- data/modules/emscripten/system/include/semaphore.h +31 -0
- data/modules/emscripten/system/include/spawn.h +105 -0
- data/modules/emscripten/system/include/stdbool.h +16 -0
- data/modules/emscripten/system/include/sys/bitypes.h +3 -0
- data/modules/emscripten/system/include/sys/io.h +14 -0
- data/modules/emscripten/system/include/sys/ioctl.h +26 -0
- data/modules/emscripten/system/include/sys/poll.h +31 -0
- data/modules/emscripten/system/include/sys/select.h +14 -0
- data/modules/emscripten/system/include/sys/socket.h +101 -0
- data/modules/emscripten/system/include/sys/socketvar.h +3 -0
- data/modules/emscripten/system/include/sys/statvfs.h +32 -0
- data/modules/emscripten/system/include/sys/sysctl.h +14 -0
- data/modules/emscripten/system/include/sys/uio.h +22 -0
- data/modules/emscripten/system/include/sys/un.h +66 -0
- data/modules/emscripten/system/include/sysexits.h +108 -0
- data/modules/emscripten/system/include/unwind.h +154 -0
- data/modules/emscripten/system/include/xlocale.h +47 -0
- data/modules/emscripten/system/include/zconf.h +428 -0
- data/modules/emscripten/system/include/zlib.h +1613 -0
- data/modules/emscripten/system/lib/compiler-rt/LICENSE.TXT +97 -0
- data/modules/emscripten/system/lib/compiler-rt/divdi3.c +47 -0
- data/modules/emscripten/system/lib/compiler-rt/int_endianness.h +116 -0
- data/modules/emscripten/system/lib/compiler-rt/int_lib.h +46 -0
- data/modules/emscripten/system/lib/compiler-rt/int_math.h +67 -0
- data/modules/emscripten/system/lib/compiler-rt/int_types.h +140 -0
- data/modules/emscripten/system/lib/compiler-rt/int_util.h +29 -0
- data/modules/emscripten/system/lib/compiler-rt/muldi3.c +56 -0
- data/modules/emscripten/system/lib/compiler-rt/readme.txt +20 -0
- data/modules/emscripten/system/lib/compiler-rt/udivdi3.c +36 -0
- data/modules/emscripten/system/lib/compiler-rt/udivmoddi4.c +251 -0
- data/modules/emscripten/system/lib/debugging.cpp +24 -0
- data/modules/emscripten/system/lib/dlmalloc.c +6299 -0
- data/modules/emscripten/system/lib/embind/bind.cpp +63 -0
- data/modules/emscripten/system/lib/libc/gen/err.c +49 -0
- data/modules/emscripten/system/lib/libc/gen/errx.c +49 -0
- data/modules/emscripten/system/lib/libc/gen/verr.c +58 -0
- data/modules/emscripten/system/lib/libc/gen/verrx.c +51 -0
- data/modules/emscripten/system/lib/libc/gen/vwarn.c +55 -0
- data/modules/emscripten/system/lib/libc/gen/vwarnx.c +48 -0
- data/modules/emscripten/system/lib/libc/gen/warn.c +49 -0
- data/modules/emscripten/system/lib/libc/gen/warnx.c +49 -0
- data/modules/emscripten/system/lib/libc/musl/COPYRIGHT +92 -0
- data/modules/emscripten/system/lib/libc/musl/readme.txt +1 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/alpha.h +125 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswalnum.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswalpha.c +14 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswblank.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswcntrl.c +10 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswctype.c +63 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswdigit.c +9 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswgraph.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswlower.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswprint.c +19 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswpunct.c +12 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswspace.c +19 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswupper.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswxdigit.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/nonspacing.h +62 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/punct.h +109 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/towctrans.c +268 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/wcswidth.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/wctrans.c +16 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/wcwidth.c +29 -0
- data/modules/emscripten/system/lib/libc/musl/src/ctype/wide.h +42 -0
- data/modules/emscripten/system/lib/libc/musl/src/internal/libc.c +22 -0
- data/modules/emscripten/system/lib/libc/musl/src/internal/libc.h +71 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/btowc.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/internal.c +38 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/internal.h +22 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mblen.c +17 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbrlen.c +18 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbrtowc.c +57 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsinit.c +17 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsnrtowcs.c +65 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsrtowcs.c +100 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbstowcs.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbtowc.c +53 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcrtomb.c +38 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcsnrtombs.c +52 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcsrtombs.c +58 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcstombs.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wctob.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wctomb.c +18 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcpcpy.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcpncpy.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscasecmp.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscasecmp_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscat.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcschr.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscmp.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscpy.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscspn.c +10 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsdup.c +11 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcslen.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncasecmp.c +9 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncasecmp_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncat.c +10 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncmp.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncpy.c +9 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsnlen.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcspbrk.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsrchr.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsspn.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsstr.c +108 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcstok.c +12 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wcswcs.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemchr.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemcmp.c +8 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemcpy.c +9 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemmove.c +12 -0
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemset.c +9 -0
- data/modules/emscripten/system/lib/libc/stdlib/getopt_long.c +511 -0
- data/modules/emscripten/system/lib/libc/stdlib/strtod.c +305 -0
- data/modules/emscripten/system/lib/libc.symbols +81 -0
- data/modules/emscripten/system/lib/libcextra.symbols +61 -0
- data/modules/emscripten/system/lib/libcxx/CREDITS.TXT +91 -0
- data/modules/emscripten/system/lib/libcxx/LICENSE.txt +76 -0
- data/modules/emscripten/system/lib/libcxx/algorithm.cpp +83 -0
- data/modules/emscripten/system/lib/libcxx/bind.cpp +30 -0
- data/modules/emscripten/system/lib/libcxx/chrono.cpp +132 -0
- data/modules/emscripten/system/lib/libcxx/condition_variable.cpp +81 -0
- data/modules/emscripten/system/lib/libcxx/debug.cpp +504 -0
- data/modules/emscripten/system/lib/libcxx/exception.cpp +226 -0
- data/modules/emscripten/system/lib/libcxx/future.cpp +285 -0
- data/modules/emscripten/system/lib/libcxx/hash.cpp +564 -0
- data/modules/emscripten/system/lib/libcxx/ios.cpp +455 -0
- data/modules/emscripten/system/lib/libcxx/iostream.cpp +68 -0
- data/modules/emscripten/system/lib/libcxx/locale.cpp +6093 -0
- data/modules/emscripten/system/lib/libcxx/memory.cpp +223 -0
- data/modules/emscripten/system/lib/libcxx/mutex.cpp +250 -0
- data/modules/emscripten/system/lib/libcxx/new.cpp +205 -0
- data/modules/emscripten/system/lib/libcxx/random.cpp +48 -0
- data/modules/emscripten/system/lib/libcxx/readme.txt +1 -0
- data/modules/emscripten/system/lib/libcxx/regex.cpp +325 -0
- data/modules/emscripten/system/lib/libcxx/stdexcept.cpp +196 -0
- data/modules/emscripten/system/lib/libcxx/string.cpp +687 -0
- data/modules/emscripten/system/lib/libcxx/strstream.cpp +329 -0
- data/modules/emscripten/system/lib/libcxx/support/solaris/README +4 -0
- data/modules/emscripten/system/lib/libcxx/support/solaris/mbsnrtowcs.inc +76 -0
- data/modules/emscripten/system/lib/libcxx/support/solaris/wcsnrtombs.inc +93 -0
- data/modules/emscripten/system/lib/libcxx/support/solaris/xlocale.c +245 -0
- data/modules/emscripten/system/lib/libcxx/support/win32/locale_win32.cpp +94 -0
- data/modules/emscripten/system/lib/libcxx/support/win32/support.cpp +70 -0
- data/modules/emscripten/system/lib/libcxx/symbols +2927 -0
- data/modules/emscripten/system/lib/libcxx/system_error.cpp +201 -0
- data/modules/emscripten/system/lib/libcxx/thread.cpp +208 -0
- data/modules/emscripten/system/lib/libcxx/typeinfo.cpp +60 -0
- data/modules/emscripten/system/lib/libcxx/utility.cpp +17 -0
- data/modules/emscripten/system/lib/libcxx/valarray.cpp +54 -0
- data/modules/emscripten/system/lib/libcxxabi/CREDITS.TXT +38 -0
- data/modules/emscripten/system/lib/libcxxabi/LICENSE.TXT +76 -0
- data/modules/emscripten/system/lib/libcxxabi/include/cxa_demangle.h +167 -0
- data/modules/emscripten/system/lib/libcxxabi/include/cxxabi.h +175 -0
- data/modules/emscripten/system/lib/libcxxabi/lib/buildit +99 -0
- data/modules/emscripten/system/lib/libcxxabi/readme.txt +1 -0
- data/modules/emscripten/system/lib/libcxxabi/src/abort_message.cpp +50 -0
- data/modules/emscripten/system/lib/libcxxabi/src/abort_message.h +33 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_aux_runtime.cpp +34 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_demangle.cpp +11036 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception.cpp +622 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception.hpp +123 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception_storage.cpp +91 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_guard.cpp +231 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_handlers.cpp +125 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_handlers.hpp +54 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_new_delete.cpp +242 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_personality.cpp +1055 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_unexpected.cpp +27 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_vector.cpp +367 -0
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_virtual.cpp +31 -0
- data/modules/emscripten/system/lib/libcxxabi/src/exception.cpp +41 -0
- data/modules/emscripten/system/lib/libcxxabi/src/fallback_malloc.ipp +174 -0
- data/modules/emscripten/system/lib/libcxxabi/src/private_typeinfo.cpp +1146 -0
- data/modules/emscripten/system/lib/libcxxabi/src/private_typeinfo.h +248 -0
- data/modules/emscripten/system/lib/libcxxabi/src/stdexcept.cpp +169 -0
- data/modules/emscripten/system/lib/libcxxabi/src/typeinfo.cpp +53 -0
- data/modules/emscripten/system/lib/libcxxabi/symbols +236 -0
- data/modules/emscripten/system/lib/sdl.cpp +13 -0
- data/modules/emscripten/system/lib/sdl.symbols +1 -0
- data/modules/emscripten/tests/hello_world.js +92 -0
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/CppHeaderParser.py +2347 -0
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/__init__.py +4 -0
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/doc/CppHeaderParser.html +657 -0
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/examples/SampleClass.h +147 -0
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/examples/readSampleClass.py +74 -0
- data/modules/emscripten/third_party/CppHeaderParser/PKG-INFO +249 -0
- data/modules/emscripten/third_party/CppHeaderParser/README.html +544 -0
- data/modules/emscripten/third_party/CppHeaderParser/README.txt +226 -0
- data/modules/emscripten/third_party/CppHeaderParser/setup.py +43 -0
- data/modules/emscripten/third_party/ansidecl.h +371 -0
- data/modules/emscripten/third_party/closure-compiler/COPYING +202 -0
- data/modules/emscripten/third_party/closure-compiler/README +292 -0
- data/modules/emscripten/third_party/closure-compiler/compiler.jar +0 -0
- data/modules/emscripten/third_party/closure-compiler/readme.txt +3 -0
- data/modules/emscripten/third_party/cp-demangle.h +161 -0
- data/modules/emscripten/third_party/demangle.h +549 -0
- data/modules/emscripten/third_party/demangler.py +49 -0
- data/modules/emscripten/third_party/gcc_demangler.c +4226 -0
- data/modules/emscripten/third_party/gcc_demangler.js +21282 -0
- data/modules/emscripten/third_party/jni/emjvm.cpp +133 -0
- data/modules/emscripten/third_party/jni/emjvm.h +8 -0
- data/modules/emscripten/third_party/jni/emjvm.js +185 -0
- data/modules/emscripten/third_party/jni/jni.h +1154 -0
- data/modules/emscripten/third_party/libiberty.h +634 -0
- data/modules/emscripten/third_party/lzma.js/README.markdown +37 -0
- data/modules/emscripten/third_party/lzma.js/doit.sh +37 -0
- data/modules/emscripten/third_party/lzma.js/lzip/AUTHORS +7 -0
- data/modules/emscripten/third_party/lzma.js/lzip/COPYING +676 -0
- data/modules/emscripten/third_party/lzma.js/lzip/ChangeLog +201 -0
- data/modules/emscripten/third_party/lzma.js/lzip/INSTALL +56 -0
- data/modules/emscripten/third_party/lzma.js/lzip/Makefile +160 -0
- data/modules/emscripten/third_party/lzma.js/lzip/Makefile.in +138 -0
- data/modules/emscripten/third_party/lzma.js/lzip/NEWS +22 -0
- data/modules/emscripten/third_party/lzma.js/lzip/README +77 -0
- data/modules/emscripten/third_party/lzma.js/lzip/arg_parser.cc +204 -0
- data/modules/emscripten/third_party/lzma.js/lzip/arg_parser.h +106 -0
- data/modules/emscripten/third_party/lzma.js/lzip/configure +192 -0
- data/modules/emscripten/third_party/lzma.js/lzip/decoder.cc +252 -0
- data/modules/emscripten/third_party/lzma.js/lzip/decoder.h +268 -0
- data/modules/emscripten/third_party/lzma.js/lzip/encoder.cc +643 -0
- data/modules/emscripten/third_party/lzma.js/lzip/encoder.h +582 -0
- data/modules/emscripten/third_party/lzma.js/lzip/fast_encoder.cc +378 -0
- data/modules/emscripten/third_party/lzma.js/lzip/fast_encoder.h +171 -0
- data/modules/emscripten/third_party/lzma.js/lzip/lzip.h +264 -0
- data/modules/emscripten/third_party/lzma.js/lzip/main.cc +545 -0
- data/modules/emscripten/third_party/lzma.js/lzma-decoder.js +27 -0
- data/modules/emscripten/third_party/lzma.js/lzma-full.js +27 -0
- data/modules/emscripten/third_party/lzma.js/native_test.sh +5 -0
- data/modules/emscripten/third_party/lzma.js/post.js +13 -0
- data/modules/emscripten/third_party/lzma.js/pre.js +13 -0
- data/modules/emscripten/third_party/lzma.js/test-decoder.js +39 -0
- data/modules/emscripten/third_party/lzma.js/test-full.html +9 -0
- data/modules/emscripten/third_party/lzma.js/test-full.js +78 -0
- data/modules/emscripten/third_party/ply/ANNOUNCE +40 -0
- data/modules/emscripten/third_party/ply/CHANGES +1093 -0
- data/modules/emscripten/third_party/ply/PKG-INFO +22 -0
- data/modules/emscripten/third_party/ply/README +271 -0
- data/modules/emscripten/third_party/ply/TODO +16 -0
- data/modules/emscripten/third_party/ply/doc/internal.html +874 -0
- data/modules/emscripten/third_party/ply/doc/makedoc.py +194 -0
- data/modules/emscripten/third_party/ply/doc/ply.html +3262 -0
- data/modules/emscripten/third_party/ply/example/BASIC/README +79 -0
- data/modules/emscripten/third_party/ply/example/BASIC/basic.py +71 -0
- data/modules/emscripten/third_party/ply/example/BASIC/basiclex.py +74 -0
- data/modules/emscripten/third_party/ply/example/BASIC/basiclog.py +79 -0
- data/modules/emscripten/third_party/ply/example/BASIC/basinterp.py +441 -0
- data/modules/emscripten/third_party/ply/example/BASIC/basparse.py +424 -0
- data/modules/emscripten/third_party/ply/example/BASIC/dim.bas +14 -0
- data/modules/emscripten/third_party/ply/example/BASIC/func.bas +5 -0
- data/modules/emscripten/third_party/ply/example/BASIC/gcd.bas +22 -0
- data/modules/emscripten/third_party/ply/example/BASIC/gosub.bas +13 -0
- data/modules/emscripten/third_party/ply/example/BASIC/hello.bas +4 -0
- data/modules/emscripten/third_party/ply/example/BASIC/linear.bas +17 -0
- data/modules/emscripten/third_party/ply/example/BASIC/maxsin.bas +12 -0
- data/modules/emscripten/third_party/ply/example/BASIC/powers.bas +13 -0
- data/modules/emscripten/third_party/ply/example/BASIC/rand.bas +4 -0
- data/modules/emscripten/third_party/ply/example/BASIC/sales.bas +20 -0
- data/modules/emscripten/third_party/ply/example/BASIC/sears.bas +18 -0
- data/modules/emscripten/third_party/ply/example/BASIC/sqrt1.bas +5 -0
- data/modules/emscripten/third_party/ply/example/BASIC/sqrt2.bas +4 -0
- data/modules/emscripten/third_party/ply/example/GardenSnake/GardenSnake.py +709 -0
- data/modules/emscripten/third_party/ply/example/GardenSnake/README +5 -0
- data/modules/emscripten/third_party/ply/example/README +10 -0
- data/modules/emscripten/third_party/ply/example/ansic/README +2 -0
- data/modules/emscripten/third_party/ply/example/ansic/clex.py +164 -0
- data/modules/emscripten/third_party/ply/example/ansic/cparse.py +863 -0
- data/modules/emscripten/third_party/ply/example/calc/calc.py +107 -0
- data/modules/emscripten/third_party/ply/example/calcdebug/calc.py +113 -0
- data/modules/emscripten/third_party/ply/example/classcalc/calc.py +157 -0
- data/modules/emscripten/third_party/ply/example/cleanup.sh +2 -0
- data/modules/emscripten/third_party/ply/example/closurecalc/calc.py +130 -0
- data/modules/emscripten/third_party/ply/example/hedit/hedit.py +48 -0
- data/modules/emscripten/third_party/ply/example/newclasscalc/calc.py +160 -0
- data/modules/emscripten/third_party/ply/example/optcalc/README +9 -0
- data/modules/emscripten/third_party/ply/example/optcalc/calc.py +119 -0
- data/modules/emscripten/third_party/ply/example/unicalc/calc.py +117 -0
- data/modules/emscripten/third_party/ply/example/yply/README +41 -0
- data/modules/emscripten/third_party/ply/example/yply/ylex.py +112 -0
- data/modules/emscripten/third_party/ply/example/yply/yparse.py +217 -0
- data/modules/emscripten/third_party/ply/example/yply/yply.py +53 -0
- data/modules/emscripten/third_party/ply/ply/__init__.py +4 -0
- data/modules/emscripten/third_party/ply/ply/cpp.py +898 -0
- data/modules/emscripten/third_party/ply/ply/ctokens.py +133 -0
- data/modules/emscripten/third_party/ply/ply/lex.py +1058 -0
- data/modules/emscripten/third_party/ply/ply/yacc.py +3276 -0
- data/modules/emscripten/third_party/ply/setup.py +31 -0
- data/modules/emscripten/third_party/ply/test/README +7 -0
- data/modules/emscripten/third_party/ply/test/calclex.py +49 -0
- data/modules/emscripten/third_party/ply/test/cleanup.sh +4 -0
- data/modules/emscripten/third_party/ply/test/lex_closure.py +54 -0
- data/modules/emscripten/third_party/ply/test/lex_doc1.py +26 -0
- data/modules/emscripten/third_party/ply/test/lex_dup1.py +29 -0
- data/modules/emscripten/third_party/ply/test/lex_dup2.py +33 -0
- data/modules/emscripten/third_party/ply/test/lex_dup3.py +31 -0
- data/modules/emscripten/third_party/ply/test/lex_empty.py +20 -0
- data/modules/emscripten/third_party/ply/test/lex_error1.py +24 -0
- data/modules/emscripten/third_party/ply/test/lex_error2.py +26 -0
- data/modules/emscripten/third_party/ply/test/lex_error3.py +27 -0
- data/modules/emscripten/third_party/ply/test/lex_error4.py +27 -0
- data/modules/emscripten/third_party/ply/test/lex_hedit.py +47 -0
- data/modules/emscripten/third_party/ply/test/lex_ignore.py +31 -0
- data/modules/emscripten/third_party/ply/test/lex_ignore2.py +29 -0
- data/modules/emscripten/third_party/ply/test/lex_literal1.py +25 -0
- data/modules/emscripten/third_party/ply/test/lex_literal2.py +25 -0
- data/modules/emscripten/third_party/ply/test/lex_many_tokens.py +27 -0
- data/modules/emscripten/third_party/ply/test/lex_module.py +10 -0
- data/modules/emscripten/third_party/ply/test/lex_module_import.py +42 -0
- data/modules/emscripten/third_party/ply/test/lex_object.py +55 -0
- data/modules/emscripten/third_party/ply/test/lex_opt_alias.py +54 -0
- data/modules/emscripten/third_party/ply/test/lex_optimize.py +50 -0
- data/modules/emscripten/third_party/ply/test/lex_optimize2.py +50 -0
- data/modules/emscripten/third_party/ply/test/lex_optimize3.py +52 -0
- data/modules/emscripten/third_party/ply/test/lex_re1.py +27 -0
- data/modules/emscripten/third_party/ply/test/lex_re2.py +27 -0
- data/modules/emscripten/third_party/ply/test/lex_re3.py +29 -0
- data/modules/emscripten/third_party/ply/test/lex_rule1.py +27 -0
- data/modules/emscripten/third_party/ply/test/lex_rule2.py +29 -0
- data/modules/emscripten/third_party/ply/test/lex_rule3.py +27 -0
- data/modules/emscripten/third_party/ply/test/lex_state1.py +40 -0
- data/modules/emscripten/third_party/ply/test/lex_state2.py +40 -0
- data/modules/emscripten/third_party/ply/test/lex_state3.py +42 -0
- data/modules/emscripten/third_party/ply/test/lex_state4.py +41 -0
- data/modules/emscripten/third_party/ply/test/lex_state5.py +40 -0
- data/modules/emscripten/third_party/ply/test/lex_state_noerror.py +39 -0
- data/modules/emscripten/third_party/ply/test/lex_state_norule.py +40 -0
- data/modules/emscripten/third_party/ply/test/lex_state_try.py +45 -0
- data/modules/emscripten/third_party/ply/test/lex_token1.py +19 -0
- data/modules/emscripten/third_party/ply/test/lex_token2.py +22 -0
- data/modules/emscripten/third_party/ply/test/lex_token3.py +24 -0
- data/modules/emscripten/third_party/ply/test/lex_token4.py +26 -0
- data/modules/emscripten/third_party/ply/test/lex_token5.py +31 -0
- data/modules/emscripten/third_party/ply/test/lex_token_dup.py +29 -0
- data/modules/emscripten/third_party/ply/test/testlex.py +606 -0
- data/modules/emscripten/third_party/ply/test/testyacc.py +347 -0
- data/modules/emscripten/third_party/ply/test/yacc_badargs.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_badid.py +77 -0
- data/modules/emscripten/third_party/ply/test/yacc_badprec.py +64 -0
- data/modules/emscripten/third_party/ply/test/yacc_badprec2.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_badprec3.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_badrule.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_badtok.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_dup.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_error1.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_error2.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_error3.py +67 -0
- data/modules/emscripten/third_party/ply/test/yacc_error4.py +72 -0
- data/modules/emscripten/third_party/ply/test/yacc_inf.py +56 -0
- data/modules/emscripten/third_party/ply/test/yacc_literal.py +69 -0
- data/modules/emscripten/third_party/ply/test/yacc_misplaced.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_missing1.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_nested.py +33 -0
- data/modules/emscripten/third_party/ply/test/yacc_nodoc.py +67 -0
- data/modules/emscripten/third_party/ply/test/yacc_noerror.py +66 -0
- data/modules/emscripten/third_party/ply/test/yacc_nop.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_notfunc.py +66 -0
- data/modules/emscripten/third_party/ply/test/yacc_notok.py +67 -0
- data/modules/emscripten/third_party/ply/test/yacc_prec1.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_rr.py +72 -0
- data/modules/emscripten/third_party/ply/test/yacc_rr_unused.py +30 -0
- data/modules/emscripten/third_party/ply/test/yacc_simple.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_sr.py +63 -0
- data/modules/emscripten/third_party/ply/test/yacc_term1.py +68 -0
- data/modules/emscripten/third_party/ply/test/yacc_unused.py +77 -0
- data/modules/emscripten/third_party/ply/test/yacc_unused_rule.py +72 -0
- data/modules/emscripten/third_party/ply/test/yacc_uprec.py +63 -0
- data/modules/emscripten/third_party/ply/test/yacc_uprec2.py +63 -0
- data/modules/emscripten/third_party/readme.txt +7 -0
- data/modules/emscripten/third_party/websockify/CHANGES.txt +23 -0
- data/modules/emscripten/third_party/websockify/LICENSE.txt +16 -0
- data/modules/emscripten/third_party/websockify/MANIFEST.in +1 -0
- data/modules/emscripten/third_party/websockify/Makefile +11 -0
- data/modules/emscripten/third_party/websockify/README.md +168 -0
- data/modules/emscripten/third_party/websockify/Windows/Windows Service Readme.txt +39 -0
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Program.cs +24 -0
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs +61 -0
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.cs +19 -0
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.resx +129 -0
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs +36 -0
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Service1.Designer.cs +37 -0
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Service1.cs +41 -0
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj +75 -0
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.sln +20 -0
- data/modules/emscripten/third_party/websockify/docs/LICENSE.GPL-3 +621 -0
- data/modules/emscripten/third_party/websockify/docs/LICENSE.LGPL-3 +165 -0
- data/modules/emscripten/third_party/websockify/docs/LICENSE.MPL-2.0 +373 -0
- data/modules/emscripten/third_party/websockify/docs/TODO +9 -0
- data/modules/emscripten/third_party/websockify/docs/flash_policy.txt +4 -0
- data/modules/emscripten/third_party/websockify/docs/latency_results.txt +114 -0
- data/modules/emscripten/third_party/websockify/docs/notes +17 -0
- data/modules/emscripten/third_party/websockify/docs/release.txt +9 -0
- data/modules/emscripten/third_party/websockify/docs/websockify.1 +110 -0
- data/modules/emscripten/third_party/websockify/include/VT100.js +919 -0
- data/modules/emscripten/third_party/websockify/include/base64.js +114 -0
- data/modules/emscripten/third_party/websockify/include/keysym.js +99 -0
- data/modules/emscripten/third_party/websockify/include/util.js +359 -0
- data/modules/emscripten/third_party/websockify/include/web-socket-js/README.txt +109 -0
- data/modules/emscripten/third_party/websockify/include/web-socket-js/WebSocketMain.swf +0 -0
- data/modules/emscripten/third_party/websockify/include/web-socket-js/swfobject.js +4 -0
- data/modules/emscripten/third_party/websockify/include/web-socket-js/web_socket.js +391 -0
- data/modules/emscripten/third_party/websockify/include/websock.js +422 -0
- data/modules/emscripten/third_party/websockify/include/webutil.js +216 -0
- data/modules/emscripten/third_party/websockify/include/wsirc.js +235 -0
- data/modules/emscripten/third_party/websockify/include/wstelnet.js +335 -0
- data/modules/emscripten/third_party/websockify/other/Makefile +14 -0
- data/modules/emscripten/third_party/websockify/other/README.md +51 -0
- data/modules/emscripten/third_party/websockify/other/launch.sh +108 -0
- data/modules/emscripten/third_party/websockify/other/project.clj +13 -0
- data/modules/emscripten/third_party/websockify/other/websocket.c +802 -0
- data/modules/emscripten/third_party/websockify/other/websocket.h +84 -0
- data/modules/emscripten/third_party/websockify/other/websocket.rb +456 -0
- data/modules/emscripten/third_party/websockify/other/websockify.c +385 -0
- data/modules/emscripten/third_party/websockify/other/websockify.clj +233 -0
- data/modules/emscripten/third_party/websockify/other/websockify.js +196 -0
- data/modules/emscripten/third_party/websockify/other/websockify.rb +171 -0
- data/modules/emscripten/third_party/websockify/other/wswrap +22 -0
- data/modules/emscripten/third_party/websockify/rebind +18 -0
- data/modules/emscripten/third_party/websockify/rebind.c +94 -0
- data/modules/emscripten/third_party/websockify/run +5 -0
- data/modules/emscripten/third_party/websockify/setup.py +30 -0
- data/modules/emscripten/third_party/websockify/tests/b64_vs_utf8.py +29 -0
- data/modules/emscripten/third_party/websockify/tests/base64.html +91 -0
- data/modules/emscripten/third_party/websockify/tests/base64.js +12 -0
- data/modules/emscripten/third_party/websockify/tests/echo.html +148 -0
- data/modules/emscripten/third_party/websockify/tests/echo.py +75 -0
- data/modules/emscripten/third_party/websockify/tests/echo.rb +62 -0
- data/modules/emscripten/third_party/websockify/tests/latency.html +290 -0
- data/modules/emscripten/third_party/websockify/tests/latency.py +75 -0
- data/modules/emscripten/third_party/websockify/tests/load.html +250 -0
- data/modules/emscripten/third_party/websockify/tests/load.py +167 -0
- data/modules/emscripten/third_party/websockify/tests/plain_echo.html +168 -0
- data/modules/emscripten/third_party/websockify/tests/simple.html +68 -0
- data/modules/emscripten/third_party/websockify/tests/utf8-list.py +22 -0
- data/modules/emscripten/third_party/websockify/websockify/__init__.py +2 -0
- data/modules/emscripten/third_party/websockify/websockify/websocket.py +982 -0
- data/modules/emscripten/third_party/websockify/websockify/websocketproxy.py +393 -0
- data/modules/emscripten/third_party/websockify/websockify.py +5 -0
- data/modules/emscripten/third_party/websockify/wsirc.html +99 -0
- data/modules/emscripten/third_party/websockify/wstelnet.html +74 -0
- data/modules/emscripten/tools/__init__.py +0 -0
- data/modules/emscripten/tools/__init__.pyc +0 -0
- data/modules/emscripten/tools/autodebugger.py +289 -0
- data/modules/emscripten/tools/autodebugger_c.py +37 -0
- data/modules/emscripten/tools/autodebugger_indenter.py +18 -0
- data/modules/emscripten/tools/autodebugger_js.py +47 -0
- data/modules/emscripten/tools/autodediffer.py +60 -0
- data/modules/emscripten/tools/bindings_generator.py +832 -0
- data/modules/emscripten/tools/bisect_pair.py +88 -0
- data/modules/emscripten/tools/cache.py +198 -0
- data/modules/emscripten/tools/cache.pyc +0 -0
- data/modules/emscripten/tools/clean_webconsole.py +34 -0
- data/modules/emscripten/tools/crunch-worker.js +124 -0
- data/modules/emscripten/tools/diff_autodebugger.py +15 -0
- data/modules/emscripten/tools/eliminator/asm-eliminator-test-output.js +5129 -0
- data/modules/emscripten/tools/eliminator/asm-eliminator-test.js +6861 -0
- data/modules/emscripten/tools/eliminator/eliminator-test-output.js +6122 -0
- data/modules/emscripten/tools/eliminator/eliminator-test.js +8856 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/README.html +888 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/README.org +463 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/bin/uglifyjs +317 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/docstyle.css +75 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/object-ast.js +75 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/parse-js.js +1363 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/process.js +2005 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/squeeze-more.js +51 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/package.json +22 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/beautify.js +28 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/testparser.js +402 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array1.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array2.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array3.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array4.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/assignment.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/const.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/if.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue10.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue11.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue13.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue14.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue16.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue17.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue20.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue21.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue25.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue27.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue28.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue29.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue30.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue34.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue4.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue48.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue50.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue53.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue68.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue69.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue9.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/mangle.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/var.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/with.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array1.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array2.js +4 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array3.js +4 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array4.js +6 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/assignment.js +20 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/concatstring.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/const.js +5 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +4 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/forstatement.js +10 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/if.js +6 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +9 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +16 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue10.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue11.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue13.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue14.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue16.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue17.js +4 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue20.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue21.js +6 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue25.js +7 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue27.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue28.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue29.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue30.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue34.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue4.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue48.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue50.js +9 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue53.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue68.js +5 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue69.js +1 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue9.js +4 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/mangle.js +5 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/var.js +3 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/with.js +2 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/scripts.js +55 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/hoist.js +33 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/instrument.js +97 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/instrument2.js +138 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/test.js +16 -0
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/uglify-js.js +17 -0
- data/modules/emscripten/tools/eliminator/safe-eliminator-test-output.js +85 -0
- data/modules/emscripten/tools/eliminator/safe-eliminator-test.js +103 -0
- data/modules/emscripten/tools/emconfiguren.py +19 -0
- data/modules/emscripten/tools/emmaken.py +230 -0
- data/modules/emscripten/tools/emmakenxx.py +18 -0
- data/modules/emscripten/tools/exec_llvm.py +50 -0
- data/modules/emscripten/tools/file2json.py +49 -0
- data/modules/emscripten/tools/file_packager.py +649 -0
- data/modules/emscripten/tools/find_bigfuncs.py +23 -0
- data/modules/emscripten/tools/find_bigis.py +18 -0
- data/modules/emscripten/tools/fix_closure.py +88 -0
- data/modules/emscripten/tools/ie7_fix.py +14 -0
- data/modules/emscripten/tools/js-optimizer.js +3440 -0
- data/modules/emscripten/tools/js_optimizer.py +341 -0
- data/modules/emscripten/tools/js_optimizer.pyc +0 -0
- data/modules/emscripten/tools/jsrun.py +27 -0
- data/modules/emscripten/tools/jsrun.pyc +0 -0
- data/modules/emscripten/tools/ll-strip.py +56 -0
- data/modules/emscripten/tools/make_file.py +19 -0
- data/modules/emscripten/tools/make_minigzip.py +13 -0
- data/modules/emscripten/tools/namespacer.py +95 -0
- data/modules/emscripten/tools/nativize_llvm.py +34 -0
- data/modules/emscripten/tools/node_modules/source-map/CHANGELOG.md +58 -0
- data/modules/emscripten/tools/node_modules/source-map/LICENSE +28 -0
- data/modules/emscripten/tools/node_modules/source-map/Makefile.dryice.js +166 -0
- data/modules/emscripten/tools/node_modules/source-map/README.md +347 -0
- data/modules/emscripten/tools/node_modules/source-map/build/assert-shim.js +56 -0
- data/modules/emscripten/tools/node_modules/source-map/build/mini-require.js +152 -0
- data/modules/emscripten/tools/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/modules/emscripten/tools/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/modules/emscripten/tools/node_modules/source-map/build/suffix-browser.js +8 -0
- data/modules/emscripten/tools/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/modules/emscripten/tools/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/modules/emscripten/tools/node_modules/source-map/build/test-prefix.js +8 -0
- data/modules/emscripten/tools/node_modules/source-map/build/test-suffix.js +3 -0
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/array-set.js +96 -0
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-map-consumer.js +430 -0
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-node.js +353 -0
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/util.js +117 -0
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map.js +8 -0
- data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/README.md +119 -0
- data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/package.json +33 -0
- data/modules/emscripten/tools/node_modules/source-map/package.json +74 -0
- data/modules/emscripten/tools/node_modules/source-map/test/run-tests.js +73 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-array-set.js +71 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-map-consumer.js +306 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-node.js +282 -0
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/util.js +152 -0
- data/modules/emscripten/tools/reproduceriter.js +216 -0
- data/modules/emscripten/tools/reproduceriter.py +160 -0
- data/modules/emscripten/tools/response_file.py +28 -0
- data/modules/emscripten/tools/response_file.pyc +0 -0
- data/modules/emscripten/tools/scan_js.py +20 -0
- data/modules/emscripten/tools/scan_ll.py +18 -0
- data/modules/emscripten/tools/scons/site_scons/site_tools/emscripten/__init__.py +3 -0
- data/modules/emscripten/tools/scons/site_scons/site_tools/emscripten/emscripten.py +46 -0
- data/modules/emscripten/tools/settings_template_readonly.py +47 -0
- data/modules/emscripten/tools/shared.py +1437 -0
- data/modules/emscripten/tools/shared.pyc +0 -0
- data/modules/emscripten/tools/source-maps/sourcemap2json.js +15 -0
- data/modules/emscripten/tools/source-maps/sourcemapper.js +177 -0
- data/modules/emscripten/tools/split.py +97 -0
- data/modules/emscripten/tools/tempfiles.py +40 -0
- data/modules/emscripten/tools/tempfiles.pyc +0 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-last-output.js +75 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-last.js +91 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-outline-output.js +570 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-outline.js +606 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-pre-output.js +540 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-pre.js +550 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-regs-min-output.js +36 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-regs-min.js +37 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-regs-output.js +106 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-regs.js +110 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-relocate-output.js +9 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-relocate.js +12 -0
- data/modules/emscripten/tools/test-js-optimizer-output.js +291 -0
- data/modules/emscripten/tools/test-js-optimizer-regs-output.js +232 -0
- data/modules/emscripten/tools/test-js-optimizer-regs.js +237 -0
- data/modules/emscripten/tools/test-js-optimizer-t2-output.js +91 -0
- data/modules/emscripten/tools/test-js-optimizer-t2.js +92 -0
- data/modules/emscripten/tools/test-js-optimizer-t2c-output.js +17 -0
- data/modules/emscripten/tools/test-js-optimizer-t2c.js +18 -0
- data/modules/emscripten/tools/test-js-optimizer-t3-output.js +49 -0
- data/modules/emscripten/tools/test-js-optimizer-t3.js +50 -0
- data/modules/emscripten/tools/test-js-optimizer.js +401 -0
- data/modules/mruby/AUTHORS +18 -0
- data/modules/mruby/CONTRIBUTING.md +65 -0
- data/modules/mruby/ChangeLog +15 -0
- data/modules/mruby/INSTALL +29 -0
- data/modules/mruby/LEGAL +6 -0
- data/modules/mruby/MITL +20 -0
- data/modules/mruby/Makefile +18 -0
- data/modules/mruby/NEWS +13 -0
- data/modules/mruby/README.md +116 -0
- data/modules/mruby/Rakefile +114 -0
- data/modules/mruby/TODO +11 -0
- data/modules/mruby/benchmark/ao-render.rb +315 -0
- data/modules/mruby/benchmark/bm_so_lists.rb +47 -0
- data/modules/mruby/benchmark/fib39.rb +8 -0
- data/modules/mruby/build_config.rb +88 -0
- data/modules/mruby/doc/compile/README.md +376 -0
- data/modules/mruby/doc/mrbgems/README.md +254 -0
- data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/README.md +4 -0
- data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake +23 -0
- data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/mrblib/example.rb +5 -0
- data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c +20 -0
- data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/test/example.rb +7 -0
- data/modules/mruby/examples/mrbgems/c_extension_example/README.md +4 -0
- data/modules/mruby/examples/mrbgems/c_extension_example/mrbgem.rake +23 -0
- data/modules/mruby/examples/mrbgems/c_extension_example/src/example.c +20 -0
- data/modules/mruby/examples/mrbgems/c_extension_example/test/example.c +7 -0
- data/modules/mruby/examples/mrbgems/c_extension_example/test/example.rb +3 -0
- data/modules/mruby/examples/mrbgems/ruby_extension_example/README.md +4 -0
- data/modules/mruby/examples/mrbgems/ruby_extension_example/mrbgem.rake +23 -0
- data/modules/mruby/examples/mrbgems/ruby_extension_example/mrblib/example.rb +5 -0
- data/modules/mruby/examples/mrbgems/ruby_extension_example/test/example.rb +3 -0
- data/modules/mruby/examples/targets/ArduinoDue.rb +65 -0
- data/modules/mruby/examples/targets/chipKitMax32.rb +68 -0
- data/modules/mruby/include/mrbconf.h +87 -0
- data/modules/mruby/include/mruby/array.h +63 -0
- data/modules/mruby/include/mruby/class.h +75 -0
- data/modules/mruby/include/mruby/compile.h +176 -0
- data/modules/mruby/include/mruby/data.h +53 -0
- data/modules/mruby/include/mruby/dump.h +151 -0
- data/modules/mruby/include/mruby/gc.h +17 -0
- data/modules/mruby/include/mruby/hash.h +54 -0
- data/modules/mruby/include/mruby/irep.h +40 -0
- data/modules/mruby/include/mruby/khash.h +257 -0
- data/modules/mruby/include/mruby/numeric.h +32 -0
- data/modules/mruby/include/mruby/proc.h +62 -0
- data/modules/mruby/include/mruby/range.h +35 -0
- data/modules/mruby/include/mruby/string.h +78 -0
- data/modules/mruby/include/mruby/value.h +483 -0
- data/modules/mruby/include/mruby/variable.h +78 -0
- data/modules/mruby/include/mruby.h +388 -0
- data/modules/mruby/minirake +477 -0
- data/modules/mruby/mrbgems/default.gembox +61 -0
- data/modules/mruby/mrbgems/full-core.gembox +9 -0
- data/modules/mruby/mrbgems/mruby-array-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +204 -0
- data/modules/mruby/mrbgems/mruby-array-ext/src/array.c +140 -0
- data/modules/mruby/mrbgems/mruby-array-ext/test/array.rb +109 -0
- data/modules/mruby/mrbgems/mruby-bin-mirb/mrbgem.rake +5 -0
- data/modules/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +365 -0
- data/modules/mruby/mrbgems/mruby-bin-mruby/mrbgem.rake +5 -0
- data/modules/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +243 -0
- data/modules/mruby/mrbgems/mruby-enum-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +164 -0
- data/modules/mruby/mrbgems/mruby-enum-ext/test/enum.rb +44 -0
- data/modules/mruby/mrbgems/mruby-eval/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-eval/src/eval.c +23 -0
- data/modules/mruby/mrbgems/mruby-fiber/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-fiber/src/fiber.c +251 -0
- data/modules/mruby/mrbgems/mruby-fiber/test/fiber.rb +64 -0
- data/modules/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +13 -0
- data/modules/mruby/mrbgems/mruby-hash-ext/src/hash-ext.c +62 -0
- data/modules/mruby/mrbgems/mruby-hash-ext/test/hash.rb +26 -0
- data/modules/mruby/mrbgems/mruby-math/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-math/src/math.c +685 -0
- data/modules/mruby/mrbgems/mruby-math/test/math.rb +136 -0
- data/modules/mruby/mrbgems/mruby-numeric-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c +31 -0
- data/modules/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +10 -0
- data/modules/mruby/mrbgems/mruby-object-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-object-ext/src/object.c +108 -0
- data/modules/mruby/mrbgems/mruby-object-ext/test/nil.rb +11 -0
- data/modules/mruby/mrbgems/mruby-object-ext/test/object.rb +9 -0
- data/modules/mruby/mrbgems/mruby-objectspace/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +117 -0
- data/modules/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +38 -0
- data/modules/mruby/mrbgems/mruby-print/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-print/mrblib/print.rb +64 -0
- data/modules/mruby/mrbgems/mruby-print/src/print.c +44 -0
- data/modules/mruby/mrbgems/mruby-proc-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-proc-ext/mrblib/proc.rb +40 -0
- data/modules/mruby/mrbgems/mruby-proc-ext/src/proc.c +97 -0
- data/modules/mruby/mrbgems/mruby-proc-ext/test/proc.rb +41 -0
- data/modules/mruby/mrbgems/mruby-random/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-random/src/mt19937ar.c +193 -0
- data/modules/mruby/mrbgems/mruby-random/src/mt19937ar.h +48 -0
- data/modules/mruby/mrbgems/mruby-random/src/random.c +231 -0
- data/modules/mruby/mrbgems/mruby-random/src/random.h +12 -0
- data/modules/mruby/mrbgems/mruby-random/test/random.rb +32 -0
- data/modules/mruby/mrbgems/mruby-range-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-range-ext/src/range.c +141 -0
- data/modules/mruby/mrbgems/mruby-range-ext/test/range.rb +20 -0
- data/modules/mruby/mrbgems/mruby-sprintf/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-sprintf/src/kernel.c +30 -0
- data/modules/mruby/mrbgems/mruby-sprintf/src/sprintf.c +1102 -0
- data/modules/mruby/mrbgems/mruby-sprintf/test/sprintf.rb +3 -0
- data/modules/mruby/mrbgems/mruby-string-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +52 -0
- data/modules/mruby/mrbgems/mruby-string-ext/src/string.c +175 -0
- data/modules/mruby/mrbgems/mruby-string-ext/test/string.rb +112 -0
- data/modules/mruby/mrbgems/mruby-struct/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-struct/mrblib/struct.rb +50 -0
- data/modules/mruby/mrbgems/mruby-struct/src/struct.c +818 -0
- data/modules/mruby/mrbgems/mruby-struct/test/struct.rb +77 -0
- data/modules/mruby/mrbgems/mruby-symbol-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-symbol-ext/mrblib/symbol.rb +9 -0
- data/modules/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +55 -0
- data/modules/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +12 -0
- data/modules/mruby/mrbgems/mruby-time/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-time/src/time.c +749 -0
- data/modules/mruby/mrbgems/mruby-time/test/time.rb +201 -0
- data/modules/mruby/mrbgems/mruby-toplevel-ext/mrbgem.rake +4 -0
- data/modules/mruby/mrbgems/mruby-toplevel-ext/mrblib/toplevel.rb +11 -0
- data/modules/mruby/mrbgems/mruby-toplevel-ext/test/toplevel.rb +24 -0
- data/modules/mruby/mrblib/array.rb +111 -0
- data/modules/mruby/mrblib/class.rb +26 -0
- data/modules/mruby/mrblib/compar.rb +104 -0
- data/modules/mruby/mrblib/enum.rb +398 -0
- data/modules/mruby/mrblib/error.rb +66 -0
- data/modules/mruby/mrblib/hash.rb +193 -0
- data/modules/mruby/mrblib/init_mrblib.c +14 -0
- data/modules/mruby/mrblib/kernel.rb +46 -0
- data/modules/mruby/mrblib/mrblib.rake +18 -0
- data/modules/mruby/mrblib/numeric.rb +101 -0
- data/modules/mruby/mrblib/print.rb +18 -0
- data/modules/mruby/mrblib/range.rb +40 -0
- data/modules/mruby/mrblib/string.rb +145 -0
- data/modules/mruby/src/array.c +1150 -0
- data/modules/mruby/src/backtrace.c +73 -0
- data/modules/mruby/src/class.c +1942 -0
- data/modules/mruby/src/codegen.c +2864 -0
- data/modules/mruby/src/compar.c +13 -0
- data/modules/mruby/src/crc.c +38 -0
- data/modules/mruby/src/dump.c +542 -0
- data/modules/mruby/src/enum.c +14 -0
- data/modules/mruby/src/error.c +454 -0
- data/modules/mruby/src/error.h +18 -0
- data/modules/mruby/src/etc.c +204 -0
- data/modules/mruby/src/gc.c +1542 -0
- data/modules/mruby/src/hash.c +1261 -0
- data/modules/mruby/src/init.c +62 -0
- data/modules/mruby/src/kernel.c +1105 -0
- data/modules/mruby/src/keywords +50 -0
- data/modules/mruby/src/lex.def +212 -0
- data/modules/mruby/src/load.c +629 -0
- data/modules/mruby/src/mruby_core.rake +28 -0
- data/modules/mruby/src/node.h +117 -0
- data/modules/mruby/src/numeric.c +1418 -0
- data/modules/mruby/src/object.c +593 -0
- data/modules/mruby/src/opcode.h +160 -0
- data/modules/mruby/src/parse.y +6050 -0
- data/modules/mruby/src/pool.c +190 -0
- data/modules/mruby/src/print.c +71 -0
- data/modules/mruby/src/proc.c +209 -0
- data/modules/mruby/src/range.c +442 -0
- data/modules/mruby/src/re.h +13 -0
- data/modules/mruby/src/state.c +200 -0
- data/modules/mruby/src/string.c +2580 -0
- data/modules/mruby/src/symbol.c +456 -0
- data/modules/mruby/src/value_array.h +27 -0
- data/modules/mruby/src/variable.c +1147 -0
- data/modules/mruby/src/vm.c +2129 -0
- data/modules/mruby/tasks/libmruby.rake +18 -0
- data/modules/mruby/tasks/mrbgem_spec.rake +297 -0
- data/modules/mruby/tasks/mrbgems.rake +85 -0
- data/modules/mruby/tasks/mrbgems_test.rake +88 -0
- data/modules/mruby/tasks/mruby_build.rake +211 -0
- data/modules/mruby/tasks/mruby_build_commands.rake +287 -0
- data/modules/mruby/tasks/mruby_build_gem.rake +67 -0
- data/modules/mruby/tasks/ruby_ext.rake +70 -0
- data/modules/mruby/tasks/toolchains/androideabi.rake +126 -0
- data/modules/mruby/tasks/toolchains/clang.rake +8 -0
- data/modules/mruby/tasks/toolchains/gcc.rake +21 -0
- data/modules/mruby/tasks/toolchains/vs2010.rake +3 -0
- data/modules/mruby/tasks/toolchains/vs2012.rake +44 -0
- data/modules/mruby/test/README.md +7 -0
- data/modules/mruby/test/assert.rb +238 -0
- data/modules/mruby/test/driver.c +118 -0
- data/modules/mruby/test/init_mrbtest.c +24 -0
- data/modules/mruby/test/mrbtest.rake +47 -0
- data/modules/mruby/test/report.rb +4 -0
- data/modules/mruby/test/t/argumenterror.rb +21 -0
- data/modules/mruby/test/t/array.rb +309 -0
- data/modules/mruby/test/t/basicobject.rb +11 -0
- data/modules/mruby/test/t/bs_block.rb +489 -0
- data/modules/mruby/test/t/bs_literal.rb +38 -0
- data/modules/mruby/test/t/class.rb +219 -0
- data/modules/mruby/test/t/comparable.rb +72 -0
- data/modules/mruby/test/t/enumerable.rb +108 -0
- data/modules/mruby/test/t/exception.rb +337 -0
- data/modules/mruby/test/t/false.rb +33 -0
- data/modules/mruby/test/t/float.rb +145 -0
- data/modules/mruby/test/t/gc.rb +45 -0
- data/modules/mruby/test/t/hash.rb +310 -0
- data/modules/mruby/test/t/indexerror.rb +10 -0
- data/modules/mruby/test/t/integer.rb +222 -0
- data/modules/mruby/test/t/kernel.rb +425 -0
- data/modules/mruby/test/t/literals.rb +287 -0
- data/modules/mruby/test/t/localjumperror.rb +13 -0
- data/modules/mruby/test/t/methods.rb +109 -0
- data/modules/mruby/test/t/module.rb +344 -0
- data/modules/mruby/test/t/nameerror.rb +32 -0
- data/modules/mruby/test/t/nil.rb +29 -0
- data/modules/mruby/test/t/nomethoderror.rb +13 -0
- data/modules/mruby/test/t/numeric.rb +29 -0
- data/modules/mruby/test/t/object.rb +11 -0
- data/modules/mruby/test/t/proc.rb +56 -0
- data/modules/mruby/test/t/range.rb +82 -0
- data/modules/mruby/test/t/rangeerror.rb +10 -0
- data/modules/mruby/test/t/regexperror.rb +4 -0
- data/modules/mruby/test/t/runtimeerror.rb +6 -0
- data/modules/mruby/test/t/standarderror.rb +10 -0
- data/modules/mruby/test/t/string.rb +483 -0
- data/modules/mruby/test/t/symbol.rb +27 -0
- data/modules/mruby/test/t/syntax.rb +67 -0
- data/modules/mruby/test/t/true.rb +33 -0
- data/modules/mruby/test/t/typeerror.rb +11 -0
- data/modules/mruby/tools/mrbc/mrbc.c +318 -0
- data/modules/mruby/tools/mrbc/mrbc.rake +14 -0
- data/modules/mruby/travis_config.rb +6 -0
- data/modules/mrubymix/LICENSE +21 -0
- data/modules/mrubymix/README.md +6 -0
- data/modules/mrubymix/bin/mrubymix +29 -0
- data/modules/mrubymix/lib/mrubymix.rb +93 -0
- data/modules/mrubymix/mrubymix.gemspec +13 -0
- data/scripts/gen_gems_config.rb +185 -0
- data/scripts/gen_post.rb +104 -0
- data/templates/minimal/Rakefile +36 -0
- data/templates/minimal/app/app.rb +3 -0
- metadata +1408 -0
|
@@ -0,0 +1,1055 @@
|
|
|
1
|
+
//===------------------------- cxa_exception.cpp --------------------------===//
|
|
2
|
+
//
|
|
3
|
+
// The LLVM Compiler Infrastructure
|
|
4
|
+
//
|
|
5
|
+
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
6
|
+
// Source Licenses. See LICENSE.TXT for details.
|
|
7
|
+
//
|
|
8
|
+
//
|
|
9
|
+
// This file implements the "Exception Handling APIs"
|
|
10
|
+
// http://www.codesourcery.com/public/cxx-abi/abi-eh.html
|
|
11
|
+
// http://www.intel.com/design/itanium/downloads/245358.htm
|
|
12
|
+
//
|
|
13
|
+
//===----------------------------------------------------------------------===//
|
|
14
|
+
|
|
15
|
+
#include "unwind.h"
|
|
16
|
+
#include "cxa_exception.hpp"
|
|
17
|
+
#include "cxa_handlers.hpp"
|
|
18
|
+
#include "private_typeinfo.h"
|
|
19
|
+
#include <typeinfo>
|
|
20
|
+
#include <stdlib.h>
|
|
21
|
+
#include <assert.h>
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
Exception Header Layout:
|
|
25
|
+
|
|
26
|
+
+---------------------------+-----------------------------+---------------+
|
|
27
|
+
| __cxa_exception | _Unwind_Exception CLNGC++\0 | thrown object |
|
|
28
|
+
+---------------------------+-----------------------------+---------------+
|
|
29
|
+
^
|
|
30
|
+
|
|
|
31
|
+
+-------------------------------------------------------+
|
|
32
|
+
|
|
|
33
|
+
+---------------------------+-----------------------------+
|
|
34
|
+
| __cxa_dependent_exception | _Unwind_Exception CLNGC++\1 |
|
|
35
|
+
+---------------------------+-----------------------------+
|
|
36
|
+
|
|
37
|
+
Exception Handling Table Layout:
|
|
38
|
+
|
|
39
|
+
+-----------------+--------+
|
|
40
|
+
| lpStartEncoding | (char) |
|
|
41
|
+
+---------+-------+--------+---------------+-----------------------+
|
|
42
|
+
| lpStart | (encoded with lpStartEncoding) | defaults to funcStart |
|
|
43
|
+
+---------+-----+--------+-----------------+---------------+-------+
|
|
44
|
+
| ttypeEncoding | (char) | Encoding of the type_info table |
|
|
45
|
+
+---------------+-+------+----+----------------------------+----------------+
|
|
46
|
+
| classInfoOffset | (ULEB128) | Offset to type_info table, defaults to null |
|
|
47
|
+
+-----------------++--------+-+----------------------------+----------------+
|
|
48
|
+
| callSiteEncoding | (char) | Encoding for Call Site Table |
|
|
49
|
+
+------------------+--+-----+-----+------------------------+--------------------------+
|
|
50
|
+
| callSiteTableLength | (ULEB128) | Call Site Table length, used to find Action table |
|
|
51
|
+
+---------------------+-----------+---------------------------------------------------+
|
|
52
|
+
#if !__arm__
|
|
53
|
+
+---------------------+-----------+------------------------------------------------+
|
|
54
|
+
| Beginning of Call Site Table The current ip lies within the |
|
|
55
|
+
| ... (start, length) range of one of these |
|
|
56
|
+
| call sites. There may be action needed. |
|
|
57
|
+
| +-------------+---------------------------------+------------------------------+ |
|
|
58
|
+
| | start | (encoded with callSiteEncoding) | offset relative to funcStart | |
|
|
59
|
+
| | length | (encoded with callSiteEncoding) | length of code fragment | |
|
|
60
|
+
| | landingPad | (encoded with callSiteEncoding) | offset relative to lpStart | |
|
|
61
|
+
| | actionEntry | (ULEB128) | Action Table Index 1-based | |
|
|
62
|
+
| | | | actionEntry == 0 -> cleanup | |
|
|
63
|
+
| +-------------+---------------------------------+------------------------------+ |
|
|
64
|
+
| ... |
|
|
65
|
+
+----------------------------------------------------------------------------------+
|
|
66
|
+
#else // __arm_
|
|
67
|
+
+---------------------+-----------+------------------------------------------------+
|
|
68
|
+
| Beginning of Call Site Table The current ip is a 1-based index into |
|
|
69
|
+
| ... this table. Or it is -1 meaning no |
|
|
70
|
+
| action is needed. Or it is 0 meaning |
|
|
71
|
+
| terminate. |
|
|
72
|
+
| +-------------+---------------------------------+------------------------------+ |
|
|
73
|
+
| | landingPad | (ULEB128) | offset relative to lpStart | |
|
|
74
|
+
| | actionEntry | (ULEB128) | Action Table Index 1-based | |
|
|
75
|
+
| | | | actionEntry == 0 -> cleanup | |
|
|
76
|
+
| +-------------+---------------------------------+------------------------------+ |
|
|
77
|
+
| ... |
|
|
78
|
+
+----------------------------------------------------------------------------------+
|
|
79
|
+
#endif // __arm_
|
|
80
|
+
+---------------------------------------------------------------------+
|
|
81
|
+
| Beginning of Action Table ttypeIndex == 0 : cleanup |
|
|
82
|
+
| ... ttypeIndex > 0 : catch |
|
|
83
|
+
| ttypeIndex < 0 : exception spec |
|
|
84
|
+
| +--------------+-----------+--------------------------------------+ |
|
|
85
|
+
| | ttypeIndex | (SLEB128) | Index into type_info Table (1-based) | |
|
|
86
|
+
| | actionOffset | (SLEB128) | Offset into next Action Table entry | |
|
|
87
|
+
| +--------------+-----------+--------------------------------------+ |
|
|
88
|
+
| ... |
|
|
89
|
+
+---------------------------------------------------------------------+-----------------+
|
|
90
|
+
| type_info Table, but classInfoOffset does *not* point here! |
|
|
91
|
+
| +----------------+------------------------------------------------+-----------------+ |
|
|
92
|
+
| | Nth type_info* | Encoded with ttypeEncoding, 0 means catch(...) | ttypeIndex == N | |
|
|
93
|
+
| +----------------+------------------------------------------------+-----------------+ |
|
|
94
|
+
| ... |
|
|
95
|
+
| +----------------+------------------------------------------------+-----------------+ |
|
|
96
|
+
| | 1st type_info* | Encoded with ttypeEncoding, 0 means catch(...) | ttypeIndex == 1 | |
|
|
97
|
+
| +----------------+------------------------------------------------+-----------------+ |
|
|
98
|
+
| +---------------------------------------+-----------+------------------------------+ |
|
|
99
|
+
| | 1st ttypeIndex for 1st exception spec | (ULEB128) | classInfoOffset points here! | |
|
|
100
|
+
| | ... | (ULEB128) | | |
|
|
101
|
+
| | Mth ttypeIndex for 1st exception spec | (ULEB128) | | |
|
|
102
|
+
| | 0 | (ULEB128) | | |
|
|
103
|
+
| +---------------------------------------+------------------------------------------+ |
|
|
104
|
+
| ... |
|
|
105
|
+
| +---------------------------------------+------------------------------------------+ |
|
|
106
|
+
| | 0 | (ULEB128) | throw() | |
|
|
107
|
+
| +---------------------------------------+------------------------------------------+ |
|
|
108
|
+
| ... |
|
|
109
|
+
| +---------------------------------------+------------------------------------------+ |
|
|
110
|
+
| | 1st ttypeIndex for Nth exception spec | (ULEB128) | | |
|
|
111
|
+
| | ... | (ULEB128) | | |
|
|
112
|
+
| | Mth ttypeIndex for Nth exception spec | (ULEB128) | | |
|
|
113
|
+
| | 0 | (ULEB128) | | |
|
|
114
|
+
| +---------------------------------------+------------------------------------------+ |
|
|
115
|
+
+---------------------------------------------------------------------------------------+
|
|
116
|
+
|
|
117
|
+
Notes:
|
|
118
|
+
|
|
119
|
+
* ttypeIndex in the Action Table, and in the exception spec table, is an index,
|
|
120
|
+
not a byte count, if positive. It is a negative index offset of
|
|
121
|
+
classInfoOffset and the sizeof entry depends on ttypeEncoding.
|
|
122
|
+
But if ttypeIndex is negative, it is a positive 1-based byte offset into the
|
|
123
|
+
type_info Table.
|
|
124
|
+
And if ttypeIndex is zero, it refers to a catch (...).
|
|
125
|
+
|
|
126
|
+
* landingPad can be 0, this implies there is nothing to be done.
|
|
127
|
+
|
|
128
|
+
* landingPad != 0 and actionEntry == 0 implies a cleanup needs to be done
|
|
129
|
+
@landingPad.
|
|
130
|
+
|
|
131
|
+
* A cleanup can also be found under landingPad != 0 and actionEntry != 0 in
|
|
132
|
+
the Action Table with ttypeIndex == 0.
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
namespace __cxxabiv1
|
|
136
|
+
{
|
|
137
|
+
|
|
138
|
+
extern "C"
|
|
139
|
+
{
|
|
140
|
+
|
|
141
|
+
// private API
|
|
142
|
+
|
|
143
|
+
// Heavily borrowed from llvm/examples/ExceptionDemo/ExceptionDemo.cpp
|
|
144
|
+
|
|
145
|
+
// DWARF Constants
|
|
146
|
+
enum
|
|
147
|
+
{
|
|
148
|
+
DW_EH_PE_absptr = 0x00,
|
|
149
|
+
DW_EH_PE_uleb128 = 0x01,
|
|
150
|
+
DW_EH_PE_udata2 = 0x02,
|
|
151
|
+
DW_EH_PE_udata4 = 0x03,
|
|
152
|
+
DW_EH_PE_udata8 = 0x04,
|
|
153
|
+
DW_EH_PE_sleb128 = 0x09,
|
|
154
|
+
DW_EH_PE_sdata2 = 0x0A,
|
|
155
|
+
DW_EH_PE_sdata4 = 0x0B,
|
|
156
|
+
DW_EH_PE_sdata8 = 0x0C,
|
|
157
|
+
DW_EH_PE_pcrel = 0x10,
|
|
158
|
+
DW_EH_PE_textrel = 0x20,
|
|
159
|
+
DW_EH_PE_datarel = 0x30,
|
|
160
|
+
DW_EH_PE_funcrel = 0x40,
|
|
161
|
+
DW_EH_PE_aligned = 0x50,
|
|
162
|
+
DW_EH_PE_indirect = 0x80,
|
|
163
|
+
DW_EH_PE_omit = 0xFF
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/// Read a uleb128 encoded value and advance pointer
|
|
167
|
+
/// See Variable Length Data Appendix C in:
|
|
168
|
+
/// @link http://dwarfstd.org/Dwarf4.pdf @unlink
|
|
169
|
+
/// @param data reference variable holding memory pointer to decode from
|
|
170
|
+
/// @returns decoded value
|
|
171
|
+
static
|
|
172
|
+
uintptr_t
|
|
173
|
+
readULEB128(const uint8_t** data)
|
|
174
|
+
{
|
|
175
|
+
uintptr_t result = 0;
|
|
176
|
+
uintptr_t shift = 0;
|
|
177
|
+
unsigned char byte;
|
|
178
|
+
const uint8_t *p = *data;
|
|
179
|
+
do
|
|
180
|
+
{
|
|
181
|
+
byte = *p++;
|
|
182
|
+
result |= static_cast<uintptr_t>(byte & 0x7F) << shift;
|
|
183
|
+
shift += 7;
|
|
184
|
+
} while (byte & 0x80);
|
|
185
|
+
*data = p;
|
|
186
|
+
return result;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/// Read a sleb128 encoded value and advance pointer
|
|
190
|
+
/// See Variable Length Data Appendix C in:
|
|
191
|
+
/// @link http://dwarfstd.org/Dwarf4.pdf @unlink
|
|
192
|
+
/// @param data reference variable holding memory pointer to decode from
|
|
193
|
+
/// @returns decoded value
|
|
194
|
+
static
|
|
195
|
+
intptr_t
|
|
196
|
+
readSLEB128(const uint8_t** data)
|
|
197
|
+
{
|
|
198
|
+
uintptr_t result = 0;
|
|
199
|
+
uintptr_t shift = 0;
|
|
200
|
+
unsigned char byte;
|
|
201
|
+
const uint8_t *p = *data;
|
|
202
|
+
do
|
|
203
|
+
{
|
|
204
|
+
byte = *p++;
|
|
205
|
+
result |= static_cast<uintptr_t>(byte & 0x7F) << shift;
|
|
206
|
+
shift += 7;
|
|
207
|
+
} while (byte & 0x80);
|
|
208
|
+
*data = p;
|
|
209
|
+
if ((byte & 0x40) && (shift < (sizeof(result) << 3)))
|
|
210
|
+
result |= static_cast<uintptr_t>(~0) << shift;
|
|
211
|
+
return static_cast<intptr_t>(result);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/// Read a pointer encoded value and advance pointer
|
|
215
|
+
/// See Variable Length Data in:
|
|
216
|
+
/// @link http://dwarfstd.org/Dwarf3.pdf @unlink
|
|
217
|
+
/// @param data reference variable holding memory pointer to decode from
|
|
218
|
+
/// @param encoding dwarf encoding type
|
|
219
|
+
/// @returns decoded value
|
|
220
|
+
static
|
|
221
|
+
uintptr_t
|
|
222
|
+
readEncodedPointer(const uint8_t** data, uint8_t encoding)
|
|
223
|
+
{
|
|
224
|
+
uintptr_t result = 0;
|
|
225
|
+
if (encoding == DW_EH_PE_omit)
|
|
226
|
+
return result;
|
|
227
|
+
const uint8_t* p = *data;
|
|
228
|
+
// first get value
|
|
229
|
+
switch (encoding & 0x0F)
|
|
230
|
+
{
|
|
231
|
+
case DW_EH_PE_absptr:
|
|
232
|
+
result = *((uintptr_t*)p);
|
|
233
|
+
p += sizeof(uintptr_t);
|
|
234
|
+
break;
|
|
235
|
+
case DW_EH_PE_uleb128:
|
|
236
|
+
result = readULEB128(&p);
|
|
237
|
+
break;
|
|
238
|
+
case DW_EH_PE_sleb128:
|
|
239
|
+
result = static_cast<uintptr_t>(readSLEB128(&p));
|
|
240
|
+
break;
|
|
241
|
+
case DW_EH_PE_udata2:
|
|
242
|
+
result = *((uint16_t*)p);
|
|
243
|
+
p += sizeof(uint16_t);
|
|
244
|
+
break;
|
|
245
|
+
case DW_EH_PE_udata4:
|
|
246
|
+
result = *((uint32_t*)p);
|
|
247
|
+
p += sizeof(uint32_t);
|
|
248
|
+
break;
|
|
249
|
+
case DW_EH_PE_udata8:
|
|
250
|
+
result = static_cast<uintptr_t>(*((uint64_t*)p));
|
|
251
|
+
p += sizeof(uint64_t);
|
|
252
|
+
break;
|
|
253
|
+
case DW_EH_PE_sdata2:
|
|
254
|
+
result = static_cast<uintptr_t>(*((int16_t*)p));
|
|
255
|
+
p += sizeof(int16_t);
|
|
256
|
+
break;
|
|
257
|
+
case DW_EH_PE_sdata4:
|
|
258
|
+
result = static_cast<uintptr_t>(*((int32_t*)p));
|
|
259
|
+
p += sizeof(int32_t);
|
|
260
|
+
break;
|
|
261
|
+
case DW_EH_PE_sdata8:
|
|
262
|
+
result = static_cast<uintptr_t>(*((int64_t*)p));
|
|
263
|
+
p += sizeof(int64_t);
|
|
264
|
+
break;
|
|
265
|
+
default:
|
|
266
|
+
// not supported
|
|
267
|
+
abort();
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
// then add relative offset
|
|
271
|
+
switch (encoding & 0x70)
|
|
272
|
+
{
|
|
273
|
+
case DW_EH_PE_absptr:
|
|
274
|
+
// do nothing
|
|
275
|
+
break;
|
|
276
|
+
case DW_EH_PE_pcrel:
|
|
277
|
+
if (result)
|
|
278
|
+
result += (uintptr_t)(*data);
|
|
279
|
+
break;
|
|
280
|
+
case DW_EH_PE_textrel:
|
|
281
|
+
case DW_EH_PE_datarel:
|
|
282
|
+
case DW_EH_PE_funcrel:
|
|
283
|
+
case DW_EH_PE_aligned:
|
|
284
|
+
default:
|
|
285
|
+
// not supported
|
|
286
|
+
abort();
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
// then apply indirection
|
|
290
|
+
if (result && (encoding & DW_EH_PE_indirect))
|
|
291
|
+
result = *((uintptr_t*)result);
|
|
292
|
+
*data = p;
|
|
293
|
+
return result;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
static
|
|
297
|
+
void
|
|
298
|
+
call_terminate(bool native_exception, _Unwind_Exception* unwind_exception)
|
|
299
|
+
{
|
|
300
|
+
__cxa_begin_catch(unwind_exception);
|
|
301
|
+
if (native_exception)
|
|
302
|
+
{
|
|
303
|
+
// Use the stored terminate_handler if possible
|
|
304
|
+
__cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1;
|
|
305
|
+
std::__terminate(exception_header->terminateHandler);
|
|
306
|
+
}
|
|
307
|
+
std::terminate();
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
static
|
|
311
|
+
const __shim_type_info*
|
|
312
|
+
get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo,
|
|
313
|
+
uint8_t ttypeEncoding, bool native_exception,
|
|
314
|
+
_Unwind_Exception* unwind_exception)
|
|
315
|
+
{
|
|
316
|
+
if (classInfo == 0)
|
|
317
|
+
{
|
|
318
|
+
// this should not happen. Indicates corrupted eh_table.
|
|
319
|
+
call_terminate(native_exception, unwind_exception);
|
|
320
|
+
}
|
|
321
|
+
switch (ttypeEncoding & 0x0F)
|
|
322
|
+
{
|
|
323
|
+
case DW_EH_PE_absptr:
|
|
324
|
+
ttypeIndex *= sizeof(void*);
|
|
325
|
+
break;
|
|
326
|
+
case DW_EH_PE_udata2:
|
|
327
|
+
case DW_EH_PE_sdata2:
|
|
328
|
+
ttypeIndex *= 2;
|
|
329
|
+
break;
|
|
330
|
+
case DW_EH_PE_udata4:
|
|
331
|
+
case DW_EH_PE_sdata4:
|
|
332
|
+
ttypeIndex *= 4;
|
|
333
|
+
break;
|
|
334
|
+
case DW_EH_PE_udata8:
|
|
335
|
+
case DW_EH_PE_sdata8:
|
|
336
|
+
ttypeIndex *= 8;
|
|
337
|
+
break;
|
|
338
|
+
default:
|
|
339
|
+
// this should not happen. Indicates corrupted eh_table.
|
|
340
|
+
call_terminate(native_exception, unwind_exception);
|
|
341
|
+
}
|
|
342
|
+
classInfo -= ttypeIndex;
|
|
343
|
+
return (const __shim_type_info*)readEncodedPointer(&classInfo, ttypeEncoding);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/*
|
|
347
|
+
This is checking a thrown exception type, excpType, against a possibly empty
|
|
348
|
+
list of catchType's which make up an exception spec.
|
|
349
|
+
|
|
350
|
+
An exception spec acts like a catch handler, but in reverse. This "catch
|
|
351
|
+
handler" will catch an excpType if and only if none of the catchType's in
|
|
352
|
+
the list will catch a excpType. If any catchType in the list can catch an
|
|
353
|
+
excpType, then this exception spec does not catch the excpType.
|
|
354
|
+
*/
|
|
355
|
+
static
|
|
356
|
+
bool
|
|
357
|
+
exception_spec_can_catch(int64_t specIndex, const uint8_t* classInfo,
|
|
358
|
+
uint8_t ttypeEncoding, const __shim_type_info* excpType,
|
|
359
|
+
void* adjustedPtr, _Unwind_Exception* unwind_exception)
|
|
360
|
+
{
|
|
361
|
+
if (classInfo == 0)
|
|
362
|
+
{
|
|
363
|
+
// this should not happen. Indicates corrupted eh_table.
|
|
364
|
+
call_terminate(false, unwind_exception);
|
|
365
|
+
}
|
|
366
|
+
// specIndex is negative of 1-based byte offset into classInfo;
|
|
367
|
+
specIndex = -specIndex;
|
|
368
|
+
--specIndex;
|
|
369
|
+
const uint8_t* temp = classInfo + specIndex;
|
|
370
|
+
// If any type in the spec list can catch excpType, return false, else return true
|
|
371
|
+
// adjustments to adjustedPtr are ignored.
|
|
372
|
+
while (true)
|
|
373
|
+
{
|
|
374
|
+
uint64_t ttypeIndex = readULEB128(&temp);
|
|
375
|
+
if (ttypeIndex == 0)
|
|
376
|
+
break;
|
|
377
|
+
const __shim_type_info* catchType = get_shim_type_info(ttypeIndex,
|
|
378
|
+
classInfo,
|
|
379
|
+
ttypeEncoding,
|
|
380
|
+
true,
|
|
381
|
+
unwind_exception);
|
|
382
|
+
void* tempPtr = adjustedPtr;
|
|
383
|
+
if (catchType->can_catch(excpType, tempPtr))
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
return true;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
static
|
|
390
|
+
void*
|
|
391
|
+
get_thrown_object_ptr(_Unwind_Exception* unwind_exception)
|
|
392
|
+
{
|
|
393
|
+
// Even for foreign exceptions, the exception object is *probably* at unwind_exception + 1
|
|
394
|
+
// Regardless, this library is prohibited from touching a foreign exception
|
|
395
|
+
void* adjustedPtr = unwind_exception + 1;
|
|
396
|
+
if (unwind_exception->exception_class == kOurDependentExceptionClass)
|
|
397
|
+
adjustedPtr = ((__cxa_dependent_exception*)adjustedPtr - 1)->primaryException;
|
|
398
|
+
return adjustedPtr;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
namespace
|
|
402
|
+
{
|
|
403
|
+
|
|
404
|
+
struct scan_results
|
|
405
|
+
{
|
|
406
|
+
int64_t ttypeIndex; // > 0 catch handler, < 0 exception spec handler, == 0 a cleanup
|
|
407
|
+
const uint8_t* actionRecord; // Currently unused. Retained to ease future maintenance.
|
|
408
|
+
const uint8_t* languageSpecificData; // Needed only for __cxa_call_unexpected
|
|
409
|
+
uintptr_t landingPad; // null -> nothing found, else something found
|
|
410
|
+
void* adjustedPtr; // Used in cxa_exception.cpp
|
|
411
|
+
_Unwind_Reason_Code reason; // One of _URC_FATAL_PHASE1_ERROR,
|
|
412
|
+
// _URC_FATAL_PHASE2_ERROR,
|
|
413
|
+
// _URC_CONTINUE_UNWIND,
|
|
414
|
+
// _URC_HANDLER_FOUND
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
} // unnamed namespace
|
|
418
|
+
|
|
419
|
+
static
|
|
420
|
+
void
|
|
421
|
+
set_registers(_Unwind_Exception* unwind_exception, _Unwind_Context* context,
|
|
422
|
+
const scan_results& results)
|
|
423
|
+
{
|
|
424
|
+
#if __arm__
|
|
425
|
+
_Unwind_SetGR(context, 0, reinterpret_cast<uintptr_t>(unwind_exception));
|
|
426
|
+
_Unwind_SetGR(context, 1, static_cast<uintptr_t>(results.ttypeIndex));
|
|
427
|
+
#else
|
|
428
|
+
_Unwind_SetGR(context, __builtin_eh_return_data_regno(0),
|
|
429
|
+
reinterpret_cast<uintptr_t>(unwind_exception));
|
|
430
|
+
_Unwind_SetGR(context, __builtin_eh_return_data_regno(1),
|
|
431
|
+
static_cast<uintptr_t>(results.ttypeIndex));
|
|
432
|
+
#endif
|
|
433
|
+
_Unwind_SetIP(context, results.landingPad);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/*
|
|
437
|
+
There are 3 types of scans needed:
|
|
438
|
+
|
|
439
|
+
1. Scan for handler with native or foreign exception. If handler found,
|
|
440
|
+
save state and return _URC_HANDLER_FOUND, else return _URC_CONTINUE_UNWIND.
|
|
441
|
+
May also report an error on invalid input.
|
|
442
|
+
May terminate for invalid exception table.
|
|
443
|
+
_UA_SEARCH_PHASE
|
|
444
|
+
|
|
445
|
+
2. Scan for handler with foreign exception. Must return _URC_HANDLER_FOUND,
|
|
446
|
+
or call terminate.
|
|
447
|
+
_UA_CLEANUP_PHASE && _UA_HANDLER_FRAME && !native_exception
|
|
448
|
+
|
|
449
|
+
3. Scan for cleanups. If a handler is found and this isn't forced unwind,
|
|
450
|
+
then terminate, otherwise ignore the handler and keep looking for cleanup.
|
|
451
|
+
If a cleanup is found, return _URC_HANDLER_FOUND, else return _URC_CONTINUE_UNWIND.
|
|
452
|
+
May also report an error on invalid input.
|
|
453
|
+
May terminate for invalid exception table.
|
|
454
|
+
_UA_CLEANUP_PHASE && !_UA_HANDLER_FRAME
|
|
455
|
+
*/
|
|
456
|
+
|
|
457
|
+
static
|
|
458
|
+
void
|
|
459
|
+
scan_eh_tab(scan_results& results, _Unwind_Action actions, bool native_exception,
|
|
460
|
+
_Unwind_Exception* unwind_exception, _Unwind_Context* context)
|
|
461
|
+
{
|
|
462
|
+
// Initialize results to found nothing but an error
|
|
463
|
+
results.ttypeIndex = 0;
|
|
464
|
+
results.actionRecord = 0;
|
|
465
|
+
results.languageSpecificData = 0;
|
|
466
|
+
results.landingPad = 0;
|
|
467
|
+
results.adjustedPtr = 0;
|
|
468
|
+
results.reason = _URC_FATAL_PHASE1_ERROR;
|
|
469
|
+
// Check for consistent actions
|
|
470
|
+
if (actions & _UA_SEARCH_PHASE)
|
|
471
|
+
{
|
|
472
|
+
// Do Phase 1
|
|
473
|
+
if (actions & (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME | _UA_FORCE_UNWIND))
|
|
474
|
+
{
|
|
475
|
+
// None of these flags should be set during Phase 1
|
|
476
|
+
// Client error
|
|
477
|
+
results.reason = _URC_FATAL_PHASE1_ERROR;
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
else if (actions & _UA_CLEANUP_PHASE)
|
|
482
|
+
{
|
|
483
|
+
if ((actions & _UA_HANDLER_FRAME) && (actions & _UA_FORCE_UNWIND))
|
|
484
|
+
{
|
|
485
|
+
// _UA_HANDLER_FRAME should only be set if phase 1 found a handler.
|
|
486
|
+
// If _UA_FORCE_UNWIND is set, phase 1 shouldn't have happened.
|
|
487
|
+
// Client error
|
|
488
|
+
results.reason = _URC_FATAL_PHASE2_ERROR;
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
else // Neither _UA_SEARCH_PHASE nor _UA_CLEANUP_PHASE is set
|
|
493
|
+
{
|
|
494
|
+
// One of these should be set.
|
|
495
|
+
// Client error
|
|
496
|
+
results.reason = _URC_FATAL_PHASE1_ERROR;
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
// Start scan by getting exception table address
|
|
500
|
+
const uint8_t* lsda = (const uint8_t*)_Unwind_GetLanguageSpecificData(context);
|
|
501
|
+
if (lsda == 0)
|
|
502
|
+
{
|
|
503
|
+
// There is no exception table
|
|
504
|
+
results.reason = _URC_CONTINUE_UNWIND;
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
results.languageSpecificData = lsda;
|
|
508
|
+
// Get the current instruction pointer and offset it before next
|
|
509
|
+
// instruction in the current frame which threw the exception.
|
|
510
|
+
uintptr_t ip = _Unwind_GetIP(context) - 1;
|
|
511
|
+
// Get beginning current frame's code (as defined by the
|
|
512
|
+
// emitted dwarf code)
|
|
513
|
+
uintptr_t funcStart = _Unwind_GetRegionStart(context);
|
|
514
|
+
#if __arm__
|
|
515
|
+
if (ip == uintptr_t(-1))
|
|
516
|
+
{
|
|
517
|
+
// no action
|
|
518
|
+
results.reason = _URC_CONTINUE_UNWIND;
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
else if (ip == 0)
|
|
522
|
+
call_terminate(native_exception, unwind_exception);
|
|
523
|
+
// ip is 1-based index into call site table
|
|
524
|
+
#else // __arm__
|
|
525
|
+
uintptr_t ipOffset = ip - funcStart;
|
|
526
|
+
#endif // __arm__
|
|
527
|
+
const uint8_t* classInfo = NULL;
|
|
528
|
+
// Note: See JITDwarfEmitter::EmitExceptionTable(...) for corresponding
|
|
529
|
+
// dwarf emission
|
|
530
|
+
// Parse LSDA header.
|
|
531
|
+
uint8_t lpStartEncoding = *lsda++;
|
|
532
|
+
const uint8_t* lpStart = (const uint8_t*)readEncodedPointer(&lsda, lpStartEncoding);
|
|
533
|
+
if (lpStart == 0)
|
|
534
|
+
lpStart = (const uint8_t*)funcStart;
|
|
535
|
+
uint8_t ttypeEncoding = *lsda++;
|
|
536
|
+
if (ttypeEncoding != DW_EH_PE_omit)
|
|
537
|
+
{
|
|
538
|
+
// Calculate type info locations in emitted dwarf code which
|
|
539
|
+
// were flagged by type info arguments to llvm.eh.selector
|
|
540
|
+
// intrinsic
|
|
541
|
+
uintptr_t classInfoOffset = readULEB128(&lsda);
|
|
542
|
+
classInfo = lsda + classInfoOffset;
|
|
543
|
+
}
|
|
544
|
+
// Walk call-site table looking for range that
|
|
545
|
+
// includes current PC.
|
|
546
|
+
uint8_t callSiteEncoding = *lsda++;
|
|
547
|
+
#if __arm__
|
|
548
|
+
(void)callSiteEncoding; // On arm callSiteEncoding is never used
|
|
549
|
+
#endif
|
|
550
|
+
uint32_t callSiteTableLength = static_cast<uint32_t>(readULEB128(&lsda));
|
|
551
|
+
const uint8_t* callSiteTableStart = lsda;
|
|
552
|
+
const uint8_t* callSiteTableEnd = callSiteTableStart + callSiteTableLength;
|
|
553
|
+
const uint8_t* actionTableStart = callSiteTableEnd;
|
|
554
|
+
const uint8_t* callSitePtr = callSiteTableStart;
|
|
555
|
+
while (callSitePtr < callSiteTableEnd)
|
|
556
|
+
{
|
|
557
|
+
// There is one entry per call site.
|
|
558
|
+
#if !__arm__
|
|
559
|
+
// The call sites are non-overlapping in [start, start+length)
|
|
560
|
+
// The call sites are ordered in increasing value of start
|
|
561
|
+
uintptr_t start = readEncodedPointer(&callSitePtr, callSiteEncoding);
|
|
562
|
+
uintptr_t length = readEncodedPointer(&callSitePtr, callSiteEncoding);
|
|
563
|
+
uintptr_t landingPad = readEncodedPointer(&callSitePtr, callSiteEncoding);
|
|
564
|
+
uintptr_t actionEntry = readULEB128(&callSitePtr);
|
|
565
|
+
if ((start <= ipOffset) && (ipOffset < (start + length)))
|
|
566
|
+
#else // __arm__
|
|
567
|
+
// ip is 1-based index into this table
|
|
568
|
+
uintptr_t landingPad = readULEB128(&callSitePtr);
|
|
569
|
+
uintptr_t actionEntry = readULEB128(&callSitePtr);
|
|
570
|
+
if (--ip == 0)
|
|
571
|
+
#endif // __arm__
|
|
572
|
+
{
|
|
573
|
+
// Found the call site containing ip.
|
|
574
|
+
#if !__arm__
|
|
575
|
+
if (landingPad == 0)
|
|
576
|
+
{
|
|
577
|
+
// No handler here
|
|
578
|
+
results.reason = _URC_CONTINUE_UNWIND;
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
landingPad = (uintptr_t)lpStart + landingPad;
|
|
582
|
+
#else // __arm__
|
|
583
|
+
++landingPad;
|
|
584
|
+
#endif // __arm__
|
|
585
|
+
if (actionEntry == 0)
|
|
586
|
+
{
|
|
587
|
+
// Found a cleanup
|
|
588
|
+
// If this is a type 1 or type 2 search, there are no handlers
|
|
589
|
+
// If this is a type 3 search, you want to install the cleanup.
|
|
590
|
+
if ((actions & _UA_CLEANUP_PHASE) && !(actions & _UA_HANDLER_FRAME))
|
|
591
|
+
{
|
|
592
|
+
results.ttypeIndex = 0; // Redundant but clarifying
|
|
593
|
+
results.landingPad = landingPad;
|
|
594
|
+
results.reason = _URC_HANDLER_FOUND;
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
// No handler here
|
|
598
|
+
results.reason = _URC_CONTINUE_UNWIND;
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
// Convert 1-based byte offset into
|
|
602
|
+
const uint8_t* action = actionTableStart + (actionEntry - 1);
|
|
603
|
+
// Scan action entries until you find a matching handler, cleanup, or the end of action list
|
|
604
|
+
while (true)
|
|
605
|
+
{
|
|
606
|
+
const uint8_t* actionRecord = action;
|
|
607
|
+
int64_t ttypeIndex = readSLEB128(&action);
|
|
608
|
+
if (ttypeIndex > 0)
|
|
609
|
+
{
|
|
610
|
+
// Found a catch, does it actually catch?
|
|
611
|
+
// First check for catch (...)
|
|
612
|
+
const __shim_type_info* catchType =
|
|
613
|
+
get_shim_type_info(static_cast<uint64_t>(ttypeIndex),
|
|
614
|
+
classInfo, ttypeEncoding,
|
|
615
|
+
native_exception, unwind_exception);
|
|
616
|
+
if (catchType == 0)
|
|
617
|
+
{
|
|
618
|
+
// Found catch (...) catches everything, including foreign exceptions
|
|
619
|
+
// If this is a type 1 search save state and return _URC_HANDLER_FOUND
|
|
620
|
+
// If this is a type 2 search save state and return _URC_HANDLER_FOUND
|
|
621
|
+
// If this is a type 3 search !_UA_FORCE_UNWIND, we should have found this in phase 1!
|
|
622
|
+
// If this is a type 3 search _UA_FORCE_UNWIND, ignore handler and continue scan
|
|
623
|
+
if ((actions & _UA_SEARCH_PHASE) || (actions & _UA_HANDLER_FRAME))
|
|
624
|
+
{
|
|
625
|
+
// Save state and return _URC_HANDLER_FOUND
|
|
626
|
+
results.ttypeIndex = ttypeIndex;
|
|
627
|
+
results.actionRecord = actionRecord;
|
|
628
|
+
results.landingPad = landingPad;
|
|
629
|
+
results.adjustedPtr = get_thrown_object_ptr(unwind_exception);
|
|
630
|
+
results.reason = _URC_HANDLER_FOUND;
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
else if (!(actions & _UA_FORCE_UNWIND))
|
|
634
|
+
{
|
|
635
|
+
// It looks like the exception table has changed
|
|
636
|
+
// on us. Likely stack corruption!
|
|
637
|
+
call_terminate(native_exception, unwind_exception);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
// Else this is a catch (T) clause and will never
|
|
641
|
+
// catch a foreign exception
|
|
642
|
+
else if (native_exception)
|
|
643
|
+
{
|
|
644
|
+
__cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1;
|
|
645
|
+
void* adjustedPtr = get_thrown_object_ptr(unwind_exception);
|
|
646
|
+
const __shim_type_info* excpType =
|
|
647
|
+
static_cast<const __shim_type_info*>(exception_header->exceptionType);
|
|
648
|
+
if (adjustedPtr == 0 || excpType == 0)
|
|
649
|
+
{
|
|
650
|
+
// Something very bad happened
|
|
651
|
+
call_terminate(native_exception, unwind_exception);
|
|
652
|
+
}
|
|
653
|
+
if (catchType->can_catch(excpType, adjustedPtr))
|
|
654
|
+
{
|
|
655
|
+
// Found a matching handler
|
|
656
|
+
// If this is a type 1 search save state and return _URC_HANDLER_FOUND
|
|
657
|
+
// If this is a type 3 search and !_UA_FORCE_UNWIND, we should have found this in phase 1!
|
|
658
|
+
// If this is a type 3 search and _UA_FORCE_UNWIND, ignore handler and continue scan
|
|
659
|
+
if (actions & _UA_SEARCH_PHASE)
|
|
660
|
+
{
|
|
661
|
+
// Save state and return _URC_HANDLER_FOUND
|
|
662
|
+
results.ttypeIndex = ttypeIndex;
|
|
663
|
+
results.actionRecord = actionRecord;
|
|
664
|
+
results.landingPad = landingPad;
|
|
665
|
+
results.adjustedPtr = adjustedPtr;
|
|
666
|
+
results.reason = _URC_HANDLER_FOUND;
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
else if (!(actions & _UA_FORCE_UNWIND))
|
|
670
|
+
{
|
|
671
|
+
// It looks like the exception table has changed
|
|
672
|
+
// on us. Likely stack corruption!
|
|
673
|
+
call_terminate(native_exception, unwind_exception);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
// Scan next action ...
|
|
678
|
+
}
|
|
679
|
+
else if (ttypeIndex < 0)
|
|
680
|
+
{
|
|
681
|
+
// Found an exception spec. If this is a foreign exception,
|
|
682
|
+
// it is always caught.
|
|
683
|
+
if (native_exception)
|
|
684
|
+
{
|
|
685
|
+
// Does the exception spec catch this native exception?
|
|
686
|
+
__cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1;
|
|
687
|
+
void* adjustedPtr = get_thrown_object_ptr(unwind_exception);
|
|
688
|
+
const __shim_type_info* excpType =
|
|
689
|
+
static_cast<const __shim_type_info*>(exception_header->exceptionType);
|
|
690
|
+
if (adjustedPtr == 0 || excpType == 0)
|
|
691
|
+
{
|
|
692
|
+
// Something very bad happened
|
|
693
|
+
call_terminate(native_exception, unwind_exception);
|
|
694
|
+
}
|
|
695
|
+
if (exception_spec_can_catch(ttypeIndex, classInfo,
|
|
696
|
+
ttypeEncoding, excpType,
|
|
697
|
+
adjustedPtr, unwind_exception))
|
|
698
|
+
{
|
|
699
|
+
// native exception caught by exception spec
|
|
700
|
+
// If this is a type 1 search, save state and return _URC_HANDLER_FOUND
|
|
701
|
+
// If this is a type 3 search !_UA_FORCE_UNWIND, we should have found this in phase 1!
|
|
702
|
+
// If this is a type 3 search _UA_FORCE_UNWIND, ignore handler and continue scan
|
|
703
|
+
if (actions & _UA_SEARCH_PHASE)
|
|
704
|
+
{
|
|
705
|
+
// Save state and return _URC_HANDLER_FOUND
|
|
706
|
+
results.ttypeIndex = ttypeIndex;
|
|
707
|
+
results.actionRecord = actionRecord;
|
|
708
|
+
results.landingPad = landingPad;
|
|
709
|
+
results.adjustedPtr = adjustedPtr;
|
|
710
|
+
results.reason = _URC_HANDLER_FOUND;
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
else if (!(actions & _UA_FORCE_UNWIND))
|
|
714
|
+
{
|
|
715
|
+
// It looks like the exception table has changed
|
|
716
|
+
// on us. Likely stack corruption!
|
|
717
|
+
call_terminate(native_exception, unwind_exception);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
else
|
|
722
|
+
{
|
|
723
|
+
// foreign exception caught by exception spec
|
|
724
|
+
// If this is a type 1 search, save state and return _URC_HANDLER_FOUND
|
|
725
|
+
// If this is a type 2 search, save state and return _URC_HANDLER_FOUND
|
|
726
|
+
// If this is a type 3 search !_UA_FORCE_UNWIND, we should have found this in phase 1!
|
|
727
|
+
// If this is a type 3 search _UA_FORCE_UNWIND, ignore handler and continue scan
|
|
728
|
+
if ((actions & _UA_SEARCH_PHASE) || (actions & _UA_HANDLER_FRAME))
|
|
729
|
+
{
|
|
730
|
+
// Save state and return _URC_HANDLER_FOUND
|
|
731
|
+
results.ttypeIndex = ttypeIndex;
|
|
732
|
+
results.actionRecord = actionRecord;
|
|
733
|
+
results.landingPad = landingPad;
|
|
734
|
+
results.adjustedPtr = get_thrown_object_ptr(unwind_exception);
|
|
735
|
+
results.reason = _URC_HANDLER_FOUND;
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
else if (!(actions & _UA_FORCE_UNWIND))
|
|
739
|
+
{
|
|
740
|
+
// It looks like the exception table has changed
|
|
741
|
+
// on us. Likely stack corruption!
|
|
742
|
+
call_terminate(native_exception, unwind_exception);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
// Scan next action ...
|
|
746
|
+
}
|
|
747
|
+
else // ttypeIndex == 0
|
|
748
|
+
{
|
|
749
|
+
// Found a cleanup
|
|
750
|
+
// If this is a type 1 search, ignore it and continue scan
|
|
751
|
+
// If this is a type 2 search, ignore it and continue scan
|
|
752
|
+
// If this is a type 3 search, save state and return _URC_HANDLER_FOUND
|
|
753
|
+
if ((actions & _UA_CLEANUP_PHASE) && !(actions & _UA_HANDLER_FRAME))
|
|
754
|
+
{
|
|
755
|
+
// Save state and return _URC_HANDLER_FOUND
|
|
756
|
+
results.ttypeIndex = ttypeIndex;
|
|
757
|
+
results.actionRecord = actionRecord;
|
|
758
|
+
results.landingPad = landingPad;
|
|
759
|
+
results.adjustedPtr = get_thrown_object_ptr(unwind_exception);
|
|
760
|
+
results.reason = _URC_HANDLER_FOUND;
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
const uint8_t* temp = action;
|
|
765
|
+
int64_t actionOffset = readSLEB128(&temp);
|
|
766
|
+
if (actionOffset == 0)
|
|
767
|
+
{
|
|
768
|
+
// End of action list, no matching handler or cleanup found
|
|
769
|
+
results.reason = _URC_CONTINUE_UNWIND;
|
|
770
|
+
return;
|
|
771
|
+
}
|
|
772
|
+
// Go to next action
|
|
773
|
+
action += actionOffset;
|
|
774
|
+
} // there is no break out of this loop, only return
|
|
775
|
+
}
|
|
776
|
+
#if !__arm__
|
|
777
|
+
else if (ipOffset < start)
|
|
778
|
+
{
|
|
779
|
+
// There is no call site for this ip
|
|
780
|
+
// Something bad has happened. We should never get here.
|
|
781
|
+
// Possible stack corruption.
|
|
782
|
+
call_terminate(native_exception, unwind_exception);
|
|
783
|
+
}
|
|
784
|
+
#endif // !__arm__
|
|
785
|
+
} // there might be some tricky cases which break out of this loop
|
|
786
|
+
|
|
787
|
+
// It is possible that no eh table entry specify how to handle
|
|
788
|
+
// this exception. By spec, terminate it immediately.
|
|
789
|
+
call_terminate(native_exception, unwind_exception);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
// public API
|
|
793
|
+
|
|
794
|
+
/*
|
|
795
|
+
The personality function branches on actions like so:
|
|
796
|
+
|
|
797
|
+
_UA_SEARCH_PHASE
|
|
798
|
+
|
|
799
|
+
If _UA_CLEANUP_PHASE or _UA_HANDLER_FRAME or _UA_FORCE_UNWIND there's
|
|
800
|
+
an error from above, return _URC_FATAL_PHASE1_ERROR.
|
|
801
|
+
|
|
802
|
+
Scan for anything that could stop unwinding:
|
|
803
|
+
|
|
804
|
+
1. A catch clause that will catch this exception
|
|
805
|
+
(will never catch foreign).
|
|
806
|
+
2. A catch (...) (will always catch foreign).
|
|
807
|
+
3. An exception spec that will catch this exception
|
|
808
|
+
(will always catch foreign).
|
|
809
|
+
If a handler is found
|
|
810
|
+
If not foreign
|
|
811
|
+
Save state in header
|
|
812
|
+
return _URC_HANDLER_FOUND
|
|
813
|
+
Else a handler not found
|
|
814
|
+
return _URC_CONTINUE_UNWIND
|
|
815
|
+
|
|
816
|
+
_UA_CLEANUP_PHASE
|
|
817
|
+
|
|
818
|
+
If _UA_HANDLER_FRAME
|
|
819
|
+
If _UA_FORCE_UNWIND
|
|
820
|
+
How did this happen? return _URC_FATAL_PHASE2_ERROR
|
|
821
|
+
If foreign
|
|
822
|
+
Do _UA_SEARCH_PHASE to recover state
|
|
823
|
+
else
|
|
824
|
+
Recover state from header
|
|
825
|
+
Transfer control to landing pad. return _URC_INSTALL_CONTEXT
|
|
826
|
+
|
|
827
|
+
Else
|
|
828
|
+
|
|
829
|
+
This branch handles both normal C++ non-catching handlers (cleanups)
|
|
830
|
+
and forced unwinding.
|
|
831
|
+
Scan for anything that can not stop unwinding:
|
|
832
|
+
|
|
833
|
+
1. A cleanup.
|
|
834
|
+
|
|
835
|
+
If a cleanup is found
|
|
836
|
+
transfer control to it. return _URC_INSTALL_CONTEXT
|
|
837
|
+
Else a cleanup is not found: return _URC_CONTINUE_UNWIND
|
|
838
|
+
*/
|
|
839
|
+
|
|
840
|
+
_Unwind_Reason_Code
|
|
841
|
+
#if __arm__
|
|
842
|
+
__gxx_personality_sj0
|
|
843
|
+
#else
|
|
844
|
+
__gxx_personality_v0
|
|
845
|
+
#endif
|
|
846
|
+
(int version, _Unwind_Action actions, uint64_t exceptionClass,
|
|
847
|
+
_Unwind_Exception* unwind_exception, _Unwind_Context* context)
|
|
848
|
+
{
|
|
849
|
+
if (version != 1 || unwind_exception == 0 || context == 0)
|
|
850
|
+
return _URC_FATAL_PHASE1_ERROR;
|
|
851
|
+
bool native_exception = (exceptionClass & get_vendor_and_language) ==
|
|
852
|
+
(kOurExceptionClass & get_vendor_and_language);
|
|
853
|
+
scan_results results;
|
|
854
|
+
if (actions & _UA_SEARCH_PHASE)
|
|
855
|
+
{
|
|
856
|
+
// Phase 1 search: All we're looking for in phase 1 is a handler that
|
|
857
|
+
// halts unwinding
|
|
858
|
+
scan_eh_tab(results, actions, native_exception, unwind_exception, context);
|
|
859
|
+
if (results.reason == _URC_HANDLER_FOUND)
|
|
860
|
+
{
|
|
861
|
+
// Found one. Can we cache the results somewhere to optimize phase 2?
|
|
862
|
+
if (native_exception)
|
|
863
|
+
{
|
|
864
|
+
__cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1;
|
|
865
|
+
exception_header->handlerSwitchValue = static_cast<int>(results.ttypeIndex);
|
|
866
|
+
exception_header->actionRecord = results.actionRecord;
|
|
867
|
+
exception_header->languageSpecificData = results.languageSpecificData;
|
|
868
|
+
exception_header->catchTemp = reinterpret_cast<void*>(results.landingPad);
|
|
869
|
+
exception_header->adjustedPtr = results.adjustedPtr;
|
|
870
|
+
}
|
|
871
|
+
return _URC_HANDLER_FOUND;
|
|
872
|
+
}
|
|
873
|
+
// Did not find a catching-handler. Return the results of the scan
|
|
874
|
+
// (normally _URC_CONTINUE_UNWIND, but could have been _URC_FATAL_PHASE1_ERROR
|
|
875
|
+
// if we were called improperly).
|
|
876
|
+
return results.reason;
|
|
877
|
+
}
|
|
878
|
+
if (actions & _UA_CLEANUP_PHASE)
|
|
879
|
+
{
|
|
880
|
+
// Phase 2 search:
|
|
881
|
+
// Did we find a catching handler in phase 1?
|
|
882
|
+
if (actions & _UA_HANDLER_FRAME)
|
|
883
|
+
{
|
|
884
|
+
// Yes, phase 1 said we have a catching handler here.
|
|
885
|
+
// Did we cache the results of the scan?
|
|
886
|
+
if (native_exception)
|
|
887
|
+
{
|
|
888
|
+
// Yes, reload the results from the cache.
|
|
889
|
+
__cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1;
|
|
890
|
+
results.ttypeIndex = exception_header->handlerSwitchValue;
|
|
891
|
+
results.actionRecord = exception_header->actionRecord;
|
|
892
|
+
results.languageSpecificData = exception_header->languageSpecificData;
|
|
893
|
+
results.landingPad = reinterpret_cast<uintptr_t>(exception_header->catchTemp);
|
|
894
|
+
results.adjustedPtr = exception_header->adjustedPtr;
|
|
895
|
+
}
|
|
896
|
+
else
|
|
897
|
+
{
|
|
898
|
+
// No, do the scan again to reload the results.
|
|
899
|
+
scan_eh_tab(results, actions, native_exception, unwind_exception, context);
|
|
900
|
+
// Phase 1 told us we would find a handler. Now in Phase 2 we
|
|
901
|
+
// didn't find a handler. The eh table should not be changing!
|
|
902
|
+
if (results.reason != _URC_HANDLER_FOUND)
|
|
903
|
+
call_terminate(native_exception, unwind_exception);
|
|
904
|
+
}
|
|
905
|
+
// Jump to the handler
|
|
906
|
+
set_registers(unwind_exception, context, results);
|
|
907
|
+
return _URC_INSTALL_CONTEXT;
|
|
908
|
+
}
|
|
909
|
+
// Either we didn't do a phase 1 search (due to forced unwinding), or
|
|
910
|
+
// phase 1 reported no catching-handlers.
|
|
911
|
+
// Search for a (non-catching) cleanup
|
|
912
|
+
scan_eh_tab(results, actions, native_exception, unwind_exception, context);
|
|
913
|
+
if (results.reason == _URC_HANDLER_FOUND)
|
|
914
|
+
{
|
|
915
|
+
// Found a non-catching handler. Jump to it:
|
|
916
|
+
set_registers(unwind_exception, context, results);
|
|
917
|
+
return _URC_INSTALL_CONTEXT;
|
|
918
|
+
}
|
|
919
|
+
// Did not find a cleanup. Return the results of the scan
|
|
920
|
+
// (normally _URC_CONTINUE_UNWIND, but could have been _URC_FATAL_PHASE2_ERROR
|
|
921
|
+
// if we were called improperly).
|
|
922
|
+
return results.reason;
|
|
923
|
+
}
|
|
924
|
+
// We were called improperly: neither a phase 1 or phase 2 search
|
|
925
|
+
return _URC_FATAL_PHASE1_ERROR;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
__attribute__((noreturn))
|
|
929
|
+
void
|
|
930
|
+
__cxa_call_unexpected(void* arg)
|
|
931
|
+
{
|
|
932
|
+
_Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(arg);
|
|
933
|
+
if (unwind_exception == 0)
|
|
934
|
+
call_terminate(false, unwind_exception);
|
|
935
|
+
__cxa_begin_catch(unwind_exception);
|
|
936
|
+
bool native_old_exception =
|
|
937
|
+
(unwind_exception->exception_class & get_vendor_and_language) ==
|
|
938
|
+
(kOurExceptionClass & get_vendor_and_language);
|
|
939
|
+
std::unexpected_handler u_handler;
|
|
940
|
+
std::terminate_handler t_handler;
|
|
941
|
+
__cxa_exception* old_exception_header = 0;
|
|
942
|
+
int64_t ttypeIndex;
|
|
943
|
+
const uint8_t* lsda;
|
|
944
|
+
if (native_old_exception)
|
|
945
|
+
{
|
|
946
|
+
old_exception_header = (__cxa_exception*)(unwind_exception+1) - 1;
|
|
947
|
+
t_handler = old_exception_header->terminateHandler;
|
|
948
|
+
u_handler = old_exception_header->unexpectedHandler;
|
|
949
|
+
// If std::__unexpected(u_handler) rethrows the same exception,
|
|
950
|
+
// these values get overwritten by the rethrow. So save them now:
|
|
951
|
+
ttypeIndex = old_exception_header->handlerSwitchValue;
|
|
952
|
+
lsda = old_exception_header->languageSpecificData;
|
|
953
|
+
}
|
|
954
|
+
else
|
|
955
|
+
{
|
|
956
|
+
t_handler = std::get_terminate();
|
|
957
|
+
u_handler = std::get_unexpected();
|
|
958
|
+
}
|
|
959
|
+
try
|
|
960
|
+
{
|
|
961
|
+
std::__unexpected(u_handler);
|
|
962
|
+
}
|
|
963
|
+
catch (...)
|
|
964
|
+
{
|
|
965
|
+
// If the old exception is foreign, then all we can do is terminate.
|
|
966
|
+
// We have no way to recover the needed old exception spec. There's
|
|
967
|
+
// no way to pass that information here. And the personality routine
|
|
968
|
+
// can't call us directly and do anything but terminate() if we throw
|
|
969
|
+
// from here.
|
|
970
|
+
if (native_old_exception)
|
|
971
|
+
{
|
|
972
|
+
// Have:
|
|
973
|
+
// old_exception_header->languageSpecificData
|
|
974
|
+
// old_exception_header->actionRecord
|
|
975
|
+
// Need
|
|
976
|
+
// const uint8_t* classInfo
|
|
977
|
+
// uint8_t ttypeEncoding
|
|
978
|
+
uint8_t lpStartEncoding = *lsda++;
|
|
979
|
+
const uint8_t* lpStart = (const uint8_t*)readEncodedPointer(&lsda, lpStartEncoding);
|
|
980
|
+
(void)lpStart; // purposefully unused. Just needed to increment lsda.
|
|
981
|
+
uint8_t ttypeEncoding = *lsda++;
|
|
982
|
+
if (ttypeEncoding == DW_EH_PE_omit)
|
|
983
|
+
std::__terminate(t_handler);
|
|
984
|
+
uintptr_t classInfoOffset = readULEB128(&lsda);
|
|
985
|
+
const uint8_t* classInfo = lsda + classInfoOffset;
|
|
986
|
+
// Is this new exception catchable by the exception spec at ttypeIndex?
|
|
987
|
+
// The answer is obviously yes if the new and old exceptions are the same exception
|
|
988
|
+
// If no
|
|
989
|
+
// throw;
|
|
990
|
+
__cxa_eh_globals* globals = __cxa_get_globals_fast();
|
|
991
|
+
__cxa_exception* new_exception_header = globals->caughtExceptions;
|
|
992
|
+
if (new_exception_header == 0)
|
|
993
|
+
// This shouldn't be able to happen!
|
|
994
|
+
std::__terminate(t_handler);
|
|
995
|
+
bool native_new_exception =
|
|
996
|
+
(new_exception_header->unwindHeader.exception_class & get_vendor_and_language) ==
|
|
997
|
+
(kOurExceptionClass & get_vendor_and_language);
|
|
998
|
+
void* adjustedPtr;
|
|
999
|
+
if (native_new_exception && (new_exception_header != old_exception_header))
|
|
1000
|
+
{
|
|
1001
|
+
const __shim_type_info* excpType =
|
|
1002
|
+
static_cast<const __shim_type_info*>(new_exception_header->exceptionType);
|
|
1003
|
+
adjustedPtr =
|
|
1004
|
+
new_exception_header->unwindHeader.exception_class == kOurDependentExceptionClass ?
|
|
1005
|
+
((__cxa_dependent_exception*)new_exception_header)->primaryException :
|
|
1006
|
+
new_exception_header + 1;
|
|
1007
|
+
if (!exception_spec_can_catch(ttypeIndex, classInfo, ttypeEncoding,
|
|
1008
|
+
excpType, adjustedPtr, unwind_exception))
|
|
1009
|
+
{
|
|
1010
|
+
// We need to __cxa_end_catch, but for the old exception,
|
|
1011
|
+
// not the new one. This is a little tricky ...
|
|
1012
|
+
// Disguise new_exception_header as a rethrown exception, but
|
|
1013
|
+
// don't actually rethrow it. This means you can temporarily
|
|
1014
|
+
// end the catch clause enclosing new_exception_header without
|
|
1015
|
+
// __cxa_end_catch destroying new_exception_header.
|
|
1016
|
+
new_exception_header->handlerCount = -new_exception_header->handlerCount;
|
|
1017
|
+
globals->uncaughtExceptions += 1;
|
|
1018
|
+
// Call __cxa_end_catch for new_exception_header
|
|
1019
|
+
__cxa_end_catch();
|
|
1020
|
+
// Call __cxa_end_catch for old_exception_header
|
|
1021
|
+
__cxa_end_catch();
|
|
1022
|
+
// Renter this catch clause with new_exception_header
|
|
1023
|
+
__cxa_begin_catch(&new_exception_header->unwindHeader);
|
|
1024
|
+
// Rethrow new_exception_header
|
|
1025
|
+
throw;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
// Will a std::bad_exception be catchable by the exception spec at
|
|
1029
|
+
// ttypeIndex?
|
|
1030
|
+
// If no
|
|
1031
|
+
// throw std::bad_exception();
|
|
1032
|
+
const __shim_type_info* excpType =
|
|
1033
|
+
static_cast<const __shim_type_info*>(&typeid(std::bad_exception));
|
|
1034
|
+
std::bad_exception be;
|
|
1035
|
+
adjustedPtr = &be;
|
|
1036
|
+
if (!exception_spec_can_catch(ttypeIndex, classInfo, ttypeEncoding,
|
|
1037
|
+
excpType, adjustedPtr, unwind_exception))
|
|
1038
|
+
{
|
|
1039
|
+
// We need to __cxa_end_catch for both the old exception and the
|
|
1040
|
+
// new exception. Technically we should do it in that order.
|
|
1041
|
+
// But it is expedient to do it in the opposite order:
|
|
1042
|
+
// Call __cxa_end_catch for new_exception_header
|
|
1043
|
+
__cxa_end_catch();
|
|
1044
|
+
// Throw std::bad_exception will __cxa_end_catch for
|
|
1045
|
+
// old_exception_header
|
|
1046
|
+
throw be;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
std::__terminate(t_handler);
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
} // extern "C"
|
|
1054
|
+
|
|
1055
|
+
} // __cxxabiv1
|