webruby 0.2.7 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/webruby/environment.rb +24 -8
- data/lib/webruby/rake/files.rake +6 -22
- data/lib/webruby/rake/general.rake +1 -1
- data/lib/webruby/rake/mruby.rake +1 -0
- data/lib/webruby/utility.rb +14 -0
- data/modules/mruby/AUTHORS +14 -0
- data/modules/mruby/CONTRIBUTING.md +7 -4
- data/modules/mruby/INSTALL +28 -11
- data/modules/mruby/MITL +13 -13
- data/modules/mruby/Makefile +4 -5
- data/modules/mruby/README.md +54 -49
- data/modules/mruby/Rakefile +36 -6
- data/modules/mruby/benchmark/ao-render.rb +1 -2
- data/modules/mruby/benchmark/bm_app_lc_fizzbuzz.rb +52 -0
- data/modules/mruby/benchmark/fib39.rb +0 -0
- data/modules/mruby/bintest/mrbc.rb +12 -0
- data/modules/mruby/build_config.rb +32 -2
- data/modules/mruby/doc/api/README.md +30 -0
- data/modules/mruby/doc/api/mruby.h.md +69 -0
- data/modules/mruby/doc/compile/README.md +208 -99
- data/modules/mruby/doc/debugger/README.md +370 -0
- data/modules/mruby/doc/language/Core.md +1590 -0
- data/modules/mruby/doc/language/README.md +9 -0
- data/modules/mruby/doc/language/generator.rb +15 -0
- data/modules/mruby/doc/language/mrbdoc/lib/mrbdoc_analyze.rb +231 -0
- data/modules/mruby/doc/language/mrbdoc/lib/mrbdoc_docu.rb +118 -0
- data/modules/mruby/doc/language/mrbdoc/mrbdoc.rb +38 -0
- data/modules/mruby/doc/mrbconf/README.md +160 -0
- data/modules/mruby/doc/mrbgems/README.md +136 -66
- data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake +1 -1
- data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c +1 -1
- data/modules/mruby/examples/mrbgems/c_extension_example/mrbgem.rake +1 -1
- data/modules/mruby/examples/mrbgems/c_extension_example/src/example.c +1 -1
- data/modules/mruby/examples/mrbgems/ruby_extension_example/mrbgem.rake +1 -1
- data/modules/mruby/examples/targets/{ArduinoDue.rb → build_config_ArduinoDue.rb} +32 -6
- data/modules/mruby/examples/targets/build_config_IntelGalileo.rb +106 -0
- data/modules/mruby/examples/targets/{chipKitMax32.rb → build_config_chipKITMax32.rb} +26 -7
- data/modules/mruby/include/mrbconf.h +25 -1
- data/modules/mruby/include/mruby/array.h +32 -22
- data/modules/mruby/include/mruby/boxing_nan.h +94 -0
- data/modules/mruby/include/mruby/boxing_no.h +49 -0
- data/modules/mruby/include/mruby/boxing_word.h +119 -0
- data/modules/mruby/include/mruby/class.h +15 -13
- data/modules/mruby/include/mruby/compile.h +43 -36
- data/modules/mruby/include/mruby/data.h +13 -5
- data/modules/mruby/include/mruby/debug.h +9 -9
- data/modules/mruby/include/mruby/dump.h +32 -23
- data/modules/mruby/include/mruby/error.h +36 -0
- data/modules/mruby/include/mruby/gc.h +11 -6
- data/modules/mruby/include/mruby/hash.h +12 -12
- data/modules/mruby/include/mruby/irep.h +9 -3
- data/modules/mruby/include/mruby/khash.h +58 -41
- data/modules/mruby/include/mruby/numeric.h +38 -4
- data/modules/mruby/include/mruby/object.h +55 -0
- data/modules/mruby/include/mruby/opcode.h +160 -0
- data/modules/mruby/include/mruby/proc.h +19 -5
- data/modules/mruby/include/mruby/range.h +4 -3
- data/modules/mruby/include/mruby/re.h +20 -0
- data/modules/mruby/include/mruby/string.h +86 -47
- data/modules/mruby/include/mruby/value.h +100 -374
- data/modules/mruby/include/mruby/variable.h +34 -32
- data/modules/mruby/include/mruby/version.h +40 -0
- data/modules/mruby/include/mruby.h +211 -139
- data/modules/mruby/minirake +16 -9
- data/modules/mruby/mrbgems/default.gembox +12 -0
- data/modules/mruby/mrbgems/full-core.gembox +3 -3
- data/modules/mruby/mrbgems/mruby-array-ext/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +488 -8
- data/modules/mruby/mrbgems/mruby-array-ext/src/array.c +57 -31
- data/modules/mruby/mrbgems/mruby-array-ext/test/array.rb +231 -45
- data/modules/mruby/mrbgems/mruby-bin-debugger/bintest/mrdb.rb +286 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/bintest/print.rb +701 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/mrbgem.rake +9 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +516 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.h +26 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c +235 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.h +14 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +78 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.h +13 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c +428 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c +501 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +58 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c +54 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +746 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +163 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +16 -0
- data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdberror.h +20 -0
- data/modules/mruby/mrbgems/mruby-bin-mirb/bintest/mirb.rb +12 -0
- data/modules/mruby/mrbgems/mruby-bin-mirb/mrbgem.rake +14 -1
- data/modules/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +154 -72
- data/modules/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +46 -0
- data/modules/mruby/mrbgems/mruby-bin-mruby/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +37 -28
- data/modules/mruby/mrbgems/mruby-bin-mruby-config/mrbgem.rake +30 -0
- data/modules/mruby/mrbgems/mruby-bin-mruby-config/mruby-config +16 -0
- data/modules/mruby/mrbgems/mruby-bin-mruby-config/mruby-config.bat +30 -0
- data/modules/mruby/mrbgems/mruby-bin-strip/bintest/mruby-strip.rb +73 -0
- data/modules/mruby/mrbgems/mruby-bin-strip/mrbgem.rake +6 -0
- data/modules/mruby/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c +155 -0
- data/modules/mruby/mrbgems/mruby-enum-ext/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +555 -21
- data/modules/mruby/mrbgems/mruby-enum-ext/test/enum.rb +119 -0
- data/modules/mruby/mrbgems/mruby-enum-lazy/mrbgem.rake +7 -0
- data/modules/mruby/mrbgems/mruby-enum-lazy/mrblib/lazy.rb +150 -0
- data/modules/mruby/mrbgems/mruby-enum-lazy/test/lazy.rb +47 -0
- data/modules/mruby/mrbgems/mruby-enumerator/mrbgem.rake +7 -0
- data/modules/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +636 -0
- data/modules/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +537 -0
- data/modules/mruby/mrbgems/mruby-eval/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-eval/src/eval.c +243 -4
- data/modules/mruby/mrbgems/mruby-eval/test/eval.rb +80 -0
- data/modules/mruby/mrbgems/mruby-exit/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-exit/src/mruby-exit.c +1 -1
- data/modules/mruby/mrbgems/mruby-fiber/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-fiber/src/fiber.c +157 -51
- data/modules/mruby/mrbgems/mruby-fiber/test/fiber.rb +179 -35
- data/modules/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +3 -0
- data/modules/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +241 -1
- data/modules/mruby/mrbgems/mruby-hash-ext/src/hash-ext.c +11 -19
- data/modules/mruby/mrbgems/mruby-hash-ext/test/hash.rb +138 -1
- data/modules/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +5 -0
- data/modules/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +183 -0
- data/modules/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +53 -0
- data/modules/mruby/mrbgems/mruby-math/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-math/src/math.c +107 -14
- data/modules/mruby/mrbgems/mruby-math/test/math.rb +16 -0
- data/modules/mruby/mrbgems/mruby-numeric-ext/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +5 -0
- data/modules/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +9 -1
- data/modules/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +19 -0
- data/modules/mruby/mrbgems/mruby-object-ext/src/object.c +5 -8
- data/modules/mruby/mrbgems/mruby-object-ext/test/object.rb +16 -0
- data/modules/mruby/mrbgems/mruby-objectspace/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +121 -53
- data/modules/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +27 -4
- data/modules/mruby/mrbgems/mruby-print/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-print/src/print.c +3 -5
- data/modules/mruby/mrbgems/mruby-proc-ext/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-proc-ext/src/proc.c +89 -19
- data/modules/mruby/mrbgems/mruby-proc-ext/test/proc.c +56 -0
- data/modules/mruby/mrbgems/mruby-proc-ext/test/proc.rb +47 -0
- data/modules/mruby/mrbgems/mruby-random/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-random/src/mt19937ar.c +30 -25
- data/modules/mruby/mrbgems/mruby-random/src/mt19937ar.h +6 -3
- data/modules/mruby/mrbgems/mruby-random/src/random.c +157 -137
- data/modules/mruby/mrbgems/mruby-random/src/random.h +3 -3
- data/modules/mruby/mrbgems/mruby-random/test/random.rb +9 -9
- data/modules/mruby/mrbgems/mruby-range-ext/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-range-ext/src/range.c +57 -3
- data/modules/mruby/mrbgems/mruby-range-ext/test/range.rb +9 -0
- data/modules/mruby/mrbgems/mruby-sprintf/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-sprintf/mrblib/string.rb +9 -0
- data/modules/mruby/mrbgems/mruby-sprintf/src/sprintf.c +29 -23
- data/modules/mruby/mrbgems/mruby-sprintf/test/sprintf.rb +7 -2
- data/modules/mruby/mrbgems/mruby-string-ext/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +250 -11
- data/modules/mruby/mrbgems/mruby-string-ext/src/string.c +220 -5
- data/modules/mruby/mrbgems/mruby-string-ext/test/string.rb +326 -4
- data/modules/mruby/mrbgems/mruby-string-utf8/mrbgem.rake +2 -0
- data/modules/mruby/mrbgems/mruby-string-utf8/src/string.c +486 -52
- data/modules/mruby/mrbgems/mruby-string-utf8/test/string.rb +97 -14
- data/modules/mruby/mrbgems/mruby-struct/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-struct/mrblib/struct.rb +31 -0
- data/modules/mruby/mrbgems/mruby-struct/src/struct.c +178 -196
- data/modules/mruby/mrbgems/mruby-struct/test/struct.rb +115 -61
- data/modules/mruby/mrbgems/mruby-symbol-ext/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-symbol-ext/mrblib/symbol.rb +22 -17
- data/modules/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +20 -11
- data/modules/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +14 -0
- data/modules/mruby/mrbgems/mruby-time/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-time/mrblib/time.rb +9 -0
- data/modules/mruby/mrbgems/mruby-time/src/time.c +98 -37
- data/modules/mruby/mrbgems/mruby-time/test/time.rb +152 -148
- data/modules/mruby/mrbgems/mruby-toplevel-ext/mrbgem.rake +1 -0
- data/modules/mruby/mrbgems/mruby-toplevel-ext/test/toplevel.rb +1 -1
- data/modules/mruby/mrblib/array.rb +110 -4
- data/modules/mruby/mrblib/class.rb +1 -22
- data/modules/mruby/mrblib/compar.rb +10 -30
- data/modules/mruby/mrblib/enum.rb +64 -52
- data/modules/mruby/mrblib/error.rb +9 -4
- data/modules/mruby/mrblib/hash.rb +164 -23
- data/modules/mruby/mrblib/kernel.rb +26 -22
- data/modules/mruby/mrblib/mrblib.rake +4 -4
- data/modules/mruby/mrblib/numeric.rb +22 -9
- data/modules/mruby/mrblib/range.rb +24 -2
- data/modules/mruby/mrblib/string.rb +15 -3
- data/modules/mruby/src/array.c +279 -339
- data/modules/mruby/src/backtrace.c +68 -16
- data/modules/mruby/src/class.c +539 -379
- data/modules/mruby/src/codegen.c +424 -207
- data/modules/mruby/src/compar.c +1 -1
- data/modules/mruby/src/crc.c +7 -6
- data/modules/mruby/src/debug.c +37 -36
- data/modules/mruby/src/dump.c +463 -213
- data/modules/mruby/src/enum.c +1 -1
- data/modules/mruby/src/error.c +91 -92
- data/modules/mruby/src/error.h +3 -19
- data/modules/mruby/src/etc.c +85 -82
- data/modules/mruby/src/gc.c +134 -108
- data/modules/mruby/src/hash.c +161 -565
- data/modules/mruby/src/init.c +2 -13
- data/modules/mruby/src/kernel.c +217 -251
- data/modules/mruby/src/load.c +280 -283
- data/modules/mruby/src/mrb_throw.h +41 -0
- data/modules/mruby/src/mruby_core.rake +57 -7
- data/modules/mruby/src/node.h +104 -104
- data/modules/mruby/src/numeric.c +221 -208
- data/modules/mruby/src/object.c +41 -42
- data/modules/mruby/src/opcode.h +2 -160
- data/modules/mruby/src/parse.y +3430 -3223
- data/modules/mruby/src/pool.c +13 -9
- data/modules/mruby/src/print.c +20 -17
- data/modules/mruby/src/proc.c +77 -21
- data/modules/mruby/src/range.c +55 -45
- data/modules/mruby/src/state.c +95 -31
- data/modules/mruby/src/string.c +462 -468
- data/modules/mruby/src/symbol.c +95 -85
- data/modules/mruby/src/variable.c +104 -74
- data/modules/mruby/src/version.c +13 -0
- data/modules/mruby/src/vm.c +528 -296
- data/modules/mruby/tasks/libmruby.rake +9 -5
- data/modules/mruby/tasks/mrbgem_spec.rake +130 -26
- data/modules/mruby/tasks/mrbgems.rake +21 -11
- data/modules/mruby/tasks/mrbgems_test.rake +46 -40
- data/modules/mruby/tasks/mruby_build.rake +54 -12
- data/modules/mruby/tasks/mruby_build_commands.rake +34 -5
- data/modules/mruby/tasks/mruby_build_gem.rake +25 -3
- data/modules/mruby/tasks/ruby_ext.rake +11 -2
- data/modules/mruby/tasks/toolchains/clang.rake +2 -1
- data/modules/mruby/tasks/toolchains/gcc.rake +26 -3
- data/modules/mruby/tasks/toolchains/visualcpp.rake +17 -8
- data/modules/mruby/test/assert.rb +30 -8
- data/modules/mruby/test/bintest.rb +10 -0
- data/modules/mruby/test/driver.c +74 -24
- data/modules/mruby/test/init_mrbtest.c +21 -2
- data/modules/mruby/test/mrbtest.rake +27 -5
- data/modules/mruby/test/t/argumenterror.rb +0 -5
- data/modules/mruby/test/t/array.rb +23 -7
- data/modules/mruby/test/t/bs_block.rb +32 -0
- data/modules/mruby/test/t/class.rb +29 -5
- data/modules/mruby/test/t/comparable.rb +20 -12
- data/modules/mruby/test/t/enumerable.rb +33 -7
- data/modules/mruby/test/t/exception.rb +63 -38
- data/modules/mruby/test/t/false.rb +2 -4
- data/modules/mruby/test/t/float.rb +39 -4
- data/modules/mruby/test/t/hash.rb +40 -6
- data/modules/mruby/test/t/indexerror.rb +0 -4
- data/modules/mruby/test/t/integer.rb +41 -5
- data/modules/mruby/test/t/kernel.rb +90 -3
- data/modules/mruby/test/t/localjumperror.rb +4 -4
- data/modules/mruby/test/t/methods.rb +1 -1
- data/modules/mruby/test/t/module.rb +43 -13
- data/modules/mruby/test/t/nameerror.rb +0 -4
- data/modules/mruby/test/t/nil.rb +5 -0
- data/modules/mruby/test/t/nomethoderror.rb +11 -2
- data/modules/mruby/test/t/numeric.rb +18 -4
- data/modules/mruby/test/t/proc.rb +59 -6
- data/modules/mruby/test/t/range.rb +15 -5
- data/modules/mruby/test/t/rangeerror.rb +0 -4
- data/modules/mruby/test/t/standarderror.rb +0 -4
- data/modules/mruby/test/t/string.rb +56 -12
- data/modules/mruby/test/t/superclass.rb +46 -0
- data/modules/mruby/test/t/symbol.rb +0 -4
- data/modules/mruby/test/t/syntax.rb +134 -1
- data/modules/mruby/test/t/true.rb +2 -4
- data/modules/mruby/test/t/typeerror.rb +0 -5
- data/modules/mruby/test/t/unicode.rb +35 -0
- data/modules/mruby/tools/mrbc/mrbc.c +9 -12
- data/modules/mruby/travis_config.rb +22 -2
- metadata +98 -1299
- data/modules/emscripten/AUTHORS +0 -117
- data/modules/emscripten/CONTRIBUTING.markdown +0 -5
- data/modules/emscripten/ChangeLog +0 -468
- data/modules/emscripten/LICENSE +0 -94
- data/modules/emscripten/README.markdown +0 -14
- data/modules/emscripten/cmake/Modules/FindOpenAL.cmake +0 -26
- data/modules/emscripten/cmake/Platform/Emscripten.cmake +0 -228
- data/modules/emscripten/em++ +0 -12
- data/modules/emscripten/em++.bat +0 -2
- data/modules/emscripten/em-config +0 -24
- data/modules/emscripten/em-config.bat +0 -2
- data/modules/emscripten/emar +0 -24
- data/modules/emscripten/emar.bat +0 -2
- data/modules/emscripten/emcc +0 -2069
- data/modules/emscripten/emcc.bat +0 -2
- data/modules/emscripten/emcc.py +0 -5
- data/modules/emscripten/emconfigure +0 -27
- data/modules/emscripten/emconfigure.bat +0 -2
- data/modules/emscripten/emlink.py +0 -33
- data/modules/emscripten/emmake +0 -29
- data/modules/emscripten/emmake.bat +0 -2
- data/modules/emscripten/emranlib +0 -9
- data/modules/emscripten/emranlib.bat +0 -2
- data/modules/emscripten/emrun +0 -1087
- data/modules/emscripten/emrun.bat +0 -2
- data/modules/emscripten/emscons +0 -20
- data/modules/emscripten/emscripten.py +0 -1347
- data/modules/emscripten/package.json +0 -7
- data/modules/emscripten/patches/README +0 -4
- data/modules/emscripten/patches/series +0 -2
- data/modules/emscripten/scons-tools/closure.py +0 -28
- data/modules/emscripten/scons-tools/emscripten.py +0 -364
- data/modules/emscripten/scons-tools/llvm.py +0 -34
- data/modules/emscripten/src/analyzer.js +0 -1781
- data/modules/emscripten/src/closure-externs.js +0 -110
- data/modules/emscripten/src/compiler.html +0 -48
- data/modules/emscripten/src/compiler.js +0 -331
- data/modules/emscripten/src/compiler_phase.html +0 -33
- data/modules/emscripten/src/corruptionCheck.js +0 -98
- data/modules/emscripten/src/determinstic.js +0 -20
- data/modules/emscripten/src/embind/embind.js +0 -1677
- data/modules/emscripten/src/embind/emval.js +0 -284
- data/modules/emscripten/src/emrun_postjs.js +0 -20
- data/modules/emscripten/src/emrun_prejs.js +0 -5
- data/modules/emscripten/src/emscripten-source-map.min.js +0 -31
- data/modules/emscripten/src/experimental/allow_loopvars_from_memsetcpy_inasm.diff +0 -97
- data/modules/emscripten/src/experimental/batching.diff +0 -44
- data/modules/emscripten/src/experimental/functypeopt.diff +0 -113
- data/modules/emscripten/src/experimental/multiple_heaps.diff +0 -175
- data/modules/emscripten/src/experimental/noncallgraphprofiling.diff +0 -197
- data/modules/emscripten/src/experimental/optimize_memcpy_for_ta1.diff +0 -124
- data/modules/emscripten/src/experimental/remove__label__s.diff +0 -140
- data/modules/emscripten/src/experimental/renderer_cache_hash.diff +0 -99
- data/modules/emscripten/src/experimental/sdl_key_forwarding.diff +0 -57
- data/modules/emscripten/src/experimental/simplifyGeneratedFunctionsDetection.diff +0 -336
- data/modules/emscripten/src/experimental/stringCache.diff +0 -147
- data/modules/emscripten/src/fastLong.js +0 -299
- data/modules/emscripten/src/gl-matrix.js +0 -1952
- data/modules/emscripten/src/headless.js +0 -295
- data/modules/emscripten/src/headlessCanvas.js +0 -618
- data/modules/emscripten/src/hello_world.js +0 -92
- data/modules/emscripten/src/intertyper.js +0 -1228
- data/modules/emscripten/src/jsifier.js +0 -1969
- data/modules/emscripten/src/library.js +0 -9196
- data/modules/emscripten/src/library_browser.js +0 -988
- data/modules/emscripten/src/library_egl.js +0 -564
- data/modules/emscripten/src/library_fs.js +0 -1619
- data/modules/emscripten/src/library_gc.js +0 -236
- data/modules/emscripten/src/library_gl.js +0 -5194
- data/modules/emscripten/src/library_glfw.js +0 -585
- data/modules/emscripten/src/library_glut.js +0 -504
- data/modules/emscripten/src/library_idbfs.js +0 -216
- data/modules/emscripten/src/library_jansson.js +0 -320
- data/modules/emscripten/src/library_memfs.js +0 -303
- data/modules/emscripten/src/library_nodefs.js +0 -286
- data/modules/emscripten/src/library_openal.js +0 -915
- data/modules/emscripten/src/library_path.js +0 -133
- data/modules/emscripten/src/library_sdl.js +0 -2728
- data/modules/emscripten/src/library_sockfs.js +0 -578
- data/modules/emscripten/src/library_strtok_r.c +0 -97
- data/modules/emscripten/src/library_tty.js +0 -146
- data/modules/emscripten/src/library_uuid.js +0 -140
- data/modules/emscripten/src/library_xlib.js +0 -23
- data/modules/emscripten/src/long.js +0 -1609
- data/modules/emscripten/src/modules.js +0 -543
- data/modules/emscripten/src/parseTools.js +0 -2723
- data/modules/emscripten/src/postamble.js +0 -239
- data/modules/emscripten/src/postamble_sharedlib.js +0 -16
- data/modules/emscripten/src/preamble.js +0 -1233
- data/modules/emscripten/src/preamble_sharedlib.js +0 -25
- data/modules/emscripten/src/proxyClient.js +0 -82
- data/modules/emscripten/src/proxyWorker.js +0 -143
- data/modules/emscripten/src/relooper/README.markdown +0 -14
- data/modules/emscripten/src/relooper/Relooper.cpp +0 -1301
- data/modules/emscripten/src/relooper/Relooper.h +0 -257
- data/modules/emscripten/src/relooper/doit.sh +0 -70
- data/modules/emscripten/src/relooper/emscripten/glue.js +0 -67
- data/modules/emscripten/src/relooper/emscripten/test.js +0 -44
- data/modules/emscripten/src/relooper/fuzzer.py +0 -131
- data/modules/emscripten/src/relooper/ministring.h +0 -35
- data/modules/emscripten/src/relooper/paper.pdf +0 -0
- data/modules/emscripten/src/relooper/test.cpp +0 -290
- data/modules/emscripten/src/relooper/test.txt +0 -317
- data/modules/emscripten/src/relooper/test2.c +0 -44
- data/modules/emscripten/src/relooper/test2.txt +0 -26
- data/modules/emscripten/src/relooper/test3.c +0 -42
- data/modules/emscripten/src/relooper/test3.txt +0 -56
- data/modules/emscripten/src/relooper/test4.cpp +0 -40
- data/modules/emscripten/src/relooper/test4.txt +0 -44
- data/modules/emscripten/src/relooper/test5.cpp +0 -40
- data/modules/emscripten/src/relooper/test5.txt +0 -56
- data/modules/emscripten/src/relooper/test6.cpp +0 -31
- data/modules/emscripten/src/relooper/test6.txt +0 -26
- data/modules/emscripten/src/relooper/test_dead.cpp +0 -28
- data/modules/emscripten/src/relooper/test_dead.txt +0 -9
- data/modules/emscripten/src/relooper/test_debug.cpp +0 -30
- data/modules/emscripten/src/relooper/test_debug.txt +0 -142
- data/modules/emscripten/src/relooper/test_fuzz1.cpp +0 -52
- data/modules/emscripten/src/relooper/test_fuzz1.txt +0 -72
- data/modules/emscripten/src/relooper/test_fuzz2.cpp +0 -34
- data/modules/emscripten/src/relooper/test_fuzz2.txt +0 -30
- data/modules/emscripten/src/relooper/test_fuzz3.cpp +0 -36
- data/modules/emscripten/src/relooper/test_fuzz3.txt +0 -25
- data/modules/emscripten/src/relooper/test_fuzz4.cpp +0 -38
- data/modules/emscripten/src/relooper/test_fuzz4.txt +0 -41
- data/modules/emscripten/src/relooper/test_fuzz5.cpp +0 -57
- data/modules/emscripten/src/relooper/test_fuzz5.txt +0 -86
- data/modules/emscripten/src/relooper/test_fuzz6.cpp +0 -322
- data/modules/emscripten/src/relooper/test_fuzz6.txt +0 -291
- data/modules/emscripten/src/relooper/test_inf.cpp +0 -813
- data/modules/emscripten/src/relooper/test_inf.txt +0 -1131
- data/modules/emscripten/src/relooper/testit.sh +0 -62
- data/modules/emscripten/src/relooper/updateit.sh +0 -17
- data/modules/emscripten/src/runtime.js +0 -604
- data/modules/emscripten/src/settings.js +0 -476
- data/modules/emscripten/src/shell.html +0 -95
- data/modules/emscripten/src/shell.js +0 -173
- data/modules/emscripten/src/shell_sharedlib.js +0 -29
- data/modules/emscripten/src/simd.js +0 -1128
- data/modules/emscripten/src/socket.io.js +0 -3870
- data/modules/emscripten/src/struct_info.json +0 -1077
- data/modules/emscripten/src/utility.js +0 -411
- data/modules/emscripten/src/wrtcp.js +0 -821
- data/modules/emscripten/system/bin/sdl-config +0 -13
- data/modules/emscripten/system/include/AL/al.h +0 -172
- data/modules/emscripten/system/include/AL/alc.h +0 -84
- data/modules/emscripten/system/include/EGL/egl.h +0 -329
- data/modules/emscripten/system/include/EGL/eglext.h +0 -398
- data/modules/emscripten/system/include/EGL/eglplatform.h +0 -141
- data/modules/emscripten/system/include/GL/freeglut_std.h +0 -628
- data/modules/emscripten/system/include/GL/gl.h +0 -2241
- data/modules/emscripten/system/include/GL/glew.h +0 -6
- data/modules/emscripten/system/include/GL/glext.h +0 -11127
- data/modules/emscripten/system/include/GL/glfw.h +0 -518
- data/modules/emscripten/system/include/GL/glu.h +0 -353
- data/modules/emscripten/system/include/GL/glut.h +0 -21
- data/modules/emscripten/system/include/GLES/gl.h +0 -770
- data/modules/emscripten/system/include/GLES/glext.h +0 -1278
- data/modules/emscripten/system/include/GLES/glplatform.h +0 -30
- data/modules/emscripten/system/include/GLES2/gl2.h +0 -621
- data/modules/emscripten/system/include/GLES2/gl2ext.h +0 -803
- data/modules/emscripten/system/include/GLES2/gl2platform.h +0 -30
- data/modules/emscripten/system/include/KHR/khrplatform.h +0 -277
- data/modules/emscripten/system/include/SDL/COPYING +0 -19
- data/modules/emscripten/system/include/SDL/SDL.h +0 -162
- data/modules/emscripten/system/include/SDL/SDL_assert.h +0 -241
- data/modules/emscripten/system/include/SDL/SDL_atomic.h +0 -318
- data/modules/emscripten/system/include/SDL/SDL_audio.h +0 -509
- data/modules/emscripten/system/include/SDL/SDL_blendmode.h +0 -60
- data/modules/emscripten/system/include/SDL/SDL_clipboard.h +0 -75
- data/modules/emscripten/system/include/SDL/SDL_compat.h +0 -365
- data/modules/emscripten/system/include/SDL/SDL_config.h +0 -48
- data/modules/emscripten/system/include/SDL/SDL_config.h.in +0 -297
- data/modules/emscripten/system/include/SDL/SDL_config_android.h +0 -133
- data/modules/emscripten/system/include/SDL/SDL_config_iphoneos.h +0 -148
- data/modules/emscripten/system/include/SDL/SDL_config_macosx.h +0 -172
- data/modules/emscripten/system/include/SDL/SDL_config_minimal.h +0 -74
- data/modules/emscripten/system/include/SDL/SDL_config_nintendods.h +0 -129
- data/modules/emscripten/system/include/SDL/SDL_config_pandora.h +0 -125
- data/modules/emscripten/system/include/SDL/SDL_config_windows.h +0 -207
- data/modules/emscripten/system/include/SDL/SDL_config_wiz.h +0 -119
- data/modules/emscripten/system/include/SDL/SDL_copying.h +0 -20
- data/modules/emscripten/system/include/SDL/SDL_cpuinfo.h +0 -150
- data/modules/emscripten/system/include/SDL/SDL_endian.h +0 -248
- data/modules/emscripten/system/include/SDL/SDL_error.h +0 -77
- data/modules/emscripten/system/include/SDL/SDL_events.h +0 -640
- data/modules/emscripten/system/include/SDL/SDL_gesture.h +0 -91
- data/modules/emscripten/system/include/SDL/SDL_gfxPrimitives.h +0 -246
- data/modules/emscripten/system/include/SDL/SDL_haptic.h +0 -1200
- data/modules/emscripten/system/include/SDL/SDL_hints.h +0 -206
- data/modules/emscripten/system/include/SDL/SDL_image.h +0 -138
- data/modules/emscripten/system/include/SDL/SDL_input.h +0 -87
- data/modules/emscripten/system/include/SDL/SDL_joystick.h +0 -208
- data/modules/emscripten/system/include/SDL/SDL_keyboard.h +0 -169
- data/modules/emscripten/system/include/SDL/SDL_keycode.h +0 -344
- data/modules/emscripten/system/include/SDL/SDL_loadso.h +0 -85
- data/modules/emscripten/system/include/SDL/SDL_log.h +0 -211
- data/modules/emscripten/system/include/SDL/SDL_main.h +0 -98
- data/modules/emscripten/system/include/SDL/SDL_mixer.h +0 -634
- data/modules/emscripten/system/include/SDL/SDL_mouse.h +0 -213
- data/modules/emscripten/system/include/SDL/SDL_mutex.h +0 -248
- data/modules/emscripten/system/include/SDL/SDL_name.h +0 -11
- data/modules/emscripten/system/include/SDL/SDL_opengl.h +0 -11116
- data/modules/emscripten/system/include/SDL/SDL_opengles.h +0 -38
- data/modules/emscripten/system/include/SDL/SDL_opengles2.h +0 -38
- data/modules/emscripten/system/include/SDL/SDL_pixels.h +0 -423
- data/modules/emscripten/system/include/SDL/SDL_platform.h +0 -160
- data/modules/emscripten/system/include/SDL/SDL_power.h +0 -79
- data/modules/emscripten/system/include/SDL/SDL_quit.h +0 -58
- data/modules/emscripten/system/include/SDL/SDL_rect.h +0 -136
- data/modules/emscripten/system/include/SDL/SDL_render.h +0 -615
- data/modules/emscripten/system/include/SDL/SDL_revision.h +0 -2
- data/modules/emscripten/system/include/SDL/SDL_revision.h.orig +0 -2
- data/modules/emscripten/system/include/SDL/SDL_rotozoom.h +0 -123
- data/modules/emscripten/system/include/SDL/SDL_rwops.h +0 -220
- data/modules/emscripten/system/include/SDL/SDL_scancode.h +0 -398
- data/modules/emscripten/system/include/SDL/SDL_shape.h +0 -147
- data/modules/emscripten/system/include/SDL/SDL_stdinc.h +0 -764
- data/modules/emscripten/system/include/SDL/SDL_surface.h +0 -499
- data/modules/emscripten/system/include/SDL/SDL_syswm.h +0 -241
- data/modules/emscripten/system/include/SDL/SDL_thread.h +0 -182
- data/modules/emscripten/system/include/SDL/SDL_timer.h +0 -108
- data/modules/emscripten/system/include/SDL/SDL_touch.h +0 -124
- data/modules/emscripten/system/include/SDL/SDL_ttf.h +0 -249
- data/modules/emscripten/system/include/SDL/SDL_types.h +0 -29
- data/modules/emscripten/system/include/SDL/SDL_version.h +0 -166
- data/modules/emscripten/system/include/SDL/SDL_video.h +0 -820
- data/modules/emscripten/system/include/SDL/begin_code.h +0 -135
- data/modules/emscripten/system/include/SDL/close_code.h +0 -37
- data/modules/emscripten/system/include/X11/X.h +0 -717
- data/modules/emscripten/system/include/X11/Xatom.h +0 -79
- data/modules/emscripten/system/include/X11/Xfuncproto.h +0 -127
- data/modules/emscripten/system/include/X11/Xlib.h +0 -4023
- data/modules/emscripten/system/include/X11/Xosdefs.h +0 -116
- data/modules/emscripten/system/include/X11/Xutil.h +0 -826
- data/modules/emscripten/system/include/X11/keysym.h +0 -73
- data/modules/emscripten/system/include/X11/keysymdef.h +0 -2389
- data/modules/emscripten/system/include/compat/ctype.h +0 -34
- data/modules/emscripten/system/include/compat/malloc.h +0 -48
- data/modules/emscripten/system/include/compat/math.h +0 -14
- data/modules/emscripten/system/include/compat/netdb.h +0 -22
- data/modules/emscripten/system/include/compat/stdarg.h +0 -16
- data/modules/emscripten/system/include/compat/stdlib.h +0 -16
- data/modules/emscripten/system/include/compat/string.h +0 -17
- data/modules/emscripten/system/include/compat/sys/socketvar.h +0 -14
- data/modules/emscripten/system/include/compat/sys/stat.h +0 -20
- data/modules/emscripten/system/include/compat/sys/timeb.h +0 -35
- data/modules/emscripten/system/include/compat/time.h +0 -18
- data/modules/emscripten/system/include/compat/unistd.h +0 -16
- data/modules/emscripten/system/include/compat/wchar.h +0 -23
- data/modules/emscripten/system/include/compat/wctype.h +0 -23
- data/modules/emscripten/system/include/compat/xlocale.h +0 -19
- data/modules/emscripten/system/include/emscripten/bind.h +0 -1210
- data/modules/emscripten/system/include/emscripten/emmintrin.h +0 -87
- data/modules/emscripten/system/include/emscripten/emscripten.h +0 -519
- data/modules/emscripten/system/include/emscripten/val.h +0 -311
- data/modules/emscripten/system/include/emscripten/vector.h +0 -34
- data/modules/emscripten/system/include/emscripten/wire.h +0 -393
- data/modules/emscripten/system/include/emscripten/xmmintrin.h +0 -131
- data/modules/emscripten/system/include/execinfo.h +0 -44
- data/modules/emscripten/system/include/gc.h +0 -70
- data/modules/emscripten/system/include/gfx/png.h +0 -3798
- data/modules/emscripten/system/include/gfx/pngconf.h +0 -1665
- data/modules/emscripten/system/include/gfx/tiff.h +0 -654
- data/modules/emscripten/system/include/gfx/tiffconf.h +0 -104
- data/modules/emscripten/system/include/gfx/tiffio.h +0 -526
- data/modules/emscripten/system/include/gfx/tiffvers.h +0 -9
- data/modules/emscripten/system/include/jansson.h +0 -323
- data/modules/emscripten/system/include/jansson_config.h +0 -54
- data/modules/emscripten/system/include/libc/aio.h +0 -69
- data/modules/emscripten/system/include/libc/alloca.h +0 -21
- data/modules/emscripten/system/include/libc/ar.h +0 -25
- data/modules/emscripten/system/include/libc/arpa/ftp.h +0 -35
- data/modules/emscripten/system/include/libc/arpa/inet.h +0 -36
- data/modules/emscripten/system/include/libc/arpa/nameser.h +0 -467
- data/modules/emscripten/system/include/libc/arpa/nameser_compat.h +0 -2
- data/modules/emscripten/system/include/libc/arpa/telnet.h +0 -251
- data/modules/emscripten/system/include/libc/arpa/tftp.h +0 -31
- data/modules/emscripten/system/include/libc/assert.h +0 -19
- data/modules/emscripten/system/include/libc/bits/alltypes.h +0 -397
- data/modules/emscripten/system/include/libc/bits/endian.h +0 -1
- data/modules/emscripten/system/include/libc/bits/errno.h +0 -134
- data/modules/emscripten/system/include/libc/bits/fcntl.h +0 -38
- data/modules/emscripten/system/include/libc/bits/fenv.h +0 -34
- data/modules/emscripten/system/include/libc/bits/float.h +0 -17
- data/modules/emscripten/system/include/libc/bits/io.h +0 -0
- data/modules/emscripten/system/include/libc/bits/ioctl.h +0 -197
- data/modules/emscripten/system/include/libc/bits/ipc.h +0 -14
- data/modules/emscripten/system/include/libc/bits/limits.h +0 -8
- data/modules/emscripten/system/include/libc/bits/mman.h +0 -62
- data/modules/emscripten/system/include/libc/bits/msg.h +0 -16
- data/modules/emscripten/system/include/libc/bits/posix.h +0 -2
- data/modules/emscripten/system/include/libc/bits/reg.h +0 -19
- data/modules/emscripten/system/include/libc/bits/setjmp.h +0 -1
- data/modules/emscripten/system/include/libc/bits/shm.h +0 -18
- data/modules/emscripten/system/include/libc/bits/signal.h +0 -112
- data/modules/emscripten/system/include/libc/bits/socket.h +0 -17
- data/modules/emscripten/system/include/libc/bits/stat.h +0 -22
- data/modules/emscripten/system/include/libc/bits/statfs.h +0 -7
- data/modules/emscripten/system/include/libc/bits/stdarg.h +0 -4
- data/modules/emscripten/system/include/libc/bits/stdint.h +0 -20
- data/modules/emscripten/system/include/libc/bits/syscall.h +0 -696
- data/modules/emscripten/system/include/libc/bits/termios.h +0 -160
- data/modules/emscripten/system/include/libc/bits/user.h +0 -48
- data/modules/emscripten/system/include/libc/byteswap.h +0 -26
- data/modules/emscripten/system/include/libc/complex.h +0 -125
- data/modules/emscripten/system/include/libc/cpio.h +0 -29
- data/modules/emscripten/system/include/libc/crypt.h +0 -20
- data/modules/emscripten/system/include/libc/ctype.h +0 -67
- data/modules/emscripten/system/include/libc/dirent.h +0 -79
- data/modules/emscripten/system/include/libc/dlfcn.h +0 -42
- data/modules/emscripten/system/include/libc/elf.h +0 -2555
- data/modules/emscripten/system/include/libc/endian.h +0 -82
- data/modules/emscripten/system/include/libc/err.h +0 -25
- data/modules/emscripten/system/include/libc/errno.h +0 -27
- data/modules/emscripten/system/include/libc/fcntl.h +0 -175
- data/modules/emscripten/system/include/libc/features.h +0 -32
- data/modules/emscripten/system/include/libc/fenv.h +0 -28
- data/modules/emscripten/system/include/libc/float.h +0 -34
- data/modules/emscripten/system/include/libc/fnmatch.h +0 -29
- data/modules/emscripten/system/include/libc/ftw.h +0 -42
- data/modules/emscripten/system/include/libc/getopt.h +0 -31
- data/modules/emscripten/system/include/libc/glob.h +0 -48
- data/modules/emscripten/system/include/libc/grp.h +0 -52
- data/modules/emscripten/system/include/libc/iconv.h +0 -24
- data/modules/emscripten/system/include/libc/ifaddrs.h +0 -35
- data/modules/emscripten/system/include/libc/inttypes.h +0 -227
- data/modules/emscripten/system/include/libc/iso646.h +0 -20
- data/modules/emscripten/system/include/libc/langinfo.h +0 -88
- data/modules/emscripten/system/include/libc/lastlog.h +0 -1
- data/modules/emscripten/system/include/libc/libgen.h +0 -15
- data/modules/emscripten/system/include/libc/libintl.h +0 -25
- data/modules/emscripten/system/include/libc/limits.h +0 -146
- data/modules/emscripten/system/include/libc/link.h +0 -54
- data/modules/emscripten/system/include/libc/locale.h +0 -82
- data/modules/emscripten/system/include/libc/malloc.h +0 -0
- data/modules/emscripten/system/include/libc/math.h +0 -422
- data/modules/emscripten/system/include/libc/memory.h +0 -1
- data/modules/emscripten/system/include/libc/mntent.h +0 -44
- data/modules/emscripten/system/include/libc/monetary.h +0 -23
- data/modules/emscripten/system/include/libc/mqueue.h +0 -36
- data/modules/emscripten/system/include/libc/net/ethernet.h +0 -55
- data/modules/emscripten/system/include/libc/net/if.h +0 -135
- data/modules/emscripten/system/include/libc/net/if_arp.h +0 -133
- data/modules/emscripten/system/include/libc/net/route.h +0 -124
- data/modules/emscripten/system/include/libc/netdb.h +0 -161
- data/modules/emscripten/system/include/libc/netinet/ether.h +0 -14
- data/modules/emscripten/system/include/libc/netinet/icmp6.h +0 -305
- data/modules/emscripten/system/include/libc/netinet/if_ether.h +0 -126
- data/modules/emscripten/system/include/libc/netinet/in.h +0 -336
- data/modules/emscripten/system/include/libc/netinet/in_systm.h +0 -9
- data/modules/emscripten/system/include/libc/netinet/ip.h +0 -186
- data/modules/emscripten/system/include/libc/netinet/ip6.h +0 -142
- data/modules/emscripten/system/include/libc/netinet/ip_icmp.h +0 -192
- data/modules/emscripten/system/include/libc/netinet/tcp.h +0 -71
- data/modules/emscripten/system/include/libc/netinet/udp.h +0 -35
- data/modules/emscripten/system/include/libc/netpacket/packet.h +0 -44
- data/modules/emscripten/system/include/libc/nl_types.h +0 -22
- data/modules/emscripten/system/include/libc/paths.h +0 -32
- data/modules/emscripten/system/include/libc/poll.h +0 -46
- data/modules/emscripten/system/include/libc/pthread.h +0 -222
- data/modules/emscripten/system/include/libc/pty.h +0 -18
- data/modules/emscripten/system/include/libc/pwd.h +0 -49
- data/modules/emscripten/system/include/libc/readme.txt +0 -3
- data/modules/emscripten/system/include/libc/regex.h +0 -62
- data/modules/emscripten/system/include/libc/resolv.h +0 -144
- data/modules/emscripten/system/include/libc/sched.h +0 -132
- data/modules/emscripten/system/include/libc/search.h +0 -51
- data/modules/emscripten/system/include/libc/semaphore.h +0 -35
- data/modules/emscripten/system/include/libc/setjmp.h +0 -42
- data/modules/emscripten/system/include/libc/shadow.h +0 -44
- data/modules/emscripten/system/include/libc/signal.h +0 -255
- data/modules/emscripten/system/include/libc/spawn.h +0 -74
- data/modules/emscripten/system/include/libc/stdalign.h +0 -15
- data/modules/emscripten/system/include/libc/stdarg.h +0 -25
- data/modules/emscripten/system/include/libc/stdbool.h +0 -14
- data/modules/emscripten/system/include/libc/stddef.h +0 -18
- data/modules/emscripten/system/include/libc/stdint.h +0 -117
- data/modules/emscripten/system/include/libc/stdio.h +0 -199
- data/modules/emscripten/system/include/libc/stdio_ext.h +0 -34
- data/modules/emscripten/system/include/libc/stdlib.h +0 -171
- data/modules/emscripten/system/include/libc/stdnoreturn.h +0 -5
- data/modules/emscripten/system/include/libc/string.h +0 -102
- data/modules/emscripten/system/include/libc/strings.h +0 -35
- data/modules/emscripten/system/include/libc/stropts.h +0 -139
- data/modules/emscripten/system/include/libc/sys/acct.h +0 -75
- data/modules/emscripten/system/include/libc/sys/cachectl.h +0 -22
- data/modules/emscripten/system/include/libc/sys/dir.h +0 -2
- data/modules/emscripten/system/include/libc/sys/epoll.h +0 -67
- data/modules/emscripten/system/include/libc/sys/errno.h +0 -2
- data/modules/emscripten/system/include/libc/sys/eventfd.h +0 -26
- data/modules/emscripten/system/include/libc/sys/fcntl.h +0 -2
- data/modules/emscripten/system/include/libc/sys/file.h +0 -21
- data/modules/emscripten/system/include/libc/sys/fsuid.h +0 -20
- data/modules/emscripten/system/include/libc/sys/inotify.h +0 -57
- data/modules/emscripten/system/include/libc/sys/io.h +0 -17
- data/modules/emscripten/system/include/libc/sys/ioctl.h +0 -14
- data/modules/emscripten/system/include/libc/sys/ipc.h +0 -42
- data/modules/emscripten/system/include/libc/sys/klog.h +0 -14
- data/modules/emscripten/system/include/libc/sys/mman.h +0 -55
- data/modules/emscripten/system/include/libc/sys/mount.h +0 -72
- data/modules/emscripten/system/include/libc/sys/msg.h +0 -52
- data/modules/emscripten/system/include/libc/sys/mtio.h +0 -188
- data/modules/emscripten/system/include/libc/sys/param.h +0 -35
- data/modules/emscripten/system/include/libc/sys/personality.h +0 -46
- data/modules/emscripten/system/include/libc/sys/poll.h +0 -2
- data/modules/emscripten/system/include/libc/sys/prctl.h +0 -101
- data/modules/emscripten/system/include/libc/sys/procfs.h +0 -65
- data/modules/emscripten/system/include/libc/sys/ptrace.h +0 -96
- data/modules/emscripten/system/include/libc/sys/reboot.h +0 -20
- data/modules/emscripten/system/include/libc/sys/reg.h +0 -9
- data/modules/emscripten/system/include/libc/sys/resource.h +0 -103
- data/modules/emscripten/system/include/libc/sys/select.h +0 -42
- data/modules/emscripten/system/include/libc/sys/sem.h +0 -82
- data/modules/emscripten/system/include/libc/sys/sendfile.h +0 -22
- data/modules/emscripten/system/include/libc/sys/shm.h +0 -61
- data/modules/emscripten/system/include/libc/sys/signal.h +0 -2
- data/modules/emscripten/system/include/libc/sys/signalfd.h +0 -44
- data/modules/emscripten/system/include/libc/sys/socket.h +0 -299
- data/modules/emscripten/system/include/libc/sys/stat.h +0 -114
- data/modules/emscripten/system/include/libc/sys/statfs.h +0 -32
- data/modules/emscripten/system/include/libc/sys/statvfs.h +0 -57
- data/modules/emscripten/system/include/libc/sys/stropts.h +0 -1
- data/modules/emscripten/system/include/libc/sys/swap.h +0 -21
- data/modules/emscripten/system/include/libc/sys/syscall.h +0 -6
- data/modules/emscripten/system/include/libc/sys/sysctl.h +0 -17
- data/modules/emscripten/system/include/libc/sys/sysinfo.h +0 -36
- data/modules/emscripten/system/include/libc/sys/syslog.h +0 -1
- data/modules/emscripten/system/include/libc/sys/sysmacros.h +0 -15
- data/modules/emscripten/system/include/libc/sys/termios.h +0 -2
- data/modules/emscripten/system/include/libc/sys/time.h +0 -57
- data/modules/emscripten/system/include/libc/sys/timerfd.h +0 -24
- data/modules/emscripten/system/include/libc/sys/times.h +0 -26
- data/modules/emscripten/system/include/libc/sys/timex.h +0 -98
- data/modules/emscripten/system/include/libc/sys/ttydefaults.h +0 -39
- data/modules/emscripten/system/include/libc/sys/types.h +0 -91
- data/modules/emscripten/system/include/libc/sys/ucontext.h +0 -1
- data/modules/emscripten/system/include/libc/sys/uio.h +0 -48
- data/modules/emscripten/system/include/libc/sys/un.h +0 -32
- data/modules/emscripten/system/include/libc/sys/user.h +0 -16
- data/modules/emscripten/system/include/libc/sys/utsname.h +0 -30
- data/modules/emscripten/system/include/libc/sys/vfs.h +0 -1
- data/modules/emscripten/system/include/libc/sys/wait.h +0 -55
- data/modules/emscripten/system/include/libc/sys/xattr.h +0 -30
- data/modules/emscripten/system/include/libc/syscall.h +0 -1
- data/modules/emscripten/system/include/libc/sysexits.h +0 -21
- data/modules/emscripten/system/include/libc/syslog.h +0 -104
- data/modules/emscripten/system/include/libc/tar.h +0 -33
- data/modules/emscripten/system/include/libc/termios.h +0 -46
- data/modules/emscripten/system/include/libc/tgmath.h +0 -270
- data/modules/emscripten/system/include/libc/time.h +0 -132
- data/modules/emscripten/system/include/libc/ucontext.h +0 -25
- data/modules/emscripten/system/include/libc/ulimit.h +0 -17
- data/modules/emscripten/system/include/libc/unistd.h +0 -519
- data/modules/emscripten/system/include/libc/utime.h +0 -24
- data/modules/emscripten/system/include/libc/utmp.h +0 -47
- data/modules/emscripten/system/include/libc/utmpx.h +0 -58
- data/modules/emscripten/system/include/libc/values.h +0 -39
- data/modules/emscripten/system/include/libc/wchar.h +0 -183
- data/modules/emscripten/system/include/libc/wctype.h +0 -77
- data/modules/emscripten/system/include/libc/wordexp.h +0 -42
- data/modules/emscripten/system/include/libcxx/CREDITS.TXT +0 -123
- data/modules/emscripten/system/include/libcxx/LICENSE.txt +0 -76
- data/modules/emscripten/system/include/libcxx/__bit_reference +0 -1287
- data/modules/emscripten/system/include/libcxx/__config +0 -610
- data/modules/emscripten/system/include/libcxx/__debug +0 -218
- data/modules/emscripten/system/include/libcxx/__functional_03 +0 -2130
- data/modules/emscripten/system/include/libcxx/__functional_base +0 -615
- data/modules/emscripten/system/include/libcxx/__functional_base_03 +0 -1087
- data/modules/emscripten/system/include/libcxx/__hash_table +0 -2457
- data/modules/emscripten/system/include/libcxx/__locale +0 -1445
- data/modules/emscripten/system/include/libcxx/__mutex_base +0 -407
- data/modules/emscripten/system/include/libcxx/__split_buffer +0 -654
- data/modules/emscripten/system/include/libcxx/__sso_allocator +0 -77
- data/modules/emscripten/system/include/libcxx/__std_stream +0 -359
- data/modules/emscripten/system/include/libcxx/__tree +0 -2309
- data/modules/emscripten/system/include/libcxx/__tuple +0 -305
- data/modules/emscripten/system/include/libcxx/__tuple_03 +0 -27
- data/modules/emscripten/system/include/libcxx/__undef_min_max +0 -27
- data/modules/emscripten/system/include/libcxx/algorithm +0 -5679
- data/modules/emscripten/system/include/libcxx/array +0 -342
- data/modules/emscripten/system/include/libcxx/atomic +0 -1531
- data/modules/emscripten/system/include/libcxx/bitset +0 -1081
- data/modules/emscripten/system/include/libcxx/cassert +0 -25
- data/modules/emscripten/system/include/libcxx/ccomplex +0 -29
- data/modules/emscripten/system/include/libcxx/cctype +0 -164
- data/modules/emscripten/system/include/libcxx/cerrno +0 -393
- data/modules/emscripten/system/include/libcxx/cfenv +0 -82
- data/modules/emscripten/system/include/libcxx/cfloat +0 -78
- data/modules/emscripten/system/include/libcxx/chrono +0 -1027
- data/modules/emscripten/system/include/libcxx/cinttypes +0 -259
- data/modules/emscripten/system/include/libcxx/ciso646 +0 -25
- data/modules/emscripten/system/include/libcxx/climits +0 -48
- data/modules/emscripten/system/include/libcxx/clocale +0 -53
- data/modules/emscripten/system/include/libcxx/cmath +0 -1690
- data/modules/emscripten/system/include/libcxx/codecvt +0 -550
- data/modules/emscripten/system/include/libcxx/complex +0 -1567
- data/modules/emscripten/system/include/libcxx/complex.h +0 -35
- data/modules/emscripten/system/include/libcxx/condition_variable +0 -256
- data/modules/emscripten/system/include/libcxx/csetjmp +0 -52
- data/modules/emscripten/system/include/libcxx/csignal +0 -58
- data/modules/emscripten/system/include/libcxx/cstdarg +0 -48
- data/modules/emscripten/system/include/libcxx/cstdbool +0 -32
- data/modules/emscripten/system/include/libcxx/cstddef +0 -103
- data/modules/emscripten/system/include/libcxx/cstdint +0 -191
- data/modules/emscripten/system/include/libcxx/cstdio +0 -182
- data/modules/emscripten/system/include/libcxx/cstdlib +0 -172
- data/modules/emscripten/system/include/libcxx/cstring +0 -112
- data/modules/emscripten/system/include/libcxx/ctgmath +0 -29
- data/modules/emscripten/system/include/libcxx/ctime +0 -72
- data/modules/emscripten/system/include/libcxx/cwchar +0 -217
- data/modules/emscripten/system/include/libcxx/cwctype +0 -213
- data/modules/emscripten/system/include/libcxx/deque +0 -2873
- data/modules/emscripten/system/include/libcxx/dynarray +0 -311
- data/modules/emscripten/system/include/libcxx/exception +0 -250
- data/modules/emscripten/system/include/libcxx/ext/__hash +0 -46
- data/modules/emscripten/system/include/libcxx/ext/hash_map +0 -1007
- data/modules/emscripten/system/include/libcxx/ext/hash_set +0 -661
- data/modules/emscripten/system/include/libcxx/forward_list +0 -1663
- data/modules/emscripten/system/include/libcxx/fstream +0 -1431
- data/modules/emscripten/system/include/libcxx/functional +0 -2418
- data/modules/emscripten/system/include/libcxx/future +0 -2615
- data/modules/emscripten/system/include/libcxx/initializer_list +0 -118
- data/modules/emscripten/system/include/libcxx/iomanip +0 -651
- data/modules/emscripten/system/include/libcxx/ios +0 -1023
- data/modules/emscripten/system/include/libcxx/iosfwd +0 -194
- data/modules/emscripten/system/include/libcxx/iostream +0 -60
- data/modules/emscripten/system/include/libcxx/istream +0 -1716
- data/modules/emscripten/system/include/libcxx/iterator +0 -1568
- data/modules/emscripten/system/include/libcxx/limits +0 -813
- data/modules/emscripten/system/include/libcxx/list +0 -2355
- data/modules/emscripten/system/include/libcxx/locale +0 -4465
- data/modules/emscripten/system/include/libcxx/map +0 -2045
- data/modules/emscripten/system/include/libcxx/memory +0 -5448
- data/modules/emscripten/system/include/libcxx/mutex +0 -566
- data/modules/emscripten/system/include/libcxx/new +0 -146
- data/modules/emscripten/system/include/libcxx/numeric +0 -197
- data/modules/emscripten/system/include/libcxx/optional +0 -697
- data/modules/emscripten/system/include/libcxx/ostream +0 -1295
- data/modules/emscripten/system/include/libcxx/queue +0 -717
- data/modules/emscripten/system/include/libcxx/random +0 -6725
- data/modules/emscripten/system/include/libcxx/ratio +0 -487
- data/modules/emscripten/system/include/libcxx/readme.txt +0 -1
- data/modules/emscripten/system/include/libcxx/regex +0 -6487
- data/modules/emscripten/system/include/libcxx/scoped_allocator +0 -578
- data/modules/emscripten/system/include/libcxx/set +0 -1189
- data/modules/emscripten/system/include/libcxx/shared_mutex +0 -419
- data/modules/emscripten/system/include/libcxx/sstream +0 -972
- data/modules/emscripten/system/include/libcxx/stack +0 -292
- data/modules/emscripten/system/include/libcxx/stdexcept +0 -162
- data/modules/emscripten/system/include/libcxx/streambuf +0 -564
- data/modules/emscripten/system/include/libcxx/string +0 -4198
- data/modules/emscripten/system/include/libcxx/strstream +0 -400
- data/modules/emscripten/system/include/libcxx/support/ibm/limits.h +0 -99
- data/modules/emscripten/system/include/libcxx/support/ibm/support.h +0 -54
- data/modules/emscripten/system/include/libcxx/support/ibm/xlocale.h +0 -326
- data/modules/emscripten/system/include/libcxx/support/solaris/floatingpoint.h +0 -5
- data/modules/emscripten/system/include/libcxx/support/solaris/wchar.h +0 -38
- data/modules/emscripten/system/include/libcxx/support/solaris/xlocale.h +0 -146
- data/modules/emscripten/system/include/libcxx/support/win32/limits_win32.h +0 -79
- data/modules/emscripten/system/include/libcxx/support/win32/locale_win32.h +0 -129
- data/modules/emscripten/system/include/libcxx/support/win32/math_win32.h +0 -115
- data/modules/emscripten/system/include/libcxx/support/win32/support.h +0 -119
- data/modules/emscripten/system/include/libcxx/system_error +0 -642
- data/modules/emscripten/system/include/libcxx/tgmath.h +0 -29
- data/modules/emscripten/system/include/libcxx/thread +0 -458
- data/modules/emscripten/system/include/libcxx/tuple +0 -1102
- data/modules/emscripten/system/include/libcxx/type_traits +0 -3292
- data/modules/emscripten/system/include/libcxx/typeindex +0 -103
- data/modules/emscripten/system/include/libcxx/typeinfo +0 -124
- data/modules/emscripten/system/include/libcxx/unordered_map +0 -2078
- data/modules/emscripten/system/include/libcxx/unordered_set +0 -1379
- data/modules/emscripten/system/include/libcxx/utility +0 -768
- data/modules/emscripten/system/include/libcxx/valarray +0 -4779
- data/modules/emscripten/system/include/libcxx/vector +0 -3246
- data/modules/emscripten/system/include/unwind.h +0 -154
- data/modules/emscripten/system/include/uuid/uuid.h +0 -35
- data/modules/emscripten/system/include/zconf.h +0 -428
- data/modules/emscripten/system/include/zlib.h +0 -1613
- data/modules/emscripten/system/lib/compiler-rt/LICENSE.TXT +0 -97
- data/modules/emscripten/system/lib/compiler-rt/divdi3.c +0 -47
- data/modules/emscripten/system/lib/compiler-rt/int_endianness.h +0 -116
- data/modules/emscripten/system/lib/compiler-rt/int_lib.h +0 -46
- data/modules/emscripten/system/lib/compiler-rt/int_math.h +0 -67
- data/modules/emscripten/system/lib/compiler-rt/int_types.h +0 -140
- data/modules/emscripten/system/lib/compiler-rt/int_util.h +0 -29
- data/modules/emscripten/system/lib/compiler-rt/muldi3.c +0 -56
- data/modules/emscripten/system/lib/compiler-rt/readme.txt +0 -20
- data/modules/emscripten/system/lib/compiler-rt/udivdi3.c +0 -36
- data/modules/emscripten/system/lib/compiler-rt/udivmoddi4.c +0 -251
- data/modules/emscripten/system/lib/debugging.cpp +0 -24
- data/modules/emscripten/system/lib/dlmalloc.c +0 -6297
- data/modules/emscripten/system/lib/embind/bind.cpp +0 -63
- data/modules/emscripten/system/lib/libc/gen/err.c +0 -49
- data/modules/emscripten/system/lib/libc/gen/errx.c +0 -49
- data/modules/emscripten/system/lib/libc/gen/verr.c +0 -58
- data/modules/emscripten/system/lib/libc/gen/verrx.c +0 -51
- data/modules/emscripten/system/lib/libc/gen/vwarn.c +0 -55
- data/modules/emscripten/system/lib/libc/gen/vwarnx.c +0 -48
- data/modules/emscripten/system/lib/libc/gen/warn.c +0 -49
- data/modules/emscripten/system/lib/libc/gen/warnx.c +0 -49
- data/modules/emscripten/system/lib/libc/musl/COPYRIGHT +0 -92
- data/modules/emscripten/system/lib/libc/musl/readme.txt +0 -9
- data/modules/emscripten/system/lib/libc/musl/src/ctype/alpha.h +0 -125
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswalnum.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswalpha.c +0 -14
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswblank.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswcntrl.c +0 -10
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswctype.c +0 -63
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswdigit.c +0 -9
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswgraph.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswlower.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswprint.c +0 -19
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswpunct.c +0 -12
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswspace.c +0 -19
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswupper.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/ctype/iswxdigit.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/ctype/nonspacing.h +0 -62
- data/modules/emscripten/system/lib/libc/musl/src/ctype/punct.h +0 -109
- data/modules/emscripten/system/lib/libc/musl/src/ctype/towctrans.c +0 -268
- data/modules/emscripten/system/lib/libc/musl/src/ctype/wcswidth.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/ctype/wctrans.c +0 -16
- data/modules/emscripten/system/lib/libc/musl/src/ctype/wcwidth.c +0 -29
- data/modules/emscripten/system/lib/libc/musl/src/ctype/wide.h +0 -42
- data/modules/emscripten/system/lib/libc/musl/src/internal/libc.c +0 -22
- data/modules/emscripten/system/lib/libc/musl/src/internal/libc.h +0 -71
- data/modules/emscripten/system/lib/libc/musl/src/internal/locale_impl.h +0 -5
- data/modules/emscripten/system/lib/libc/musl/src/internal/stdio_impl.h +0 -92
- data/modules/emscripten/system/lib/libc/musl/src/locale/big5.h +0 -1085
- data/modules/emscripten/system/lib/libc/musl/src/locale/codepages.h +0 -238
- data/modules/emscripten/system/lib/libc/musl/src/locale/gb18030.h +0 -1836
- data/modules/emscripten/system/lib/libc/musl/src/locale/hkscs.h +0 -390
- data/modules/emscripten/system/lib/libc/musl/src/locale/iconv.c +0 -454
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswalnum_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswalpha_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswblank_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswcntrl_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswctype_l.c +0 -9
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswdigit_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswgraph_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswlower_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswprint_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswpunct_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswspace_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswupper_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswxdigit_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/jis0208.h +0 -550
- data/modules/emscripten/system/lib/libc/musl/src/locale/ksc.h +0 -640
- data/modules/emscripten/system/lib/libc/musl/src/locale/legacychars.h +0 -39
- data/modules/emscripten/system/lib/libc/musl/src/locale/strfmon.c +0 -101
- data/modules/emscripten/system/lib/libc/musl/src/locale/strxfrm.c +0 -18
- data/modules/emscripten/system/lib/libc/musl/src/locale/towctrans_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/towlower_l.c +0 -9
- data/modules/emscripten/system/lib/libc/musl/src/locale/towupper_l.c +0 -9
- data/modules/emscripten/system/lib/libc/musl/src/locale/wcscoll.c +0 -16
- data/modules/emscripten/system/lib/libc/musl/src/locale/wcscoll_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/wcsxfrm.c +0 -21
- data/modules/emscripten/system/lib/libc/musl/src/locale/wcsxfrm_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/wctrans_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/locale/wctype_l.c +0 -9
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/btowc.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/internal.c +0 -38
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/internal.h +0 -22
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mblen.c +0 -17
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbrlen.c +0 -18
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbrtowc.c +0 -57
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsinit.c +0 -17
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsnrtowcs.c +0 -65
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsrtowcs.c +0 -100
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbstowcs.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbtowc.c +0 -53
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcrtomb.c +0 -38
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcsnrtombs.c +0 -52
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcsrtombs.c +0 -58
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcstombs.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wctob.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/multibyte/wctomb.c +0 -18
- data/modules/emscripten/system/lib/libc/musl/src/regex/regcomp.c +0 -3352
- data/modules/emscripten/system/lib/libc/musl/src/regex/regerror.c +0 -35
- data/modules/emscripten/system/lib/libc/musl/src/regex/regexec.c +0 -1011
- data/modules/emscripten/system/lib/libc/musl/src/regex/tre-mem.c +0 -158
- data/modules/emscripten/system/lib/libc/musl/src/regex/tre.h +0 -231
- data/modules/emscripten/system/lib/libc/musl/src/stdio/fwprintf.c +0 -13
- data/modules/emscripten/system/lib/libc/musl/src/stdio/swprintf.c +0 -14
- data/modules/emscripten/system/lib/libc/musl/src/stdio/vfwprintf.c +0 -361
- data/modules/emscripten/system/lib/libc/musl/src/stdio/vswprintf.c +0 -53
- data/modules/emscripten/system/lib/libc/musl/src/stdio/vwprintf.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/stdio/wprintf.c +0 -13
- data/modules/emscripten/system/lib/libc/musl/src/stdlib/ecvt.c +0 -19
- data/modules/emscripten/system/lib/libc/musl/src/stdlib/fcvt.c +0 -25
- data/modules/emscripten/system/lib/libc/musl/src/stdlib/gcvt.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/string/wcpcpy.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/string/wcpncpy.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscasecmp.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscasecmp_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscat.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/string/wcschr.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscmp.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscpy.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/string/wcscspn.c +0 -10
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsdup.c +0 -11
- data/modules/emscripten/system/lib/libc/musl/src/string/wcslen.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncasecmp.c +0 -9
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncasecmp_l.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncat.c +0 -10
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncmp.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsncpy.c +0 -9
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsnlen.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/string/wcspbrk.c +0 -7
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsrchr.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsspn.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/string/wcsstr.c +0 -108
- data/modules/emscripten/system/lib/libc/musl/src/string/wcstok.c +0 -12
- data/modules/emscripten/system/lib/libc/musl/src/string/wcswcs.c +0 -6
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemchr.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemcmp.c +0 -8
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemcpy.c +0 -9
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemmove.c +0 -12
- data/modules/emscripten/system/lib/libc/musl/src/string/wmemset.c +0 -9
- data/modules/emscripten/system/lib/libc/stdlib/getopt_long.c +0 -511
- data/modules/emscripten/system/lib/libc/stdlib/strtod.c +0 -305
- data/modules/emscripten/system/lib/libc.symbols +0 -81
- data/modules/emscripten/system/lib/libcextra.symbols +0 -115
- data/modules/emscripten/system/lib/libcxx/CREDITS.TXT +0 -123
- data/modules/emscripten/system/lib/libcxx/LICENSE.txt +0 -76
- data/modules/emscripten/system/lib/libcxx/algorithm.cpp +0 -84
- data/modules/emscripten/system/lib/libcxx/bind.cpp +0 -30
- data/modules/emscripten/system/lib/libcxx/chrono.cpp +0 -132
- data/modules/emscripten/system/lib/libcxx/condition_variable.cpp +0 -81
- data/modules/emscripten/system/lib/libcxx/debug.cpp +0 -530
- data/modules/emscripten/system/lib/libcxx/exception.cpp +0 -307
- data/modules/emscripten/system/lib/libcxx/future.cpp +0 -291
- data/modules/emscripten/system/lib/libcxx/hash.cpp +0 -570
- data/modules/emscripten/system/lib/libcxx/ios.cpp +0 -460
- data/modules/emscripten/system/lib/libcxx/iostream.cpp +0 -68
- data/modules/emscripten/system/lib/libcxx/locale.cpp +0 -6169
- data/modules/emscripten/system/lib/libcxx/memory.cpp +0 -223
- data/modules/emscripten/system/lib/libcxx/mutex.cpp +0 -253
- data/modules/emscripten/system/lib/libcxx/new.cpp +0 -239
- data/modules/emscripten/system/lib/libcxx/optional.cpp +0 -25
- data/modules/emscripten/system/lib/libcxx/random.cpp +0 -74
- data/modules/emscripten/system/lib/libcxx/readme.txt +0 -1
- data/modules/emscripten/system/lib/libcxx/regex.cpp +0 -325
- data/modules/emscripten/system/lib/libcxx/shared_mutex.cpp +0 -101
- data/modules/emscripten/system/lib/libcxx/stdexcept.cpp +0 -200
- data/modules/emscripten/system/lib/libcxx/string.cpp +0 -530
- data/modules/emscripten/system/lib/libcxx/strstream.cpp +0 -329
- data/modules/emscripten/system/lib/libcxx/support/solaris/README +0 -4
- data/modules/emscripten/system/lib/libcxx/support/solaris/mbsnrtowcs.inc +0 -76
- data/modules/emscripten/system/lib/libcxx/support/solaris/wcsnrtombs.inc +0 -93
- data/modules/emscripten/system/lib/libcxx/support/solaris/xlocale.c +0 -245
- data/modules/emscripten/system/lib/libcxx/support/win32/locale_win32.cpp +0 -95
- data/modules/emscripten/system/lib/libcxx/support/win32/support.cpp +0 -166
- data/modules/emscripten/system/lib/libcxx/symbols +0 -2699
- data/modules/emscripten/system/lib/libcxx/system_error.cpp +0 -205
- data/modules/emscripten/system/lib/libcxx/thread.cpp +0 -225
- data/modules/emscripten/system/lib/libcxx/typeinfo.cpp +0 -73
- data/modules/emscripten/system/lib/libcxx/utility.cpp +0 -17
- data/modules/emscripten/system/lib/libcxx/valarray.cpp +0 -56
- data/modules/emscripten/system/lib/libcxxabi/CREDITS.TXT +0 -38
- data/modules/emscripten/system/lib/libcxxabi/LICENSE.TXT +0 -76
- data/modules/emscripten/system/lib/libcxxabi/include/cxa_demangle.h +0 -167
- data/modules/emscripten/system/lib/libcxxabi/include/cxxabi.h +0 -175
- data/modules/emscripten/system/lib/libcxxabi/lib/buildit +0 -99
- data/modules/emscripten/system/lib/libcxxabi/readme.txt +0 -1
- data/modules/emscripten/system/lib/libcxxabi/src/abort_message.cpp +0 -50
- data/modules/emscripten/system/lib/libcxxabi/src/abort_message.h +0 -33
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_aux_runtime.cpp +0 -34
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_demangle.cpp +0 -11036
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception.cpp +0 -622
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception.hpp +0 -123
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception_storage.cpp +0 -91
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_guard.cpp +0 -231
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_handlers.cpp +0 -125
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_handlers.hpp +0 -54
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_new_delete.cpp +0 -242
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_personality.cpp +0 -1055
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_unexpected.cpp +0 -27
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_vector.cpp +0 -367
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_virtual.cpp +0 -31
- data/modules/emscripten/system/lib/libcxxabi/src/exception.cpp +0 -41
- data/modules/emscripten/system/lib/libcxxabi/src/fallback_malloc.ipp +0 -174
- data/modules/emscripten/system/lib/libcxxabi/src/private_typeinfo.cpp +0 -1146
- data/modules/emscripten/system/lib/libcxxabi/src/private_typeinfo.h +0 -248
- data/modules/emscripten/system/lib/libcxxabi/src/stdexcept.cpp +0 -169
- data/modules/emscripten/system/lib/libcxxabi/src/typeinfo.cpp +0 -53
- data/modules/emscripten/system/lib/libcxxabi/symbols +0 -236
- data/modules/emscripten/system/lib/sdl.cpp +0 -13
- data/modules/emscripten/system/lib/sdl.symbols +0 -1
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/CppHeaderParser.py +0 -2347
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/__init__.py +0 -4
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/doc/CppHeaderParser.html +0 -657
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/examples/SampleClass.h +0 -147
- data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/examples/readSampleClass.py +0 -74
- data/modules/emscripten/third_party/CppHeaderParser/PKG-INFO +0 -249
- data/modules/emscripten/third_party/CppHeaderParser/README.html +0 -544
- data/modules/emscripten/third_party/CppHeaderParser/README.txt +0 -226
- data/modules/emscripten/third_party/CppHeaderParser/setup.py +0 -43
- data/modules/emscripten/third_party/ansidecl.h +0 -371
- data/modules/emscripten/third_party/closure-compiler/COPYING +0 -202
- data/modules/emscripten/third_party/closure-compiler/README +0 -292
- data/modules/emscripten/third_party/closure-compiler/compiler.jar +0 -0
- data/modules/emscripten/third_party/closure-compiler/readme.txt +0 -3
- data/modules/emscripten/third_party/cp-demangle.h +0 -161
- data/modules/emscripten/third_party/demangle.h +0 -549
- data/modules/emscripten/third_party/demangler.py +0 -49
- data/modules/emscripten/third_party/gcc_demangler.c +0 -4226
- data/modules/emscripten/third_party/gcc_demangler.js +0 -21282
- data/modules/emscripten/third_party/jni/emjvm.cpp +0 -133
- data/modules/emscripten/third_party/jni/emjvm.h +0 -8
- data/modules/emscripten/third_party/jni/emjvm.js +0 -185
- data/modules/emscripten/third_party/jni/jni.h +0 -1154
- data/modules/emscripten/third_party/libiberty.h +0 -634
- data/modules/emscripten/third_party/lzma.js/README.markdown +0 -37
- data/modules/emscripten/third_party/lzma.js/doit.bat +0 -4
- data/modules/emscripten/third_party/lzma.js/doit.sh +0 -44
- data/modules/emscripten/third_party/lzma.js/lzip/AUTHORS +0 -7
- data/modules/emscripten/third_party/lzma.js/lzip/COPYING +0 -676
- data/modules/emscripten/third_party/lzma.js/lzip/ChangeLog +0 -201
- data/modules/emscripten/third_party/lzma.js/lzip/INSTALL +0 -56
- data/modules/emscripten/third_party/lzma.js/lzip/Makefile +0 -160
- data/modules/emscripten/third_party/lzma.js/lzip/Makefile.in +0 -138
- data/modules/emscripten/third_party/lzma.js/lzip/NEWS +0 -22
- data/modules/emscripten/third_party/lzma.js/lzip/README +0 -77
- data/modules/emscripten/third_party/lzma.js/lzip/arg_parser.cc +0 -204
- data/modules/emscripten/third_party/lzma.js/lzip/arg_parser.h +0 -106
- data/modules/emscripten/third_party/lzma.js/lzip/configure +0 -192
- data/modules/emscripten/third_party/lzma.js/lzip/decoder.cc +0 -252
- data/modules/emscripten/third_party/lzma.js/lzip/decoder.h +0 -268
- data/modules/emscripten/third_party/lzma.js/lzip/encoder.cc +0 -643
- data/modules/emscripten/third_party/lzma.js/lzip/encoder.h +0 -582
- data/modules/emscripten/third_party/lzma.js/lzip/fast_encoder.cc +0 -378
- data/modules/emscripten/third_party/lzma.js/lzip/fast_encoder.h +0 -171
- data/modules/emscripten/third_party/lzma.js/lzip/lzip.h +0 -264
- data/modules/emscripten/third_party/lzma.js/lzip/main.cc +0 -545
- data/modules/emscripten/third_party/lzma.js/lzma-decoder.js +0 -27
- data/modules/emscripten/third_party/lzma.js/lzma-full.js +0 -27
- data/modules/emscripten/third_party/lzma.js/native_test.sh +0 -5
- data/modules/emscripten/third_party/lzma.js/post.js +0 -13
- data/modules/emscripten/third_party/lzma.js/pre.js +0 -13
- data/modules/emscripten/third_party/lzma.js/test-decoder.js +0 -39
- data/modules/emscripten/third_party/lzma.js/test-full.html +0 -9
- data/modules/emscripten/third_party/lzma.js/test-full.js +0 -78
- data/modules/emscripten/third_party/ply/ANNOUNCE +0 -40
- data/modules/emscripten/third_party/ply/CHANGES +0 -1093
- data/modules/emscripten/third_party/ply/PKG-INFO +0 -22
- data/modules/emscripten/third_party/ply/README +0 -271
- data/modules/emscripten/third_party/ply/TODO +0 -16
- data/modules/emscripten/third_party/ply/doc/internal.html +0 -874
- data/modules/emscripten/third_party/ply/doc/makedoc.py +0 -194
- data/modules/emscripten/third_party/ply/doc/ply.html +0 -3262
- data/modules/emscripten/third_party/ply/example/BASIC/README +0 -79
- data/modules/emscripten/third_party/ply/example/BASIC/basic.py +0 -71
- data/modules/emscripten/third_party/ply/example/BASIC/basiclex.py +0 -74
- data/modules/emscripten/third_party/ply/example/BASIC/basiclog.py +0 -79
- data/modules/emscripten/third_party/ply/example/BASIC/basinterp.py +0 -441
- data/modules/emscripten/third_party/ply/example/BASIC/basparse.py +0 -424
- data/modules/emscripten/third_party/ply/example/BASIC/dim.bas +0 -14
- data/modules/emscripten/third_party/ply/example/BASIC/func.bas +0 -5
- data/modules/emscripten/third_party/ply/example/BASIC/gcd.bas +0 -22
- data/modules/emscripten/third_party/ply/example/BASIC/gosub.bas +0 -13
- data/modules/emscripten/third_party/ply/example/BASIC/hello.bas +0 -4
- data/modules/emscripten/third_party/ply/example/BASIC/linear.bas +0 -17
- data/modules/emscripten/third_party/ply/example/BASIC/maxsin.bas +0 -12
- data/modules/emscripten/third_party/ply/example/BASIC/powers.bas +0 -13
- data/modules/emscripten/third_party/ply/example/BASIC/rand.bas +0 -4
- data/modules/emscripten/third_party/ply/example/BASIC/sales.bas +0 -20
- data/modules/emscripten/third_party/ply/example/BASIC/sears.bas +0 -18
- data/modules/emscripten/third_party/ply/example/BASIC/sqrt1.bas +0 -5
- data/modules/emscripten/third_party/ply/example/BASIC/sqrt2.bas +0 -4
- data/modules/emscripten/third_party/ply/example/GardenSnake/GardenSnake.py +0 -709
- data/modules/emscripten/third_party/ply/example/GardenSnake/README +0 -5
- data/modules/emscripten/third_party/ply/example/README +0 -10
- data/modules/emscripten/third_party/ply/example/ansic/README +0 -2
- data/modules/emscripten/third_party/ply/example/ansic/clex.py +0 -164
- data/modules/emscripten/third_party/ply/example/ansic/cparse.py +0 -863
- data/modules/emscripten/third_party/ply/example/calc/calc.py +0 -107
- data/modules/emscripten/third_party/ply/example/calcdebug/calc.py +0 -113
- data/modules/emscripten/third_party/ply/example/classcalc/calc.py +0 -157
- data/modules/emscripten/third_party/ply/example/cleanup.sh +0 -2
- data/modules/emscripten/third_party/ply/example/closurecalc/calc.py +0 -130
- data/modules/emscripten/third_party/ply/example/hedit/hedit.py +0 -48
- data/modules/emscripten/third_party/ply/example/newclasscalc/calc.py +0 -160
- data/modules/emscripten/third_party/ply/example/optcalc/README +0 -9
- data/modules/emscripten/third_party/ply/example/optcalc/calc.py +0 -119
- data/modules/emscripten/third_party/ply/example/unicalc/calc.py +0 -117
- data/modules/emscripten/third_party/ply/example/yply/README +0 -41
- data/modules/emscripten/third_party/ply/example/yply/ylex.py +0 -112
- data/modules/emscripten/third_party/ply/example/yply/yparse.py +0 -217
- data/modules/emscripten/third_party/ply/example/yply/yply.py +0 -53
- data/modules/emscripten/third_party/ply/ply/__init__.py +0 -4
- data/modules/emscripten/third_party/ply/ply/cpp.py +0 -898
- data/modules/emscripten/third_party/ply/ply/ctokens.py +0 -133
- data/modules/emscripten/third_party/ply/ply/lex.py +0 -1058
- data/modules/emscripten/third_party/ply/ply/yacc.py +0 -3276
- data/modules/emscripten/third_party/ply/setup.py +0 -31
- data/modules/emscripten/third_party/ply/test/README +0 -7
- data/modules/emscripten/third_party/ply/test/calclex.py +0 -49
- data/modules/emscripten/third_party/ply/test/cleanup.sh +0 -4
- data/modules/emscripten/third_party/ply/test/lex_closure.py +0 -54
- data/modules/emscripten/third_party/ply/test/lex_doc1.py +0 -26
- data/modules/emscripten/third_party/ply/test/lex_dup1.py +0 -29
- data/modules/emscripten/third_party/ply/test/lex_dup2.py +0 -33
- data/modules/emscripten/third_party/ply/test/lex_dup3.py +0 -31
- data/modules/emscripten/third_party/ply/test/lex_empty.py +0 -20
- data/modules/emscripten/third_party/ply/test/lex_error1.py +0 -24
- data/modules/emscripten/third_party/ply/test/lex_error2.py +0 -26
- data/modules/emscripten/third_party/ply/test/lex_error3.py +0 -27
- data/modules/emscripten/third_party/ply/test/lex_error4.py +0 -27
- data/modules/emscripten/third_party/ply/test/lex_hedit.py +0 -47
- data/modules/emscripten/third_party/ply/test/lex_ignore.py +0 -31
- data/modules/emscripten/third_party/ply/test/lex_ignore2.py +0 -29
- data/modules/emscripten/third_party/ply/test/lex_literal1.py +0 -25
- data/modules/emscripten/third_party/ply/test/lex_literal2.py +0 -25
- data/modules/emscripten/third_party/ply/test/lex_many_tokens.py +0 -27
- data/modules/emscripten/third_party/ply/test/lex_module.py +0 -10
- data/modules/emscripten/third_party/ply/test/lex_module_import.py +0 -42
- data/modules/emscripten/third_party/ply/test/lex_object.py +0 -55
- data/modules/emscripten/third_party/ply/test/lex_opt_alias.py +0 -54
- data/modules/emscripten/third_party/ply/test/lex_optimize.py +0 -50
- data/modules/emscripten/third_party/ply/test/lex_optimize2.py +0 -50
- data/modules/emscripten/third_party/ply/test/lex_optimize3.py +0 -52
- data/modules/emscripten/third_party/ply/test/lex_re1.py +0 -27
- data/modules/emscripten/third_party/ply/test/lex_re2.py +0 -27
- data/modules/emscripten/third_party/ply/test/lex_re3.py +0 -29
- data/modules/emscripten/third_party/ply/test/lex_rule1.py +0 -27
- data/modules/emscripten/third_party/ply/test/lex_rule2.py +0 -29
- data/modules/emscripten/third_party/ply/test/lex_rule3.py +0 -27
- data/modules/emscripten/third_party/ply/test/lex_state1.py +0 -40
- data/modules/emscripten/third_party/ply/test/lex_state2.py +0 -40
- data/modules/emscripten/third_party/ply/test/lex_state3.py +0 -42
- data/modules/emscripten/third_party/ply/test/lex_state4.py +0 -41
- data/modules/emscripten/third_party/ply/test/lex_state5.py +0 -40
- data/modules/emscripten/third_party/ply/test/lex_state_noerror.py +0 -39
- data/modules/emscripten/third_party/ply/test/lex_state_norule.py +0 -40
- data/modules/emscripten/third_party/ply/test/lex_state_try.py +0 -45
- data/modules/emscripten/third_party/ply/test/lex_token1.py +0 -19
- data/modules/emscripten/third_party/ply/test/lex_token2.py +0 -22
- data/modules/emscripten/third_party/ply/test/lex_token3.py +0 -24
- data/modules/emscripten/third_party/ply/test/lex_token4.py +0 -26
- data/modules/emscripten/third_party/ply/test/lex_token5.py +0 -31
- data/modules/emscripten/third_party/ply/test/lex_token_dup.py +0 -29
- data/modules/emscripten/third_party/ply/test/testlex.py +0 -606
- data/modules/emscripten/third_party/ply/test/testyacc.py +0 -347
- data/modules/emscripten/third_party/ply/test/yacc_badargs.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_badid.py +0 -77
- data/modules/emscripten/third_party/ply/test/yacc_badprec.py +0 -64
- data/modules/emscripten/third_party/ply/test/yacc_badprec2.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_badprec3.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_badrule.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_badtok.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_dup.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_error1.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_error2.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_error3.py +0 -67
- data/modules/emscripten/third_party/ply/test/yacc_error4.py +0 -72
- data/modules/emscripten/third_party/ply/test/yacc_inf.py +0 -56
- data/modules/emscripten/third_party/ply/test/yacc_literal.py +0 -69
- data/modules/emscripten/third_party/ply/test/yacc_misplaced.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_missing1.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_nested.py +0 -33
- data/modules/emscripten/third_party/ply/test/yacc_nodoc.py +0 -67
- data/modules/emscripten/third_party/ply/test/yacc_noerror.py +0 -66
- data/modules/emscripten/third_party/ply/test/yacc_nop.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_notfunc.py +0 -66
- data/modules/emscripten/third_party/ply/test/yacc_notok.py +0 -67
- data/modules/emscripten/third_party/ply/test/yacc_prec1.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_rr.py +0 -72
- data/modules/emscripten/third_party/ply/test/yacc_rr_unused.py +0 -30
- data/modules/emscripten/third_party/ply/test/yacc_simple.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_sr.py +0 -63
- data/modules/emscripten/third_party/ply/test/yacc_term1.py +0 -68
- data/modules/emscripten/third_party/ply/test/yacc_unused.py +0 -77
- data/modules/emscripten/third_party/ply/test/yacc_unused_rule.py +0 -72
- data/modules/emscripten/third_party/ply/test/yacc_uprec.py +0 -63
- data/modules/emscripten/third_party/ply/test/yacc_uprec2.py +0 -63
- data/modules/emscripten/third_party/readme.txt +0 -7
- data/modules/emscripten/third_party/stb_image.c +0 -4673
- data/modules/emscripten/third_party/websockify/CHANGES.txt +0 -23
- data/modules/emscripten/third_party/websockify/LICENSE.txt +0 -16
- data/modules/emscripten/third_party/websockify/MANIFEST.in +0 -1
- data/modules/emscripten/third_party/websockify/Makefile +0 -11
- data/modules/emscripten/third_party/websockify/README.md +0 -168
- data/modules/emscripten/third_party/websockify/Windows/Windows Service Readme.txt +0 -39
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Program.cs +0 -24
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs +0 -61
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.cs +0 -19
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.resx +0 -129
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs +0 -36
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Service1.Designer.cs +0 -37
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Service1.cs +0 -41
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj +0 -75
- data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.sln +0 -20
- data/modules/emscripten/third_party/websockify/docs/LICENSE.GPL-3 +0 -621
- data/modules/emscripten/third_party/websockify/docs/LICENSE.LGPL-3 +0 -165
- data/modules/emscripten/third_party/websockify/docs/LICENSE.MPL-2.0 +0 -373
- data/modules/emscripten/third_party/websockify/docs/TODO +0 -9
- data/modules/emscripten/third_party/websockify/docs/flash_policy.txt +0 -4
- data/modules/emscripten/third_party/websockify/docs/latency_results.txt +0 -114
- data/modules/emscripten/third_party/websockify/docs/notes +0 -17
- data/modules/emscripten/third_party/websockify/docs/release.txt +0 -9
- data/modules/emscripten/third_party/websockify/docs/websockify.1 +0 -110
- data/modules/emscripten/third_party/websockify/include/VT100.js +0 -919
- data/modules/emscripten/third_party/websockify/include/base64.js +0 -114
- data/modules/emscripten/third_party/websockify/include/keysym.js +0 -99
- data/modules/emscripten/third_party/websockify/include/util.js +0 -359
- data/modules/emscripten/third_party/websockify/include/web-socket-js/README.txt +0 -109
- 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 +0 -4
- data/modules/emscripten/third_party/websockify/include/web-socket-js/web_socket.js +0 -391
- data/modules/emscripten/third_party/websockify/include/websock.js +0 -422
- data/modules/emscripten/third_party/websockify/include/webutil.js +0 -216
- data/modules/emscripten/third_party/websockify/include/wsirc.js +0 -235
- data/modules/emscripten/third_party/websockify/include/wstelnet.js +0 -335
- data/modules/emscripten/third_party/websockify/other/Makefile +0 -14
- data/modules/emscripten/third_party/websockify/other/README.md +0 -51
- data/modules/emscripten/third_party/websockify/other/launch.sh +0 -108
- data/modules/emscripten/third_party/websockify/other/project.clj +0 -13
- data/modules/emscripten/third_party/websockify/other/websocket.c +0 -802
- data/modules/emscripten/third_party/websockify/other/websocket.h +0 -84
- data/modules/emscripten/third_party/websockify/other/websocket.rb +0 -456
- data/modules/emscripten/third_party/websockify/other/websockify.c +0 -385
- data/modules/emscripten/third_party/websockify/other/websockify.clj +0 -233
- data/modules/emscripten/third_party/websockify/other/websockify.js +0 -196
- data/modules/emscripten/third_party/websockify/other/websockify.rb +0 -171
- data/modules/emscripten/third_party/websockify/other/wswrap +0 -22
- data/modules/emscripten/third_party/websockify/rebind +0 -18
- data/modules/emscripten/third_party/websockify/rebind.c +0 -94
- data/modules/emscripten/third_party/websockify/run +0 -5
- data/modules/emscripten/third_party/websockify/setup.py +0 -30
- data/modules/emscripten/third_party/websockify/tests/b64_vs_utf8.py +0 -29
- data/modules/emscripten/third_party/websockify/tests/base64.html +0 -91
- data/modules/emscripten/third_party/websockify/tests/base64.js +0 -12
- data/modules/emscripten/third_party/websockify/tests/echo.html +0 -148
- data/modules/emscripten/third_party/websockify/tests/echo.py +0 -75
- data/modules/emscripten/third_party/websockify/tests/echo.rb +0 -62
- data/modules/emscripten/third_party/websockify/tests/latency.html +0 -290
- data/modules/emscripten/third_party/websockify/tests/latency.py +0 -75
- data/modules/emscripten/third_party/websockify/tests/load.html +0 -250
- data/modules/emscripten/third_party/websockify/tests/load.py +0 -167
- data/modules/emscripten/third_party/websockify/tests/plain_echo.html +0 -168
- data/modules/emscripten/third_party/websockify/tests/simple.html +0 -68
- data/modules/emscripten/third_party/websockify/tests/utf8-list.py +0 -22
- data/modules/emscripten/third_party/websockify/websockify/__init__.py +0 -2
- data/modules/emscripten/third_party/websockify/websockify/websocket.py +0 -982
- data/modules/emscripten/third_party/websockify/websockify/websocketproxy.py +0 -393
- data/modules/emscripten/third_party/websockify/websockify.py +0 -5
- data/modules/emscripten/third_party/websockify/wsirc.html +0 -99
- data/modules/emscripten/third_party/websockify/wstelnet.html +0 -74
- data/modules/emscripten/tools/__init__.py +0 -0
- data/modules/emscripten/tools/asm_module.py +0 -275
- data/modules/emscripten/tools/autodebugger.py +0 -291
- data/modules/emscripten/tools/autodebugger_c.py +0 -37
- data/modules/emscripten/tools/autodebugger_indenter.py +0 -18
- data/modules/emscripten/tools/autodebugger_js.py +0 -47
- data/modules/emscripten/tools/autodediffer.py +0 -60
- data/modules/emscripten/tools/bindings_generator.py +0 -832
- data/modules/emscripten/tools/bisect_pair.py +0 -88
- data/modules/emscripten/tools/cache.py +0 -196
- data/modules/emscripten/tools/clean_webconsole.py +0 -34
- data/modules/emscripten/tools/crunch-worker.js +0 -124
- data/modules/emscripten/tools/diff_autodebugger.py +0 -15
- data/modules/emscripten/tools/eliminator/asm-eliminator-test-output.js +0 -307
- data/modules/emscripten/tools/eliminator/asm-eliminator-test.js +0 -382
- data/modules/emscripten/tools/eliminator/eliminator-test-output.js +0 -6136
- data/modules/emscripten/tools/eliminator/eliminator-test.js +0 -8879
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/README.html +0 -888
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/README.org +0 -463
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/bin/uglifyjs +0 -317
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/docstyle.css +0 -75
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/object-ast.js +0 -75
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/parse-js.js +0 -1363
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/process.js +0 -2005
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/squeeze-more.js +0 -51
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/package.json +0 -22
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/beautify.js +0 -28
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/testparser.js +0 -402
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array1.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array2.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array3.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array4.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/assignment.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/const.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/if.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue10.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue11.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue13.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue14.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue16.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue17.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue20.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue21.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue25.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue27.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue28.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue29.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue30.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue34.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue4.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue48.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue50.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue53.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue68.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue69.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue9.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/mangle.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/var.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/with.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array1.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array2.js +0 -4
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array3.js +0 -4
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array4.js +0 -6
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/assignment.js +0 -20
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/concatstring.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/const.js +0 -5
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +0 -4
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/forstatement.js +0 -10
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/if.js +0 -6
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +0 -9
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +0 -16
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue10.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue11.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue13.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue14.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue16.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue17.js +0 -4
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue20.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue21.js +0 -6
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue25.js +0 -7
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue27.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue28.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue29.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue30.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue34.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue4.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue48.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue50.js +0 -9
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue53.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue68.js +0 -5
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue69.js +0 -1
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue9.js +0 -4
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/mangle.js +0 -5
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/var.js +0 -3
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/with.js +0 -2
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/scripts.js +0 -55
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/hoist.js +0 -33
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/instrument.js +0 -97
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/instrument2.js +0 -138
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/test.js +0 -16
- data/modules/emscripten/tools/eliminator/node_modules/uglify-js/uglify-js.js +0 -17
- data/modules/emscripten/tools/eliminator/safe-eliminator-test-output.js +0 -85
- data/modules/emscripten/tools/eliminator/safe-eliminator-test.js +0 -103
- data/modules/emscripten/tools/emconfiguren.py +0 -19
- data/modules/emscripten/tools/emmaken.py +0 -230
- data/modules/emscripten/tools/emmakenxx.py +0 -18
- data/modules/emscripten/tools/exec_llvm.py +0 -50
- data/modules/emscripten/tools/file2json.py +0 -49
- data/modules/emscripten/tools/file_packager.py +0 -719
- data/modules/emscripten/tools/find_bigfuncs.py +0 -23
- data/modules/emscripten/tools/find_bigis.py +0 -18
- data/modules/emscripten/tools/find_bigvars.py +0 -24
- data/modules/emscripten/tools/fix_closure.py +0 -88
- data/modules/emscripten/tools/gen_struct_info.py +0 -509
- data/modules/emscripten/tools/ie7_fix.py +0 -14
- data/modules/emscripten/tools/js-optimizer.js +0 -4023
- data/modules/emscripten/tools/js_optimizer.py +0 -357
- data/modules/emscripten/tools/jsrun.py +0 -37
- data/modules/emscripten/tools/ll-strip.py +0 -56
- data/modules/emscripten/tools/make_file.py +0 -19
- data/modules/emscripten/tools/make_minigzip.py +0 -13
- data/modules/emscripten/tools/merge_asm.py +0 -26
- data/modules/emscripten/tools/namespacer.py +0 -95
- data/modules/emscripten/tools/nativize_llvm.py +0 -34
- data/modules/emscripten/tools/node_modules/source-map/CHANGELOG.md +0 -58
- data/modules/emscripten/tools/node_modules/source-map/LICENSE +0 -28
- data/modules/emscripten/tools/node_modules/source-map/Makefile.dryice.js +0 -166
- data/modules/emscripten/tools/node_modules/source-map/README.md +0 -347
- data/modules/emscripten/tools/node_modules/source-map/build/assert-shim.js +0 -56
- data/modules/emscripten/tools/node_modules/source-map/build/mini-require.js +0 -152
- data/modules/emscripten/tools/node_modules/source-map/build/prefix-source-map.jsm +0 -20
- data/modules/emscripten/tools/node_modules/source-map/build/prefix-utils.jsm +0 -18
- data/modules/emscripten/tools/node_modules/source-map/build/suffix-browser.js +0 -8
- data/modules/emscripten/tools/node_modules/source-map/build/suffix-source-map.jsm +0 -6
- data/modules/emscripten/tools/node_modules/source-map/build/suffix-utils.jsm +0 -21
- data/modules/emscripten/tools/node_modules/source-map/build/test-prefix.js +0 -8
- data/modules/emscripten/tools/node_modules/source-map/build/test-suffix.js +0 -3
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/array-set.js +0 -96
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/base64-vlq.js +0 -144
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/base64.js +0 -42
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/binary-search.js +0 -81
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-map-consumer.js +0 -430
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-map-generator.js +0 -381
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-node.js +0 -353
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map/util.js +0 -117
- data/modules/emscripten/tools/node_modules/source-map/lib/source-map.js +0 -8
- data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/LICENSE +0 -58
- data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/README.md +0 -119
- data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/amdefine.js +0 -299
- data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/package.json +0 -33
- data/modules/emscripten/tools/node_modules/source-map/package.json +0 -74
- data/modules/emscripten/tools/node_modules/source-map/test/run-tests.js +0 -73
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-api.js +0 -26
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-array-set.js +0 -71
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64-vlq.js +0 -24
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js +0 -35
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-binary-search.js +0 -54
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-dog-fooding.js +0 -72
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-map-consumer.js +0 -306
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-map-generator.js +0 -391
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-node.js +0 -282
- data/modules/emscripten/tools/node_modules/source-map/test/source-map/util.js +0 -152
- data/modules/emscripten/tools/reproduceriter.js +0 -216
- data/modules/emscripten/tools/reproduceriter.py +0 -160
- data/modules/emscripten/tools/response_file.py +0 -34
- data/modules/emscripten/tools/scan_js.py +0 -20
- data/modules/emscripten/tools/scan_ll.py +0 -18
- data/modules/emscripten/tools/scons/site_scons/site_tools/emscripten/__init__.py +0 -3
- data/modules/emscripten/tools/scons/site_scons/site_tools/emscripten/emscripten.py +0 -46
- data/modules/emscripten/tools/settings_template_readonly.py +0 -49
- data/modules/emscripten/tools/shared.py +0 -1705
- data/modules/emscripten/tools/source-maps/sourcemap2json.js +0 -15
- data/modules/emscripten/tools/source-maps/sourcemapper.js +0 -208
- data/modules/emscripten/tools/split.py +0 -105
- data/modules/emscripten/tools/split_asm.py +0 -30
- data/modules/emscripten/tools/tempfiles.py +0 -41
- data/modules/emscripten/tools/test-js-optimizer-asm-last-output.js +0 -75
- data/modules/emscripten/tools/test-js-optimizer-asm-last.js +0 -91
- data/modules/emscripten/tools/test-js-optimizer-asm-minlast-output.js +0 -2
- data/modules/emscripten/tools/test-js-optimizer-asm-minlast.js +0 -8
- data/modules/emscripten/tools/test-js-optimizer-asm-outline1-output.js +0 -929
- data/modules/emscripten/tools/test-js-optimizer-asm-outline1.js +0 -351
- data/modules/emscripten/tools/test-js-optimizer-asm-outline2-output.js +0 -793
- data/modules/emscripten/tools/test-js-optimizer-asm-outline2.js +0 -606
- data/modules/emscripten/tools/test-js-optimizer-asm-outline3-output.js +0 -28
- data/modules/emscripten/tools/test-js-optimizer-asm-outline3.js +0 -30
- data/modules/emscripten/tools/test-js-optimizer-asm-pre-output.js +0 -522
- data/modules/emscripten/tools/test-js-optimizer-asm-pre.js +0 -533
- data/modules/emscripten/tools/test-js-optimizer-asm-regs-min-output.js +0 -36
- data/modules/emscripten/tools/test-js-optimizer-asm-regs-min.js +0 -37
- data/modules/emscripten/tools/test-js-optimizer-asm-regs-output.js +0 -106
- data/modules/emscripten/tools/test-js-optimizer-asm-regs.js +0 -110
- data/modules/emscripten/tools/test-js-optimizer-asm-relocate-output.js +0 -9
- data/modules/emscripten/tools/test-js-optimizer-asm-relocate.js +0 -12
- data/modules/emscripten/tools/test-js-optimizer-output.js +0 -291
- data/modules/emscripten/tools/test-js-optimizer-regs-output.js +0 -232
- data/modules/emscripten/tools/test-js-optimizer-regs.js +0 -237
- data/modules/emscripten/tools/test-js-optimizer-t2-output.js +0 -91
- data/modules/emscripten/tools/test-js-optimizer-t2.js +0 -92
- data/modules/emscripten/tools/test-js-optimizer-t2c-output.js +0 -17
- data/modules/emscripten/tools/test-js-optimizer-t2c.js +0 -18
- data/modules/emscripten/tools/test-js-optimizer-t3-output.js +0 -49
- data/modules/emscripten/tools/test-js-optimizer-t3.js +0 -50
- data/modules/emscripten/tools/test-js-optimizer.js +0 -401
- data/modules/emscripten/tools/validate_asmjs.py +0 -82
- data/modules/mruby/mrblib/print.rb +0 -18
- data/modules/mruby/src/re.h +0 -12
@@ -1,2615 +0,0 @@
|
|
1
|
-
// -*- C++ -*-
|
2
|
-
//===--------------------------- future -----------------------------------===//
|
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_FUTURE
|
12
|
-
#define _LIBCPP_FUTURE
|
13
|
-
|
14
|
-
/*
|
15
|
-
future synopsis
|
16
|
-
|
17
|
-
namespace std
|
18
|
-
{
|
19
|
-
|
20
|
-
enum class future_errc
|
21
|
-
{
|
22
|
-
future_already_retrieved = 1,
|
23
|
-
promise_already_satisfied,
|
24
|
-
no_state,
|
25
|
-
broken_promise
|
26
|
-
};
|
27
|
-
|
28
|
-
enum class launch
|
29
|
-
{
|
30
|
-
async = 1,
|
31
|
-
deferred = 2,
|
32
|
-
any = async | deferred
|
33
|
-
};
|
34
|
-
|
35
|
-
enum class future_status
|
36
|
-
{
|
37
|
-
ready,
|
38
|
-
timeout,
|
39
|
-
deferred
|
40
|
-
};
|
41
|
-
|
42
|
-
template <> struct is_error_code_enum<future_errc> : public true_type { };
|
43
|
-
error_code make_error_code(future_errc e) noexcept;
|
44
|
-
error_condition make_error_condition(future_errc e) noexcept;
|
45
|
-
|
46
|
-
const error_category& future_category() noexcept;
|
47
|
-
|
48
|
-
class future_error
|
49
|
-
: public logic_error
|
50
|
-
{
|
51
|
-
public:
|
52
|
-
future_error(error_code ec); // exposition only
|
53
|
-
|
54
|
-
const error_code& code() const noexcept;
|
55
|
-
const char* what() const noexcept;
|
56
|
-
};
|
57
|
-
|
58
|
-
template <class R>
|
59
|
-
class promise
|
60
|
-
{
|
61
|
-
public:
|
62
|
-
promise();
|
63
|
-
template <class Allocator>
|
64
|
-
promise(allocator_arg_t, const Allocator& a);
|
65
|
-
promise(promise&& rhs) noexcept;
|
66
|
-
promise(const promise& rhs) = delete;
|
67
|
-
~promise();
|
68
|
-
|
69
|
-
// assignment
|
70
|
-
promise& operator=(promise&& rhs) noexcept;
|
71
|
-
promise& operator=(const promise& rhs) = delete;
|
72
|
-
void swap(promise& other) noexcept;
|
73
|
-
|
74
|
-
// retrieving the result
|
75
|
-
future<R> get_future();
|
76
|
-
|
77
|
-
// setting the result
|
78
|
-
void set_value(const R& r);
|
79
|
-
void set_value(R&& r);
|
80
|
-
void set_exception(exception_ptr p);
|
81
|
-
|
82
|
-
// setting the result with deferred notification
|
83
|
-
void set_value_at_thread_exit(const R& r);
|
84
|
-
void set_value_at_thread_exit(R&& r);
|
85
|
-
void set_exception_at_thread_exit(exception_ptr p);
|
86
|
-
};
|
87
|
-
|
88
|
-
template <class R>
|
89
|
-
class promise<R&>
|
90
|
-
{
|
91
|
-
public:
|
92
|
-
promise();
|
93
|
-
template <class Allocator>
|
94
|
-
promise(allocator_arg_t, const Allocator& a);
|
95
|
-
promise(promise&& rhs) noexcept;
|
96
|
-
promise(const promise& rhs) = delete;
|
97
|
-
~promise();
|
98
|
-
|
99
|
-
// assignment
|
100
|
-
promise& operator=(promise&& rhs) noexcept;
|
101
|
-
promise& operator=(const promise& rhs) = delete;
|
102
|
-
void swap(promise& other) noexcept;
|
103
|
-
|
104
|
-
// retrieving the result
|
105
|
-
future<R&> get_future();
|
106
|
-
|
107
|
-
// setting the result
|
108
|
-
void set_value(R& r);
|
109
|
-
void set_exception(exception_ptr p);
|
110
|
-
|
111
|
-
// setting the result with deferred notification
|
112
|
-
void set_value_at_thread_exit(R&);
|
113
|
-
void set_exception_at_thread_exit(exception_ptr p);
|
114
|
-
};
|
115
|
-
|
116
|
-
template <>
|
117
|
-
class promise<void>
|
118
|
-
{
|
119
|
-
public:
|
120
|
-
promise();
|
121
|
-
template <class Allocator>
|
122
|
-
promise(allocator_arg_t, const Allocator& a);
|
123
|
-
promise(promise&& rhs) noexcept;
|
124
|
-
promise(const promise& rhs) = delete;
|
125
|
-
~promise();
|
126
|
-
|
127
|
-
// assignment
|
128
|
-
promise& operator=(promise&& rhs) noexcept;
|
129
|
-
promise& operator=(const promise& rhs) = delete;
|
130
|
-
void swap(promise& other) noexcept;
|
131
|
-
|
132
|
-
// retrieving the result
|
133
|
-
future<void> get_future();
|
134
|
-
|
135
|
-
// setting the result
|
136
|
-
void set_value();
|
137
|
-
void set_exception(exception_ptr p);
|
138
|
-
|
139
|
-
// setting the result with deferred notification
|
140
|
-
void set_value_at_thread_exit();
|
141
|
-
void set_exception_at_thread_exit(exception_ptr p);
|
142
|
-
};
|
143
|
-
|
144
|
-
template <class R> void swap(promise<R>& x, promise<R>& y) noexcept;
|
145
|
-
|
146
|
-
template <class R, class Alloc>
|
147
|
-
struct uses_allocator<promise<R>, Alloc> : public true_type {};
|
148
|
-
|
149
|
-
template <class R>
|
150
|
-
class future
|
151
|
-
{
|
152
|
-
public:
|
153
|
-
future() noexcept;
|
154
|
-
future(future&&) noexcept;
|
155
|
-
future(const future& rhs) = delete;
|
156
|
-
~future();
|
157
|
-
future& operator=(const future& rhs) = delete;
|
158
|
-
future& operator=(future&&) noexcept;
|
159
|
-
shared_future<R> share();
|
160
|
-
|
161
|
-
// retrieving the value
|
162
|
-
R get();
|
163
|
-
|
164
|
-
// functions to check state
|
165
|
-
bool valid() const noexcept;
|
166
|
-
|
167
|
-
void wait() const;
|
168
|
-
template <class Rep, class Period>
|
169
|
-
future_status
|
170
|
-
wait_for(const chrono::duration<Rep, Period>& rel_time) const;
|
171
|
-
template <class Clock, class Duration>
|
172
|
-
future_status
|
173
|
-
wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
|
174
|
-
};
|
175
|
-
|
176
|
-
template <class R>
|
177
|
-
class future<R&>
|
178
|
-
{
|
179
|
-
public:
|
180
|
-
future() noexcept;
|
181
|
-
future(future&&) noexcept;
|
182
|
-
future(const future& rhs) = delete;
|
183
|
-
~future();
|
184
|
-
future& operator=(const future& rhs) = delete;
|
185
|
-
future& operator=(future&&) noexcept;
|
186
|
-
shared_future<R&> share();
|
187
|
-
|
188
|
-
// retrieving the value
|
189
|
-
R& get();
|
190
|
-
|
191
|
-
// functions to check state
|
192
|
-
bool valid() const noexcept;
|
193
|
-
|
194
|
-
void wait() const;
|
195
|
-
template <class Rep, class Period>
|
196
|
-
future_status
|
197
|
-
wait_for(const chrono::duration<Rep, Period>& rel_time) const;
|
198
|
-
template <class Clock, class Duration>
|
199
|
-
future_status
|
200
|
-
wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
|
201
|
-
};
|
202
|
-
|
203
|
-
template <>
|
204
|
-
class future<void>
|
205
|
-
{
|
206
|
-
public:
|
207
|
-
future() noexcept;
|
208
|
-
future(future&&) noexcept;
|
209
|
-
future(const future& rhs) = delete;
|
210
|
-
~future();
|
211
|
-
future& operator=(const future& rhs) = delete;
|
212
|
-
future& operator=(future&&) noexcept;
|
213
|
-
shared_future<void> share();
|
214
|
-
|
215
|
-
// retrieving the value
|
216
|
-
void get();
|
217
|
-
|
218
|
-
// functions to check state
|
219
|
-
bool valid() const noexcept;
|
220
|
-
|
221
|
-
void wait() const;
|
222
|
-
template <class Rep, class Period>
|
223
|
-
future_status
|
224
|
-
wait_for(const chrono::duration<Rep, Period>& rel_time) const;
|
225
|
-
template <class Clock, class Duration>
|
226
|
-
future_status
|
227
|
-
wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
|
228
|
-
};
|
229
|
-
|
230
|
-
template <class R>
|
231
|
-
class shared_future
|
232
|
-
{
|
233
|
-
public:
|
234
|
-
shared_future() noexcept;
|
235
|
-
shared_future(const shared_future& rhs);
|
236
|
-
shared_future(future<R>&&) noexcept;
|
237
|
-
shared_future(shared_future&& rhs) noexcept;
|
238
|
-
~shared_future();
|
239
|
-
shared_future& operator=(const shared_future& rhs);
|
240
|
-
shared_future& operator=(shared_future&& rhs) noexcept;
|
241
|
-
|
242
|
-
// retrieving the value
|
243
|
-
const R& get() const;
|
244
|
-
|
245
|
-
// functions to check state
|
246
|
-
bool valid() const noexcept;
|
247
|
-
|
248
|
-
void wait() const;
|
249
|
-
template <class Rep, class Period>
|
250
|
-
future_status
|
251
|
-
wait_for(const chrono::duration<Rep, Period>& rel_time) const;
|
252
|
-
template <class Clock, class Duration>
|
253
|
-
future_status
|
254
|
-
wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
|
255
|
-
};
|
256
|
-
|
257
|
-
template <class R>
|
258
|
-
class shared_future<R&>
|
259
|
-
{
|
260
|
-
public:
|
261
|
-
shared_future() noexcept;
|
262
|
-
shared_future(const shared_future& rhs);
|
263
|
-
shared_future(future<R&>&&) noexcept;
|
264
|
-
shared_future(shared_future&& rhs) noexcept;
|
265
|
-
~shared_future();
|
266
|
-
shared_future& operator=(const shared_future& rhs);
|
267
|
-
shared_future& operator=(shared_future&& rhs) noexcept;
|
268
|
-
|
269
|
-
// retrieving the value
|
270
|
-
R& get() const;
|
271
|
-
|
272
|
-
// functions to check state
|
273
|
-
bool valid() const noexcept;
|
274
|
-
|
275
|
-
void wait() const;
|
276
|
-
template <class Rep, class Period>
|
277
|
-
future_status
|
278
|
-
wait_for(const chrono::duration<Rep, Period>& rel_time) const;
|
279
|
-
template <class Clock, class Duration>
|
280
|
-
future_status
|
281
|
-
wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
|
282
|
-
};
|
283
|
-
|
284
|
-
template <>
|
285
|
-
class shared_future<void>
|
286
|
-
{
|
287
|
-
public:
|
288
|
-
shared_future() noexcept;
|
289
|
-
shared_future(const shared_future& rhs);
|
290
|
-
shared_future(future<void>&&) noexcept;
|
291
|
-
shared_future(shared_future&& rhs) noexcept;
|
292
|
-
~shared_future();
|
293
|
-
shared_future& operator=(const shared_future& rhs);
|
294
|
-
shared_future& operator=(shared_future&& rhs) noexcept;
|
295
|
-
|
296
|
-
// retrieving the value
|
297
|
-
void get() const;
|
298
|
-
|
299
|
-
// functions to check state
|
300
|
-
bool valid() const noexcept;
|
301
|
-
|
302
|
-
void wait() const;
|
303
|
-
template <class Rep, class Period>
|
304
|
-
future_status
|
305
|
-
wait_for(const chrono::duration<Rep, Period>& rel_time) const;
|
306
|
-
template <class Clock, class Duration>
|
307
|
-
future_status
|
308
|
-
wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
|
309
|
-
};
|
310
|
-
|
311
|
-
template <class F, class... Args>
|
312
|
-
future<typename result_of<typename decay<F>::type(typename decay<Args>::type...)>::type>
|
313
|
-
async(F&& f, Args&&... args);
|
314
|
-
|
315
|
-
template <class F, class... Args>
|
316
|
-
future<typename result_of<typename decay<F>::type(typename decay<Args>::type...)>::type>
|
317
|
-
async(launch policy, F&& f, Args&&... args);
|
318
|
-
|
319
|
-
template <class> class packaged_task; // undefined
|
320
|
-
|
321
|
-
template <class R, class... ArgTypes>
|
322
|
-
class packaged_task<R(ArgTypes...)>
|
323
|
-
{
|
324
|
-
public:
|
325
|
-
typedef R result_type;
|
326
|
-
|
327
|
-
// construction and destruction
|
328
|
-
packaged_task() noexcept;
|
329
|
-
template <class F>
|
330
|
-
explicit packaged_task(F&& f);
|
331
|
-
template <class F, class Allocator>
|
332
|
-
explicit packaged_task(allocator_arg_t, const Allocator& a, F&& f);
|
333
|
-
~packaged_task();
|
334
|
-
|
335
|
-
// no copy
|
336
|
-
packaged_task(const packaged_task&) = delete;
|
337
|
-
packaged_task& operator=(const packaged_task&) = delete;
|
338
|
-
|
339
|
-
// move support
|
340
|
-
packaged_task(packaged_task&& other) noexcept;
|
341
|
-
packaged_task& operator=(packaged_task&& other) noexcept;
|
342
|
-
void swap(packaged_task& other) noexcept;
|
343
|
-
|
344
|
-
bool valid() const noexcept;
|
345
|
-
|
346
|
-
// result retrieval
|
347
|
-
future<R> get_future();
|
348
|
-
|
349
|
-
// execution
|
350
|
-
void operator()(ArgTypes... );
|
351
|
-
void make_ready_at_thread_exit(ArgTypes...);
|
352
|
-
|
353
|
-
void reset();
|
354
|
-
};
|
355
|
-
|
356
|
-
template <class R>
|
357
|
-
void swap(packaged_task<R(ArgTypes...)&, packaged_task<R(ArgTypes...)>&) noexcept;
|
358
|
-
|
359
|
-
template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
|
360
|
-
|
361
|
-
} // std
|
362
|
-
|
363
|
-
*/
|
364
|
-
|
365
|
-
#include <__config>
|
366
|
-
#include <system_error>
|
367
|
-
#include <memory>
|
368
|
-
#include <chrono>
|
369
|
-
#include <exception>
|
370
|
-
#include <mutex>
|
371
|
-
#include <thread>
|
372
|
-
|
373
|
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
374
|
-
#pragma GCC system_header
|
375
|
-
#endif
|
376
|
-
|
377
|
-
_LIBCPP_BEGIN_NAMESPACE_STD
|
378
|
-
|
379
|
-
//enum class future_errc
|
380
|
-
_LIBCPP_DECLARE_STRONG_ENUM(future_errc)
|
381
|
-
{
|
382
|
-
future_already_retrieved = 1,
|
383
|
-
promise_already_satisfied,
|
384
|
-
no_state,
|
385
|
-
broken_promise
|
386
|
-
};
|
387
|
-
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(future_errc)
|
388
|
-
|
389
|
-
template <>
|
390
|
-
struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum<future_errc> : public true_type {};
|
391
|
-
|
392
|
-
#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
|
393
|
-
template <>
|
394
|
-
struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum<future_errc::__lx> : public true_type { };
|
395
|
-
#endif
|
396
|
-
|
397
|
-
//enum class launch
|
398
|
-
_LIBCPP_DECLARE_STRONG_ENUM(launch)
|
399
|
-
{
|
400
|
-
async = 1,
|
401
|
-
deferred = 2,
|
402
|
-
any = async | deferred
|
403
|
-
};
|
404
|
-
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(launch)
|
405
|
-
|
406
|
-
#ifndef _LIBCPP_HAS_NO_STRONG_ENUMS
|
407
|
-
|
408
|
-
#ifdef _LIBCXX_UNDERLYING_TYPE
|
409
|
-
typedef underlying_type<launch>::type __launch_underlying_type;
|
410
|
-
#else
|
411
|
-
typedef int __launch_underlying_type;
|
412
|
-
#endif
|
413
|
-
|
414
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
415
|
-
_LIBCPP_CONSTEXPR
|
416
|
-
launch
|
417
|
-
operator&(launch __x, launch __y)
|
418
|
-
{
|
419
|
-
return static_cast<launch>(static_cast<__launch_underlying_type>(__x) &
|
420
|
-
static_cast<__launch_underlying_type>(__y));
|
421
|
-
}
|
422
|
-
|
423
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
424
|
-
_LIBCPP_CONSTEXPR
|
425
|
-
launch
|
426
|
-
operator|(launch __x, launch __y)
|
427
|
-
{
|
428
|
-
return static_cast<launch>(static_cast<__launch_underlying_type>(__x) |
|
429
|
-
static_cast<__launch_underlying_type>(__y));
|
430
|
-
}
|
431
|
-
|
432
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
433
|
-
_LIBCPP_CONSTEXPR
|
434
|
-
launch
|
435
|
-
operator^(launch __x, launch __y)
|
436
|
-
{
|
437
|
-
return static_cast<launch>(static_cast<__launch_underlying_type>(__x) ^
|
438
|
-
static_cast<__launch_underlying_type>(__y));
|
439
|
-
}
|
440
|
-
|
441
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
442
|
-
_LIBCPP_CONSTEXPR
|
443
|
-
launch
|
444
|
-
operator~(launch __x)
|
445
|
-
{
|
446
|
-
return static_cast<launch>(~static_cast<__launch_underlying_type>(__x) & 3);
|
447
|
-
}
|
448
|
-
|
449
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
450
|
-
launch&
|
451
|
-
operator&=(launch& __x, launch __y)
|
452
|
-
{
|
453
|
-
__x = __x & __y; return __x;
|
454
|
-
}
|
455
|
-
|
456
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
457
|
-
launch&
|
458
|
-
operator|=(launch& __x, launch __y)
|
459
|
-
{
|
460
|
-
__x = __x | __y; return __x;
|
461
|
-
}
|
462
|
-
|
463
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
464
|
-
launch&
|
465
|
-
operator^=(launch& __x, launch __y)
|
466
|
-
{
|
467
|
-
__x = __x ^ __y; return __x;
|
468
|
-
}
|
469
|
-
|
470
|
-
#endif // !_LIBCPP_HAS_NO_STRONG_ENUMS
|
471
|
-
|
472
|
-
//enum class future_status
|
473
|
-
_LIBCPP_DECLARE_STRONG_ENUM(future_status)
|
474
|
-
{
|
475
|
-
ready,
|
476
|
-
timeout,
|
477
|
-
deferred
|
478
|
-
};
|
479
|
-
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(future_status)
|
480
|
-
|
481
|
-
_LIBCPP_FUNC_VIS
|
482
|
-
const error_category& future_category() _NOEXCEPT;
|
483
|
-
|
484
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
485
|
-
error_code
|
486
|
-
make_error_code(future_errc __e) _NOEXCEPT
|
487
|
-
{
|
488
|
-
return error_code(static_cast<int>(__e), future_category());
|
489
|
-
}
|
490
|
-
|
491
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
492
|
-
error_condition
|
493
|
-
make_error_condition(future_errc __e) _NOEXCEPT
|
494
|
-
{
|
495
|
-
return error_condition(static_cast<int>(__e), future_category());
|
496
|
-
}
|
497
|
-
|
498
|
-
class _LIBCPP_EXCEPTION_ABI future_error
|
499
|
-
: public logic_error
|
500
|
-
{
|
501
|
-
error_code __ec_;
|
502
|
-
public:
|
503
|
-
future_error(error_code __ec);
|
504
|
-
|
505
|
-
_LIBCPP_INLINE_VISIBILITY
|
506
|
-
const error_code& code() const _NOEXCEPT {return __ec_;}
|
507
|
-
|
508
|
-
virtual ~future_error() _NOEXCEPT;
|
509
|
-
};
|
510
|
-
|
511
|
-
class _LIBCPP_TYPE_VIS __assoc_sub_state
|
512
|
-
: public __shared_count
|
513
|
-
{
|
514
|
-
protected:
|
515
|
-
exception_ptr __exception_;
|
516
|
-
mutable mutex __mut_;
|
517
|
-
mutable condition_variable __cv_;
|
518
|
-
unsigned __state_;
|
519
|
-
|
520
|
-
virtual void __on_zero_shared() _NOEXCEPT;
|
521
|
-
void __sub_wait(unique_lock<mutex>& __lk);
|
522
|
-
public:
|
523
|
-
enum
|
524
|
-
{
|
525
|
-
__constructed = 1,
|
526
|
-
__future_attached = 2,
|
527
|
-
ready = 4,
|
528
|
-
deferred = 8
|
529
|
-
};
|
530
|
-
|
531
|
-
_LIBCPP_INLINE_VISIBILITY
|
532
|
-
__assoc_sub_state() : __state_(0) {}
|
533
|
-
|
534
|
-
_LIBCPP_INLINE_VISIBILITY
|
535
|
-
bool __has_value() const
|
536
|
-
{return (__state_ & __constructed) || (__exception_ != nullptr);}
|
537
|
-
|
538
|
-
_LIBCPP_INLINE_VISIBILITY
|
539
|
-
void __set_future_attached()
|
540
|
-
{
|
541
|
-
lock_guard<mutex> __lk(__mut_);
|
542
|
-
__state_ |= __future_attached;
|
543
|
-
}
|
544
|
-
_LIBCPP_INLINE_VISIBILITY
|
545
|
-
bool __has_future_attached() const {return (__state_ & __future_attached) != 0;}
|
546
|
-
|
547
|
-
_LIBCPP_INLINE_VISIBILITY
|
548
|
-
void __set_deferred() {__state_ |= deferred;}
|
549
|
-
|
550
|
-
void __make_ready();
|
551
|
-
_LIBCPP_INLINE_VISIBILITY
|
552
|
-
bool __is_ready() const {return (__state_ & ready) != 0;}
|
553
|
-
|
554
|
-
void set_value();
|
555
|
-
void set_value_at_thread_exit();
|
556
|
-
|
557
|
-
void set_exception(exception_ptr __p);
|
558
|
-
void set_exception_at_thread_exit(exception_ptr __p);
|
559
|
-
|
560
|
-
void copy();
|
561
|
-
|
562
|
-
void wait();
|
563
|
-
template <class _Rep, class _Period>
|
564
|
-
future_status
|
565
|
-
wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const;
|
566
|
-
template <class _Clock, class _Duration>
|
567
|
-
future_status
|
568
|
-
wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const;
|
569
|
-
|
570
|
-
virtual void __execute();
|
571
|
-
};
|
572
|
-
|
573
|
-
template <class _Clock, class _Duration>
|
574
|
-
future_status
|
575
|
-
__assoc_sub_state::wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
|
576
|
-
{
|
577
|
-
unique_lock<mutex> __lk(__mut_);
|
578
|
-
if (__state_ & deferred)
|
579
|
-
return future_status::deferred;
|
580
|
-
while (!(__state_ & ready) && _Clock::now() < __abs_time)
|
581
|
-
__cv_.wait_until(__lk, __abs_time);
|
582
|
-
if (__state_ & ready)
|
583
|
-
return future_status::ready;
|
584
|
-
return future_status::timeout;
|
585
|
-
}
|
586
|
-
|
587
|
-
template <class _Rep, class _Period>
|
588
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
589
|
-
future_status
|
590
|
-
__assoc_sub_state::wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
|
591
|
-
{
|
592
|
-
return wait_until(chrono::steady_clock::now() + __rel_time);
|
593
|
-
}
|
594
|
-
|
595
|
-
template <class _Rp>
|
596
|
-
class __assoc_state
|
597
|
-
: public __assoc_sub_state
|
598
|
-
{
|
599
|
-
typedef __assoc_sub_state base;
|
600
|
-
typedef typename aligned_storage<sizeof(_Rp), alignment_of<_Rp>::value>::type _Up;
|
601
|
-
protected:
|
602
|
-
_Up __value_;
|
603
|
-
|
604
|
-
virtual void __on_zero_shared() _NOEXCEPT;
|
605
|
-
public:
|
606
|
-
|
607
|
-
template <class _Arg>
|
608
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
609
|
-
void set_value(_Arg&& __arg);
|
610
|
-
#else
|
611
|
-
void set_value(_Arg& __arg);
|
612
|
-
#endif
|
613
|
-
|
614
|
-
template <class _Arg>
|
615
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
616
|
-
void set_value_at_thread_exit(_Arg&& __arg);
|
617
|
-
#else
|
618
|
-
void set_value_at_thread_exit(_Arg& __arg);
|
619
|
-
#endif
|
620
|
-
|
621
|
-
_Rp move();
|
622
|
-
typename add_lvalue_reference<_Rp>::type copy();
|
623
|
-
};
|
624
|
-
|
625
|
-
template <class _Rp>
|
626
|
-
void
|
627
|
-
__assoc_state<_Rp>::__on_zero_shared() _NOEXCEPT
|
628
|
-
{
|
629
|
-
if (this->__state_ & base::__constructed)
|
630
|
-
reinterpret_cast<_Rp*>(&__value_)->~_Rp();
|
631
|
-
delete this;
|
632
|
-
}
|
633
|
-
|
634
|
-
template <class _Rp>
|
635
|
-
template <class _Arg>
|
636
|
-
void
|
637
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
638
|
-
__assoc_state<_Rp>::set_value(_Arg&& __arg)
|
639
|
-
#else
|
640
|
-
__assoc_state<_Rp>::set_value(_Arg& __arg)
|
641
|
-
#endif
|
642
|
-
{
|
643
|
-
unique_lock<mutex> __lk(this->__mut_);
|
644
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
645
|
-
if (this->__has_value())
|
646
|
-
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
647
|
-
#endif
|
648
|
-
::new(&__value_) _Rp(_VSTD::forward<_Arg>(__arg));
|
649
|
-
this->__state_ |= base::__constructed | base::ready;
|
650
|
-
__lk.unlock();
|
651
|
-
__cv_.notify_all();
|
652
|
-
}
|
653
|
-
|
654
|
-
template <class _Rp>
|
655
|
-
template <class _Arg>
|
656
|
-
void
|
657
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
658
|
-
__assoc_state<_Rp>::set_value_at_thread_exit(_Arg&& __arg)
|
659
|
-
#else
|
660
|
-
__assoc_state<_Rp>::set_value_at_thread_exit(_Arg& __arg)
|
661
|
-
#endif
|
662
|
-
{
|
663
|
-
unique_lock<mutex> __lk(this->__mut_);
|
664
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
665
|
-
if (this->__has_value())
|
666
|
-
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
667
|
-
#endif
|
668
|
-
::new(&__value_) _Rp(_VSTD::forward<_Arg>(__arg));
|
669
|
-
this->__state_ |= base::__constructed;
|
670
|
-
__thread_local_data()->__make_ready_at_thread_exit(this);
|
671
|
-
__lk.unlock();
|
672
|
-
}
|
673
|
-
|
674
|
-
template <class _Rp>
|
675
|
-
_Rp
|
676
|
-
__assoc_state<_Rp>::move()
|
677
|
-
{
|
678
|
-
unique_lock<mutex> __lk(this->__mut_);
|
679
|
-
this->__sub_wait(__lk);
|
680
|
-
if (this->__exception_ != nullptr)
|
681
|
-
rethrow_exception(this->__exception_);
|
682
|
-
return _VSTD::move(*reinterpret_cast<_Rp*>(&__value_));
|
683
|
-
}
|
684
|
-
|
685
|
-
template <class _Rp>
|
686
|
-
typename add_lvalue_reference<_Rp>::type
|
687
|
-
__assoc_state<_Rp>::copy()
|
688
|
-
{
|
689
|
-
unique_lock<mutex> __lk(this->__mut_);
|
690
|
-
this->__sub_wait(__lk);
|
691
|
-
if (this->__exception_ != nullptr)
|
692
|
-
rethrow_exception(this->__exception_);
|
693
|
-
return *reinterpret_cast<_Rp*>(&__value_);
|
694
|
-
}
|
695
|
-
|
696
|
-
template <class _Rp>
|
697
|
-
class __assoc_state<_Rp&>
|
698
|
-
: public __assoc_sub_state
|
699
|
-
{
|
700
|
-
typedef __assoc_sub_state base;
|
701
|
-
typedef _Rp* _Up;
|
702
|
-
protected:
|
703
|
-
_Up __value_;
|
704
|
-
|
705
|
-
virtual void __on_zero_shared() _NOEXCEPT;
|
706
|
-
public:
|
707
|
-
|
708
|
-
void set_value(_Rp& __arg);
|
709
|
-
void set_value_at_thread_exit(_Rp& __arg);
|
710
|
-
|
711
|
-
_Rp& copy();
|
712
|
-
};
|
713
|
-
|
714
|
-
template <class _Rp>
|
715
|
-
void
|
716
|
-
__assoc_state<_Rp&>::__on_zero_shared() _NOEXCEPT
|
717
|
-
{
|
718
|
-
delete this;
|
719
|
-
}
|
720
|
-
|
721
|
-
template <class _Rp>
|
722
|
-
void
|
723
|
-
__assoc_state<_Rp&>::set_value(_Rp& __arg)
|
724
|
-
{
|
725
|
-
unique_lock<mutex> __lk(this->__mut_);
|
726
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
727
|
-
if (this->__has_value())
|
728
|
-
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
729
|
-
#endif
|
730
|
-
__value_ = _VSTD::addressof(__arg);
|
731
|
-
this->__state_ |= base::__constructed | base::ready;
|
732
|
-
__lk.unlock();
|
733
|
-
__cv_.notify_all();
|
734
|
-
}
|
735
|
-
|
736
|
-
template <class _Rp>
|
737
|
-
void
|
738
|
-
__assoc_state<_Rp&>::set_value_at_thread_exit(_Rp& __arg)
|
739
|
-
{
|
740
|
-
unique_lock<mutex> __lk(this->__mut_);
|
741
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
742
|
-
if (this->__has_value())
|
743
|
-
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
744
|
-
#endif
|
745
|
-
__value_ = _VSTD::addressof(__arg);
|
746
|
-
this->__state_ |= base::__constructed;
|
747
|
-
__thread_local_data()->__make_ready_at_thread_exit(this);
|
748
|
-
__lk.unlock();
|
749
|
-
}
|
750
|
-
|
751
|
-
template <class _Rp>
|
752
|
-
_Rp&
|
753
|
-
__assoc_state<_Rp&>::copy()
|
754
|
-
{
|
755
|
-
unique_lock<mutex> __lk(this->__mut_);
|
756
|
-
this->__sub_wait(__lk);
|
757
|
-
if (this->__exception_ != nullptr)
|
758
|
-
rethrow_exception(this->__exception_);
|
759
|
-
return *__value_;
|
760
|
-
}
|
761
|
-
|
762
|
-
template <class _Rp, class _Alloc>
|
763
|
-
class __assoc_state_alloc
|
764
|
-
: public __assoc_state<_Rp>
|
765
|
-
{
|
766
|
-
typedef __assoc_state<_Rp> base;
|
767
|
-
_Alloc __alloc_;
|
768
|
-
|
769
|
-
virtual void __on_zero_shared() _NOEXCEPT;
|
770
|
-
public:
|
771
|
-
_LIBCPP_INLINE_VISIBILITY
|
772
|
-
explicit __assoc_state_alloc(const _Alloc& __a)
|
773
|
-
: __alloc_(__a) {}
|
774
|
-
};
|
775
|
-
|
776
|
-
template <class _Rp, class _Alloc>
|
777
|
-
void
|
778
|
-
__assoc_state_alloc<_Rp, _Alloc>::__on_zero_shared() _NOEXCEPT
|
779
|
-
{
|
780
|
-
if (this->__state_ & base::__constructed)
|
781
|
-
reinterpret_cast<_Rp*>(_VSTD::addressof(this->__value_))->~_Rp();
|
782
|
-
typename _Alloc::template rebind<__assoc_state_alloc>::other __a(__alloc_);
|
783
|
-
this->~__assoc_state_alloc();
|
784
|
-
__a.deallocate(this, 1);
|
785
|
-
}
|
786
|
-
|
787
|
-
template <class _Rp, class _Alloc>
|
788
|
-
class __assoc_state_alloc<_Rp&, _Alloc>
|
789
|
-
: public __assoc_state<_Rp&>
|
790
|
-
{
|
791
|
-
typedef __assoc_state<_Rp&> base;
|
792
|
-
_Alloc __alloc_;
|
793
|
-
|
794
|
-
virtual void __on_zero_shared() _NOEXCEPT;
|
795
|
-
public:
|
796
|
-
_LIBCPP_INLINE_VISIBILITY
|
797
|
-
explicit __assoc_state_alloc(const _Alloc& __a)
|
798
|
-
: __alloc_(__a) {}
|
799
|
-
};
|
800
|
-
|
801
|
-
template <class _Rp, class _Alloc>
|
802
|
-
void
|
803
|
-
__assoc_state_alloc<_Rp&, _Alloc>::__on_zero_shared() _NOEXCEPT
|
804
|
-
{
|
805
|
-
typename _Alloc::template rebind<__assoc_state_alloc>::other __a(__alloc_);
|
806
|
-
this->~__assoc_state_alloc();
|
807
|
-
__a.deallocate(this, 1);
|
808
|
-
}
|
809
|
-
|
810
|
-
template <class _Alloc>
|
811
|
-
class __assoc_sub_state_alloc
|
812
|
-
: public __assoc_sub_state
|
813
|
-
{
|
814
|
-
typedef __assoc_sub_state base;
|
815
|
-
_Alloc __alloc_;
|
816
|
-
|
817
|
-
virtual void __on_zero_shared() _NOEXCEPT;
|
818
|
-
public:
|
819
|
-
_LIBCPP_INLINE_VISIBILITY
|
820
|
-
explicit __assoc_sub_state_alloc(const _Alloc& __a)
|
821
|
-
: __alloc_(__a) {}
|
822
|
-
};
|
823
|
-
|
824
|
-
template <class _Alloc>
|
825
|
-
void
|
826
|
-
__assoc_sub_state_alloc<_Alloc>::__on_zero_shared() _NOEXCEPT
|
827
|
-
{
|
828
|
-
typename _Alloc::template rebind<__assoc_sub_state_alloc>::other __a(__alloc_);
|
829
|
-
this->~__assoc_sub_state_alloc();
|
830
|
-
__a.deallocate(this, 1);
|
831
|
-
}
|
832
|
-
|
833
|
-
template <class _Rp, class _Fp>
|
834
|
-
class __deferred_assoc_state
|
835
|
-
: public __assoc_state<_Rp>
|
836
|
-
{
|
837
|
-
typedef __assoc_state<_Rp> base;
|
838
|
-
|
839
|
-
_Fp __func_;
|
840
|
-
|
841
|
-
public:
|
842
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
843
|
-
explicit __deferred_assoc_state(_Fp&& __f);
|
844
|
-
#endif
|
845
|
-
|
846
|
-
virtual void __execute();
|
847
|
-
};
|
848
|
-
|
849
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
850
|
-
|
851
|
-
template <class _Rp, class _Fp>
|
852
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
853
|
-
__deferred_assoc_state<_Rp, _Fp>::__deferred_assoc_state(_Fp&& __f)
|
854
|
-
: __func_(_VSTD::forward<_Fp>(__f))
|
855
|
-
{
|
856
|
-
this->__set_deferred();
|
857
|
-
}
|
858
|
-
|
859
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
860
|
-
|
861
|
-
template <class _Rp, class _Fp>
|
862
|
-
void
|
863
|
-
__deferred_assoc_state<_Rp, _Fp>::__execute()
|
864
|
-
{
|
865
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
866
|
-
try
|
867
|
-
{
|
868
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
869
|
-
this->set_value(__func_());
|
870
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
871
|
-
}
|
872
|
-
catch (...)
|
873
|
-
{
|
874
|
-
this->set_exception(current_exception());
|
875
|
-
}
|
876
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
877
|
-
}
|
878
|
-
|
879
|
-
template <class _Fp>
|
880
|
-
class __deferred_assoc_state<void, _Fp>
|
881
|
-
: public __assoc_sub_state
|
882
|
-
{
|
883
|
-
typedef __assoc_sub_state base;
|
884
|
-
|
885
|
-
_Fp __func_;
|
886
|
-
|
887
|
-
public:
|
888
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
889
|
-
explicit __deferred_assoc_state(_Fp&& __f);
|
890
|
-
#endif
|
891
|
-
|
892
|
-
virtual void __execute();
|
893
|
-
};
|
894
|
-
|
895
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
896
|
-
|
897
|
-
template <class _Fp>
|
898
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
899
|
-
__deferred_assoc_state<void, _Fp>::__deferred_assoc_state(_Fp&& __f)
|
900
|
-
: __func_(_VSTD::forward<_Fp>(__f))
|
901
|
-
{
|
902
|
-
this->__set_deferred();
|
903
|
-
}
|
904
|
-
|
905
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
906
|
-
|
907
|
-
template <class _Fp>
|
908
|
-
void
|
909
|
-
__deferred_assoc_state<void, _Fp>::__execute()
|
910
|
-
{
|
911
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
912
|
-
try
|
913
|
-
{
|
914
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
915
|
-
__func_();
|
916
|
-
this->set_value();
|
917
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
918
|
-
}
|
919
|
-
catch (...)
|
920
|
-
{
|
921
|
-
this->set_exception(current_exception());
|
922
|
-
}
|
923
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
924
|
-
}
|
925
|
-
|
926
|
-
template <class _Rp, class _Fp>
|
927
|
-
class __async_assoc_state
|
928
|
-
: public __assoc_state<_Rp>
|
929
|
-
{
|
930
|
-
typedef __assoc_state<_Rp> base;
|
931
|
-
|
932
|
-
_Fp __func_;
|
933
|
-
|
934
|
-
virtual void __on_zero_shared() _NOEXCEPT;
|
935
|
-
public:
|
936
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
937
|
-
explicit __async_assoc_state(_Fp&& __f);
|
938
|
-
#endif
|
939
|
-
|
940
|
-
virtual void __execute();
|
941
|
-
};
|
942
|
-
|
943
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
944
|
-
|
945
|
-
template <class _Rp, class _Fp>
|
946
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
947
|
-
__async_assoc_state<_Rp, _Fp>::__async_assoc_state(_Fp&& __f)
|
948
|
-
: __func_(_VSTD::forward<_Fp>(__f))
|
949
|
-
{
|
950
|
-
}
|
951
|
-
|
952
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
953
|
-
|
954
|
-
template <class _Rp, class _Fp>
|
955
|
-
void
|
956
|
-
__async_assoc_state<_Rp, _Fp>::__execute()
|
957
|
-
{
|
958
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
959
|
-
try
|
960
|
-
{
|
961
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
962
|
-
this->set_value(__func_());
|
963
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
964
|
-
}
|
965
|
-
catch (...)
|
966
|
-
{
|
967
|
-
this->set_exception(current_exception());
|
968
|
-
}
|
969
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
970
|
-
}
|
971
|
-
|
972
|
-
template <class _Rp, class _Fp>
|
973
|
-
void
|
974
|
-
__async_assoc_state<_Rp, _Fp>::__on_zero_shared() _NOEXCEPT
|
975
|
-
{
|
976
|
-
this->wait();
|
977
|
-
base::__on_zero_shared();
|
978
|
-
}
|
979
|
-
|
980
|
-
template <class _Fp>
|
981
|
-
class __async_assoc_state<void, _Fp>
|
982
|
-
: public __assoc_sub_state
|
983
|
-
{
|
984
|
-
typedef __assoc_sub_state base;
|
985
|
-
|
986
|
-
_Fp __func_;
|
987
|
-
|
988
|
-
virtual void __on_zero_shared() _NOEXCEPT;
|
989
|
-
public:
|
990
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
991
|
-
explicit __async_assoc_state(_Fp&& __f);
|
992
|
-
#endif
|
993
|
-
|
994
|
-
virtual void __execute();
|
995
|
-
};
|
996
|
-
|
997
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
998
|
-
|
999
|
-
template <class _Fp>
|
1000
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
1001
|
-
__async_assoc_state<void, _Fp>::__async_assoc_state(_Fp&& __f)
|
1002
|
-
: __func_(_VSTD::forward<_Fp>(__f))
|
1003
|
-
{
|
1004
|
-
}
|
1005
|
-
|
1006
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1007
|
-
|
1008
|
-
template <class _Fp>
|
1009
|
-
void
|
1010
|
-
__async_assoc_state<void, _Fp>::__execute()
|
1011
|
-
{
|
1012
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1013
|
-
try
|
1014
|
-
{
|
1015
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
1016
|
-
__func_();
|
1017
|
-
this->set_value();
|
1018
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1019
|
-
}
|
1020
|
-
catch (...)
|
1021
|
-
{
|
1022
|
-
this->set_exception(current_exception());
|
1023
|
-
}
|
1024
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
1025
|
-
}
|
1026
|
-
|
1027
|
-
template <class _Fp>
|
1028
|
-
void
|
1029
|
-
__async_assoc_state<void, _Fp>::__on_zero_shared() _NOEXCEPT
|
1030
|
-
{
|
1031
|
-
this->wait();
|
1032
|
-
base::__on_zero_shared();
|
1033
|
-
}
|
1034
|
-
|
1035
|
-
template <class _Rp> class _LIBCPP_TYPE_VIS_ONLY promise;
|
1036
|
-
template <class _Rp> class _LIBCPP_TYPE_VIS_ONLY shared_future;
|
1037
|
-
|
1038
|
-
// future
|
1039
|
-
|
1040
|
-
template <class _Rp> class _LIBCPP_TYPE_VIS_ONLY future;
|
1041
|
-
|
1042
|
-
template <class _Rp, class _Fp>
|
1043
|
-
future<_Rp>
|
1044
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1045
|
-
__make_deferred_assoc_state(_Fp&& __f);
|
1046
|
-
#else
|
1047
|
-
__make_deferred_assoc_state(_Fp __f);
|
1048
|
-
#endif
|
1049
|
-
|
1050
|
-
template <class _Rp, class _Fp>
|
1051
|
-
future<_Rp>
|
1052
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1053
|
-
__make_async_assoc_state(_Fp&& __f);
|
1054
|
-
#else
|
1055
|
-
__make_async_assoc_state(_Fp __f);
|
1056
|
-
#endif
|
1057
|
-
|
1058
|
-
template <class _Rp>
|
1059
|
-
class _LIBCPP_TYPE_VIS_ONLY future
|
1060
|
-
{
|
1061
|
-
__assoc_state<_Rp>* __state_;
|
1062
|
-
|
1063
|
-
explicit future(__assoc_state<_Rp>* __state);
|
1064
|
-
|
1065
|
-
template <class> friend class promise;
|
1066
|
-
template <class> friend class shared_future;
|
1067
|
-
|
1068
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1069
|
-
template <class _R1, class _Fp>
|
1070
|
-
friend future<_R1> __make_deferred_assoc_state(_Fp&& __f);
|
1071
|
-
template <class _R1, class _Fp>
|
1072
|
-
friend future<_R1> __make_async_assoc_state(_Fp&& __f);
|
1073
|
-
#else
|
1074
|
-
template <class _R1, class _Fp>
|
1075
|
-
friend future<_R1> __make_deferred_assoc_state(_Fp __f);
|
1076
|
-
template <class _R1, class _Fp>
|
1077
|
-
friend future<_R1> __make_async_assoc_state(_Fp __f);
|
1078
|
-
#endif
|
1079
|
-
|
1080
|
-
public:
|
1081
|
-
_LIBCPP_INLINE_VISIBILITY
|
1082
|
-
future() _NOEXCEPT : __state_(nullptr) {}
|
1083
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1084
|
-
_LIBCPP_INLINE_VISIBILITY
|
1085
|
-
future(future&& __rhs) _NOEXCEPT
|
1086
|
-
: __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
|
1087
|
-
future(const future&) = delete;
|
1088
|
-
future& operator=(const future&) = delete;
|
1089
|
-
_LIBCPP_INLINE_VISIBILITY
|
1090
|
-
future& operator=(future&& __rhs) _NOEXCEPT
|
1091
|
-
{
|
1092
|
-
future(std::move(__rhs)).swap(*this);
|
1093
|
-
return *this;
|
1094
|
-
}
|
1095
|
-
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1096
|
-
private:
|
1097
|
-
future(const future&);
|
1098
|
-
future& operator=(const future&);
|
1099
|
-
public:
|
1100
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1101
|
-
~future();
|
1102
|
-
shared_future<_Rp> share();
|
1103
|
-
|
1104
|
-
// retrieving the value
|
1105
|
-
_Rp get();
|
1106
|
-
|
1107
|
-
_LIBCPP_INLINE_VISIBILITY
|
1108
|
-
void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
|
1109
|
-
|
1110
|
-
// functions to check state
|
1111
|
-
_LIBCPP_INLINE_VISIBILITY
|
1112
|
-
bool valid() const _NOEXCEPT {return __state_ != nullptr;}
|
1113
|
-
|
1114
|
-
_LIBCPP_INLINE_VISIBILITY
|
1115
|
-
void wait() const {__state_->wait();}
|
1116
|
-
template <class _Rep, class _Period>
|
1117
|
-
_LIBCPP_INLINE_VISIBILITY
|
1118
|
-
future_status
|
1119
|
-
wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
|
1120
|
-
{return __state_->wait_for(__rel_time);}
|
1121
|
-
template <class _Clock, class _Duration>
|
1122
|
-
_LIBCPP_INLINE_VISIBILITY
|
1123
|
-
future_status
|
1124
|
-
wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
|
1125
|
-
{return __state_->wait_until(__abs_time);}
|
1126
|
-
};
|
1127
|
-
|
1128
|
-
template <class _Rp>
|
1129
|
-
future<_Rp>::future(__assoc_state<_Rp>* __state)
|
1130
|
-
: __state_(__state)
|
1131
|
-
{
|
1132
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1133
|
-
if (__state_->__has_future_attached())
|
1134
|
-
throw future_error(make_error_code(future_errc::future_already_retrieved));
|
1135
|
-
#endif
|
1136
|
-
__state_->__add_shared();
|
1137
|
-
__state_->__set_future_attached();
|
1138
|
-
}
|
1139
|
-
|
1140
|
-
struct __release_shared_count
|
1141
|
-
{
|
1142
|
-
void operator()(__shared_count* p) {p->__release_shared();}
|
1143
|
-
};
|
1144
|
-
|
1145
|
-
template <class _Rp>
|
1146
|
-
future<_Rp>::~future()
|
1147
|
-
{
|
1148
|
-
if (__state_)
|
1149
|
-
__state_->__release_shared();
|
1150
|
-
}
|
1151
|
-
|
1152
|
-
template <class _Rp>
|
1153
|
-
_Rp
|
1154
|
-
future<_Rp>::get()
|
1155
|
-
{
|
1156
|
-
unique_ptr<__shared_count, __release_shared_count> __(__state_);
|
1157
|
-
__assoc_state<_Rp>* __s = __state_;
|
1158
|
-
__state_ = nullptr;
|
1159
|
-
return __s->move();
|
1160
|
-
}
|
1161
|
-
|
1162
|
-
template <class _Rp>
|
1163
|
-
class _LIBCPP_TYPE_VIS_ONLY future<_Rp&>
|
1164
|
-
{
|
1165
|
-
__assoc_state<_Rp&>* __state_;
|
1166
|
-
|
1167
|
-
explicit future(__assoc_state<_Rp&>* __state);
|
1168
|
-
|
1169
|
-
template <class> friend class promise;
|
1170
|
-
template <class> friend class shared_future;
|
1171
|
-
|
1172
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1173
|
-
template <class _R1, class _Fp>
|
1174
|
-
friend future<_R1> __make_deferred_assoc_state(_Fp&& __f);
|
1175
|
-
template <class _R1, class _Fp>
|
1176
|
-
friend future<_R1> __make_async_assoc_state(_Fp&& __f);
|
1177
|
-
#else
|
1178
|
-
template <class _R1, class _Fp>
|
1179
|
-
friend future<_R1> __make_deferred_assoc_state(_Fp __f);
|
1180
|
-
template <class _R1, class _Fp>
|
1181
|
-
friend future<_R1> __make_async_assoc_state(_Fp __f);
|
1182
|
-
#endif
|
1183
|
-
|
1184
|
-
public:
|
1185
|
-
_LIBCPP_INLINE_VISIBILITY
|
1186
|
-
future() _NOEXCEPT : __state_(nullptr) {}
|
1187
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1188
|
-
_LIBCPP_INLINE_VISIBILITY
|
1189
|
-
future(future&& __rhs) _NOEXCEPT
|
1190
|
-
: __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
|
1191
|
-
future(const future&) = delete;
|
1192
|
-
future& operator=(const future&) = delete;
|
1193
|
-
_LIBCPP_INLINE_VISIBILITY
|
1194
|
-
future& operator=(future&& __rhs) _NOEXCEPT
|
1195
|
-
{
|
1196
|
-
future(std::move(__rhs)).swap(*this);
|
1197
|
-
return *this;
|
1198
|
-
}
|
1199
|
-
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1200
|
-
private:
|
1201
|
-
future(const future&);
|
1202
|
-
future& operator=(const future&);
|
1203
|
-
public:
|
1204
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1205
|
-
~future();
|
1206
|
-
shared_future<_Rp&> share();
|
1207
|
-
|
1208
|
-
// retrieving the value
|
1209
|
-
_Rp& get();
|
1210
|
-
|
1211
|
-
_LIBCPP_INLINE_VISIBILITY
|
1212
|
-
void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
|
1213
|
-
|
1214
|
-
// functions to check state
|
1215
|
-
_LIBCPP_INLINE_VISIBILITY
|
1216
|
-
bool valid() const _NOEXCEPT {return __state_ != nullptr;}
|
1217
|
-
|
1218
|
-
_LIBCPP_INLINE_VISIBILITY
|
1219
|
-
void wait() const {__state_->wait();}
|
1220
|
-
template <class _Rep, class _Period>
|
1221
|
-
_LIBCPP_INLINE_VISIBILITY
|
1222
|
-
future_status
|
1223
|
-
wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
|
1224
|
-
{return __state_->wait_for(__rel_time);}
|
1225
|
-
template <class _Clock, class _Duration>
|
1226
|
-
_LIBCPP_INLINE_VISIBILITY
|
1227
|
-
future_status
|
1228
|
-
wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
|
1229
|
-
{return __state_->wait_until(__abs_time);}
|
1230
|
-
};
|
1231
|
-
|
1232
|
-
template <class _Rp>
|
1233
|
-
future<_Rp&>::future(__assoc_state<_Rp&>* __state)
|
1234
|
-
: __state_(__state)
|
1235
|
-
{
|
1236
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1237
|
-
if (__state_->__has_future_attached())
|
1238
|
-
throw future_error(make_error_code(future_errc::future_already_retrieved));
|
1239
|
-
#endif
|
1240
|
-
__state_->__add_shared();
|
1241
|
-
__state_->__set_future_attached();
|
1242
|
-
}
|
1243
|
-
|
1244
|
-
template <class _Rp>
|
1245
|
-
future<_Rp&>::~future()
|
1246
|
-
{
|
1247
|
-
if (__state_)
|
1248
|
-
__state_->__release_shared();
|
1249
|
-
}
|
1250
|
-
|
1251
|
-
template <class _Rp>
|
1252
|
-
_Rp&
|
1253
|
-
future<_Rp&>::get()
|
1254
|
-
{
|
1255
|
-
unique_ptr<__shared_count, __release_shared_count> __(__state_);
|
1256
|
-
__assoc_state<_Rp&>* __s = __state_;
|
1257
|
-
__state_ = nullptr;
|
1258
|
-
return __s->copy();
|
1259
|
-
}
|
1260
|
-
|
1261
|
-
template <>
|
1262
|
-
class _LIBCPP_TYPE_VIS future<void>
|
1263
|
-
{
|
1264
|
-
__assoc_sub_state* __state_;
|
1265
|
-
|
1266
|
-
explicit future(__assoc_sub_state* __state);
|
1267
|
-
|
1268
|
-
template <class> friend class promise;
|
1269
|
-
template <class> friend class shared_future;
|
1270
|
-
|
1271
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1272
|
-
template <class _R1, class _Fp>
|
1273
|
-
friend future<_R1> __make_deferred_assoc_state(_Fp&& __f);
|
1274
|
-
template <class _R1, class _Fp>
|
1275
|
-
friend future<_R1> __make_async_assoc_state(_Fp&& __f);
|
1276
|
-
#else
|
1277
|
-
template <class _R1, class _Fp>
|
1278
|
-
friend future<_R1> __make_deferred_assoc_state(_Fp __f);
|
1279
|
-
template <class _R1, class _Fp>
|
1280
|
-
friend future<_R1> __make_async_assoc_state(_Fp __f);
|
1281
|
-
#endif
|
1282
|
-
|
1283
|
-
public:
|
1284
|
-
_LIBCPP_INLINE_VISIBILITY
|
1285
|
-
future() _NOEXCEPT : __state_(nullptr) {}
|
1286
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1287
|
-
_LIBCPP_INLINE_VISIBILITY
|
1288
|
-
future(future&& __rhs) _NOEXCEPT
|
1289
|
-
: __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
|
1290
|
-
future(const future&) = delete;
|
1291
|
-
future& operator=(const future&) = delete;
|
1292
|
-
_LIBCPP_INLINE_VISIBILITY
|
1293
|
-
future& operator=(future&& __rhs) _NOEXCEPT
|
1294
|
-
{
|
1295
|
-
future(std::move(__rhs)).swap(*this);
|
1296
|
-
return *this;
|
1297
|
-
}
|
1298
|
-
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1299
|
-
private:
|
1300
|
-
future(const future&);
|
1301
|
-
future& operator=(const future&);
|
1302
|
-
public:
|
1303
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1304
|
-
~future();
|
1305
|
-
shared_future<void> share();
|
1306
|
-
|
1307
|
-
// retrieving the value
|
1308
|
-
void get();
|
1309
|
-
|
1310
|
-
_LIBCPP_INLINE_VISIBILITY
|
1311
|
-
void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
|
1312
|
-
|
1313
|
-
// functions to check state
|
1314
|
-
_LIBCPP_INLINE_VISIBILITY
|
1315
|
-
bool valid() const _NOEXCEPT {return __state_ != nullptr;}
|
1316
|
-
|
1317
|
-
_LIBCPP_INLINE_VISIBILITY
|
1318
|
-
void wait() const {__state_->wait();}
|
1319
|
-
template <class _Rep, class _Period>
|
1320
|
-
_LIBCPP_INLINE_VISIBILITY
|
1321
|
-
future_status
|
1322
|
-
wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
|
1323
|
-
{return __state_->wait_for(__rel_time);}
|
1324
|
-
template <class _Clock, class _Duration>
|
1325
|
-
_LIBCPP_INLINE_VISIBILITY
|
1326
|
-
future_status
|
1327
|
-
wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
|
1328
|
-
{return __state_->wait_until(__abs_time);}
|
1329
|
-
};
|
1330
|
-
|
1331
|
-
template <class _Rp>
|
1332
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
1333
|
-
void
|
1334
|
-
swap(future<_Rp>& __x, future<_Rp>& __y) _NOEXCEPT
|
1335
|
-
{
|
1336
|
-
__x.swap(__y);
|
1337
|
-
}
|
1338
|
-
|
1339
|
-
// promise<R>
|
1340
|
-
|
1341
|
-
template <class _Callable> class packaged_task;
|
1342
|
-
|
1343
|
-
template <class _Rp>
|
1344
|
-
class _LIBCPP_TYPE_VIS_ONLY promise
|
1345
|
-
{
|
1346
|
-
__assoc_state<_Rp>* __state_;
|
1347
|
-
|
1348
|
-
_LIBCPP_INLINE_VISIBILITY
|
1349
|
-
explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
|
1350
|
-
|
1351
|
-
template <class> friend class packaged_task;
|
1352
|
-
public:
|
1353
|
-
promise();
|
1354
|
-
template <class _Alloc>
|
1355
|
-
promise(allocator_arg_t, const _Alloc& __a);
|
1356
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1357
|
-
_LIBCPP_INLINE_VISIBILITY
|
1358
|
-
promise(promise&& __rhs) _NOEXCEPT
|
1359
|
-
: __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
|
1360
|
-
promise(const promise& __rhs) = delete;
|
1361
|
-
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1362
|
-
private:
|
1363
|
-
promise(const promise& __rhs);
|
1364
|
-
public:
|
1365
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1366
|
-
~promise();
|
1367
|
-
|
1368
|
-
// assignment
|
1369
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1370
|
-
_LIBCPP_INLINE_VISIBILITY
|
1371
|
-
promise& operator=(promise&& __rhs) _NOEXCEPT
|
1372
|
-
{
|
1373
|
-
promise(std::move(__rhs)).swap(*this);
|
1374
|
-
return *this;
|
1375
|
-
}
|
1376
|
-
promise& operator=(const promise& __rhs) = delete;
|
1377
|
-
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1378
|
-
private:
|
1379
|
-
promise& operator=(const promise& __rhs);
|
1380
|
-
public:
|
1381
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1382
|
-
_LIBCPP_INLINE_VISIBILITY
|
1383
|
-
void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
|
1384
|
-
|
1385
|
-
// retrieving the result
|
1386
|
-
future<_Rp> get_future();
|
1387
|
-
|
1388
|
-
// setting the result
|
1389
|
-
void set_value(const _Rp& __r);
|
1390
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1391
|
-
void set_value(_Rp&& __r);
|
1392
|
-
#endif
|
1393
|
-
void set_exception(exception_ptr __p);
|
1394
|
-
|
1395
|
-
// setting the result with deferred notification
|
1396
|
-
void set_value_at_thread_exit(const _Rp& __r);
|
1397
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1398
|
-
void set_value_at_thread_exit(_Rp&& __r);
|
1399
|
-
#endif
|
1400
|
-
void set_exception_at_thread_exit(exception_ptr __p);
|
1401
|
-
};
|
1402
|
-
|
1403
|
-
template <class _Rp>
|
1404
|
-
promise<_Rp>::promise()
|
1405
|
-
: __state_(new __assoc_state<_Rp>)
|
1406
|
-
{
|
1407
|
-
}
|
1408
|
-
|
1409
|
-
template <class _Rp>
|
1410
|
-
template <class _Alloc>
|
1411
|
-
promise<_Rp>::promise(allocator_arg_t, const _Alloc& __a0)
|
1412
|
-
{
|
1413
|
-
typedef typename _Alloc::template rebind<__assoc_state_alloc<_Rp, _Alloc> >::other _A2;
|
1414
|
-
typedef __allocator_destructor<_A2> _D2;
|
1415
|
-
_A2 __a(__a0);
|
1416
|
-
unique_ptr<__assoc_state_alloc<_Rp, _Alloc>, _D2> __hold(__a.allocate(1), _D2(__a, 1));
|
1417
|
-
::new(__hold.get()) __assoc_state_alloc<_Rp, _Alloc>(__a0);
|
1418
|
-
__state_ = __hold.release();
|
1419
|
-
}
|
1420
|
-
|
1421
|
-
template <class _Rp>
|
1422
|
-
promise<_Rp>::~promise()
|
1423
|
-
{
|
1424
|
-
if (__state_)
|
1425
|
-
{
|
1426
|
-
if (!__state_->__has_value() && __state_->use_count() > 1)
|
1427
|
-
__state_->set_exception(make_exception_ptr(
|
1428
|
-
future_error(make_error_code(future_errc::broken_promise))
|
1429
|
-
));
|
1430
|
-
__state_->__release_shared();
|
1431
|
-
}
|
1432
|
-
}
|
1433
|
-
|
1434
|
-
template <class _Rp>
|
1435
|
-
future<_Rp>
|
1436
|
-
promise<_Rp>::get_future()
|
1437
|
-
{
|
1438
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1439
|
-
if (__state_ == nullptr)
|
1440
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1441
|
-
#endif
|
1442
|
-
return future<_Rp>(__state_);
|
1443
|
-
}
|
1444
|
-
|
1445
|
-
template <class _Rp>
|
1446
|
-
void
|
1447
|
-
promise<_Rp>::set_value(const _Rp& __r)
|
1448
|
-
{
|
1449
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1450
|
-
if (__state_ == nullptr)
|
1451
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1452
|
-
#endif
|
1453
|
-
__state_->set_value(__r);
|
1454
|
-
}
|
1455
|
-
|
1456
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1457
|
-
|
1458
|
-
template <class _Rp>
|
1459
|
-
void
|
1460
|
-
promise<_Rp>::set_value(_Rp&& __r)
|
1461
|
-
{
|
1462
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1463
|
-
if (__state_ == nullptr)
|
1464
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1465
|
-
#endif
|
1466
|
-
__state_->set_value(_VSTD::move(__r));
|
1467
|
-
}
|
1468
|
-
|
1469
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1470
|
-
|
1471
|
-
template <class _Rp>
|
1472
|
-
void
|
1473
|
-
promise<_Rp>::set_exception(exception_ptr __p)
|
1474
|
-
{
|
1475
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1476
|
-
if (__state_ == nullptr)
|
1477
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1478
|
-
#endif
|
1479
|
-
__state_->set_exception(__p);
|
1480
|
-
}
|
1481
|
-
|
1482
|
-
template <class _Rp>
|
1483
|
-
void
|
1484
|
-
promise<_Rp>::set_value_at_thread_exit(const _Rp& __r)
|
1485
|
-
{
|
1486
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1487
|
-
if (__state_ == nullptr)
|
1488
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1489
|
-
#endif
|
1490
|
-
__state_->set_value_at_thread_exit(__r);
|
1491
|
-
}
|
1492
|
-
|
1493
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1494
|
-
|
1495
|
-
template <class _Rp>
|
1496
|
-
void
|
1497
|
-
promise<_Rp>::set_value_at_thread_exit(_Rp&& __r)
|
1498
|
-
{
|
1499
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1500
|
-
if (__state_ == nullptr)
|
1501
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1502
|
-
#endif
|
1503
|
-
__state_->set_value_at_thread_exit(_VSTD::move(__r));
|
1504
|
-
}
|
1505
|
-
|
1506
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1507
|
-
|
1508
|
-
template <class _Rp>
|
1509
|
-
void
|
1510
|
-
promise<_Rp>::set_exception_at_thread_exit(exception_ptr __p)
|
1511
|
-
{
|
1512
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1513
|
-
if (__state_ == nullptr)
|
1514
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1515
|
-
#endif
|
1516
|
-
__state_->set_exception_at_thread_exit(__p);
|
1517
|
-
}
|
1518
|
-
|
1519
|
-
// promise<R&>
|
1520
|
-
|
1521
|
-
template <class _Rp>
|
1522
|
-
class _LIBCPP_TYPE_VIS_ONLY promise<_Rp&>
|
1523
|
-
{
|
1524
|
-
__assoc_state<_Rp&>* __state_;
|
1525
|
-
|
1526
|
-
_LIBCPP_INLINE_VISIBILITY
|
1527
|
-
explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
|
1528
|
-
|
1529
|
-
template <class> friend class packaged_task;
|
1530
|
-
|
1531
|
-
public:
|
1532
|
-
promise();
|
1533
|
-
template <class _Allocator>
|
1534
|
-
promise(allocator_arg_t, const _Allocator& __a);
|
1535
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1536
|
-
_LIBCPP_INLINE_VISIBILITY
|
1537
|
-
promise(promise&& __rhs) _NOEXCEPT
|
1538
|
-
: __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
|
1539
|
-
promise(const promise& __rhs) = delete;
|
1540
|
-
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1541
|
-
private:
|
1542
|
-
promise(const promise& __rhs);
|
1543
|
-
public:
|
1544
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1545
|
-
~promise();
|
1546
|
-
|
1547
|
-
// assignment
|
1548
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1549
|
-
_LIBCPP_INLINE_VISIBILITY
|
1550
|
-
promise& operator=(promise&& __rhs) _NOEXCEPT
|
1551
|
-
{
|
1552
|
-
promise(std::move(__rhs)).swap(*this);
|
1553
|
-
return *this;
|
1554
|
-
}
|
1555
|
-
promise& operator=(const promise& __rhs) = delete;
|
1556
|
-
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1557
|
-
private:
|
1558
|
-
promise& operator=(const promise& __rhs);
|
1559
|
-
public:
|
1560
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1561
|
-
_LIBCPP_INLINE_VISIBILITY
|
1562
|
-
void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
|
1563
|
-
|
1564
|
-
// retrieving the result
|
1565
|
-
future<_Rp&> get_future();
|
1566
|
-
|
1567
|
-
// setting the result
|
1568
|
-
void set_value(_Rp& __r);
|
1569
|
-
void set_exception(exception_ptr __p);
|
1570
|
-
|
1571
|
-
// setting the result with deferred notification
|
1572
|
-
void set_value_at_thread_exit(_Rp&);
|
1573
|
-
void set_exception_at_thread_exit(exception_ptr __p);
|
1574
|
-
};
|
1575
|
-
|
1576
|
-
template <class _Rp>
|
1577
|
-
promise<_Rp&>::promise()
|
1578
|
-
: __state_(new __assoc_state<_Rp&>)
|
1579
|
-
{
|
1580
|
-
}
|
1581
|
-
|
1582
|
-
template <class _Rp>
|
1583
|
-
template <class _Alloc>
|
1584
|
-
promise<_Rp&>::promise(allocator_arg_t, const _Alloc& __a0)
|
1585
|
-
{
|
1586
|
-
typedef typename _Alloc::template rebind<__assoc_state_alloc<_Rp&, _Alloc> >::other _A2;
|
1587
|
-
typedef __allocator_destructor<_A2> _D2;
|
1588
|
-
_A2 __a(__a0);
|
1589
|
-
unique_ptr<__assoc_state_alloc<_Rp&, _Alloc>, _D2> __hold(__a.allocate(1), _D2(__a, 1));
|
1590
|
-
::new(__hold.get()) __assoc_state_alloc<_Rp&, _Alloc>(__a0);
|
1591
|
-
__state_ = __hold.release();
|
1592
|
-
}
|
1593
|
-
|
1594
|
-
template <class _Rp>
|
1595
|
-
promise<_Rp&>::~promise()
|
1596
|
-
{
|
1597
|
-
if (__state_)
|
1598
|
-
{
|
1599
|
-
if (!__state_->__has_value() && __state_->use_count() > 1)
|
1600
|
-
__state_->set_exception(make_exception_ptr(
|
1601
|
-
future_error(make_error_code(future_errc::broken_promise))
|
1602
|
-
));
|
1603
|
-
__state_->__release_shared();
|
1604
|
-
}
|
1605
|
-
}
|
1606
|
-
|
1607
|
-
template <class _Rp>
|
1608
|
-
future<_Rp&>
|
1609
|
-
promise<_Rp&>::get_future()
|
1610
|
-
{
|
1611
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1612
|
-
if (__state_ == nullptr)
|
1613
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1614
|
-
#endif
|
1615
|
-
return future<_Rp&>(__state_);
|
1616
|
-
}
|
1617
|
-
|
1618
|
-
template <class _Rp>
|
1619
|
-
void
|
1620
|
-
promise<_Rp&>::set_value(_Rp& __r)
|
1621
|
-
{
|
1622
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1623
|
-
if (__state_ == nullptr)
|
1624
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1625
|
-
#endif
|
1626
|
-
__state_->set_value(__r);
|
1627
|
-
}
|
1628
|
-
|
1629
|
-
template <class _Rp>
|
1630
|
-
void
|
1631
|
-
promise<_Rp&>::set_exception(exception_ptr __p)
|
1632
|
-
{
|
1633
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1634
|
-
if (__state_ == nullptr)
|
1635
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1636
|
-
#endif
|
1637
|
-
__state_->set_exception(__p);
|
1638
|
-
}
|
1639
|
-
|
1640
|
-
template <class _Rp>
|
1641
|
-
void
|
1642
|
-
promise<_Rp&>::set_value_at_thread_exit(_Rp& __r)
|
1643
|
-
{
|
1644
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1645
|
-
if (__state_ == nullptr)
|
1646
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1647
|
-
#endif
|
1648
|
-
__state_->set_value_at_thread_exit(__r);
|
1649
|
-
}
|
1650
|
-
|
1651
|
-
template <class _Rp>
|
1652
|
-
void
|
1653
|
-
promise<_Rp&>::set_exception_at_thread_exit(exception_ptr __p)
|
1654
|
-
{
|
1655
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
1656
|
-
if (__state_ == nullptr)
|
1657
|
-
throw future_error(make_error_code(future_errc::no_state));
|
1658
|
-
#endif
|
1659
|
-
__state_->set_exception_at_thread_exit(__p);
|
1660
|
-
}
|
1661
|
-
|
1662
|
-
// promise<void>
|
1663
|
-
|
1664
|
-
template <>
|
1665
|
-
class _LIBCPP_TYPE_VIS promise<void>
|
1666
|
-
{
|
1667
|
-
__assoc_sub_state* __state_;
|
1668
|
-
|
1669
|
-
_LIBCPP_INLINE_VISIBILITY
|
1670
|
-
explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
|
1671
|
-
|
1672
|
-
template <class> friend class packaged_task;
|
1673
|
-
|
1674
|
-
public:
|
1675
|
-
promise();
|
1676
|
-
template <class _Allocator>
|
1677
|
-
promise(allocator_arg_t, const _Allocator& __a);
|
1678
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1679
|
-
_LIBCPP_INLINE_VISIBILITY
|
1680
|
-
promise(promise&& __rhs) _NOEXCEPT
|
1681
|
-
: __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
|
1682
|
-
promise(const promise& __rhs) = delete;
|
1683
|
-
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1684
|
-
private:
|
1685
|
-
promise(const promise& __rhs);
|
1686
|
-
public:
|
1687
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1688
|
-
~promise();
|
1689
|
-
|
1690
|
-
// assignment
|
1691
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1692
|
-
_LIBCPP_INLINE_VISIBILITY
|
1693
|
-
promise& operator=(promise&& __rhs) _NOEXCEPT
|
1694
|
-
{
|
1695
|
-
promise(std::move(__rhs)).swap(*this);
|
1696
|
-
return *this;
|
1697
|
-
}
|
1698
|
-
promise& operator=(const promise& __rhs) = delete;
|
1699
|
-
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1700
|
-
private:
|
1701
|
-
promise& operator=(const promise& __rhs);
|
1702
|
-
public:
|
1703
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
1704
|
-
_LIBCPP_INLINE_VISIBILITY
|
1705
|
-
void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
|
1706
|
-
|
1707
|
-
// retrieving the result
|
1708
|
-
future<void> get_future();
|
1709
|
-
|
1710
|
-
// setting the result
|
1711
|
-
void set_value();
|
1712
|
-
void set_exception(exception_ptr __p);
|
1713
|
-
|
1714
|
-
// setting the result with deferred notification
|
1715
|
-
void set_value_at_thread_exit();
|
1716
|
-
void set_exception_at_thread_exit(exception_ptr __p);
|
1717
|
-
};
|
1718
|
-
|
1719
|
-
template <class _Alloc>
|
1720
|
-
promise<void>::promise(allocator_arg_t, const _Alloc& __a0)
|
1721
|
-
{
|
1722
|
-
typedef typename _Alloc::template rebind<__assoc_sub_state_alloc<_Alloc> >::other _A2;
|
1723
|
-
typedef __allocator_destructor<_A2> _D2;
|
1724
|
-
_A2 __a(__a0);
|
1725
|
-
unique_ptr<__assoc_sub_state_alloc<_Alloc>, _D2> __hold(__a.allocate(1), _D2(__a, 1));
|
1726
|
-
::new(__hold.get()) __assoc_sub_state_alloc<_Alloc>(__a0);
|
1727
|
-
__state_ = __hold.release();
|
1728
|
-
}
|
1729
|
-
|
1730
|
-
template <class _Rp>
|
1731
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
1732
|
-
void
|
1733
|
-
swap(promise<_Rp>& __x, promise<_Rp>& __y) _NOEXCEPT
|
1734
|
-
{
|
1735
|
-
__x.swap(__y);
|
1736
|
-
}
|
1737
|
-
|
1738
|
-
template <class _Rp, class _Alloc>
|
1739
|
-
struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<promise<_Rp>, _Alloc>
|
1740
|
-
: public true_type {};
|
1741
|
-
|
1742
|
-
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
1743
|
-
|
1744
|
-
// packaged_task
|
1745
|
-
|
1746
|
-
template<class _Fp> class __packaged_task_base;
|
1747
|
-
|
1748
|
-
template<class _Rp, class ..._ArgTypes>
|
1749
|
-
class __packaged_task_base<_Rp(_ArgTypes...)>
|
1750
|
-
{
|
1751
|
-
__packaged_task_base(const __packaged_task_base&);
|
1752
|
-
__packaged_task_base& operator=(const __packaged_task_base&);
|
1753
|
-
public:
|
1754
|
-
_LIBCPP_INLINE_VISIBILITY
|
1755
|
-
__packaged_task_base() {}
|
1756
|
-
_LIBCPP_INLINE_VISIBILITY
|
1757
|
-
virtual ~__packaged_task_base() {}
|
1758
|
-
virtual void __move_to(__packaged_task_base*) _NOEXCEPT = 0;
|
1759
|
-
virtual void destroy() = 0;
|
1760
|
-
virtual void destroy_deallocate() = 0;
|
1761
|
-
virtual _Rp operator()(_ArgTypes&& ...) = 0;
|
1762
|
-
};
|
1763
|
-
|
1764
|
-
template<class _FD, class _Alloc, class _FB> class __packaged_task_func;
|
1765
|
-
|
1766
|
-
template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
|
1767
|
-
class __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>
|
1768
|
-
: public __packaged_task_base<_Rp(_ArgTypes...)>
|
1769
|
-
{
|
1770
|
-
__compressed_pair<_Fp, _Alloc> __f_;
|
1771
|
-
public:
|
1772
|
-
_LIBCPP_INLINE_VISIBILITY
|
1773
|
-
explicit __packaged_task_func(const _Fp& __f) : __f_(__f) {}
|
1774
|
-
_LIBCPP_INLINE_VISIBILITY
|
1775
|
-
explicit __packaged_task_func(_Fp&& __f) : __f_(_VSTD::move(__f)) {}
|
1776
|
-
_LIBCPP_INLINE_VISIBILITY
|
1777
|
-
__packaged_task_func(const _Fp& __f, const _Alloc& __a)
|
1778
|
-
: __f_(__f, __a) {}
|
1779
|
-
_LIBCPP_INLINE_VISIBILITY
|
1780
|
-
__packaged_task_func(_Fp&& __f, const _Alloc& __a)
|
1781
|
-
: __f_(_VSTD::move(__f), __a) {}
|
1782
|
-
virtual void __move_to(__packaged_task_base<_Rp(_ArgTypes...)>*) _NOEXCEPT;
|
1783
|
-
virtual void destroy();
|
1784
|
-
virtual void destroy_deallocate();
|
1785
|
-
virtual _Rp operator()(_ArgTypes&& ... __args);
|
1786
|
-
};
|
1787
|
-
|
1788
|
-
template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
|
1789
|
-
void
|
1790
|
-
__packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__move_to(
|
1791
|
-
__packaged_task_base<_Rp(_ArgTypes...)>* __p) _NOEXCEPT
|
1792
|
-
{
|
1793
|
-
::new (__p) __packaged_task_func(_VSTD::move(__f_.first()), _VSTD::move(__f_.second()));
|
1794
|
-
}
|
1795
|
-
|
1796
|
-
template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
|
1797
|
-
void
|
1798
|
-
__packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy()
|
1799
|
-
{
|
1800
|
-
__f_.~__compressed_pair<_Fp, _Alloc>();
|
1801
|
-
}
|
1802
|
-
|
1803
|
-
template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
|
1804
|
-
void
|
1805
|
-
__packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy_deallocate()
|
1806
|
-
{
|
1807
|
-
typedef typename _Alloc::template rebind<__packaged_task_func>::other _Ap;
|
1808
|
-
_Ap __a(__f_.second());
|
1809
|
-
__f_.~__compressed_pair<_Fp, _Alloc>();
|
1810
|
-
__a.deallocate(this, 1);
|
1811
|
-
}
|
1812
|
-
|
1813
|
-
template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
|
1814
|
-
_Rp
|
1815
|
-
__packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg)
|
1816
|
-
{
|
1817
|
-
return __invoke(__f_.first(), _VSTD::forward<_ArgTypes>(__arg)...);
|
1818
|
-
}
|
1819
|
-
|
1820
|
-
template <class _Callable> class __packaged_task_function;
|
1821
|
-
|
1822
|
-
template<class _Rp, class ..._ArgTypes>
|
1823
|
-
class __packaged_task_function<_Rp(_ArgTypes...)>
|
1824
|
-
{
|
1825
|
-
typedef __packaged_task_base<_Rp(_ArgTypes...)> __base;
|
1826
|
-
typename aligned_storage<3*sizeof(void*)>::type __buf_;
|
1827
|
-
__base* __f_;
|
1828
|
-
|
1829
|
-
public:
|
1830
|
-
typedef _Rp result_type;
|
1831
|
-
|
1832
|
-
// construct/copy/destroy:
|
1833
|
-
_LIBCPP_INLINE_VISIBILITY
|
1834
|
-
__packaged_task_function() _NOEXCEPT : __f_(nullptr) {}
|
1835
|
-
template<class _Fp>
|
1836
|
-
__packaged_task_function(_Fp&& __f);
|
1837
|
-
template<class _Fp, class _Alloc>
|
1838
|
-
__packaged_task_function(allocator_arg_t, const _Alloc& __a, _Fp&& __f);
|
1839
|
-
|
1840
|
-
__packaged_task_function(__packaged_task_function&&) _NOEXCEPT;
|
1841
|
-
__packaged_task_function& operator=(__packaged_task_function&&) _NOEXCEPT;
|
1842
|
-
|
1843
|
-
__packaged_task_function(const __packaged_task_function&) = delete;
|
1844
|
-
__packaged_task_function& operator=(const __packaged_task_function&) = delete;
|
1845
|
-
|
1846
|
-
~__packaged_task_function();
|
1847
|
-
|
1848
|
-
void swap(__packaged_task_function&) _NOEXCEPT;
|
1849
|
-
|
1850
|
-
_Rp operator()(_ArgTypes...) const;
|
1851
|
-
};
|
1852
|
-
|
1853
|
-
template<class _Rp, class ..._ArgTypes>
|
1854
|
-
__packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(__packaged_task_function&& __f) _NOEXCEPT
|
1855
|
-
{
|
1856
|
-
if (__f.__f_ == nullptr)
|
1857
|
-
__f_ = nullptr;
|
1858
|
-
else if (__f.__f_ == (__base*)&__f.__buf_)
|
1859
|
-
{
|
1860
|
-
__f_ = (__base*)&__buf_;
|
1861
|
-
__f.__f_->__move_to(__f_);
|
1862
|
-
}
|
1863
|
-
else
|
1864
|
-
{
|
1865
|
-
__f_ = __f.__f_;
|
1866
|
-
__f.__f_ = nullptr;
|
1867
|
-
}
|
1868
|
-
}
|
1869
|
-
|
1870
|
-
template<class _Rp, class ..._ArgTypes>
|
1871
|
-
template <class _Fp>
|
1872
|
-
__packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(_Fp&& __f)
|
1873
|
-
: __f_(nullptr)
|
1874
|
-
{
|
1875
|
-
typedef typename remove_reference<_Fp>::type _FR;
|
1876
|
-
typedef __packaged_task_func<_FR, allocator<_FR>, _Rp(_ArgTypes...)> _FF;
|
1877
|
-
if (sizeof(_FF) <= sizeof(__buf_))
|
1878
|
-
{
|
1879
|
-
__f_ = (__base*)&__buf_;
|
1880
|
-
::new (__f_) _FF(_VSTD::forward<_Fp>(__f));
|
1881
|
-
}
|
1882
|
-
else
|
1883
|
-
{
|
1884
|
-
typedef allocator<_FF> _Ap;
|
1885
|
-
_Ap __a;
|
1886
|
-
typedef __allocator_destructor<_Ap> _Dp;
|
1887
|
-
unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
|
1888
|
-
::new (__hold.get()) _FF(_VSTD::forward<_Fp>(__f), allocator<_FR>(__a));
|
1889
|
-
__f_ = __hold.release();
|
1890
|
-
}
|
1891
|
-
}
|
1892
|
-
|
1893
|
-
template<class _Rp, class ..._ArgTypes>
|
1894
|
-
template <class _Fp, class _Alloc>
|
1895
|
-
__packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(
|
1896
|
-
allocator_arg_t, const _Alloc& __a0, _Fp&& __f)
|
1897
|
-
: __f_(nullptr)
|
1898
|
-
{
|
1899
|
-
typedef allocator_traits<_Alloc> __alloc_traits;
|
1900
|
-
typedef typename remove_reference<_Fp>::type _FR;
|
1901
|
-
typedef __packaged_task_func<_FR, _Alloc, _Rp(_ArgTypes...)> _FF;
|
1902
|
-
if (sizeof(_FF) <= sizeof(__buf_))
|
1903
|
-
{
|
1904
|
-
__f_ = (__base*)&__buf_;
|
1905
|
-
::new (__f_) _FF(_VSTD::forward<_Fp>(__f));
|
1906
|
-
}
|
1907
|
-
else
|
1908
|
-
{
|
1909
|
-
typedef typename __alloc_traits::template
|
1910
|
-
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
1911
|
-
rebind_alloc<_FF>
|
1912
|
-
#else
|
1913
|
-
rebind_alloc<_FF>::other
|
1914
|
-
#endif
|
1915
|
-
_Ap;
|
1916
|
-
_Ap __a(__a0);
|
1917
|
-
typedef __allocator_destructor<_Ap> _Dp;
|
1918
|
-
unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
|
1919
|
-
::new (__hold.get()) _FF(_VSTD::forward<_Fp>(__f), _Alloc(__a));
|
1920
|
-
__f_ = __hold.release();
|
1921
|
-
}
|
1922
|
-
}
|
1923
|
-
|
1924
|
-
template<class _Rp, class ..._ArgTypes>
|
1925
|
-
__packaged_task_function<_Rp(_ArgTypes...)>&
|
1926
|
-
__packaged_task_function<_Rp(_ArgTypes...)>::operator=(__packaged_task_function&& __f) _NOEXCEPT
|
1927
|
-
{
|
1928
|
-
if (__f_ == (__base*)&__buf_)
|
1929
|
-
__f_->destroy();
|
1930
|
-
else if (__f_)
|
1931
|
-
__f_->destroy_deallocate();
|
1932
|
-
__f_ = nullptr;
|
1933
|
-
if (__f.__f_ == nullptr)
|
1934
|
-
__f_ = nullptr;
|
1935
|
-
else if (__f.__f_ == (__base*)&__f.__buf_)
|
1936
|
-
{
|
1937
|
-
__f_ = (__base*)&__buf_;
|
1938
|
-
__f.__f_->__move_to(__f_);
|
1939
|
-
}
|
1940
|
-
else
|
1941
|
-
{
|
1942
|
-
__f_ = __f.__f_;
|
1943
|
-
__f.__f_ = nullptr;
|
1944
|
-
}
|
1945
|
-
return *this;
|
1946
|
-
}
|
1947
|
-
|
1948
|
-
template<class _Rp, class ..._ArgTypes>
|
1949
|
-
__packaged_task_function<_Rp(_ArgTypes...)>::~__packaged_task_function()
|
1950
|
-
{
|
1951
|
-
if (__f_ == (__base*)&__buf_)
|
1952
|
-
__f_->destroy();
|
1953
|
-
else if (__f_)
|
1954
|
-
__f_->destroy_deallocate();
|
1955
|
-
}
|
1956
|
-
|
1957
|
-
template<class _Rp, class ..._ArgTypes>
|
1958
|
-
void
|
1959
|
-
__packaged_task_function<_Rp(_ArgTypes...)>::swap(__packaged_task_function& __f) _NOEXCEPT
|
1960
|
-
{
|
1961
|
-
if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
|
1962
|
-
{
|
1963
|
-
typename aligned_storage<sizeof(__buf_)>::type __tempbuf;
|
1964
|
-
__base* __t = (__base*)&__tempbuf;
|
1965
|
-
__f_->__move_to(__t);
|
1966
|
-
__f_->destroy();
|
1967
|
-
__f_ = nullptr;
|
1968
|
-
__f.__f_->__move_to((__base*)&__buf_);
|
1969
|
-
__f.__f_->destroy();
|
1970
|
-
__f.__f_ = nullptr;
|
1971
|
-
__f_ = (__base*)&__buf_;
|
1972
|
-
__t->__move_to((__base*)&__f.__buf_);
|
1973
|
-
__t->destroy();
|
1974
|
-
__f.__f_ = (__base*)&__f.__buf_;
|
1975
|
-
}
|
1976
|
-
else if (__f_ == (__base*)&__buf_)
|
1977
|
-
{
|
1978
|
-
__f_->__move_to((__base*)&__f.__buf_);
|
1979
|
-
__f_->destroy();
|
1980
|
-
__f_ = __f.__f_;
|
1981
|
-
__f.__f_ = (__base*)&__f.__buf_;
|
1982
|
-
}
|
1983
|
-
else if (__f.__f_ == (__base*)&__f.__buf_)
|
1984
|
-
{
|
1985
|
-
__f.__f_->__move_to((__base*)&__buf_);
|
1986
|
-
__f.__f_->destroy();
|
1987
|
-
__f.__f_ = __f_;
|
1988
|
-
__f_ = (__base*)&__buf_;
|
1989
|
-
}
|
1990
|
-
else
|
1991
|
-
_VSTD::swap(__f_, __f.__f_);
|
1992
|
-
}
|
1993
|
-
|
1994
|
-
template<class _Rp, class ..._ArgTypes>
|
1995
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
1996
|
-
_Rp
|
1997
|
-
__packaged_task_function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) const
|
1998
|
-
{
|
1999
|
-
return (*__f_)(_VSTD::forward<_ArgTypes>(__arg)...);
|
2000
|
-
}
|
2001
|
-
|
2002
|
-
template<class _Rp, class ..._ArgTypes>
|
2003
|
-
class _LIBCPP_TYPE_VIS_ONLY packaged_task<_Rp(_ArgTypes...)>
|
2004
|
-
{
|
2005
|
-
public:
|
2006
|
-
typedef _Rp result_type;
|
2007
|
-
|
2008
|
-
private:
|
2009
|
-
__packaged_task_function<result_type(_ArgTypes...)> __f_;
|
2010
|
-
promise<result_type> __p_;
|
2011
|
-
|
2012
|
-
public:
|
2013
|
-
// construction and destruction
|
2014
|
-
_LIBCPP_INLINE_VISIBILITY
|
2015
|
-
packaged_task() _NOEXCEPT : __p_(nullptr) {}
|
2016
|
-
template <class _Fp,
|
2017
|
-
class = typename enable_if
|
2018
|
-
<
|
2019
|
-
!is_same<
|
2020
|
-
typename decay<_Fp>::type,
|
2021
|
-
packaged_task
|
2022
|
-
>::value
|
2023
|
-
>::type
|
2024
|
-
>
|
2025
|
-
_LIBCPP_INLINE_VISIBILITY
|
2026
|
-
explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {}
|
2027
|
-
template <class _Fp, class _Allocator,
|
2028
|
-
class = typename enable_if
|
2029
|
-
<
|
2030
|
-
!is_same<
|
2031
|
-
typename decay<_Fp>::type,
|
2032
|
-
packaged_task
|
2033
|
-
>::value
|
2034
|
-
>::type
|
2035
|
-
>
|
2036
|
-
_LIBCPP_INLINE_VISIBILITY
|
2037
|
-
explicit packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
|
2038
|
-
: __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)),
|
2039
|
-
__p_(allocator_arg, __a) {}
|
2040
|
-
// ~packaged_task() = default;
|
2041
|
-
|
2042
|
-
// no copy
|
2043
|
-
packaged_task(const packaged_task&) = delete;
|
2044
|
-
packaged_task& operator=(const packaged_task&) = delete;
|
2045
|
-
|
2046
|
-
// move support
|
2047
|
-
_LIBCPP_INLINE_VISIBILITY
|
2048
|
-
packaged_task(packaged_task&& __other) _NOEXCEPT
|
2049
|
-
: __f_(_VSTD::move(__other.__f_)), __p_(_VSTD::move(__other.__p_)) {}
|
2050
|
-
_LIBCPP_INLINE_VISIBILITY
|
2051
|
-
packaged_task& operator=(packaged_task&& __other) _NOEXCEPT
|
2052
|
-
{
|
2053
|
-
__f_ = _VSTD::move(__other.__f_);
|
2054
|
-
__p_ = _VSTD::move(__other.__p_);
|
2055
|
-
return *this;
|
2056
|
-
}
|
2057
|
-
_LIBCPP_INLINE_VISIBILITY
|
2058
|
-
void swap(packaged_task& __other) _NOEXCEPT
|
2059
|
-
{
|
2060
|
-
__f_.swap(__other.__f_);
|
2061
|
-
__p_.swap(__other.__p_);
|
2062
|
-
}
|
2063
|
-
|
2064
|
-
_LIBCPP_INLINE_VISIBILITY
|
2065
|
-
bool valid() const _NOEXCEPT {return __p_.__state_ != nullptr;}
|
2066
|
-
|
2067
|
-
// result retrieval
|
2068
|
-
_LIBCPP_INLINE_VISIBILITY
|
2069
|
-
future<result_type> get_future() {return __p_.get_future();}
|
2070
|
-
|
2071
|
-
// execution
|
2072
|
-
void operator()(_ArgTypes... __args);
|
2073
|
-
void make_ready_at_thread_exit(_ArgTypes... __args);
|
2074
|
-
|
2075
|
-
void reset();
|
2076
|
-
};
|
2077
|
-
|
2078
|
-
template<class _Rp, class ..._ArgTypes>
|
2079
|
-
void
|
2080
|
-
packaged_task<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __args)
|
2081
|
-
{
|
2082
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2083
|
-
if (__p_.__state_ == nullptr)
|
2084
|
-
throw future_error(make_error_code(future_errc::no_state));
|
2085
|
-
if (__p_.__state_->__has_value())
|
2086
|
-
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
2087
|
-
try
|
2088
|
-
{
|
2089
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2090
|
-
__p_.set_value(__f_(_VSTD::forward<_ArgTypes>(__args)...));
|
2091
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2092
|
-
}
|
2093
|
-
catch (...)
|
2094
|
-
{
|
2095
|
-
__p_.set_exception(current_exception());
|
2096
|
-
}
|
2097
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2098
|
-
}
|
2099
|
-
|
2100
|
-
template<class _Rp, class ..._ArgTypes>
|
2101
|
-
void
|
2102
|
-
packaged_task<_Rp(_ArgTypes...)>::make_ready_at_thread_exit(_ArgTypes... __args)
|
2103
|
-
{
|
2104
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2105
|
-
if (__p_.__state_ == nullptr)
|
2106
|
-
throw future_error(make_error_code(future_errc::no_state));
|
2107
|
-
if (__p_.__state_->__has_value())
|
2108
|
-
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
2109
|
-
try
|
2110
|
-
{
|
2111
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2112
|
-
__p_.set_value_at_thread_exit(__f_(_VSTD::forward<_ArgTypes>(__args)...));
|
2113
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2114
|
-
}
|
2115
|
-
catch (...)
|
2116
|
-
{
|
2117
|
-
__p_.set_exception_at_thread_exit(current_exception());
|
2118
|
-
}
|
2119
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2120
|
-
}
|
2121
|
-
|
2122
|
-
template<class _Rp, class ..._ArgTypes>
|
2123
|
-
void
|
2124
|
-
packaged_task<_Rp(_ArgTypes...)>::reset()
|
2125
|
-
{
|
2126
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2127
|
-
if (!valid())
|
2128
|
-
throw future_error(make_error_code(future_errc::no_state));
|
2129
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2130
|
-
__p_ = promise<result_type>();
|
2131
|
-
}
|
2132
|
-
|
2133
|
-
template<class ..._ArgTypes>
|
2134
|
-
class _LIBCPP_TYPE_VIS_ONLY packaged_task<void(_ArgTypes...)>
|
2135
|
-
{
|
2136
|
-
public:
|
2137
|
-
typedef void result_type;
|
2138
|
-
|
2139
|
-
private:
|
2140
|
-
__packaged_task_function<result_type(_ArgTypes...)> __f_;
|
2141
|
-
promise<result_type> __p_;
|
2142
|
-
|
2143
|
-
public:
|
2144
|
-
// construction and destruction
|
2145
|
-
_LIBCPP_INLINE_VISIBILITY
|
2146
|
-
packaged_task() _NOEXCEPT : __p_(nullptr) {}
|
2147
|
-
template <class _Fp,
|
2148
|
-
class = typename enable_if
|
2149
|
-
<
|
2150
|
-
!is_same<
|
2151
|
-
typename decay<_Fp>::type,
|
2152
|
-
packaged_task
|
2153
|
-
>::value
|
2154
|
-
>::type
|
2155
|
-
>
|
2156
|
-
_LIBCPP_INLINE_VISIBILITY
|
2157
|
-
explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {}
|
2158
|
-
template <class _Fp, class _Allocator,
|
2159
|
-
class = typename enable_if
|
2160
|
-
<
|
2161
|
-
!is_same<
|
2162
|
-
typename decay<_Fp>::type,
|
2163
|
-
packaged_task
|
2164
|
-
>::value
|
2165
|
-
>::type
|
2166
|
-
>
|
2167
|
-
_LIBCPP_INLINE_VISIBILITY
|
2168
|
-
explicit packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
|
2169
|
-
: __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)),
|
2170
|
-
__p_(allocator_arg, __a) {}
|
2171
|
-
// ~packaged_task() = default;
|
2172
|
-
|
2173
|
-
// no copy
|
2174
|
-
packaged_task(const packaged_task&) = delete;
|
2175
|
-
packaged_task& operator=(const packaged_task&) = delete;
|
2176
|
-
|
2177
|
-
// move support
|
2178
|
-
_LIBCPP_INLINE_VISIBILITY
|
2179
|
-
packaged_task(packaged_task&& __other) _NOEXCEPT
|
2180
|
-
: __f_(_VSTD::move(__other.__f_)), __p_(_VSTD::move(__other.__p_)) {}
|
2181
|
-
_LIBCPP_INLINE_VISIBILITY
|
2182
|
-
packaged_task& operator=(packaged_task&& __other) _NOEXCEPT
|
2183
|
-
{
|
2184
|
-
__f_ = _VSTD::move(__other.__f_);
|
2185
|
-
__p_ = _VSTD::move(__other.__p_);
|
2186
|
-
return *this;
|
2187
|
-
}
|
2188
|
-
_LIBCPP_INLINE_VISIBILITY
|
2189
|
-
void swap(packaged_task& __other) _NOEXCEPT
|
2190
|
-
{
|
2191
|
-
__f_.swap(__other.__f_);
|
2192
|
-
__p_.swap(__other.__p_);
|
2193
|
-
}
|
2194
|
-
|
2195
|
-
_LIBCPP_INLINE_VISIBILITY
|
2196
|
-
bool valid() const _NOEXCEPT {return __p_.__state_ != nullptr;}
|
2197
|
-
|
2198
|
-
// result retrieval
|
2199
|
-
_LIBCPP_INLINE_VISIBILITY
|
2200
|
-
future<result_type> get_future() {return __p_.get_future();}
|
2201
|
-
|
2202
|
-
// execution
|
2203
|
-
void operator()(_ArgTypes... __args);
|
2204
|
-
void make_ready_at_thread_exit(_ArgTypes... __args);
|
2205
|
-
|
2206
|
-
void reset();
|
2207
|
-
};
|
2208
|
-
|
2209
|
-
template<class ..._ArgTypes>
|
2210
|
-
void
|
2211
|
-
packaged_task<void(_ArgTypes...)>::operator()(_ArgTypes... __args)
|
2212
|
-
{
|
2213
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2214
|
-
if (__p_.__state_ == nullptr)
|
2215
|
-
throw future_error(make_error_code(future_errc::no_state));
|
2216
|
-
if (__p_.__state_->__has_value())
|
2217
|
-
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
2218
|
-
try
|
2219
|
-
{
|
2220
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2221
|
-
__f_(_VSTD::forward<_ArgTypes>(__args)...);
|
2222
|
-
__p_.set_value();
|
2223
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2224
|
-
}
|
2225
|
-
catch (...)
|
2226
|
-
{
|
2227
|
-
__p_.set_exception(current_exception());
|
2228
|
-
}
|
2229
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2230
|
-
}
|
2231
|
-
|
2232
|
-
template<class ..._ArgTypes>
|
2233
|
-
void
|
2234
|
-
packaged_task<void(_ArgTypes...)>::make_ready_at_thread_exit(_ArgTypes... __args)
|
2235
|
-
{
|
2236
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2237
|
-
if (__p_.__state_ == nullptr)
|
2238
|
-
throw future_error(make_error_code(future_errc::no_state));
|
2239
|
-
if (__p_.__state_->__has_value())
|
2240
|
-
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
2241
|
-
try
|
2242
|
-
{
|
2243
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2244
|
-
__f_(_VSTD::forward<_ArgTypes>(__args)...);
|
2245
|
-
__p_.set_value_at_thread_exit();
|
2246
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2247
|
-
}
|
2248
|
-
catch (...)
|
2249
|
-
{
|
2250
|
-
__p_.set_exception_at_thread_exit(current_exception());
|
2251
|
-
}
|
2252
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2253
|
-
}
|
2254
|
-
|
2255
|
-
template<class ..._ArgTypes>
|
2256
|
-
void
|
2257
|
-
packaged_task<void(_ArgTypes...)>::reset()
|
2258
|
-
{
|
2259
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2260
|
-
if (!valid())
|
2261
|
-
throw future_error(make_error_code(future_errc::no_state));
|
2262
|
-
#endif // _LIBCPP_NO_EXCEPTIONS
|
2263
|
-
__p_ = promise<result_type>();
|
2264
|
-
}
|
2265
|
-
|
2266
|
-
template <class _Callable>
|
2267
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
2268
|
-
void
|
2269
|
-
swap(packaged_task<_Callable>& __x, packaged_task<_Callable>& __y) _NOEXCEPT
|
2270
|
-
{
|
2271
|
-
__x.swap(__y);
|
2272
|
-
}
|
2273
|
-
|
2274
|
-
template <class _Callable, class _Alloc>
|
2275
|
-
struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<packaged_task<_Callable>, _Alloc>
|
2276
|
-
: public true_type {};
|
2277
|
-
|
2278
|
-
template <class _Rp, class _Fp>
|
2279
|
-
future<_Rp>
|
2280
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2281
|
-
__make_deferred_assoc_state(_Fp&& __f)
|
2282
|
-
#else
|
2283
|
-
__make_deferred_assoc_state(_Fp __f)
|
2284
|
-
#endif
|
2285
|
-
{
|
2286
|
-
unique_ptr<__deferred_assoc_state<_Rp, _Fp>, __release_shared_count>
|
2287
|
-
__h(new __deferred_assoc_state<_Rp, _Fp>(_VSTD::forward<_Fp>(__f)));
|
2288
|
-
return future<_Rp>(__h.get());
|
2289
|
-
}
|
2290
|
-
|
2291
|
-
template <class _Rp, class _Fp>
|
2292
|
-
future<_Rp>
|
2293
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2294
|
-
__make_async_assoc_state(_Fp&& __f)
|
2295
|
-
#else
|
2296
|
-
__make_async_assoc_state(_Fp __f)
|
2297
|
-
#endif
|
2298
|
-
{
|
2299
|
-
unique_ptr<__async_assoc_state<_Rp, _Fp>, __release_shared_count>
|
2300
|
-
__h(new __async_assoc_state<_Rp, _Fp>(_VSTD::forward<_Fp>(__f)));
|
2301
|
-
_VSTD::thread(&__async_assoc_state<_Rp, _Fp>::__execute, __h.get()).detach();
|
2302
|
-
return future<_Rp>(__h.get());
|
2303
|
-
}
|
2304
|
-
|
2305
|
-
template <class _Fp, class... _Args>
|
2306
|
-
class __async_func
|
2307
|
-
{
|
2308
|
-
tuple<_Fp, _Args...> __f_;
|
2309
|
-
|
2310
|
-
public:
|
2311
|
-
typedef typename __invoke_of<_Fp, _Args...>::type _Rp;
|
2312
|
-
|
2313
|
-
_LIBCPP_INLINE_VISIBILITY
|
2314
|
-
explicit __async_func(_Fp&& __f, _Args&&... __args)
|
2315
|
-
: __f_(_VSTD::move(__f), _VSTD::move(__args)...) {}
|
2316
|
-
|
2317
|
-
_LIBCPP_INLINE_VISIBILITY
|
2318
|
-
__async_func(__async_func&& __f) : __f_(_VSTD::move(__f.__f_)) {}
|
2319
|
-
|
2320
|
-
_Rp operator()()
|
2321
|
-
{
|
2322
|
-
typedef typename __make_tuple_indices<1+sizeof...(_Args), 1>::type _Index;
|
2323
|
-
return __execute(_Index());
|
2324
|
-
}
|
2325
|
-
private:
|
2326
|
-
template <size_t ..._Indices>
|
2327
|
-
_Rp
|
2328
|
-
__execute(__tuple_indices<_Indices...>)
|
2329
|
-
{
|
2330
|
-
return __invoke(_VSTD::move(_VSTD::get<0>(__f_)), _VSTD::move(_VSTD::get<_Indices>(__f_))...);
|
2331
|
-
}
|
2332
|
-
};
|
2333
|
-
|
2334
|
-
inline _LIBCPP_INLINE_VISIBILITY bool __does_policy_contain(launch __policy, launch __value )
|
2335
|
-
{ return (int(__policy) & int(__value)) != 0; }
|
2336
|
-
|
2337
|
-
template <class _Fp, class... _Args>
|
2338
|
-
future<typename __invoke_of<typename decay<_Fp>::type, typename decay<_Args>::type...>::type>
|
2339
|
-
async(launch __policy, _Fp&& __f, _Args&&... __args)
|
2340
|
-
{
|
2341
|
-
typedef __async_func<typename decay<_Fp>::type, typename decay<_Args>::type...> _BF;
|
2342
|
-
typedef typename _BF::_Rp _Rp;
|
2343
|
-
|
2344
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2345
|
-
try
|
2346
|
-
{
|
2347
|
-
#endif
|
2348
|
-
if (__does_policy_contain(__policy, launch::async))
|
2349
|
-
return _VSTD::__make_async_assoc_state<_Rp>(_BF(__decay_copy(_VSTD::forward<_Fp>(__f)),
|
2350
|
-
__decay_copy(_VSTD::forward<_Args>(__args))...));
|
2351
|
-
#ifndef _LIBCPP_NO_EXCEPTIONS
|
2352
|
-
}
|
2353
|
-
catch ( ... ) { if (__policy == launch::async) throw ; }
|
2354
|
-
#endif
|
2355
|
-
|
2356
|
-
if (__does_policy_contain(__policy, launch::deferred))
|
2357
|
-
return _VSTD::__make_deferred_assoc_state<_Rp>(_BF(__decay_copy(_VSTD::forward<_Fp>(__f)),
|
2358
|
-
__decay_copy(_VSTD::forward<_Args>(__args))...));
|
2359
|
-
return future<_Rp>{};
|
2360
|
-
}
|
2361
|
-
|
2362
|
-
template <class _Fp, class... _Args>
|
2363
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
2364
|
-
future<typename __invoke_of<typename decay<_Fp>::type, typename decay<_Args>::type...>::type>
|
2365
|
-
async(_Fp&& __f, _Args&&... __args)
|
2366
|
-
{
|
2367
|
-
return _VSTD::async(launch::any, _VSTD::forward<_Fp>(__f),
|
2368
|
-
_VSTD::forward<_Args>(__args)...);
|
2369
|
-
}
|
2370
|
-
|
2371
|
-
#endif // _LIBCPP_HAS_NO_VARIADICS
|
2372
|
-
|
2373
|
-
// shared_future
|
2374
|
-
|
2375
|
-
template <class _Rp>
|
2376
|
-
class _LIBCPP_TYPE_VIS_ONLY shared_future
|
2377
|
-
{
|
2378
|
-
__assoc_state<_Rp>* __state_;
|
2379
|
-
|
2380
|
-
public:
|
2381
|
-
_LIBCPP_INLINE_VISIBILITY
|
2382
|
-
shared_future() _NOEXCEPT : __state_(nullptr) {}
|
2383
|
-
_LIBCPP_INLINE_VISIBILITY
|
2384
|
-
shared_future(const shared_future& __rhs) : __state_(__rhs.__state_)
|
2385
|
-
{if (__state_) __state_->__add_shared();}
|
2386
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2387
|
-
_LIBCPP_INLINE_VISIBILITY
|
2388
|
-
shared_future(future<_Rp>&& __f) _NOEXCEPT : __state_(__f.__state_)
|
2389
|
-
{__f.__state_ = nullptr;}
|
2390
|
-
_LIBCPP_INLINE_VISIBILITY
|
2391
|
-
shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
|
2392
|
-
{__rhs.__state_ = nullptr;}
|
2393
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2394
|
-
~shared_future();
|
2395
|
-
shared_future& operator=(const shared_future& __rhs);
|
2396
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2397
|
-
_LIBCPP_INLINE_VISIBILITY
|
2398
|
-
shared_future& operator=(shared_future&& __rhs) _NOEXCEPT
|
2399
|
-
{
|
2400
|
-
shared_future(std::move(__rhs)).swap(*this);
|
2401
|
-
return *this;
|
2402
|
-
}
|
2403
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2404
|
-
|
2405
|
-
// retrieving the value
|
2406
|
-
_LIBCPP_INLINE_VISIBILITY
|
2407
|
-
const _Rp& get() const {return __state_->copy();}
|
2408
|
-
|
2409
|
-
_LIBCPP_INLINE_VISIBILITY
|
2410
|
-
void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
|
2411
|
-
|
2412
|
-
// functions to check state
|
2413
|
-
_LIBCPP_INLINE_VISIBILITY
|
2414
|
-
bool valid() const _NOEXCEPT {return __state_ != nullptr;}
|
2415
|
-
|
2416
|
-
_LIBCPP_INLINE_VISIBILITY
|
2417
|
-
void wait() const {__state_->wait();}
|
2418
|
-
template <class _Rep, class _Period>
|
2419
|
-
_LIBCPP_INLINE_VISIBILITY
|
2420
|
-
future_status
|
2421
|
-
wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
|
2422
|
-
{return __state_->wait_for(__rel_time);}
|
2423
|
-
template <class _Clock, class _Duration>
|
2424
|
-
_LIBCPP_INLINE_VISIBILITY
|
2425
|
-
future_status
|
2426
|
-
wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
|
2427
|
-
{return __state_->wait_until(__abs_time);}
|
2428
|
-
};
|
2429
|
-
|
2430
|
-
template <class _Rp>
|
2431
|
-
shared_future<_Rp>::~shared_future()
|
2432
|
-
{
|
2433
|
-
if (__state_)
|
2434
|
-
__state_->__release_shared();
|
2435
|
-
}
|
2436
|
-
|
2437
|
-
template <class _Rp>
|
2438
|
-
shared_future<_Rp>&
|
2439
|
-
shared_future<_Rp>::operator=(const shared_future& __rhs)
|
2440
|
-
{
|
2441
|
-
if (__rhs.__state_)
|
2442
|
-
__rhs.__state_->__add_shared();
|
2443
|
-
if (__state_)
|
2444
|
-
__state_->__release_shared();
|
2445
|
-
__state_ = __rhs.__state_;
|
2446
|
-
return *this;
|
2447
|
-
}
|
2448
|
-
|
2449
|
-
template <class _Rp>
|
2450
|
-
class _LIBCPP_TYPE_VIS_ONLY shared_future<_Rp&>
|
2451
|
-
{
|
2452
|
-
__assoc_state<_Rp&>* __state_;
|
2453
|
-
|
2454
|
-
public:
|
2455
|
-
_LIBCPP_INLINE_VISIBILITY
|
2456
|
-
shared_future() _NOEXCEPT : __state_(nullptr) {}
|
2457
|
-
_LIBCPP_INLINE_VISIBILITY
|
2458
|
-
shared_future(const shared_future& __rhs) : __state_(__rhs.__state_)
|
2459
|
-
{if (__state_) __state_->__add_shared();}
|
2460
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2461
|
-
_LIBCPP_INLINE_VISIBILITY
|
2462
|
-
shared_future(future<_Rp&>&& __f) _NOEXCEPT : __state_(__f.__state_)
|
2463
|
-
{__f.__state_ = nullptr;}
|
2464
|
-
_LIBCPP_INLINE_VISIBILITY
|
2465
|
-
shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
|
2466
|
-
{__rhs.__state_ = nullptr;}
|
2467
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2468
|
-
~shared_future();
|
2469
|
-
shared_future& operator=(const shared_future& __rhs);
|
2470
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2471
|
-
_LIBCPP_INLINE_VISIBILITY
|
2472
|
-
shared_future& operator=(shared_future&& __rhs) _NOEXCEPT
|
2473
|
-
{
|
2474
|
-
shared_future(std::move(__rhs)).swap(*this);
|
2475
|
-
return *this;
|
2476
|
-
}
|
2477
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2478
|
-
|
2479
|
-
// retrieving the value
|
2480
|
-
_LIBCPP_INLINE_VISIBILITY
|
2481
|
-
_Rp& get() const {return __state_->copy();}
|
2482
|
-
|
2483
|
-
_LIBCPP_INLINE_VISIBILITY
|
2484
|
-
void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
|
2485
|
-
|
2486
|
-
// functions to check state
|
2487
|
-
_LIBCPP_INLINE_VISIBILITY
|
2488
|
-
bool valid() const _NOEXCEPT {return __state_ != nullptr;}
|
2489
|
-
|
2490
|
-
_LIBCPP_INLINE_VISIBILITY
|
2491
|
-
void wait() const {__state_->wait();}
|
2492
|
-
template <class _Rep, class _Period>
|
2493
|
-
_LIBCPP_INLINE_VISIBILITY
|
2494
|
-
future_status
|
2495
|
-
wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
|
2496
|
-
{return __state_->wait_for(__rel_time);}
|
2497
|
-
template <class _Clock, class _Duration>
|
2498
|
-
_LIBCPP_INLINE_VISIBILITY
|
2499
|
-
future_status
|
2500
|
-
wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
|
2501
|
-
{return __state_->wait_until(__abs_time);}
|
2502
|
-
};
|
2503
|
-
|
2504
|
-
template <class _Rp>
|
2505
|
-
shared_future<_Rp&>::~shared_future()
|
2506
|
-
{
|
2507
|
-
if (__state_)
|
2508
|
-
__state_->__release_shared();
|
2509
|
-
}
|
2510
|
-
|
2511
|
-
template <class _Rp>
|
2512
|
-
shared_future<_Rp&>&
|
2513
|
-
shared_future<_Rp&>::operator=(const shared_future& __rhs)
|
2514
|
-
{
|
2515
|
-
if (__rhs.__state_)
|
2516
|
-
__rhs.__state_->__add_shared();
|
2517
|
-
if (__state_)
|
2518
|
-
__state_->__release_shared();
|
2519
|
-
__state_ = __rhs.__state_;
|
2520
|
-
return *this;
|
2521
|
-
}
|
2522
|
-
|
2523
|
-
template <>
|
2524
|
-
class _LIBCPP_TYPE_VIS shared_future<void>
|
2525
|
-
{
|
2526
|
-
__assoc_sub_state* __state_;
|
2527
|
-
|
2528
|
-
public:
|
2529
|
-
_LIBCPP_INLINE_VISIBILITY
|
2530
|
-
shared_future() _NOEXCEPT : __state_(nullptr) {}
|
2531
|
-
_LIBCPP_INLINE_VISIBILITY
|
2532
|
-
shared_future(const shared_future& __rhs) : __state_(__rhs.__state_)
|
2533
|
-
{if (__state_) __state_->__add_shared();}
|
2534
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2535
|
-
_LIBCPP_INLINE_VISIBILITY
|
2536
|
-
shared_future(future<void>&& __f) _NOEXCEPT : __state_(__f.__state_)
|
2537
|
-
{__f.__state_ = nullptr;}
|
2538
|
-
_LIBCPP_INLINE_VISIBILITY
|
2539
|
-
shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
|
2540
|
-
{__rhs.__state_ = nullptr;}
|
2541
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2542
|
-
~shared_future();
|
2543
|
-
shared_future& operator=(const shared_future& __rhs);
|
2544
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2545
|
-
_LIBCPP_INLINE_VISIBILITY
|
2546
|
-
shared_future& operator=(shared_future&& __rhs) _NOEXCEPT
|
2547
|
-
{
|
2548
|
-
shared_future(std::move(__rhs)).swap(*this);
|
2549
|
-
return *this;
|
2550
|
-
}
|
2551
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2552
|
-
|
2553
|
-
// retrieving the value
|
2554
|
-
_LIBCPP_INLINE_VISIBILITY
|
2555
|
-
void get() const {__state_->copy();}
|
2556
|
-
|
2557
|
-
_LIBCPP_INLINE_VISIBILITY
|
2558
|
-
void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
|
2559
|
-
|
2560
|
-
// functions to check state
|
2561
|
-
_LIBCPP_INLINE_VISIBILITY
|
2562
|
-
bool valid() const _NOEXCEPT {return __state_ != nullptr;}
|
2563
|
-
|
2564
|
-
_LIBCPP_INLINE_VISIBILITY
|
2565
|
-
void wait() const {__state_->wait();}
|
2566
|
-
template <class _Rep, class _Period>
|
2567
|
-
_LIBCPP_INLINE_VISIBILITY
|
2568
|
-
future_status
|
2569
|
-
wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
|
2570
|
-
{return __state_->wait_for(__rel_time);}
|
2571
|
-
template <class _Clock, class _Duration>
|
2572
|
-
_LIBCPP_INLINE_VISIBILITY
|
2573
|
-
future_status
|
2574
|
-
wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
|
2575
|
-
{return __state_->wait_until(__abs_time);}
|
2576
|
-
};
|
2577
|
-
|
2578
|
-
template <class _Rp>
|
2579
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
2580
|
-
void
|
2581
|
-
swap(shared_future<_Rp>& __x, shared_future<_Rp>& __y) _NOEXCEPT
|
2582
|
-
{
|
2583
|
-
__x.swap(__y);
|
2584
|
-
}
|
2585
|
-
|
2586
|
-
template <class _Rp>
|
2587
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
2588
|
-
shared_future<_Rp>
|
2589
|
-
future<_Rp>::share()
|
2590
|
-
{
|
2591
|
-
return shared_future<_Rp>(_VSTD::move(*this));
|
2592
|
-
}
|
2593
|
-
|
2594
|
-
template <class _Rp>
|
2595
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
2596
|
-
shared_future<_Rp&>
|
2597
|
-
future<_Rp&>::share()
|
2598
|
-
{
|
2599
|
-
return shared_future<_Rp&>(_VSTD::move(*this));
|
2600
|
-
}
|
2601
|
-
|
2602
|
-
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2603
|
-
|
2604
|
-
inline _LIBCPP_INLINE_VISIBILITY
|
2605
|
-
shared_future<void>
|
2606
|
-
future<void>::share()
|
2607
|
-
{
|
2608
|
-
return shared_future<void>(_VSTD::move(*this));
|
2609
|
-
}
|
2610
|
-
|
2611
|
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
2612
|
-
|
2613
|
-
_LIBCPP_END_NAMESPACE_STD
|
2614
|
-
|
2615
|
-
#endif // _LIBCPP_FUTURE
|