webruby 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,1945 @@
|
|
1
|
+
// -*- C++ -*-
|
2
|
+
//===----------------------------------------------------------------------===//
|
3
|
+
//
|
4
|
+
// The LLVM Compiler Infrastructure
|
5
|
+
//
|
6
|
+
// This file is dual licensed under the MIT and the University of Illinois Open
|
7
|
+
// Source Licenses. See LICENSE.TXT for details.
|
8
|
+
//
|
9
|
+
//===----------------------------------------------------------------------===//
|
10
|
+
|
11
|
+
#ifndef _LIBCPP__HASH_TABLE
|
12
|
+
#define _LIBCPP__HASH_TABLE
|
13
|
+
|
14
|
+
#include <__config>
|
15
|
+
#include <initializer_list>
|
16
|
+
#include <memory>
|
17
|
+
#include <iterator>
|
18
|
+
#include <algorithm>
|
19
|
+
#include <cmath>
|
20
|
+
|
21
|
+
#include <__undef_min_max>
|
22
|
+
|
23
|
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
24
|
+
#pragma GCC system_header
|
25
|
+
#endif
|
26
|
+
|
27
|
+
_LIBCPP_BEGIN_NAMESPACE_STD
|
28
|
+
|
29
|
+
_LIBCPP_FUNC_VIS
|
30
|
+
size_t __next_prime(size_t __n);
|
31
|
+
|
32
|
+
template <class _NodePtr>
|
33
|
+
struct __hash_node_base
|
34
|
+
{
|
35
|
+
typedef __hash_node_base __first_node;
|
36
|
+
// typedef _NodePtr pointer;
|
37
|
+
|
38
|
+
_NodePtr __next_;
|
39
|
+
|
40
|
+
_LIBCPP_INLINE_VISIBILITY __hash_node_base() _NOEXCEPT : __next_(nullptr) {}
|
41
|
+
};
|
42
|
+
|
43
|
+
template <class _Tp, class _VoidPtr>
|
44
|
+
struct __hash_node
|
45
|
+
: public __hash_node_base
|
46
|
+
<
|
47
|
+
typename pointer_traits<_VoidPtr>::template
|
48
|
+
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
49
|
+
rebind<__hash_node<_Tp, _VoidPtr> >
|
50
|
+
#else
|
51
|
+
rebind<__hash_node<_Tp, _VoidPtr> >::other
|
52
|
+
#endif
|
53
|
+
>
|
54
|
+
{
|
55
|
+
typedef _Tp value_type;
|
56
|
+
|
57
|
+
size_t __hash_;
|
58
|
+
value_type __value_;
|
59
|
+
};
|
60
|
+
|
61
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
62
|
+
bool
|
63
|
+
__is_power2(size_t __bc)
|
64
|
+
{
|
65
|
+
return __bc > 2 && !(__bc & (__bc - 1));
|
66
|
+
}
|
67
|
+
|
68
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
69
|
+
size_t
|
70
|
+
__constrain_hash(size_t __h, size_t __bc)
|
71
|
+
{
|
72
|
+
return !(__bc & (__bc - 1)) ? __h & (__bc - 1) : __h % __bc;
|
73
|
+
}
|
74
|
+
|
75
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
76
|
+
size_t
|
77
|
+
__next_pow2(size_t __n)
|
78
|
+
{
|
79
|
+
return size_t(1) << (std::numeric_limits<size_t>::digits - __clz(__n-1));
|
80
|
+
}
|
81
|
+
|
82
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc> class __hash_table;
|
83
|
+
template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS __hash_const_iterator;
|
84
|
+
template <class _HashIterator> class _LIBCPP_TYPE_VIS __hash_map_iterator;
|
85
|
+
template <class _HashIterator> class _LIBCPP_TYPE_VIS __hash_map_const_iterator;
|
86
|
+
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
87
|
+
class _LIBCPP_TYPE_VIS unordered_map;
|
88
|
+
|
89
|
+
template <class _NodePtr>
|
90
|
+
class _LIBCPP_TYPE_VIS __hash_iterator
|
91
|
+
{
|
92
|
+
typedef _NodePtr __node_pointer;
|
93
|
+
|
94
|
+
__node_pointer __node_;
|
95
|
+
|
96
|
+
public:
|
97
|
+
typedef forward_iterator_tag iterator_category;
|
98
|
+
typedef typename pointer_traits<__node_pointer>::element_type::value_type value_type;
|
99
|
+
typedef typename pointer_traits<__node_pointer>::difference_type difference_type;
|
100
|
+
typedef value_type& reference;
|
101
|
+
typedef typename pointer_traits<__node_pointer>::template
|
102
|
+
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
103
|
+
rebind<value_type>
|
104
|
+
#else
|
105
|
+
rebind<value_type>::other
|
106
|
+
#endif
|
107
|
+
pointer;
|
108
|
+
|
109
|
+
_LIBCPP_INLINE_VISIBILITY __hash_iterator() _NOEXCEPT {}
|
110
|
+
|
111
|
+
_LIBCPP_INLINE_VISIBILITY
|
112
|
+
reference operator*() const {return __node_->__value_;}
|
113
|
+
_LIBCPP_INLINE_VISIBILITY
|
114
|
+
pointer operator->() const {return _VSTD::addressof(__node_->__value_);}
|
115
|
+
|
116
|
+
_LIBCPP_INLINE_VISIBILITY
|
117
|
+
__hash_iterator& operator++()
|
118
|
+
{
|
119
|
+
__node_ = __node_->__next_;
|
120
|
+
return *this;
|
121
|
+
}
|
122
|
+
|
123
|
+
_LIBCPP_INLINE_VISIBILITY
|
124
|
+
__hash_iterator operator++(int)
|
125
|
+
{
|
126
|
+
__hash_iterator __t(*this);
|
127
|
+
++(*this);
|
128
|
+
return __t;
|
129
|
+
}
|
130
|
+
|
131
|
+
friend _LIBCPP_INLINE_VISIBILITY
|
132
|
+
bool operator==(const __hash_iterator& __x, const __hash_iterator& __y)
|
133
|
+
{return __x.__node_ == __y.__node_;}
|
134
|
+
friend _LIBCPP_INLINE_VISIBILITY
|
135
|
+
bool operator!=(const __hash_iterator& __x, const __hash_iterator& __y)
|
136
|
+
{return __x.__node_ != __y.__node_;}
|
137
|
+
|
138
|
+
private:
|
139
|
+
_LIBCPP_INLINE_VISIBILITY
|
140
|
+
__hash_iterator(__node_pointer __node) _NOEXCEPT
|
141
|
+
: __node_(__node)
|
142
|
+
{}
|
143
|
+
|
144
|
+
template <class, class, class, class> friend class __hash_table;
|
145
|
+
template <class> friend class _LIBCPP_TYPE_VIS __hash_const_iterator;
|
146
|
+
template <class> friend class _LIBCPP_TYPE_VIS __hash_map_iterator;
|
147
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_map;
|
148
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_multimap;
|
149
|
+
};
|
150
|
+
|
151
|
+
template <class _ConstNodePtr>
|
152
|
+
class _LIBCPP_TYPE_VIS __hash_const_iterator
|
153
|
+
{
|
154
|
+
typedef _ConstNodePtr __node_pointer;
|
155
|
+
|
156
|
+
__node_pointer __node_;
|
157
|
+
|
158
|
+
typedef typename remove_const<
|
159
|
+
typename pointer_traits<__node_pointer>::element_type
|
160
|
+
>::type __node;
|
161
|
+
|
162
|
+
public:
|
163
|
+
typedef forward_iterator_tag iterator_category;
|
164
|
+
typedef typename __node::value_type value_type;
|
165
|
+
typedef typename pointer_traits<__node_pointer>::difference_type difference_type;
|
166
|
+
typedef const value_type& reference;
|
167
|
+
typedef typename pointer_traits<__node_pointer>::template
|
168
|
+
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
169
|
+
rebind<const value_type>
|
170
|
+
#else
|
171
|
+
rebind<const value_type>::other
|
172
|
+
#endif
|
173
|
+
pointer;
|
174
|
+
typedef typename pointer_traits<__node_pointer>::template
|
175
|
+
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
176
|
+
rebind<__node>
|
177
|
+
#else
|
178
|
+
rebind<__node>::other
|
179
|
+
#endif
|
180
|
+
__non_const_node_pointer;
|
181
|
+
typedef __hash_iterator<__non_const_node_pointer> __non_const_iterator;
|
182
|
+
|
183
|
+
_LIBCPP_INLINE_VISIBILITY __hash_const_iterator() _NOEXCEPT {}
|
184
|
+
_LIBCPP_INLINE_VISIBILITY
|
185
|
+
__hash_const_iterator(const __non_const_iterator& __x) _NOEXCEPT
|
186
|
+
: __node_(__x.__node_)
|
187
|
+
{}
|
188
|
+
|
189
|
+
_LIBCPP_INLINE_VISIBILITY
|
190
|
+
reference operator*() const {return __node_->__value_;}
|
191
|
+
_LIBCPP_INLINE_VISIBILITY
|
192
|
+
pointer operator->() const {return _VSTD::addressof(__node_->__value_);}
|
193
|
+
|
194
|
+
_LIBCPP_INLINE_VISIBILITY
|
195
|
+
__hash_const_iterator& operator++()
|
196
|
+
{
|
197
|
+
__node_ = __node_->__next_;
|
198
|
+
return *this;
|
199
|
+
}
|
200
|
+
|
201
|
+
_LIBCPP_INLINE_VISIBILITY
|
202
|
+
__hash_const_iterator operator++(int)
|
203
|
+
{
|
204
|
+
__hash_const_iterator __t(*this);
|
205
|
+
++(*this);
|
206
|
+
return __t;
|
207
|
+
}
|
208
|
+
|
209
|
+
friend _LIBCPP_INLINE_VISIBILITY
|
210
|
+
bool operator==(const __hash_const_iterator& __x, const __hash_const_iterator& __y)
|
211
|
+
{return __x.__node_ == __y.__node_;}
|
212
|
+
friend _LIBCPP_INLINE_VISIBILITY
|
213
|
+
bool operator!=(const __hash_const_iterator& __x, const __hash_const_iterator& __y)
|
214
|
+
{return __x.__node_ != __y.__node_;}
|
215
|
+
|
216
|
+
private:
|
217
|
+
_LIBCPP_INLINE_VISIBILITY
|
218
|
+
__hash_const_iterator(__node_pointer __node) _NOEXCEPT
|
219
|
+
: __node_(__node)
|
220
|
+
{}
|
221
|
+
|
222
|
+
template <class, class, class, class> friend class __hash_table;
|
223
|
+
template <class> friend class _LIBCPP_TYPE_VIS __hash_map_const_iterator;
|
224
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_map;
|
225
|
+
template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_multimap;
|
226
|
+
};
|
227
|
+
|
228
|
+
template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS __hash_const_local_iterator;
|
229
|
+
|
230
|
+
template <class _NodePtr>
|
231
|
+
class _LIBCPP_TYPE_VIS __hash_local_iterator
|
232
|
+
{
|
233
|
+
typedef _NodePtr __node_pointer;
|
234
|
+
|
235
|
+
__node_pointer __node_;
|
236
|
+
size_t __bucket_;
|
237
|
+
size_t __bucket_count_;
|
238
|
+
|
239
|
+
typedef pointer_traits<__node_pointer> __pointer_traits;
|
240
|
+
public:
|
241
|
+
typedef forward_iterator_tag iterator_category;
|
242
|
+
typedef typename __pointer_traits::element_type::value_type value_type;
|
243
|
+
typedef typename __pointer_traits::difference_type difference_type;
|
244
|
+
typedef value_type& reference;
|
245
|
+
typedef typename __pointer_traits::template
|
246
|
+
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
247
|
+
rebind<value_type>
|
248
|
+
#else
|
249
|
+
rebind<value_type>::other
|
250
|
+
#endif
|
251
|
+
pointer;
|
252
|
+
|
253
|
+
_LIBCPP_INLINE_VISIBILITY __hash_local_iterator() _NOEXCEPT {}
|
254
|
+
|
255
|
+
_LIBCPP_INLINE_VISIBILITY
|
256
|
+
reference operator*() const {return __node_->__value_;}
|
257
|
+
_LIBCPP_INLINE_VISIBILITY
|
258
|
+
pointer operator->() const {return &__node_->__value_;}
|
259
|
+
|
260
|
+
_LIBCPP_INLINE_VISIBILITY
|
261
|
+
__hash_local_iterator& operator++()
|
262
|
+
{
|
263
|
+
__node_ = __node_->__next_;
|
264
|
+
if (__node_ != nullptr && __constrain_hash(__node_->__hash_, __bucket_count_) != __bucket_)
|
265
|
+
__node_ = nullptr;
|
266
|
+
return *this;
|
267
|
+
}
|
268
|
+
|
269
|
+
_LIBCPP_INLINE_VISIBILITY
|
270
|
+
__hash_local_iterator operator++(int)
|
271
|
+
{
|
272
|
+
__hash_local_iterator __t(*this);
|
273
|
+
++(*this);
|
274
|
+
return __t;
|
275
|
+
}
|
276
|
+
|
277
|
+
friend _LIBCPP_INLINE_VISIBILITY
|
278
|
+
bool operator==(const __hash_local_iterator& __x, const __hash_local_iterator& __y)
|
279
|
+
{return __x.__node_ == __y.__node_;}
|
280
|
+
friend _LIBCPP_INLINE_VISIBILITY
|
281
|
+
bool operator!=(const __hash_local_iterator& __x, const __hash_local_iterator& __y)
|
282
|
+
{return __x.__node_ != __y.__node_;}
|
283
|
+
|
284
|
+
private:
|
285
|
+
_LIBCPP_INLINE_VISIBILITY
|
286
|
+
__hash_local_iterator(__node_pointer __node, size_t __bucket,
|
287
|
+
size_t __bucket_count) _NOEXCEPT
|
288
|
+
: __node_(__node),
|
289
|
+
__bucket_(__bucket),
|
290
|
+
__bucket_count_(__bucket_count)
|
291
|
+
{
|
292
|
+
if (__node_ != nullptr)
|
293
|
+
__node_ = __node_->__next_;
|
294
|
+
}
|
295
|
+
|
296
|
+
template <class, class, class, class> friend class __hash_table;
|
297
|
+
template <class> friend class _LIBCPP_TYPE_VIS __hash_const_local_iterator;
|
298
|
+
template <class> friend class _LIBCPP_TYPE_VIS __hash_map_iterator;
|
299
|
+
};
|
300
|
+
|
301
|
+
template <class _ConstNodePtr>
|
302
|
+
class _LIBCPP_TYPE_VIS __hash_const_local_iterator
|
303
|
+
{
|
304
|
+
typedef _ConstNodePtr __node_pointer;
|
305
|
+
|
306
|
+
__node_pointer __node_;
|
307
|
+
size_t __bucket_;
|
308
|
+
size_t __bucket_count_;
|
309
|
+
|
310
|
+
typedef pointer_traits<__node_pointer> __pointer_traits;
|
311
|
+
typedef typename __pointer_traits::element_type __node;
|
312
|
+
typedef typename remove_const<__node>::type __non_const_node;
|
313
|
+
typedef typename pointer_traits<__node_pointer>::template
|
314
|
+
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
315
|
+
rebind<__non_const_node>
|
316
|
+
#else
|
317
|
+
rebind<__non_const_node>::other
|
318
|
+
#endif
|
319
|
+
__non_const_node_pointer;
|
320
|
+
typedef __hash_local_iterator<__non_const_node_pointer>
|
321
|
+
__non_const_iterator;
|
322
|
+
public:
|
323
|
+
typedef forward_iterator_tag iterator_category;
|
324
|
+
typedef typename remove_const<
|
325
|
+
typename __pointer_traits::element_type::value_type
|
326
|
+
>::type value_type;
|
327
|
+
typedef typename __pointer_traits::difference_type difference_type;
|
328
|
+
typedef const value_type& reference;
|
329
|
+
typedef typename __pointer_traits::template
|
330
|
+
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
331
|
+
rebind<const value_type>
|
332
|
+
#else
|
333
|
+
rebind<const value_type>::other
|
334
|
+
#endif
|
335
|
+
pointer;
|
336
|
+
|
337
|
+
_LIBCPP_INLINE_VISIBILITY __hash_const_local_iterator() _NOEXCEPT {}
|
338
|
+
_LIBCPP_INLINE_VISIBILITY
|
339
|
+
__hash_const_local_iterator(const __non_const_iterator& __x) _NOEXCEPT
|
340
|
+
: __node_(__x.__node_),
|
341
|
+
__bucket_(__x.__bucket_),
|
342
|
+
__bucket_count_(__x.__bucket_count_)
|
343
|
+
{}
|
344
|
+
|
345
|
+
_LIBCPP_INLINE_VISIBILITY
|
346
|
+
reference operator*() const {return __node_->__value_;}
|
347
|
+
_LIBCPP_INLINE_VISIBILITY
|
348
|
+
pointer operator->() const {return &__node_->__value_;}
|
349
|
+
|
350
|
+
_LIBCPP_INLINE_VISIBILITY
|
351
|
+
__hash_const_local_iterator& operator++()
|
352
|
+
{
|
353
|
+
__node_ = __node_->__next_;
|
354
|
+
if (__node_ != nullptr && __constrain_hash(__node_->__hash_, __bucket_count_) != __bucket_)
|
355
|
+
__node_ = nullptr;
|
356
|
+
return *this;
|
357
|
+
}
|
358
|
+
|
359
|
+
_LIBCPP_INLINE_VISIBILITY
|
360
|
+
__hash_const_local_iterator operator++(int)
|
361
|
+
{
|
362
|
+
__hash_const_local_iterator __t(*this);
|
363
|
+
++(*this);
|
364
|
+
return __t;
|
365
|
+
}
|
366
|
+
|
367
|
+
friend _LIBCPP_INLINE_VISIBILITY
|
368
|
+
bool operator==(const __hash_const_local_iterator& __x, const __hash_const_local_iterator& __y)
|
369
|
+
{return __x.__node_ == __y.__node_;}
|
370
|
+
friend _LIBCPP_INLINE_VISIBILITY
|
371
|
+
bool operator!=(const __hash_const_local_iterator& __x, const __hash_const_local_iterator& __y)
|
372
|
+
{return __x.__node_ != __y.__node_;}
|
373
|
+
|
374
|
+
private:
|
375
|
+
_LIBCPP_INLINE_VISIBILITY
|
376
|
+
__hash_const_local_iterator(__node_pointer __node, size_t __bucket,
|
377
|
+
size_t __bucket_count) _NOEXCEPT
|
378
|
+
: __node_(__node),
|
379
|
+
__bucket_(__bucket),
|
380
|
+
__bucket_count_(__bucket_count)
|
381
|
+
{
|
382
|
+
if (__node_ != nullptr)
|
383
|
+
__node_ = __node_->__next_;
|
384
|
+
}
|
385
|
+
|
386
|
+
template <class, class, class, class> friend class __hash_table;
|
387
|
+
template <class> friend class _LIBCPP_TYPE_VIS __hash_map_const_iterator;
|
388
|
+
};
|
389
|
+
|
390
|
+
template <class _Alloc>
|
391
|
+
class __bucket_list_deallocator
|
392
|
+
{
|
393
|
+
typedef _Alloc allocator_type;
|
394
|
+
typedef allocator_traits<allocator_type> __alloc_traits;
|
395
|
+
typedef typename __alloc_traits::size_type size_type;
|
396
|
+
|
397
|
+
__compressed_pair<size_type, allocator_type> __data_;
|
398
|
+
public:
|
399
|
+
typedef typename __alloc_traits::pointer pointer;
|
400
|
+
|
401
|
+
_LIBCPP_INLINE_VISIBILITY
|
402
|
+
__bucket_list_deallocator()
|
403
|
+
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
|
404
|
+
: __data_(0) {}
|
405
|
+
|
406
|
+
_LIBCPP_INLINE_VISIBILITY
|
407
|
+
__bucket_list_deallocator(const allocator_type& __a, size_type __size)
|
408
|
+
_NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
|
409
|
+
: __data_(__size, __a) {}
|
410
|
+
|
411
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
412
|
+
|
413
|
+
_LIBCPP_INLINE_VISIBILITY
|
414
|
+
__bucket_list_deallocator(__bucket_list_deallocator&& __x)
|
415
|
+
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
|
416
|
+
: __data_(_VSTD::move(__x.__data_))
|
417
|
+
{
|
418
|
+
__x.size() = 0;
|
419
|
+
}
|
420
|
+
|
421
|
+
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
422
|
+
|
423
|
+
_LIBCPP_INLINE_VISIBILITY
|
424
|
+
size_type& size() _NOEXCEPT {return __data_.first();}
|
425
|
+
_LIBCPP_INLINE_VISIBILITY
|
426
|
+
size_type size() const _NOEXCEPT {return __data_.first();}
|
427
|
+
|
428
|
+
_LIBCPP_INLINE_VISIBILITY
|
429
|
+
allocator_type& __alloc() _NOEXCEPT {return __data_.second();}
|
430
|
+
_LIBCPP_INLINE_VISIBILITY
|
431
|
+
const allocator_type& __alloc() const _NOEXCEPT {return __data_.second();}
|
432
|
+
|
433
|
+
_LIBCPP_INLINE_VISIBILITY
|
434
|
+
void operator()(pointer __p) _NOEXCEPT
|
435
|
+
{
|
436
|
+
__alloc_traits::deallocate(__alloc(), __p, size());
|
437
|
+
}
|
438
|
+
};
|
439
|
+
|
440
|
+
template <class _Alloc> class __hash_map_node_destructor;
|
441
|
+
|
442
|
+
template <class _Alloc>
|
443
|
+
class __hash_node_destructor
|
444
|
+
{
|
445
|
+
typedef _Alloc allocator_type;
|
446
|
+
typedef allocator_traits<allocator_type> __alloc_traits;
|
447
|
+
typedef typename __alloc_traits::value_type::value_type value_type;
|
448
|
+
public:
|
449
|
+
typedef typename __alloc_traits::pointer pointer;
|
450
|
+
private:
|
451
|
+
|
452
|
+
allocator_type& __na_;
|
453
|
+
|
454
|
+
__hash_node_destructor& operator=(const __hash_node_destructor&);
|
455
|
+
|
456
|
+
public:
|
457
|
+
bool __value_constructed;
|
458
|
+
|
459
|
+
_LIBCPP_INLINE_VISIBILITY
|
460
|
+
explicit __hash_node_destructor(allocator_type& __na,
|
461
|
+
bool __constructed = false) _NOEXCEPT
|
462
|
+
: __na_(__na),
|
463
|
+
__value_constructed(__constructed)
|
464
|
+
{}
|
465
|
+
|
466
|
+
_LIBCPP_INLINE_VISIBILITY
|
467
|
+
void operator()(pointer __p) _NOEXCEPT
|
468
|
+
{
|
469
|
+
if (__value_constructed)
|
470
|
+
__alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_));
|
471
|
+
if (__p)
|
472
|
+
__alloc_traits::deallocate(__na_, __p, 1);
|
473
|
+
}
|
474
|
+
|
475
|
+
template <class> friend class __hash_map_node_destructor;
|
476
|
+
};
|
477
|
+
|
478
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
479
|
+
class __hash_table
|
480
|
+
{
|
481
|
+
public:
|
482
|
+
typedef _Tp value_type;
|
483
|
+
typedef _Hash hasher;
|
484
|
+
typedef _Equal key_equal;
|
485
|
+
typedef _Alloc allocator_type;
|
486
|
+
|
487
|
+
private:
|
488
|
+
typedef allocator_traits<allocator_type> __alloc_traits;
|
489
|
+
public:
|
490
|
+
typedef value_type& reference;
|
491
|
+
typedef const value_type& const_reference;
|
492
|
+
typedef typename __alloc_traits::pointer pointer;
|
493
|
+
typedef typename __alloc_traits::const_pointer const_pointer;
|
494
|
+
typedef typename __alloc_traits::size_type size_type;
|
495
|
+
typedef typename __alloc_traits::difference_type difference_type;
|
496
|
+
public:
|
497
|
+
// Create __node
|
498
|
+
typedef __hash_node<value_type, typename __alloc_traits::void_pointer> __node;
|
499
|
+
typedef typename __alloc_traits::template
|
500
|
+
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
501
|
+
rebind_alloc<__node>
|
502
|
+
#else
|
503
|
+
rebind_alloc<__node>::other
|
504
|
+
#endif
|
505
|
+
__node_allocator;
|
506
|
+
typedef allocator_traits<__node_allocator> __node_traits;
|
507
|
+
typedef typename __node_traits::pointer __node_pointer;
|
508
|
+
typedef typename __node_traits::const_pointer __node_const_pointer;
|
509
|
+
typedef __hash_node_base<__node_pointer> __first_node;
|
510
|
+
|
511
|
+
private:
|
512
|
+
|
513
|
+
typedef typename __node_traits::template
|
514
|
+
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
515
|
+
rebind_alloc<__node_pointer>
|
516
|
+
#else
|
517
|
+
rebind_alloc<__node_pointer>::other
|
518
|
+
#endif
|
519
|
+
__pointer_allocator;
|
520
|
+
typedef __bucket_list_deallocator<__pointer_allocator> __bucket_list_deleter;
|
521
|
+
typedef unique_ptr<__node_pointer[], __bucket_list_deleter> __bucket_list;
|
522
|
+
typedef allocator_traits<__pointer_allocator> __pointer_alloc_traits;
|
523
|
+
typedef typename __bucket_list_deleter::pointer __node_pointer_pointer;
|
524
|
+
|
525
|
+
// --- Member data begin ---
|
526
|
+
__bucket_list __bucket_list_;
|
527
|
+
__compressed_pair<__first_node, __node_allocator> __p1_;
|
528
|
+
__compressed_pair<size_type, hasher> __p2_;
|
529
|
+
__compressed_pair<float, key_equal> __p3_;
|
530
|
+
// --- Member data end ---
|
531
|
+
|
532
|
+
_LIBCPP_INLINE_VISIBILITY
|
533
|
+
size_type& size() _NOEXCEPT {return __p2_.first();}
|
534
|
+
public:
|
535
|
+
_LIBCPP_INLINE_VISIBILITY
|
536
|
+
size_type size() const _NOEXCEPT {return __p2_.first();}
|
537
|
+
|
538
|
+
_LIBCPP_INLINE_VISIBILITY
|
539
|
+
hasher& hash_function() _NOEXCEPT {return __p2_.second();}
|
540
|
+
_LIBCPP_INLINE_VISIBILITY
|
541
|
+
const hasher& hash_function() const _NOEXCEPT {return __p2_.second();}
|
542
|
+
|
543
|
+
_LIBCPP_INLINE_VISIBILITY
|
544
|
+
float& max_load_factor() _NOEXCEPT {return __p3_.first();}
|
545
|
+
_LIBCPP_INLINE_VISIBILITY
|
546
|
+
float max_load_factor() const _NOEXCEPT {return __p3_.first();}
|
547
|
+
|
548
|
+
_LIBCPP_INLINE_VISIBILITY
|
549
|
+
key_equal& key_eq() _NOEXCEPT {return __p3_.second();}
|
550
|
+
_LIBCPP_INLINE_VISIBILITY
|
551
|
+
const key_equal& key_eq() const _NOEXCEPT {return __p3_.second();}
|
552
|
+
|
553
|
+
_LIBCPP_INLINE_VISIBILITY
|
554
|
+
__node_allocator& __node_alloc() _NOEXCEPT {return __p1_.second();}
|
555
|
+
_LIBCPP_INLINE_VISIBILITY
|
556
|
+
const __node_allocator& __node_alloc() const _NOEXCEPT
|
557
|
+
{return __p1_.second();}
|
558
|
+
|
559
|
+
public:
|
560
|
+
typedef __hash_iterator<__node_pointer> iterator;
|
561
|
+
typedef __hash_const_iterator<__node_const_pointer> const_iterator;
|
562
|
+
typedef __hash_local_iterator<__node_pointer> local_iterator;
|
563
|
+
typedef __hash_const_local_iterator<__node_const_pointer> const_local_iterator;
|
564
|
+
|
565
|
+
__hash_table()
|
566
|
+
_NOEXCEPT_(
|
567
|
+
is_nothrow_default_constructible<__bucket_list>::value &&
|
568
|
+
is_nothrow_default_constructible<__first_node>::value &&
|
569
|
+
is_nothrow_default_constructible<__node_allocator>::value &&
|
570
|
+
is_nothrow_default_constructible<hasher>::value &&
|
571
|
+
is_nothrow_default_constructible<key_equal>::value);
|
572
|
+
__hash_table(const hasher& __hf, const key_equal& __eql);
|
573
|
+
__hash_table(const hasher& __hf, const key_equal& __eql,
|
574
|
+
const allocator_type& __a);
|
575
|
+
explicit __hash_table(const allocator_type& __a);
|
576
|
+
__hash_table(const __hash_table& __u);
|
577
|
+
__hash_table(const __hash_table& __u, const allocator_type& __a);
|
578
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
579
|
+
__hash_table(__hash_table&& __u)
|
580
|
+
_NOEXCEPT_(
|
581
|
+
is_nothrow_move_constructible<__bucket_list>::value &&
|
582
|
+
is_nothrow_move_constructible<__first_node>::value &&
|
583
|
+
is_nothrow_move_constructible<__node_allocator>::value &&
|
584
|
+
is_nothrow_move_constructible<hasher>::value &&
|
585
|
+
is_nothrow_move_constructible<key_equal>::value);
|
586
|
+
__hash_table(__hash_table&& __u, const allocator_type& __a);
|
587
|
+
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
588
|
+
~__hash_table();
|
589
|
+
|
590
|
+
__hash_table& operator=(const __hash_table& __u);
|
591
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
592
|
+
__hash_table& operator=(__hash_table&& __u)
|
593
|
+
_NOEXCEPT_(
|
594
|
+
__node_traits::propagate_on_container_move_assignment::value &&
|
595
|
+
is_nothrow_move_assignable<__node_allocator>::value &&
|
596
|
+
is_nothrow_move_assignable<hasher>::value &&
|
597
|
+
is_nothrow_move_assignable<key_equal>::value);
|
598
|
+
#endif
|
599
|
+
template <class _InputIterator>
|
600
|
+
void __assign_unique(_InputIterator __first, _InputIterator __last);
|
601
|
+
template <class _InputIterator>
|
602
|
+
void __assign_multi(_InputIterator __first, _InputIterator __last);
|
603
|
+
|
604
|
+
_LIBCPP_INLINE_VISIBILITY
|
605
|
+
size_type max_size() const _NOEXCEPT
|
606
|
+
{
|
607
|
+
return allocator_traits<__pointer_allocator>::max_size(
|
608
|
+
__bucket_list_.get_deleter().__alloc());
|
609
|
+
}
|
610
|
+
|
611
|
+
pair<iterator, bool> __node_insert_unique(__node_pointer __nd);
|
612
|
+
iterator __node_insert_multi(__node_pointer __nd);
|
613
|
+
iterator __node_insert_multi(const_iterator __p,
|
614
|
+
__node_pointer __nd);
|
615
|
+
|
616
|
+
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
617
|
+
template <class... _Args>
|
618
|
+
pair<iterator, bool> __emplace_unique(_Args&&... __args);
|
619
|
+
template <class... _Args>
|
620
|
+
iterator __emplace_multi(_Args&&... __args);
|
621
|
+
template <class... _Args>
|
622
|
+
iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args);
|
623
|
+
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
624
|
+
|
625
|
+
pair<iterator, bool> __insert_unique(const value_type& __x);
|
626
|
+
|
627
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
628
|
+
template <class _Pp>
|
629
|
+
pair<iterator, bool> __insert_unique(_Pp&& __x);
|
630
|
+
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
631
|
+
|
632
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
633
|
+
template <class _Pp>
|
634
|
+
iterator __insert_multi(_Pp&& __x);
|
635
|
+
template <class _Pp>
|
636
|
+
iterator __insert_multi(const_iterator __p, _Pp&& __x);
|
637
|
+
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
638
|
+
iterator __insert_multi(const value_type& __x);
|
639
|
+
iterator __insert_multi(const_iterator __p, const value_type& __x);
|
640
|
+
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
641
|
+
|
642
|
+
void clear() _NOEXCEPT;
|
643
|
+
void rehash(size_type __n);
|
644
|
+
_LIBCPP_INLINE_VISIBILITY void reserve(size_type __n)
|
645
|
+
{rehash(static_cast<size_type>(ceil(__n / max_load_factor())));}
|
646
|
+
|
647
|
+
_LIBCPP_INLINE_VISIBILITY
|
648
|
+
size_type bucket_count() const _NOEXCEPT
|
649
|
+
{
|
650
|
+
return __bucket_list_.get_deleter().size();
|
651
|
+
}
|
652
|
+
|
653
|
+
iterator begin() _NOEXCEPT;
|
654
|
+
iterator end() _NOEXCEPT;
|
655
|
+
const_iterator begin() const _NOEXCEPT;
|
656
|
+
const_iterator end() const _NOEXCEPT;
|
657
|
+
|
658
|
+
template <class _Key>
|
659
|
+
_LIBCPP_INLINE_VISIBILITY
|
660
|
+
size_type bucket(const _Key& __k) const
|
661
|
+
{return __constrain_hash(hash_function()(__k), bucket_count());}
|
662
|
+
|
663
|
+
template <class _Key>
|
664
|
+
iterator find(const _Key& __x);
|
665
|
+
template <class _Key>
|
666
|
+
const_iterator find(const _Key& __x) const;
|
667
|
+
|
668
|
+
typedef __hash_node_destructor<__node_allocator> _Dp;
|
669
|
+
typedef unique_ptr<__node, _Dp> __node_holder;
|
670
|
+
|
671
|
+
iterator erase(const_iterator __p);
|
672
|
+
iterator erase(const_iterator __first, const_iterator __last);
|
673
|
+
template <class _Key>
|
674
|
+
size_type __erase_unique(const _Key& __k);
|
675
|
+
template <class _Key>
|
676
|
+
size_type __erase_multi(const _Key& __k);
|
677
|
+
__node_holder remove(const_iterator __p) _NOEXCEPT;
|
678
|
+
|
679
|
+
template <class _Key>
|
680
|
+
size_type __count_unique(const _Key& __k) const;
|
681
|
+
template <class _Key>
|
682
|
+
size_type __count_multi(const _Key& __k) const;
|
683
|
+
|
684
|
+
template <class _Key>
|
685
|
+
pair<iterator, iterator>
|
686
|
+
__equal_range_unique(const _Key& __k);
|
687
|
+
template <class _Key>
|
688
|
+
pair<const_iterator, const_iterator>
|
689
|
+
__equal_range_unique(const _Key& __k) const;
|
690
|
+
|
691
|
+
template <class _Key>
|
692
|
+
pair<iterator, iterator>
|
693
|
+
__equal_range_multi(const _Key& __k);
|
694
|
+
template <class _Key>
|
695
|
+
pair<const_iterator, const_iterator>
|
696
|
+
__equal_range_multi(const _Key& __k) const;
|
697
|
+
|
698
|
+
void swap(__hash_table& __u)
|
699
|
+
_NOEXCEPT_(
|
700
|
+
(!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value ||
|
701
|
+
__is_nothrow_swappable<__pointer_allocator>::value) &&
|
702
|
+
(!__node_traits::propagate_on_container_swap::value ||
|
703
|
+
__is_nothrow_swappable<__node_allocator>::value) &&
|
704
|
+
__is_nothrow_swappable<hasher>::value &&
|
705
|
+
__is_nothrow_swappable<key_equal>::value);
|
706
|
+
|
707
|
+
_LIBCPP_INLINE_VISIBILITY
|
708
|
+
size_type max_bucket_count() const _NOEXCEPT
|
709
|
+
{return __bucket_list_.get_deleter().__alloc().max_size();}
|
710
|
+
size_type bucket_size(size_type __n) const;
|
711
|
+
_LIBCPP_INLINE_VISIBILITY float load_factor() const _NOEXCEPT
|
712
|
+
{
|
713
|
+
size_type __bc = bucket_count();
|
714
|
+
return __bc != 0 ? (float)size() / __bc : 0.f;
|
715
|
+
}
|
716
|
+
_LIBCPP_INLINE_VISIBILITY void max_load_factor(float __mlf) _NOEXCEPT
|
717
|
+
{max_load_factor() = _VSTD::max(__mlf, load_factor());}
|
718
|
+
|
719
|
+
_LIBCPP_INLINE_VISIBILITY local_iterator begin(size_type __n)
|
720
|
+
{return local_iterator(__bucket_list_[__n], __n, bucket_count());}
|
721
|
+
_LIBCPP_INLINE_VISIBILITY local_iterator end(size_type __n)
|
722
|
+
{return local_iterator(nullptr, __n, bucket_count());}
|
723
|
+
_LIBCPP_INLINE_VISIBILITY const_local_iterator cbegin(size_type __n) const
|
724
|
+
{return const_local_iterator(__bucket_list_[__n], __n, bucket_count());}
|
725
|
+
_LIBCPP_INLINE_VISIBILITY const_local_iterator cend(size_type __n) const
|
726
|
+
{return const_local_iterator(nullptr, __n, bucket_count());}
|
727
|
+
private:
|
728
|
+
void __rehash(size_type __n);
|
729
|
+
|
730
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
731
|
+
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
732
|
+
template <class ..._Args>
|
733
|
+
__node_holder __construct_node(_Args&& ...__args);
|
734
|
+
#endif // _LIBCPP_HAS_NO_VARIADICS
|
735
|
+
__node_holder __construct_node(value_type&& __v, size_t __hash);
|
736
|
+
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
737
|
+
__node_holder __construct_node(const value_type& __v);
|
738
|
+
#endif
|
739
|
+
__node_holder __construct_node(const value_type& __v, size_t __hash);
|
740
|
+
|
741
|
+
_LIBCPP_INLINE_VISIBILITY
|
742
|
+
void __copy_assign_alloc(const __hash_table& __u)
|
743
|
+
{__copy_assign_alloc(__u, integral_constant<bool,
|
744
|
+
__node_traits::propagate_on_container_copy_assignment::value>());}
|
745
|
+
void __copy_assign_alloc(const __hash_table& __u, true_type);
|
746
|
+
_LIBCPP_INLINE_VISIBILITY
|
747
|
+
void __copy_assign_alloc(const __hash_table&, false_type) {}
|
748
|
+
|
749
|
+
void __move_assign(__hash_table& __u, false_type);
|
750
|
+
void __move_assign(__hash_table& __u, true_type)
|
751
|
+
_NOEXCEPT_(
|
752
|
+
is_nothrow_move_assignable<__node_allocator>::value &&
|
753
|
+
is_nothrow_move_assignable<hasher>::value &&
|
754
|
+
is_nothrow_move_assignable<key_equal>::value);
|
755
|
+
_LIBCPP_INLINE_VISIBILITY
|
756
|
+
void __move_assign_alloc(__hash_table& __u)
|
757
|
+
_NOEXCEPT_(
|
758
|
+
!__node_traits::propagate_on_container_move_assignment::value ||
|
759
|
+
(is_nothrow_move_assignable<__pointer_allocator>::value &&
|
760
|
+
is_nothrow_move_assignable<__node_allocator>::value))
|
761
|
+
{__move_assign_alloc(__u, integral_constant<bool,
|
762
|
+
__node_traits::propagate_on_container_move_assignment::value>());}
|
763
|
+
_LIBCPP_INLINE_VISIBILITY
|
764
|
+
void __move_assign_alloc(__hash_table& __u, true_type)
|
765
|
+
_NOEXCEPT_(
|
766
|
+
is_nothrow_move_assignable<__pointer_allocator>::value &&
|
767
|
+
is_nothrow_move_assignable<__node_allocator>::value)
|
768
|
+
{
|
769
|
+
__bucket_list_.get_deleter().__alloc() =
|
770
|
+
_VSTD::move(__u.__bucket_list_.get_deleter().__alloc());
|
771
|
+
__node_alloc() = _VSTD::move(__u.__node_alloc());
|
772
|
+
}
|
773
|
+
_LIBCPP_INLINE_VISIBILITY
|
774
|
+
void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {}
|
775
|
+
|
776
|
+
template <class _Ap>
|
777
|
+
_LIBCPP_INLINE_VISIBILITY
|
778
|
+
static
|
779
|
+
void
|
780
|
+
__swap_alloc(_Ap& __x, _Ap& __y)
|
781
|
+
_NOEXCEPT_(
|
782
|
+
!allocator_traits<_Ap>::propagate_on_container_swap::value ||
|
783
|
+
__is_nothrow_swappable<_Ap>::value)
|
784
|
+
{
|
785
|
+
__swap_alloc(__x, __y,
|
786
|
+
integral_constant<bool,
|
787
|
+
allocator_traits<_Ap>::propagate_on_container_swap::value
|
788
|
+
>());
|
789
|
+
}
|
790
|
+
|
791
|
+
template <class _Ap>
|
792
|
+
_LIBCPP_INLINE_VISIBILITY
|
793
|
+
static
|
794
|
+
void
|
795
|
+
__swap_alloc(_Ap& __x, _Ap& __y, true_type)
|
796
|
+
_NOEXCEPT_(__is_nothrow_swappable<_Ap>::value)
|
797
|
+
{
|
798
|
+
using _VSTD::swap;
|
799
|
+
swap(__x, __y);
|
800
|
+
}
|
801
|
+
|
802
|
+
template <class _Ap>
|
803
|
+
_LIBCPP_INLINE_VISIBILITY
|
804
|
+
static
|
805
|
+
void
|
806
|
+
__swap_alloc(_Ap&, _Ap&, false_type) _NOEXCEPT {}
|
807
|
+
|
808
|
+
void __deallocate(__node_pointer __np) _NOEXCEPT;
|
809
|
+
__node_pointer __detach() _NOEXCEPT;
|
810
|
+
};
|
811
|
+
|
812
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
813
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
814
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table()
|
815
|
+
_NOEXCEPT_(
|
816
|
+
is_nothrow_default_constructible<__bucket_list>::value &&
|
817
|
+
is_nothrow_default_constructible<__first_node>::value &&
|
818
|
+
is_nothrow_default_constructible<hasher>::value &&
|
819
|
+
is_nothrow_default_constructible<key_equal>::value)
|
820
|
+
: __p2_(0),
|
821
|
+
__p3_(1.0f)
|
822
|
+
{
|
823
|
+
}
|
824
|
+
|
825
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
826
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
827
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const hasher& __hf,
|
828
|
+
const key_equal& __eql)
|
829
|
+
: __bucket_list_(nullptr, __bucket_list_deleter()),
|
830
|
+
__p1_(),
|
831
|
+
__p2_(0, __hf),
|
832
|
+
__p3_(1.0f, __eql)
|
833
|
+
{
|
834
|
+
}
|
835
|
+
|
836
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
837
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const hasher& __hf,
|
838
|
+
const key_equal& __eql,
|
839
|
+
const allocator_type& __a)
|
840
|
+
: __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
|
841
|
+
__p1_(__node_allocator(__a)),
|
842
|
+
__p2_(0, __hf),
|
843
|
+
__p3_(1.0f, __eql)
|
844
|
+
{
|
845
|
+
}
|
846
|
+
|
847
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
848
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const allocator_type& __a)
|
849
|
+
: __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
|
850
|
+
__p1_(__node_allocator(__a)),
|
851
|
+
__p2_(0),
|
852
|
+
__p3_(1.0f)
|
853
|
+
{
|
854
|
+
}
|
855
|
+
|
856
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
857
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u)
|
858
|
+
: __bucket_list_(nullptr,
|
859
|
+
__bucket_list_deleter(allocator_traits<__pointer_allocator>::
|
860
|
+
select_on_container_copy_construction(
|
861
|
+
__u.__bucket_list_.get_deleter().__alloc()), 0)),
|
862
|
+
__p1_(allocator_traits<__node_allocator>::
|
863
|
+
select_on_container_copy_construction(__u.__node_alloc())),
|
864
|
+
__p2_(0, __u.hash_function()),
|
865
|
+
__p3_(__u.__p3_)
|
866
|
+
{
|
867
|
+
}
|
868
|
+
|
869
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
870
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u,
|
871
|
+
const allocator_type& __a)
|
872
|
+
: __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
|
873
|
+
__p1_(__node_allocator(__a)),
|
874
|
+
__p2_(0, __u.hash_function()),
|
875
|
+
__p3_(__u.__p3_)
|
876
|
+
{
|
877
|
+
}
|
878
|
+
|
879
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
880
|
+
|
881
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
882
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
|
883
|
+
_NOEXCEPT_(
|
884
|
+
is_nothrow_move_constructible<__bucket_list>::value &&
|
885
|
+
is_nothrow_move_constructible<__first_node>::value &&
|
886
|
+
is_nothrow_move_constructible<hasher>::value &&
|
887
|
+
is_nothrow_move_constructible<key_equal>::value)
|
888
|
+
: __bucket_list_(_VSTD::move(__u.__bucket_list_)),
|
889
|
+
__p1_(_VSTD::move(__u.__p1_)),
|
890
|
+
__p2_(_VSTD::move(__u.__p2_)),
|
891
|
+
__p3_(_VSTD::move(__u.__p3_))
|
892
|
+
{
|
893
|
+
if (size() > 0)
|
894
|
+
{
|
895
|
+
__bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] =
|
896
|
+
static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
|
897
|
+
__u.__p1_.first().__next_ = nullptr;
|
898
|
+
__u.size() = 0;
|
899
|
+
}
|
900
|
+
}
|
901
|
+
|
902
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
903
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
|
904
|
+
const allocator_type& __a)
|
905
|
+
: __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
|
906
|
+
__p1_(__node_allocator(__a)),
|
907
|
+
__p2_(0, _VSTD::move(__u.hash_function())),
|
908
|
+
__p3_(_VSTD::move(__u.__p3_))
|
909
|
+
{
|
910
|
+
if (__a == allocator_type(__u.__node_alloc()))
|
911
|
+
{
|
912
|
+
__bucket_list_.reset(__u.__bucket_list_.release());
|
913
|
+
__bucket_list_.get_deleter().size() = __u.__bucket_list_.get_deleter().size();
|
914
|
+
__u.__bucket_list_.get_deleter().size() = 0;
|
915
|
+
if (__u.size() > 0)
|
916
|
+
{
|
917
|
+
__p1_.first().__next_ = __u.__p1_.first().__next_;
|
918
|
+
__u.__p1_.first().__next_ = nullptr;
|
919
|
+
__bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] =
|
920
|
+
static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
|
921
|
+
size() = __u.size();
|
922
|
+
__u.size() = 0;
|
923
|
+
}
|
924
|
+
}
|
925
|
+
}
|
926
|
+
|
927
|
+
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
928
|
+
|
929
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
930
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table()
|
931
|
+
{
|
932
|
+
__deallocate(__p1_.first().__next_);
|
933
|
+
}
|
934
|
+
|
935
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
936
|
+
void
|
937
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__copy_assign_alloc(
|
938
|
+
const __hash_table& __u, true_type)
|
939
|
+
{
|
940
|
+
if (__node_alloc() != __u.__node_alloc())
|
941
|
+
{
|
942
|
+
clear();
|
943
|
+
__bucket_list_.reset();
|
944
|
+
__bucket_list_.get_deleter().size() = 0;
|
945
|
+
}
|
946
|
+
__bucket_list_.get_deleter().__alloc() = __u.__bucket_list_.get_deleter().__alloc();
|
947
|
+
__node_alloc() = __u.__node_alloc();
|
948
|
+
}
|
949
|
+
|
950
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
951
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>&
|
952
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(const __hash_table& __u)
|
953
|
+
{
|
954
|
+
if (this != &__u)
|
955
|
+
{
|
956
|
+
__copy_assign_alloc(__u);
|
957
|
+
hash_function() = __u.hash_function();
|
958
|
+
key_eq() = __u.key_eq();
|
959
|
+
max_load_factor() = __u.max_load_factor();
|
960
|
+
__assign_multi(__u.begin(), __u.end());
|
961
|
+
}
|
962
|
+
return *this;
|
963
|
+
}
|
964
|
+
|
965
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
966
|
+
void
|
967
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate(__node_pointer __np)
|
968
|
+
_NOEXCEPT
|
969
|
+
{
|
970
|
+
__node_allocator& __na = __node_alloc();
|
971
|
+
while (__np != nullptr)
|
972
|
+
{
|
973
|
+
__node_pointer __next = __np->__next_;
|
974
|
+
__node_traits::destroy(__na, _VSTD::addressof(__np->__value_));
|
975
|
+
__node_traits::deallocate(__na, __np, 1);
|
976
|
+
__np = __next;
|
977
|
+
}
|
978
|
+
}
|
979
|
+
|
980
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
981
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_pointer
|
982
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__detach() _NOEXCEPT
|
983
|
+
{
|
984
|
+
size_type __bc = bucket_count();
|
985
|
+
for (size_type __i = 0; __i < __bc; ++__i)
|
986
|
+
__bucket_list_[__i] = nullptr;
|
987
|
+
size() = 0;
|
988
|
+
__node_pointer __cache = __p1_.first().__next_;
|
989
|
+
__p1_.first().__next_ = nullptr;
|
990
|
+
return __cache;
|
991
|
+
}
|
992
|
+
|
993
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
994
|
+
|
995
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
996
|
+
void
|
997
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
|
998
|
+
__hash_table& __u, true_type)
|
999
|
+
_NOEXCEPT_(
|
1000
|
+
is_nothrow_move_assignable<__node_allocator>::value &&
|
1001
|
+
is_nothrow_move_assignable<hasher>::value &&
|
1002
|
+
is_nothrow_move_assignable<key_equal>::value)
|
1003
|
+
{
|
1004
|
+
clear();
|
1005
|
+
__bucket_list_.reset(__u.__bucket_list_.release());
|
1006
|
+
__bucket_list_.get_deleter().size() = __u.__bucket_list_.get_deleter().size();
|
1007
|
+
__u.__bucket_list_.get_deleter().size() = 0;
|
1008
|
+
__move_assign_alloc(__u);
|
1009
|
+
size() = __u.size();
|
1010
|
+
hash_function() = _VSTD::move(__u.hash_function());
|
1011
|
+
max_load_factor() = __u.max_load_factor();
|
1012
|
+
key_eq() = _VSTD::move(__u.key_eq());
|
1013
|
+
__p1_.first().__next_ = __u.__p1_.first().__next_;
|
1014
|
+
if (size() > 0)
|
1015
|
+
{
|
1016
|
+
__bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] =
|
1017
|
+
static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
|
1018
|
+
__u.__p1_.first().__next_ = nullptr;
|
1019
|
+
__u.size() = 0;
|
1020
|
+
}
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1024
|
+
void
|
1025
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
|
1026
|
+
__hash_table& __u, false_type)
|
1027
|
+
{
|
1028
|
+
if (__node_alloc() == __u.__node_alloc())
|
1029
|
+
__move_assign(__u, true_type());
|
1030
|
+
else
|
1031
|
+
{
|
1032
|
+
hash_function() = _VSTD::move(__u.hash_function());
|
1033
|
+
key_eq() = _VSTD::move(__u.key_eq());
|
1034
|
+
max_load_factor() = __u.max_load_factor();
|
1035
|
+
if (bucket_count() != 0)
|
1036
|
+
{
|
1037
|
+
__node_pointer __cache = __detach();
|
1038
|
+
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1039
|
+
try
|
1040
|
+
{
|
1041
|
+
#endif // _LIBCPP_NO_EXCEPTIONS
|
1042
|
+
const_iterator __i = __u.begin();
|
1043
|
+
while (__cache != nullptr && __u.size() != 0)
|
1044
|
+
{
|
1045
|
+
__cache->__value_ = _VSTD::move(__u.remove(__i++)->__value_);
|
1046
|
+
__node_pointer __next = __cache->__next_;
|
1047
|
+
__node_insert_multi(__cache);
|
1048
|
+
__cache = __next;
|
1049
|
+
}
|
1050
|
+
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1051
|
+
}
|
1052
|
+
catch (...)
|
1053
|
+
{
|
1054
|
+
__deallocate(__cache);
|
1055
|
+
throw;
|
1056
|
+
}
|
1057
|
+
#endif // _LIBCPP_NO_EXCEPTIONS
|
1058
|
+
__deallocate(__cache);
|
1059
|
+
}
|
1060
|
+
const_iterator __i = __u.begin();
|
1061
|
+
while (__u.size() != 0)
|
1062
|
+
{
|
1063
|
+
__node_holder __h =
|
1064
|
+
__construct_node(_VSTD::move(__u.remove(__i++)->__value_));
|
1065
|
+
__node_insert_multi(__h.get());
|
1066
|
+
__h.release();
|
1067
|
+
}
|
1068
|
+
}
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1072
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
1073
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>&
|
1074
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u)
|
1075
|
+
_NOEXCEPT_(
|
1076
|
+
__node_traits::propagate_on_container_move_assignment::value &&
|
1077
|
+
is_nothrow_move_assignable<__node_allocator>::value &&
|
1078
|
+
is_nothrow_move_assignable<hasher>::value &&
|
1079
|
+
is_nothrow_move_assignable<key_equal>::value)
|
1080
|
+
{
|
1081
|
+
__move_assign(__u, integral_constant<bool,
|
1082
|
+
__node_traits::propagate_on_container_move_assignment::value>());
|
1083
|
+
return *this;
|
1084
|
+
}
|
1085
|
+
|
1086
|
+
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1087
|
+
|
1088
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1089
|
+
template <class _InputIterator>
|
1090
|
+
void
|
1091
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __first,
|
1092
|
+
_InputIterator __last)
|
1093
|
+
{
|
1094
|
+
if (bucket_count() != 0)
|
1095
|
+
{
|
1096
|
+
__node_pointer __cache = __detach();
|
1097
|
+
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1098
|
+
try
|
1099
|
+
{
|
1100
|
+
#endif // _LIBCPP_NO_EXCEPTIONS
|
1101
|
+
for (; __cache != nullptr && __first != __last; ++__first)
|
1102
|
+
{
|
1103
|
+
__cache->__value_ = *__first;
|
1104
|
+
__node_pointer __next = __cache->__next_;
|
1105
|
+
__node_insert_unique(__cache);
|
1106
|
+
__cache = __next;
|
1107
|
+
}
|
1108
|
+
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1109
|
+
}
|
1110
|
+
catch (...)
|
1111
|
+
{
|
1112
|
+
__deallocate(__cache);
|
1113
|
+
throw;
|
1114
|
+
}
|
1115
|
+
#endif // _LIBCPP_NO_EXCEPTIONS
|
1116
|
+
__deallocate(__cache);
|
1117
|
+
}
|
1118
|
+
for (; __first != __last; ++__first)
|
1119
|
+
__insert_unique(*__first);
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1123
|
+
template <class _InputIterator>
|
1124
|
+
void
|
1125
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_multi(_InputIterator __first,
|
1126
|
+
_InputIterator __last)
|
1127
|
+
{
|
1128
|
+
if (bucket_count() != 0)
|
1129
|
+
{
|
1130
|
+
__node_pointer __cache = __detach();
|
1131
|
+
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1132
|
+
try
|
1133
|
+
{
|
1134
|
+
#endif // _LIBCPP_NO_EXCEPTIONS
|
1135
|
+
for (; __cache != nullptr && __first != __last; ++__first)
|
1136
|
+
{
|
1137
|
+
__cache->__value_ = *__first;
|
1138
|
+
__node_pointer __next = __cache->__next_;
|
1139
|
+
__node_insert_multi(__cache);
|
1140
|
+
__cache = __next;
|
1141
|
+
}
|
1142
|
+
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1143
|
+
}
|
1144
|
+
catch (...)
|
1145
|
+
{
|
1146
|
+
__deallocate(__cache);
|
1147
|
+
throw;
|
1148
|
+
}
|
1149
|
+
#endif // _LIBCPP_NO_EXCEPTIONS
|
1150
|
+
__deallocate(__cache);
|
1151
|
+
}
|
1152
|
+
for (; __first != __last; ++__first)
|
1153
|
+
__insert_multi(*__first);
|
1154
|
+
}
|
1155
|
+
|
1156
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1157
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
1158
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1159
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::begin() _NOEXCEPT
|
1160
|
+
{
|
1161
|
+
return iterator(__p1_.first().__next_);
|
1162
|
+
}
|
1163
|
+
|
1164
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1165
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
1166
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1167
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::end() _NOEXCEPT
|
1168
|
+
{
|
1169
|
+
return iterator(nullptr);
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1173
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
1174
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator
|
1175
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::begin() const _NOEXCEPT
|
1176
|
+
{
|
1177
|
+
return const_iterator(__p1_.first().__next_);
|
1178
|
+
}
|
1179
|
+
|
1180
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1181
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
1182
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator
|
1183
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::end() const _NOEXCEPT
|
1184
|
+
{
|
1185
|
+
return const_iterator(nullptr);
|
1186
|
+
}
|
1187
|
+
|
1188
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1189
|
+
void
|
1190
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::clear() _NOEXCEPT
|
1191
|
+
{
|
1192
|
+
if (size() > 0)
|
1193
|
+
{
|
1194
|
+
__deallocate(__p1_.first().__next_);
|
1195
|
+
__p1_.first().__next_ = nullptr;
|
1196
|
+
size_type __bc = bucket_count();
|
1197
|
+
for (size_type __i = 0; __i < __bc; ++__i)
|
1198
|
+
__bucket_list_[__i] = nullptr;
|
1199
|
+
size() = 0;
|
1200
|
+
}
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1204
|
+
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
|
1205
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique(__node_pointer __nd)
|
1206
|
+
{
|
1207
|
+
__nd->__hash_ = hash_function()(__nd->__value_);
|
1208
|
+
size_type __bc = bucket_count();
|
1209
|
+
bool __inserted = false;
|
1210
|
+
__node_pointer __ndptr;
|
1211
|
+
size_t __chash;
|
1212
|
+
if (__bc != 0)
|
1213
|
+
{
|
1214
|
+
__chash = __constrain_hash(__nd->__hash_, __bc);
|
1215
|
+
__ndptr = __bucket_list_[__chash];
|
1216
|
+
if (__ndptr != nullptr)
|
1217
|
+
{
|
1218
|
+
for (__ndptr = __ndptr->__next_; __ndptr != nullptr &&
|
1219
|
+
__constrain_hash(__ndptr->__hash_, __bc) == __chash;
|
1220
|
+
__ndptr = __ndptr->__next_)
|
1221
|
+
{
|
1222
|
+
if (key_eq()(__ndptr->__value_, __nd->__value_))
|
1223
|
+
goto __done;
|
1224
|
+
}
|
1225
|
+
}
|
1226
|
+
}
|
1227
|
+
{
|
1228
|
+
if (size()+1 > __bc * max_load_factor() || __bc == 0)
|
1229
|
+
{
|
1230
|
+
rehash(_VSTD::max<size_type>(2 * __bc + !__is_power2(__bc),
|
1231
|
+
size_type(ceil(float(size() + 1) / max_load_factor()))));
|
1232
|
+
__bc = bucket_count();
|
1233
|
+
__chash = __constrain_hash(__nd->__hash_, __bc);
|
1234
|
+
}
|
1235
|
+
// insert_after __bucket_list_[__chash], or __first_node if bucket is null
|
1236
|
+
__node_pointer __pn = __bucket_list_[__chash];
|
1237
|
+
if (__pn == nullptr)
|
1238
|
+
{
|
1239
|
+
__pn = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
|
1240
|
+
__nd->__next_ = __pn->__next_;
|
1241
|
+
__pn->__next_ = __nd;
|
1242
|
+
// fix up __bucket_list_
|
1243
|
+
__bucket_list_[__chash] = __pn;
|
1244
|
+
if (__nd->__next_ != nullptr)
|
1245
|
+
__bucket_list_[__constrain_hash(__nd->__next_->__hash_, __bc)] = __nd;
|
1246
|
+
}
|
1247
|
+
else
|
1248
|
+
{
|
1249
|
+
__nd->__next_ = __pn->__next_;
|
1250
|
+
__pn->__next_ = __nd;
|
1251
|
+
}
|
1252
|
+
__ndptr = __nd;
|
1253
|
+
// increment size
|
1254
|
+
++size();
|
1255
|
+
__inserted = true;
|
1256
|
+
}
|
1257
|
+
__done:
|
1258
|
+
return pair<iterator, bool>(iterator(__ndptr), __inserted);
|
1259
|
+
}
|
1260
|
+
|
1261
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1262
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1263
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(__node_pointer __cp)
|
1264
|
+
{
|
1265
|
+
__cp->__hash_ = hash_function()(__cp->__value_);
|
1266
|
+
size_type __bc = bucket_count();
|
1267
|
+
if (size()+1 > __bc * max_load_factor() || __bc == 0)
|
1268
|
+
{
|
1269
|
+
rehash(_VSTD::max<size_type>(2 * __bc + !__is_power2(__bc),
|
1270
|
+
size_type(ceil(float(size() + 1) / max_load_factor()))));
|
1271
|
+
__bc = bucket_count();
|
1272
|
+
}
|
1273
|
+
size_t __chash = __constrain_hash(__cp->__hash_, __bc);
|
1274
|
+
__node_pointer __pn = __bucket_list_[__chash];
|
1275
|
+
if (__pn == nullptr)
|
1276
|
+
{
|
1277
|
+
__pn = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
|
1278
|
+
__cp->__next_ = __pn->__next_;
|
1279
|
+
__pn->__next_ = __cp;
|
1280
|
+
// fix up __bucket_list_
|
1281
|
+
__bucket_list_[__chash] = __pn;
|
1282
|
+
if (__cp->__next_ != nullptr)
|
1283
|
+
__bucket_list_[__constrain_hash(__cp->__next_->__hash_, __bc)] = __cp;
|
1284
|
+
}
|
1285
|
+
else
|
1286
|
+
{
|
1287
|
+
for (bool __found = false; __pn->__next_ != nullptr &&
|
1288
|
+
__constrain_hash(__pn->__next_->__hash_, __bc) == __chash;
|
1289
|
+
__pn = __pn->__next_)
|
1290
|
+
{
|
1291
|
+
// __found key_eq() action
|
1292
|
+
// false false loop
|
1293
|
+
// true true loop
|
1294
|
+
// false true set __found to true
|
1295
|
+
// true false break
|
1296
|
+
if (__found != (__pn->__next_->__hash_ == __cp->__hash_ &&
|
1297
|
+
key_eq()(__pn->__next_->__value_, __cp->__value_)))
|
1298
|
+
{
|
1299
|
+
if (!__found)
|
1300
|
+
__found = true;
|
1301
|
+
else
|
1302
|
+
break;
|
1303
|
+
}
|
1304
|
+
}
|
1305
|
+
__cp->__next_ = __pn->__next_;
|
1306
|
+
__pn->__next_ = __cp;
|
1307
|
+
if (__cp->__next_ != nullptr)
|
1308
|
+
{
|
1309
|
+
size_t __nhash = __constrain_hash(__cp->__next_->__hash_, __bc);
|
1310
|
+
if (__nhash != __chash)
|
1311
|
+
__bucket_list_[__nhash] = __cp;
|
1312
|
+
}
|
1313
|
+
}
|
1314
|
+
++size();
|
1315
|
+
return iterator(__cp);
|
1316
|
+
}
|
1317
|
+
|
1318
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1319
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1320
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(
|
1321
|
+
const_iterator __p, __node_pointer __cp)
|
1322
|
+
{
|
1323
|
+
if (__p != end() && key_eq()(*__p, __cp->__value_))
|
1324
|
+
{
|
1325
|
+
__node_pointer __np = const_cast<__node_pointer>(__p.__node_);
|
1326
|
+
__cp->__hash_ = __np->__hash_;
|
1327
|
+
size_type __bc = bucket_count();
|
1328
|
+
if (size()+1 > __bc * max_load_factor() || __bc == 0)
|
1329
|
+
{
|
1330
|
+
rehash(_VSTD::max<size_type>(2 * __bc + !__is_power2(__bc),
|
1331
|
+
size_type(ceil(float(size() + 1) / max_load_factor()))));
|
1332
|
+
__bc = bucket_count();
|
1333
|
+
}
|
1334
|
+
size_t __chash = __constrain_hash(__cp->__hash_, __bc);
|
1335
|
+
__node_pointer __pp = __bucket_list_[__chash];
|
1336
|
+
while (__pp->__next_ != __np)
|
1337
|
+
__pp = __pp->__next_;
|
1338
|
+
__cp->__next_ = __np;
|
1339
|
+
__pp->__next_ = __cp;
|
1340
|
+
++size();
|
1341
|
+
return iterator(__cp);
|
1342
|
+
}
|
1343
|
+
return __node_insert_multi(__cp);
|
1344
|
+
}
|
1345
|
+
|
1346
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1347
|
+
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
|
1348
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_unique(const value_type& __x)
|
1349
|
+
{
|
1350
|
+
size_t __hash = hash_function()(__x);
|
1351
|
+
size_type __bc = bucket_count();
|
1352
|
+
bool __inserted = false;
|
1353
|
+
__node_pointer __nd;
|
1354
|
+
size_t __chash;
|
1355
|
+
if (__bc != 0)
|
1356
|
+
{
|
1357
|
+
__chash = __constrain_hash(__hash, __bc);
|
1358
|
+
__nd = __bucket_list_[__chash];
|
1359
|
+
if (__nd != nullptr)
|
1360
|
+
{
|
1361
|
+
for (__nd = __nd->__next_; __nd != nullptr &&
|
1362
|
+
__constrain_hash(__nd->__hash_, __bc) == __chash;
|
1363
|
+
__nd = __nd->__next_)
|
1364
|
+
{
|
1365
|
+
if (key_eq()(__nd->__value_, __x))
|
1366
|
+
goto __done;
|
1367
|
+
}
|
1368
|
+
}
|
1369
|
+
}
|
1370
|
+
{
|
1371
|
+
__node_holder __h = __construct_node(__x, __hash);
|
1372
|
+
if (size()+1 > __bc * max_load_factor() || __bc == 0)
|
1373
|
+
{
|
1374
|
+
rehash(_VSTD::max<size_type>(2 * __bc + !__is_power2(__bc),
|
1375
|
+
size_type(ceil(float(size() + 1) / max_load_factor()))));
|
1376
|
+
__bc = bucket_count();
|
1377
|
+
__chash = __constrain_hash(__hash, __bc);
|
1378
|
+
}
|
1379
|
+
// insert_after __bucket_list_[__chash], or __first_node if bucket is null
|
1380
|
+
__node_pointer __pn = __bucket_list_[__chash];
|
1381
|
+
if (__pn == nullptr)
|
1382
|
+
{
|
1383
|
+
__pn = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
|
1384
|
+
__h->__next_ = __pn->__next_;
|
1385
|
+
__pn->__next_ = __h.get();
|
1386
|
+
// fix up __bucket_list_
|
1387
|
+
__bucket_list_[__chash] = __pn;
|
1388
|
+
if (__h->__next_ != nullptr)
|
1389
|
+
__bucket_list_[__constrain_hash(__h->__next_->__hash_, __bc)] = __h.get();
|
1390
|
+
}
|
1391
|
+
else
|
1392
|
+
{
|
1393
|
+
__h->__next_ = __pn->__next_;
|
1394
|
+
__pn->__next_ = __h.get();
|
1395
|
+
}
|
1396
|
+
__nd = __h.release();
|
1397
|
+
// increment size
|
1398
|
+
++size();
|
1399
|
+
__inserted = true;
|
1400
|
+
}
|
1401
|
+
__done:
|
1402
|
+
return pair<iterator, bool>(iterator(__nd), __inserted);
|
1403
|
+
}
|
1404
|
+
|
1405
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1406
|
+
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
1407
|
+
|
1408
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1409
|
+
template <class... _Args>
|
1410
|
+
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
|
1411
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique(_Args&&... __args)
|
1412
|
+
{
|
1413
|
+
__node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
|
1414
|
+
pair<iterator, bool> __r = __node_insert_unique(__h.get());
|
1415
|
+
if (__r.second)
|
1416
|
+
__h.release();
|
1417
|
+
return __r;
|
1418
|
+
}
|
1419
|
+
|
1420
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1421
|
+
template <class... _Args>
|
1422
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1423
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_multi(_Args&&... __args)
|
1424
|
+
{
|
1425
|
+
__node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
|
1426
|
+
iterator __r = __node_insert_multi(__h.get());
|
1427
|
+
__h.release();
|
1428
|
+
return __r;
|
1429
|
+
}
|
1430
|
+
|
1431
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1432
|
+
template <class... _Args>
|
1433
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1434
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi(
|
1435
|
+
const_iterator __p, _Args&&... __args)
|
1436
|
+
{
|
1437
|
+
__node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
|
1438
|
+
iterator __r = __node_insert_multi(__p, __h.get());
|
1439
|
+
__h.release();
|
1440
|
+
return __r;
|
1441
|
+
}
|
1442
|
+
|
1443
|
+
#endif // _LIBCPP_HAS_NO_VARIADICS
|
1444
|
+
|
1445
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1446
|
+
template <class _Pp>
|
1447
|
+
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
|
1448
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_unique(_Pp&& __x)
|
1449
|
+
{
|
1450
|
+
__node_holder __h = __construct_node(_VSTD::forward<_Pp>(__x));
|
1451
|
+
pair<iterator, bool> __r = __node_insert_unique(__h.get());
|
1452
|
+
if (__r.second)
|
1453
|
+
__h.release();
|
1454
|
+
return __r;
|
1455
|
+
}
|
1456
|
+
|
1457
|
+
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1458
|
+
|
1459
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1460
|
+
|
1461
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1462
|
+
template <class _Pp>
|
1463
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1464
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(_Pp&& __x)
|
1465
|
+
{
|
1466
|
+
__node_holder __h = __construct_node(_VSTD::forward<_Pp>(__x));
|
1467
|
+
iterator __r = __node_insert_multi(__h.get());
|
1468
|
+
__h.release();
|
1469
|
+
return __r;
|
1470
|
+
}
|
1471
|
+
|
1472
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1473
|
+
template <class _Pp>
|
1474
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1475
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p,
|
1476
|
+
_Pp&& __x)
|
1477
|
+
{
|
1478
|
+
__node_holder __h = __construct_node(_VSTD::forward<_Pp>(__x));
|
1479
|
+
iterator __r = __node_insert_multi(__p, __h.get());
|
1480
|
+
__h.release();
|
1481
|
+
return __r;
|
1482
|
+
}
|
1483
|
+
|
1484
|
+
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1485
|
+
|
1486
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1487
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1488
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const value_type& __x)
|
1489
|
+
{
|
1490
|
+
__node_holder __h = __construct_node(__x);
|
1491
|
+
iterator __r = __node_insert_multi(__h.get());
|
1492
|
+
__h.release();
|
1493
|
+
return __r;
|
1494
|
+
}
|
1495
|
+
|
1496
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1497
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1498
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p,
|
1499
|
+
const value_type& __x)
|
1500
|
+
{
|
1501
|
+
__node_holder __h = __construct_node(__x);
|
1502
|
+
iterator __r = __node_insert_multi(__p, __h.get());
|
1503
|
+
__h.release();
|
1504
|
+
return __r;
|
1505
|
+
}
|
1506
|
+
|
1507
|
+
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1508
|
+
|
1509
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1510
|
+
void
|
1511
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::rehash(size_type __n)
|
1512
|
+
{
|
1513
|
+
if (__n == 1)
|
1514
|
+
__n = 2;
|
1515
|
+
else if (__n & (__n - 1))
|
1516
|
+
__n = __next_prime(__n);
|
1517
|
+
size_type __bc = bucket_count();
|
1518
|
+
if (__n > __bc)
|
1519
|
+
__rehash(__n);
|
1520
|
+
else if (__n < __bc)
|
1521
|
+
{
|
1522
|
+
__n = _VSTD::max<size_type>
|
1523
|
+
(
|
1524
|
+
__n,
|
1525
|
+
__is_power2(__bc) ? __next_pow2(size_t(ceil(float(size()) / max_load_factor()))) :
|
1526
|
+
__next_prime(size_t(ceil(float(size()) / max_load_factor())))
|
1527
|
+
);
|
1528
|
+
if (__n < __bc)
|
1529
|
+
__rehash(__n);
|
1530
|
+
}
|
1531
|
+
}
|
1532
|
+
|
1533
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1534
|
+
void
|
1535
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__rehash(size_type __nbc)
|
1536
|
+
{
|
1537
|
+
__pointer_allocator& __npa = __bucket_list_.get_deleter().__alloc();
|
1538
|
+
__bucket_list_.reset(__nbc > 0 ?
|
1539
|
+
__pointer_alloc_traits::allocate(__npa, __nbc) : nullptr);
|
1540
|
+
__bucket_list_.get_deleter().size() = __nbc;
|
1541
|
+
if (__nbc > 0)
|
1542
|
+
{
|
1543
|
+
for (size_type __i = 0; __i < __nbc; ++__i)
|
1544
|
+
__bucket_list_[__i] = nullptr;
|
1545
|
+
__node_pointer __pp(static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())));
|
1546
|
+
__node_pointer __cp = __pp->__next_;
|
1547
|
+
if (__cp != nullptr)
|
1548
|
+
{
|
1549
|
+
size_type __chash = __constrain_hash(__cp->__hash_, __nbc);
|
1550
|
+
__bucket_list_[__chash] = __pp;
|
1551
|
+
size_type __phash = __chash;
|
1552
|
+
for (__pp = __cp, __cp = __cp->__next_; __cp != nullptr;
|
1553
|
+
__cp = __pp->__next_)
|
1554
|
+
{
|
1555
|
+
__chash = __constrain_hash(__cp->__hash_, __nbc);
|
1556
|
+
if (__chash == __phash)
|
1557
|
+
__pp = __cp;
|
1558
|
+
else
|
1559
|
+
{
|
1560
|
+
if (__bucket_list_[__chash] == nullptr)
|
1561
|
+
{
|
1562
|
+
__bucket_list_[__chash] = __pp;
|
1563
|
+
__pp = __cp;
|
1564
|
+
__phash = __chash;
|
1565
|
+
}
|
1566
|
+
else
|
1567
|
+
{
|
1568
|
+
__node_pointer __np = __cp;
|
1569
|
+
for (; __np->__next_ != nullptr &&
|
1570
|
+
key_eq()(__cp->__value_, __np->__next_->__value_);
|
1571
|
+
__np = __np->__next_)
|
1572
|
+
;
|
1573
|
+
__pp->__next_ = __np->__next_;
|
1574
|
+
__np->__next_ = __bucket_list_[__chash]->__next_;
|
1575
|
+
__bucket_list_[__chash]->__next_ = __cp;
|
1576
|
+
|
1577
|
+
}
|
1578
|
+
}
|
1579
|
+
}
|
1580
|
+
}
|
1581
|
+
}
|
1582
|
+
}
|
1583
|
+
|
1584
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1585
|
+
template <class _Key>
|
1586
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1587
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k)
|
1588
|
+
{
|
1589
|
+
size_t __hash = hash_function()(__k);
|
1590
|
+
size_type __bc = bucket_count();
|
1591
|
+
if (__bc != 0)
|
1592
|
+
{
|
1593
|
+
size_t __chash = __constrain_hash(__hash, __bc);
|
1594
|
+
__node_pointer __nd = __bucket_list_[__chash];
|
1595
|
+
if (__nd != nullptr)
|
1596
|
+
{
|
1597
|
+
for (__nd = __nd->__next_; __nd != nullptr &&
|
1598
|
+
__constrain_hash(__nd->__hash_, __bc) == __chash;
|
1599
|
+
__nd = __nd->__next_)
|
1600
|
+
{
|
1601
|
+
if (key_eq()(__nd->__value_, __k))
|
1602
|
+
return iterator(__nd);
|
1603
|
+
}
|
1604
|
+
}
|
1605
|
+
}
|
1606
|
+
return end();
|
1607
|
+
}
|
1608
|
+
|
1609
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1610
|
+
template <class _Key>
|
1611
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator
|
1612
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const
|
1613
|
+
{
|
1614
|
+
size_t __hash = hash_function()(__k);
|
1615
|
+
size_type __bc = bucket_count();
|
1616
|
+
if (__bc != 0)
|
1617
|
+
{
|
1618
|
+
size_t __chash = __constrain_hash(__hash, __bc);
|
1619
|
+
__node_const_pointer __nd = __bucket_list_[__chash];
|
1620
|
+
if (__nd != nullptr)
|
1621
|
+
{
|
1622
|
+
for (__nd = __nd->__next_; __nd != nullptr &&
|
1623
|
+
__constrain_hash(__nd->__hash_, __bc) == __chash;
|
1624
|
+
__nd = __nd->__next_)
|
1625
|
+
{
|
1626
|
+
if (key_eq()(__nd->__value_, __k))
|
1627
|
+
return const_iterator(__nd);
|
1628
|
+
}
|
1629
|
+
}
|
1630
|
+
|
1631
|
+
}
|
1632
|
+
return end();
|
1633
|
+
}
|
1634
|
+
|
1635
|
+
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1636
|
+
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
1637
|
+
|
1638
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1639
|
+
template <class ..._Args>
|
1640
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
1641
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&& ...__args)
|
1642
|
+
{
|
1643
|
+
__node_allocator& __na = __node_alloc();
|
1644
|
+
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
|
1645
|
+
__node_traits::construct(__na, _VSTD::addressof(__h->__value_), _VSTD::forward<_Args>(__args)...);
|
1646
|
+
__h.get_deleter().__value_constructed = true;
|
1647
|
+
__h->__hash_ = hash_function()(__h->__value_);
|
1648
|
+
__h->__next_ = nullptr;
|
1649
|
+
return __h;
|
1650
|
+
}
|
1651
|
+
|
1652
|
+
#endif // _LIBCPP_HAS_NO_VARIADICS
|
1653
|
+
|
1654
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1655
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
1656
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v,
|
1657
|
+
size_t __hash)
|
1658
|
+
{
|
1659
|
+
__node_allocator& __na = __node_alloc();
|
1660
|
+
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
|
1661
|
+
__node_traits::construct(__na, _VSTD::addressof(__h->__value_), _VSTD::move(__v));
|
1662
|
+
__h.get_deleter().__value_constructed = true;
|
1663
|
+
__h->__hash_ = __hash;
|
1664
|
+
__h->__next_ = nullptr;
|
1665
|
+
return _VSTD::move(__h);
|
1666
|
+
}
|
1667
|
+
|
1668
|
+
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1669
|
+
|
1670
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1671
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
1672
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v)
|
1673
|
+
{
|
1674
|
+
__node_allocator& __na = __node_alloc();
|
1675
|
+
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
|
1676
|
+
__node_traits::construct(__na, _VSTD::addressof(__h->__value_), __v);
|
1677
|
+
__h.get_deleter().__value_constructed = true;
|
1678
|
+
__h->__hash_ = hash_function()(__h->__value_);
|
1679
|
+
__h->__next_ = nullptr;
|
1680
|
+
return _VSTD::move(__h);
|
1681
|
+
}
|
1682
|
+
|
1683
|
+
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1684
|
+
|
1685
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1686
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
1687
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v,
|
1688
|
+
size_t __hash)
|
1689
|
+
{
|
1690
|
+
__node_allocator& __na = __node_alloc();
|
1691
|
+
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
|
1692
|
+
__node_traits::construct(__na, _VSTD::addressof(__h->__value_), __v);
|
1693
|
+
__h.get_deleter().__value_constructed = true;
|
1694
|
+
__h->__hash_ = __hash;
|
1695
|
+
__h->__next_ = nullptr;
|
1696
|
+
return _VSTD::move(__h);
|
1697
|
+
}
|
1698
|
+
|
1699
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1700
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1701
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __p)
|
1702
|
+
{
|
1703
|
+
__node_pointer __np = const_cast<__node_pointer>(__p.__node_);
|
1704
|
+
iterator __r(__np);
|
1705
|
+
++__r;
|
1706
|
+
remove(__p);
|
1707
|
+
return __r;
|
1708
|
+
}
|
1709
|
+
|
1710
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1711
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
1712
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __first,
|
1713
|
+
const_iterator __last)
|
1714
|
+
{
|
1715
|
+
for (const_iterator __p = __first; __first != __last; __p = __first)
|
1716
|
+
{
|
1717
|
+
++__first;
|
1718
|
+
erase(__p);
|
1719
|
+
}
|
1720
|
+
__node_pointer __np = const_cast<__node_pointer>(__last.__node_);
|
1721
|
+
return iterator (__np);
|
1722
|
+
}
|
1723
|
+
|
1724
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1725
|
+
template <class _Key>
|
1726
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
|
1727
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__erase_unique(const _Key& __k)
|
1728
|
+
{
|
1729
|
+
iterator __i = find(__k);
|
1730
|
+
if (__i == end())
|
1731
|
+
return 0;
|
1732
|
+
erase(__i);
|
1733
|
+
return 1;
|
1734
|
+
}
|
1735
|
+
|
1736
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1737
|
+
template <class _Key>
|
1738
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
|
1739
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__erase_multi(const _Key& __k)
|
1740
|
+
{
|
1741
|
+
size_type __r = 0;
|
1742
|
+
iterator __i = find(__k);
|
1743
|
+
if (__i != end())
|
1744
|
+
{
|
1745
|
+
iterator __e = end();
|
1746
|
+
do
|
1747
|
+
{
|
1748
|
+
erase(__i++);
|
1749
|
+
++__r;
|
1750
|
+
} while (__i != __e && key_eq()(*__i, __k));
|
1751
|
+
}
|
1752
|
+
return __r;
|
1753
|
+
}
|
1754
|
+
|
1755
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1756
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
1757
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT
|
1758
|
+
{
|
1759
|
+
// current node
|
1760
|
+
__node_pointer __cn = const_cast<__node_pointer>(__p.__node_);
|
1761
|
+
size_type __bc = bucket_count();
|
1762
|
+
size_t __chash = __constrain_hash(__cn->__hash_, __bc);
|
1763
|
+
// find previous node
|
1764
|
+
__node_pointer __pn = __bucket_list_[__chash];
|
1765
|
+
for (; __pn->__next_ != __cn; __pn = __pn->__next_)
|
1766
|
+
;
|
1767
|
+
// Fix up __bucket_list_
|
1768
|
+
// if __pn is not in same bucket (before begin is not in same bucket) &&
|
1769
|
+
// if __cn->__next_ is not in same bucket (nullptr is not in same bucket)
|
1770
|
+
if (__pn == _VSTD::addressof(__p1_.first()) || __constrain_hash(__pn->__hash_, __bc) != __chash)
|
1771
|
+
{
|
1772
|
+
if (__cn->__next_ == nullptr || __constrain_hash(__cn->__next_->__hash_, __bc) != __chash)
|
1773
|
+
__bucket_list_[__chash] = nullptr;
|
1774
|
+
}
|
1775
|
+
// if __cn->__next_ is not in same bucket (nullptr is in same bucket)
|
1776
|
+
if (__cn->__next_ != nullptr)
|
1777
|
+
{
|
1778
|
+
size_t __nhash = __constrain_hash(__cn->__next_->__hash_, __bc);
|
1779
|
+
if (__nhash != __chash)
|
1780
|
+
__bucket_list_[__nhash] = __pn;
|
1781
|
+
}
|
1782
|
+
// remove __cn
|
1783
|
+
__pn->__next_ = __cn->__next_;
|
1784
|
+
__cn->__next_ = nullptr;
|
1785
|
+
--size();
|
1786
|
+
return __node_holder(__cn, _Dp(__node_alloc(), true));
|
1787
|
+
}
|
1788
|
+
|
1789
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1790
|
+
template <class _Key>
|
1791
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
1792
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
|
1793
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__count_unique(const _Key& __k) const
|
1794
|
+
{
|
1795
|
+
return static_cast<size_type>(find(__k) != end());
|
1796
|
+
}
|
1797
|
+
|
1798
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1799
|
+
template <class _Key>
|
1800
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
|
1801
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__count_multi(const _Key& __k) const
|
1802
|
+
{
|
1803
|
+
size_type __r = 0;
|
1804
|
+
const_iterator __i = find(__k);
|
1805
|
+
if (__i != end())
|
1806
|
+
{
|
1807
|
+
const_iterator __e = end();
|
1808
|
+
do
|
1809
|
+
{
|
1810
|
+
++__i;
|
1811
|
+
++__r;
|
1812
|
+
} while (__i != __e && key_eq()(*__i, __k));
|
1813
|
+
}
|
1814
|
+
return __r;
|
1815
|
+
}
|
1816
|
+
|
1817
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1818
|
+
template <class _Key>
|
1819
|
+
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator,
|
1820
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator>
|
1821
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_unique(
|
1822
|
+
const _Key& __k)
|
1823
|
+
{
|
1824
|
+
iterator __i = find(__k);
|
1825
|
+
iterator __j = __i;
|
1826
|
+
if (__i != end())
|
1827
|
+
++__j;
|
1828
|
+
return pair<iterator, iterator>(__i, __j);
|
1829
|
+
}
|
1830
|
+
|
1831
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1832
|
+
template <class _Key>
|
1833
|
+
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator,
|
1834
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator>
|
1835
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_unique(
|
1836
|
+
const _Key& __k) const
|
1837
|
+
{
|
1838
|
+
const_iterator __i = find(__k);
|
1839
|
+
const_iterator __j = __i;
|
1840
|
+
if (__i != end())
|
1841
|
+
++__j;
|
1842
|
+
return pair<const_iterator, const_iterator>(__i, __j);
|
1843
|
+
}
|
1844
|
+
|
1845
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1846
|
+
template <class _Key>
|
1847
|
+
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator,
|
1848
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator>
|
1849
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_multi(
|
1850
|
+
const _Key& __k)
|
1851
|
+
{
|
1852
|
+
iterator __i = find(__k);
|
1853
|
+
iterator __j = __i;
|
1854
|
+
if (__i != end())
|
1855
|
+
{
|
1856
|
+
iterator __e = end();
|
1857
|
+
do
|
1858
|
+
{
|
1859
|
+
++__j;
|
1860
|
+
} while (__j != __e && key_eq()(*__j, __k));
|
1861
|
+
}
|
1862
|
+
return pair<iterator, iterator>(__i, __j);
|
1863
|
+
}
|
1864
|
+
|
1865
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1866
|
+
template <class _Key>
|
1867
|
+
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator,
|
1868
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator>
|
1869
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_multi(
|
1870
|
+
const _Key& __k) const
|
1871
|
+
{
|
1872
|
+
const_iterator __i = find(__k);
|
1873
|
+
const_iterator __j = __i;
|
1874
|
+
if (__i != end())
|
1875
|
+
{
|
1876
|
+
const_iterator __e = end();
|
1877
|
+
do
|
1878
|
+
{
|
1879
|
+
++__j;
|
1880
|
+
} while (__j != __e && key_eq()(*__j, __k));
|
1881
|
+
}
|
1882
|
+
return pair<const_iterator, const_iterator>(__i, __j);
|
1883
|
+
}
|
1884
|
+
|
1885
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1886
|
+
void
|
1887
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
|
1888
|
+
_NOEXCEPT_(
|
1889
|
+
(!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value ||
|
1890
|
+
__is_nothrow_swappable<__pointer_allocator>::value) &&
|
1891
|
+
(!__node_traits::propagate_on_container_swap::value ||
|
1892
|
+
__is_nothrow_swappable<__node_allocator>::value) &&
|
1893
|
+
__is_nothrow_swappable<hasher>::value &&
|
1894
|
+
__is_nothrow_swappable<key_equal>::value)
|
1895
|
+
{
|
1896
|
+
{
|
1897
|
+
__node_pointer_pointer __npp = __bucket_list_.release();
|
1898
|
+
__bucket_list_.reset(__u.__bucket_list_.release());
|
1899
|
+
__u.__bucket_list_.reset(__npp);
|
1900
|
+
}
|
1901
|
+
_VSTD::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size());
|
1902
|
+
__swap_alloc(__bucket_list_.get_deleter().__alloc(),
|
1903
|
+
__u.__bucket_list_.get_deleter().__alloc());
|
1904
|
+
__swap_alloc(__node_alloc(), __u.__node_alloc());
|
1905
|
+
_VSTD::swap(__p1_.first().__next_, __u.__p1_.first().__next_);
|
1906
|
+
__p2_.swap(__u.__p2_);
|
1907
|
+
__p3_.swap(__u.__p3_);
|
1908
|
+
if (size() > 0)
|
1909
|
+
__bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] =
|
1910
|
+
static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
|
1911
|
+
if (__u.size() > 0)
|
1912
|
+
__u.__bucket_list_[__constrain_hash(__u.__p1_.first().__next_->__hash_, __u.bucket_count())] =
|
1913
|
+
static_cast<__node_pointer>(_VSTD::addressof(__u.__p1_.first()));
|
1914
|
+
}
|
1915
|
+
|
1916
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1917
|
+
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
|
1918
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>::bucket_size(size_type __n) const
|
1919
|
+
{
|
1920
|
+
__node_const_pointer __np = __bucket_list_[__n];
|
1921
|
+
size_type __bc = bucket_count();
|
1922
|
+
size_type __r = 0;
|
1923
|
+
if (__np != nullptr)
|
1924
|
+
{
|
1925
|
+
for (__np = __np->__next_; __np != nullptr &&
|
1926
|
+
__constrain_hash(__np->__hash_, __bc) == __n;
|
1927
|
+
__np = __np->__next_, ++__r)
|
1928
|
+
;
|
1929
|
+
}
|
1930
|
+
return __r;
|
1931
|
+
}
|
1932
|
+
|
1933
|
+
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
1934
|
+
inline _LIBCPP_INLINE_VISIBILITY
|
1935
|
+
void
|
1936
|
+
swap(__hash_table<_Tp, _Hash, _Equal, _Alloc>& __x,
|
1937
|
+
__hash_table<_Tp, _Hash, _Equal, _Alloc>& __y)
|
1938
|
+
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
|
1939
|
+
{
|
1940
|
+
__x.swap(__y);
|
1941
|
+
}
|
1942
|
+
|
1943
|
+
_LIBCPP_END_NAMESPACE_STD
|
1944
|
+
|
1945
|
+
#endif // _LIBCPP__HASH_TABLE
|