script_core 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +35 -57
- data/.ruby-version +1 -1
- data/Gemfile +2 -2
- data/README.md +7 -1
- data/ext/enterprise_script_service/Rakefile +1 -1
- data/ext/enterprise_script_service/libseccomp/.travis.yml +24 -12
- data/ext/enterprise_script_service/libseccomp/CHANGELOG +32 -0
- data/ext/enterprise_script_service/libseccomp/CONTRIBUTING.md +37 -26
- data/ext/enterprise_script_service/libseccomp/CREDITS +11 -0
- data/ext/enterprise_script_service/libseccomp/README.md +21 -1
- data/ext/enterprise_script_service/libseccomp/configure.ac +13 -8
- data/ext/enterprise_script_service/libseccomp/doc/Makefile.am +6 -0
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_api_get.3 +12 -2
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_arch_add.3 +38 -6
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_attr_set.3 +53 -2
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_export_bpf.3 +20 -2
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_init.3 +9 -2
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_load.3 +32 -2
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_merge.3 +16 -2
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_alloc.3 +113 -0
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_fd.3 +1 -0
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_free.3 +1 -0
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_id_valid.3 +1 -0
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_receive.3 +1 -0
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_notify_respond.3 +1 -0
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_rule_add.3 +64 -3
- data/ext/enterprise_script_service/libseccomp/doc/man/man3/seccomp_syscall_priority.3 +18 -3
- data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +19 -0
- data/ext/enterprise_script_service/libseccomp/include/seccomp.h.in +116 -0
- data/ext/enterprise_script_service/libseccomp/src/.gitignore +2 -0
- data/ext/enterprise_script_service/libseccomp/src/Makefile.am +31 -17
- data/ext/enterprise_script_service/libseccomp/src/api.c +254 -58
- data/ext/enterprise_script_service/libseccomp/src/arch-aarch64.h +1 -9
- data/ext/enterprise_script_service/libseccomp/src/arch-arm.c +47 -2
- data/ext/enterprise_script_service/libseccomp/src/arch-arm.h +1 -9
- data/ext/enterprise_script_service/libseccomp/src/arch-gperf-generate +40 -0
- data/ext/enterprise_script_service/libseccomp/src/arch-mips.c +41 -4
- data/ext/enterprise_script_service/libseccomp/src/arch-mips.h +2 -10
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64.c +41 -4
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64.h +3 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32.c +41 -4
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32.h +2 -10
- data/ext/enterprise_script_service/libseccomp/src/arch-parisc.h +1 -10
- data/ext/enterprise_script_service/libseccomp/src/arch-parisc64.c +3 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-parisc64.h +29 -0
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc.h +1 -9
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc64.c +606 -8
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc64.h +2 -10
- data/ext/enterprise_script_service/libseccomp/src/arch-riscv64.c +31 -0
- data/ext/enterprise_script_service/libseccomp/src/arch-riscv64.h +22 -0
- data/ext/enterprise_script_service/libseccomp/src/arch-s390.c +171 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-s390.h +1 -17
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x.c +166 -10
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x.h +1 -20
- data/ext/enterprise_script_service/libseccomp/src/arch-syscall-dump.c +8 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-syscall-validate +359 -143
- data/ext/enterprise_script_service/libseccomp/src/arch-x32.c +36 -2
- data/ext/enterprise_script_service/libseccomp/src/arch-x32.h +2 -10
- data/ext/enterprise_script_service/libseccomp/src/arch-x86.c +172 -10
- data/ext/enterprise_script_service/libseccomp/src/arch-x86.h +1 -14
- data/ext/enterprise_script_service/libseccomp/src/arch-x86_64.h +1 -9
- data/ext/enterprise_script_service/libseccomp/src/arch.c +11 -3
- data/ext/enterprise_script_service/libseccomp/src/arch.h +7 -0
- data/ext/enterprise_script_service/libseccomp/src/db.c +268 -57
- data/ext/enterprise_script_service/libseccomp/src/db.h +16 -2
- data/ext/enterprise_script_service/libseccomp/src/gen_bpf.c +503 -148
- data/ext/enterprise_script_service/libseccomp/src/gen_bpf.h +2 -1
- data/ext/enterprise_script_service/libseccomp/src/gen_pfc.c +165 -37
- data/ext/enterprise_script_service/libseccomp/src/python/libseccomp.pxd +37 -1
- data/ext/enterprise_script_service/libseccomp/src/python/seccomp.pyx +295 -5
- data/ext/enterprise_script_service/libseccomp/src/syscalls.c +56 -0
- data/ext/enterprise_script_service/libseccomp/src/syscalls.csv +470 -0
- data/ext/enterprise_script_service/libseccomp/src/syscalls.h +62 -0
- data/ext/enterprise_script_service/libseccomp/src/syscalls.perf.template +82 -0
- data/ext/enterprise_script_service/libseccomp/src/system.c +196 -16
- data/ext/enterprise_script_service/libseccomp/src/system.h +68 -13
- data/ext/enterprise_script_service/libseccomp/tests/.gitignore +10 -2
- data/ext/enterprise_script_service/libseccomp/tests/06-sim-actions.tests +1 -1
- data/ext/enterprise_script_service/libseccomp/tests/11-basic-basic_errors.c +5 -5
- data/ext/enterprise_script_service/libseccomp/tests/13-basic-attrs.c +35 -1
- data/ext/enterprise_script_service/libseccomp/tests/13-basic-attrs.py +10 -1
- data/ext/enterprise_script_service/libseccomp/tests/15-basic-resolver.c +4 -3
- data/ext/enterprise_script_service/libseccomp/tests/16-sim-arch_basic.c +12 -0
- data/ext/enterprise_script_service/libseccomp/tests/16-sim-arch_basic.py +1 -0
- data/ext/enterprise_script_service/libseccomp/tests/{18-sim-basic_whitelist.c → 18-sim-basic_allowlist.c} +0 -0
- data/ext/enterprise_script_service/libseccomp/tests/{18-sim-basic_whitelist.py → 18-sim-basic_allowlist.py} +0 -0
- data/ext/enterprise_script_service/libseccomp/tests/18-sim-basic_allowlist.tests +32 -0
- data/ext/enterprise_script_service/libseccomp/tests/23-sim-arch_all_le_basic.c +3 -0
- data/ext/enterprise_script_service/libseccomp/tests/23-sim-arch_all_le_basic.py +1 -0
- data/ext/enterprise_script_service/libseccomp/tests/30-sim-socket_syscalls.c +3 -0
- data/ext/enterprise_script_service/libseccomp/tests/30-sim-socket_syscalls.py +1 -0
- data/ext/enterprise_script_service/libseccomp/tests/30-sim-socket_syscalls.tests +33 -17
- data/ext/enterprise_script_service/libseccomp/tests/{34-sim-basic_blacklist.c → 34-sim-basic_denylist.c} +0 -0
- data/ext/enterprise_script_service/libseccomp/tests/{34-sim-basic_blacklist.py → 34-sim-basic_denylist.py} +0 -0
- data/ext/enterprise_script_service/libseccomp/tests/34-sim-basic_denylist.tests +32 -0
- data/ext/enterprise_script_service/libseccomp/tests/36-sim-ipc_syscalls.c +3 -0
- data/ext/enterprise_script_service/libseccomp/tests/36-sim-ipc_syscalls.py +1 -0
- data/ext/enterprise_script_service/libseccomp/tests/36-sim-ipc_syscalls.tests +25 -25
- data/ext/enterprise_script_service/libseccomp/tests/39-basic-api_level.c +24 -3
- data/ext/enterprise_script_service/libseccomp/tests/39-basic-api_level.py +16 -1
- data/ext/enterprise_script_service/libseccomp/tests/47-live-kill_process.c +3 -3
- data/ext/enterprise_script_service/libseccomp/tests/51-live-user_notification.c +112 -0
- data/ext/enterprise_script_service/libseccomp/tests/51-live-user_notification.py +60 -0
- data/ext/enterprise_script_service/libseccomp/tests/51-live-user_notification.tests +11 -0
- data/ext/enterprise_script_service/libseccomp/tests/52-basic-load.c +48 -0
- data/ext/enterprise_script_service/libseccomp/tests/52-basic-load.py +38 -0
- data/ext/enterprise_script_service/libseccomp/tests/52-basic-load.tests +11 -0
- data/ext/enterprise_script_service/libseccomp/tests/53-sim-binary_tree.c +156 -0
- data/ext/enterprise_script_service/libseccomp/tests/53-sim-binary_tree.py +95 -0
- data/ext/enterprise_script_service/libseccomp/tests/53-sim-binary_tree.tests +65 -0
- data/ext/enterprise_script_service/libseccomp/tests/54-live-binary_tree.c +128 -0
- data/ext/enterprise_script_service/libseccomp/tests/54-live-binary_tree.py +95 -0
- data/ext/enterprise_script_service/libseccomp/tests/54-live-binary_tree.tests +11 -0
- data/ext/enterprise_script_service/libseccomp/tests/55-basic-pfc_binary_tree.c +134 -0
- data/ext/enterprise_script_service/libseccomp/tests/55-basic-pfc_binary_tree.sh +46 -0
- data/ext/enterprise_script_service/libseccomp/tests/55-basic-pfc_binary_tree.tests +11 -0
- data/ext/enterprise_script_service/libseccomp/tests/56-basic-iterate_syscalls.c +90 -0
- data/ext/enterprise_script_service/libseccomp/tests/56-basic-iterate_syscalls.py +65 -0
- data/ext/enterprise_script_service/libseccomp/tests/56-basic-iterate_syscalls.tests +11 -0
- data/ext/enterprise_script_service/libseccomp/tests/57-basic-rawsysrc.c +64 -0
- data/ext/enterprise_script_service/libseccomp/tests/57-basic-rawsysrc.py +46 -0
- data/ext/enterprise_script_service/libseccomp/tests/57-basic-rawsysrc.tests +11 -0
- data/ext/enterprise_script_service/libseccomp/tests/58-live-tsync_notify.c +116 -0
- data/ext/enterprise_script_service/libseccomp/tests/58-live-tsync_notify.py +61 -0
- data/ext/enterprise_script_service/libseccomp/tests/58-live-tsync_notify.tests +11 -0
- data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +34 -10
- data/ext/enterprise_script_service/libseccomp/tests/regression +10 -3
- data/ext/enterprise_script_service/libseccomp/tests/util.c +3 -3
- data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -3
- data/ext/enterprise_script_service/libseccomp/tools/check-syntax +1 -1
- data/ext/enterprise_script_service/libseccomp/tools/scmp_arch_detect.c +3 -0
- data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_disasm.c +4 -2
- data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +4 -0
- data/ext/enterprise_script_service/libseccomp/tools/util.c +14 -12
- data/ext/enterprise_script_service/libseccomp/tools/util.h +7 -0
- data/ext/enterprise_script_service/mruby/.github/workflows/build.yml +149 -0
- data/ext/enterprise_script_service/mruby/.github/workflows/codeql-analysis.yml +55 -0
- data/ext/enterprise_script_service/mruby/.github/workflows/lint.yml +23 -0
- data/ext/enterprise_script_service/mruby/.github/workflows/oss-fuzz.yml +27 -0
- data/ext/enterprise_script_service/mruby/.github/workflows/spell-checker.yml +17 -0
- data/ext/enterprise_script_service/mruby/.gitignore +3 -0
- data/ext/enterprise_script_service/mruby/.gitlab-ci.yml +3 -3
- data/ext/enterprise_script_service/mruby/.markdownlint.yml +16 -0
- data/ext/enterprise_script_service/mruby/.travis.yml +7 -10
- data/ext/enterprise_script_service/mruby/.yamllint +8 -0
- data/ext/enterprise_script_service/mruby/AUTHORS +4 -0
- data/ext/enterprise_script_service/mruby/CODEOWNERS +1 -0
- data/ext/enterprise_script_service/mruby/CONTRIBUTING.md +6 -13
- data/ext/enterprise_script_service/mruby/Doxyfile +4 -4
- data/ext/enterprise_script_service/mruby/LICENSE +1 -1
- data/ext/enterprise_script_service/mruby/Makefile +1 -1
- data/ext/enterprise_script_service/mruby/README.md +5 -11
- data/ext/enterprise_script_service/mruby/Rakefile +18 -108
- data/ext/enterprise_script_service/mruby/TODO.md +17 -0
- data/ext/enterprise_script_service/mruby/appveyor.yml +29 -26
- data/ext/enterprise_script_service/mruby/benchmark/bm_ao_render.rb +1 -1
- data/ext/enterprise_script_service/mruby/build_config.rb +9 -152
- data/ext/enterprise_script_service/mruby/{examples/targets/build_config_ArduinoDue.rb → build_config/ArduinoDue.rb} +4 -21
- data/ext/enterprise_script_service/mruby/{examples/targets/build_config_IntelEdison.rb → build_config/IntelEdison.rb} +4 -4
- data/ext/enterprise_script_service/mruby/{examples/targets/build_config_IntelGalileo.rb → build_config/IntelGalileo.rb} +3 -20
- data/ext/enterprise_script_service/mruby/{examples/targets/build_config_RX630.rb → build_config/RX630.rb} +4 -21
- data/ext/enterprise_script_service/mruby/build_config/android_arm64-v8a.rb +11 -0
- data/ext/enterprise_script_service/mruby/build_config/android_armeabi.rb +11 -0
- data/ext/enterprise_script_service/mruby/{examples/targets/build_config_android_armeabi_v7a_neon_hard.rb → build_config/android_armeabi_v7a_neon_hard.rb} +0 -15
- data/ext/enterprise_script_service/mruby/build_config/bench.rb +11 -0
- data/ext/enterprise_script_service/mruby/build_config/boxing.rb +21 -0
- data/ext/enterprise_script_service/mruby/{examples/targets/build_config_chipKITMax32.rb → build_config/chipKITMax32.rb} +4 -21
- data/ext/enterprise_script_service/mruby/{appveyor_config.rb → build_config/ci/gcc-clang.rb} +11 -8
- data/ext/enterprise_script_service/mruby/build_config/ci/msvc.rb +20 -0
- data/ext/enterprise_script_service/mruby/build_config/clang-asan.rb +11 -0
- data/ext/enterprise_script_service/mruby/build_config/cross-32bit.rb +14 -0
- data/ext/enterprise_script_service/mruby/build_config/default.rb +80 -0
- data/ext/enterprise_script_service/mruby/build_config/dreamcast_shelf.rb +94 -0
- data/ext/enterprise_script_service/mruby/build_config/gameboyadvance.rb +73 -0
- data/ext/enterprise_script_service/mruby/build_config/host-cxx.rb +12 -0
- data/ext/enterprise_script_service/mruby/build_config/host-debug.rb +20 -0
- data/ext/enterprise_script_service/mruby/build_config/host-gprof.rb +14 -0
- data/ext/enterprise_script_service/mruby/build_config/host-m32.rb +15 -0
- data/ext/enterprise_script_service/mruby/build_config/host-shared.rb +36 -0
- data/ext/enterprise_script_service/mruby/build_config/mrbc.rb +11 -0
- data/ext/enterprise_script_service/mruby/build_config/no-float.rb +17 -0
- data/ext/enterprise_script_service/mruby/doc/guides/compile.md +142 -49
- data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +5 -4
- data/ext/enterprise_script_service/mruby/doc/guides/gc-arena-howto.md +1 -1
- data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +53 -30
- data/ext/enterprise_script_service/mruby/doc/guides/mrbgems.md +31 -14
- data/ext/enterprise_script_service/mruby/doc/guides/symbol.md +83 -0
- data/ext/enterprise_script_service/mruby/doc/limitations.md +35 -36
- data/ext/enterprise_script_service/mruby/doc/mruby3.md +163 -0
- data/ext/enterprise_script_service/mruby/doc/opcode.md +102 -103
- data/ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/mrblib/example.rb +1 -1
- data/ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c +5 -1
- data/ext/enterprise_script_service/mruby/examples/mrbgems/c_extension_example/src/example.c +5 -1
- data/ext/enterprise_script_service/mruby/examples/mrbgems/ruby_extension_example/mrblib/example.rb +1 -1
- data/ext/enterprise_script_service/mruby/include/mrbconf.h +88 -66
- data/ext/enterprise_script_service/mruby/include/mruby.h +160 -104
- data/ext/enterprise_script_service/mruby/include/mruby/array.h +27 -6
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +80 -46
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_no.h +8 -8
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +76 -55
- data/ext/enterprise_script_service/mruby/include/mruby/class.h +10 -8
- data/ext/enterprise_script_service/mruby/include/mruby/common.h +14 -1
- data/ext/enterprise_script_service/mruby/include/mruby/compile.h +20 -6
- data/ext/enterprise_script_service/mruby/include/mruby/debug.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/dump.h +18 -52
- data/ext/enterprise_script_service/mruby/include/mruby/endian.h +44 -0
- data/ext/enterprise_script_service/mruby/include/mruby/error.h +39 -5
- data/ext/enterprise_script_service/mruby/include/mruby/gc.h +1 -0
- data/ext/enterprise_script_service/mruby/include/mruby/hash.h +33 -13
- data/ext/enterprise_script_service/mruby/include/mruby/irep.h +74 -14
- data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -1
- data/ext/enterprise_script_service/mruby/include/mruby/khash.h +19 -9
- data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +37 -63
- data/ext/enterprise_script_service/mruby/include/mruby/opcode.h +1 -27
- data/ext/enterprise_script_service/mruby/include/mruby/ops.h +29 -24
- data/ext/enterprise_script_service/mruby/include/mruby/presym.h +40 -0
- data/ext/enterprise_script_service/mruby/include/mruby/presym/disable.h +70 -0
- data/ext/enterprise_script_service/mruby/include/mruby/presym/enable.h +37 -0
- data/ext/enterprise_script_service/mruby/include/mruby/presym/scanning.h +73 -0
- data/ext/enterprise_script_service/mruby/include/mruby/proc.h +93 -21
- data/ext/enterprise_script_service/mruby/include/mruby/string.h +12 -16
- data/ext/enterprise_script_service/mruby/include/mruby/throw.h +14 -3
- data/ext/enterprise_script_service/mruby/include/mruby/value.h +60 -59
- data/ext/enterprise_script_service/mruby/include/mruby/variable.h +1 -0
- data/ext/enterprise_script_service/mruby/include/mruby/version.h +25 -6
- data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +198 -72
- data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +71 -78
- data/ext/enterprise_script_service/mruby/lib/mruby/build/load_gems.rb +12 -10
- data/ext/enterprise_script_service/mruby/lib/{mruby-core-ext.rb → mruby/core_ext.rb} +10 -3
- data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +84 -32
- data/ext/enterprise_script_service/mruby/lib/mruby/lockfile.rb +1 -1
- data/ext/enterprise_script_service/mruby/lib/mruby/presym.rb +132 -0
- data/ext/enterprise_script_service/mruby/lib/mruby/source.rb +3 -1
- data/ext/enterprise_script_service/mruby/mrbgems/default-no-fpu.gembox +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/default-no-stdio.gembox +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +9 -81
- data/ext/enterprise_script_service/mruby/mrbgems/full-core.gembox +1 -4
- data/ext/enterprise_script_service/mruby/mrbgems/math.gembox +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/metaprog.gembox +15 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +1 -32
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +10 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +0 -13
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-config/mrbgem.rake +30 -18
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-config/mruby-config +18 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/bintest/mrdb.rb +3 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/bintest/print.rb +10 -10
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +14 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +3 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +4 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +2 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +6 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/bintest/mirb.rb +23 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/mrbgem.rake +11 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +46 -35
- data/ext/enterprise_script_service/mruby/mrbgems/{mruby-compiler → mruby-bin-mrbc}/bintest/mrbc.rb +0 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/mrbgem.rake +3 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +41 -28
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +25 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/mrbgem.rake +1 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +26 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-strip/bintest/mruby-strip.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c +6 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-catch/mrbgem.rake +5 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-catch/mrblib/catch.rb +27 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +7 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +495 -436
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/keywords +5 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/lex.def +49 -44
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +637 -220
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/y.tab.c +13734 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/mrbgem.rake +20 -23
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +9 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/test/complex.rb +4 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +1 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/mrbgem.rake +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +19 -238
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +21 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/src/fiber.c +19 -15
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/src/hash-ext.c +31 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/test/hash.rb +7 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-inline-struct/test/inline.c +5 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/README.md +18 -16
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/include/mruby/ext/io.h +39 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +2 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file.rb +9 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file_constants.rb +0 -16
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +9 -14
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +107 -59
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +22 -38
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +417 -203
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +20 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +33 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +58 -50
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +13 -14
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-math/src/math.c +13 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-math/test/math.rb +5 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +56 -73
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +13 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/README.md +4 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +80 -78
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/test/method.rb +4 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c +14 -13
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +8 -16
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +18 -13
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-os-memsize/mrbgem.rake +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-os-memsize/src/memsize.c +231 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-os-memsize/test/memsize.rb +63 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/README.md +15 -18
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +120 -67
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/mrblib/print.rb +1 -30
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/src/print.c +65 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +34 -21
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/test/proc.c +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.c +98 -43
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/test/random.rb +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/mrblib/range.rb +39 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +21 -43
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/test/range.rb +27 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +12 -20
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +216 -38
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/test/rational.rb +6 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/README.md +6 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/src/mrb_sleep.c +5 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/README.md +3 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/src/socket.c +47 -45
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/test/sockettest.c +3 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +161 -93
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/test/sprintf.rb +9 -25
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +23 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +17 -14
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/mrblib/struct.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +23 -36
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +7 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/README.md +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/driver.c +5 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +17 -44
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/vformat.c +4 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +37 -41
- data/ext/enterprise_script_service/mruby/mrbgems/stdlib-ext.gembox +18 -0
- data/ext/enterprise_script_service/mruby/mrbgems/stdlib-io.gembox +12 -0
- data/ext/enterprise_script_service/mruby/mrbgems/stdlib.gembox +54 -0
- data/ext/enterprise_script_service/mruby/mrblib/00class.rb +10 -0
- data/ext/enterprise_script_service/mruby/mrblib/10error.rb +4 -0
- data/ext/enterprise_script_service/mruby/mrblib/array.rb +17 -9
- data/ext/enterprise_script_service/mruby/mrblib/enum.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/hash.rb +3 -23
- data/ext/enterprise_script_service/mruby/mrblib/init_mrblib.c +0 -11
- data/ext/enterprise_script_service/mruby/mrblib/numeric.rb +36 -11
- data/ext/enterprise_script_service/mruby/mrblib/range.rb +25 -3
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_proto_fuzzer.cpp +2 -2
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h +1 -1
- data/ext/enterprise_script_service/mruby/src/array.c +67 -90
- data/ext/enterprise_script_service/mruby/src/backtrace.c +18 -19
- data/ext/enterprise_script_service/mruby/src/class.c +819 -211
- data/ext/enterprise_script_service/mruby/src/codedump.c +226 -197
- data/ext/enterprise_script_service/mruby/src/debug.c +14 -11
- data/ext/enterprise_script_service/mruby/src/dump.c +470 -207
- data/ext/enterprise_script_service/mruby/src/enum.c +1 -1
- data/ext/enterprise_script_service/mruby/src/error.c +94 -20
- data/ext/enterprise_script_service/mruby/src/etc.c +56 -39
- data/ext/enterprise_script_service/mruby/src/fmt_fp.c +103 -27
- data/ext/enterprise_script_service/mruby/src/gc.c +86 -349
- data/ext/enterprise_script_service/mruby/src/hash.c +1058 -723
- data/ext/enterprise_script_service/mruby/src/kernel.c +78 -226
- data/ext/enterprise_script_service/mruby/src/load.c +215 -159
- data/ext/enterprise_script_service/mruby/src/numeric.c +400 -382
- data/ext/enterprise_script_service/mruby/src/object.c +115 -90
- data/ext/enterprise_script_service/mruby/src/print.c +31 -6
- data/ext/enterprise_script_service/mruby/src/proc.c +56 -45
- data/ext/enterprise_script_service/mruby/src/range.c +49 -33
- data/ext/enterprise_script_service/mruby/src/state.c +58 -42
- data/ext/enterprise_script_service/mruby/src/string.c +151 -156
- data/ext/enterprise_script_service/mruby/src/symbol.c +132 -66
- data/ext/enterprise_script_service/mruby/src/value_array.h +1 -0
- data/ext/enterprise_script_service/mruby/src/variable.c +158 -158
- data/ext/enterprise_script_service/mruby/src/vm.c +655 -645
- data/ext/enterprise_script_service/mruby/tasks/benchmark.rake +6 -6
- data/ext/enterprise_script_service/mruby/tasks/bin.rake +23 -0
- data/ext/enterprise_script_service/mruby/tasks/core.rake +12 -0
- data/ext/enterprise_script_service/mruby/tasks/doc.rake +50 -38
- data/ext/enterprise_script_service/mruby/tasks/gitlab.rake +64 -61
- data/ext/enterprise_script_service/mruby/tasks/libmruby.rake +10 -1
- data/ext/enterprise_script_service/mruby/tasks/mrbgems.rake +13 -1
- data/ext/enterprise_script_service/mruby/tasks/mrblib.rake +40 -0
- data/ext/enterprise_script_service/mruby/tasks/presym.rake +44 -0
- data/ext/enterprise_script_service/mruby/tasks/test.rake +68 -0
- data/ext/enterprise_script_service/mruby/tasks/toolchains/android.rake +46 -1
- data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +8 -7
- data/ext/enterprise_script_service/mruby/tasks/toolchains/openwrt.rake +13 -17
- data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +21 -25
- data/ext/enterprise_script_service/mruby/test/assert.rb +5 -4
- data/ext/enterprise_script_service/mruby/test/bintest.rb +5 -5
- data/ext/enterprise_script_service/mruby/test/t/argumenterror.rb +16 -0
- data/ext/enterprise_script_service/mruby/test/t/array.rb +7 -3
- data/ext/enterprise_script_service/mruby/test/t/bs_literal.rb +1 -1
- data/ext/enterprise_script_service/mruby/test/t/ensure.rb +8 -26
- data/ext/enterprise_script_service/mruby/test/t/exception.rb +2 -2
- data/ext/enterprise_script_service/mruby/test/t/float.rb +18 -8
- data/ext/enterprise_script_service/mruby/test/t/hash.rb +903 -281
- data/ext/enterprise_script_service/mruby/test/t/integer.rb +10 -38
- data/ext/enterprise_script_service/mruby/test/t/kernel.rb +16 -25
- data/ext/enterprise_script_service/mruby/test/t/literals.rb +50 -0
- data/ext/enterprise_script_service/mruby/test/t/module.rb +2 -2
- data/ext/enterprise_script_service/mruby/test/t/numeric.rb +1 -1
- data/ext/enterprise_script_service/mruby/test/t/range.rb +83 -1
- data/ext/enterprise_script_service/mruby/test/t/string.rb +4 -0
- data/ext/enterprise_script_service/mruby/test/t/superclass.rb +10 -10
- data/ext/enterprise_script_service/mruby/test/t/syntax.rb +24 -0
- data/ext/enterprise_script_service/mruby/test/t/vformat.rb +3 -3
- data/ext/enterprise_script_service/mruby_config.rb +2 -5
- data/ext/enterprise_script_service/mruby_engine.cpp +1 -1
- data/ext/enterprise_script_service/msgpack/.github/depends/boost.sh +56 -0
- data/ext/enterprise_script_service/msgpack/.github/workflows/coverage.yml +62 -0
- data/ext/enterprise_script_service/msgpack/.github/workflows/gha.yml +304 -0
- data/ext/enterprise_script_service/msgpack/CHANGELOG.md +11 -0
- data/ext/enterprise_script_service/msgpack/CMakeLists.txt +82 -39
- data/ext/enterprise_script_service/msgpack/Files.cmake +22 -12
- data/ext/enterprise_script_service/msgpack/QUICKSTART-C.md +26 -29
- data/ext/enterprise_script_service/msgpack/README.md +3 -2
- data/ext/enterprise_script_service/msgpack/appveyor.yml +6 -2
- data/ext/enterprise_script_service/msgpack/ci/build_cmake.sh +3 -1
- data/ext/enterprise_script_service/msgpack/cmake/CodeCoverage.cmake +55 -0
- data/ext/enterprise_script_service/msgpack/codecov.yml +36 -0
- data/ext/enterprise_script_service/msgpack/example/CMakeLists.txt +9 -5
- data/ext/enterprise_script_service/msgpack/example/boost/CMakeLists.txt +1 -1
- data/ext/enterprise_script_service/msgpack/example/c/CMakeLists.txt +17 -6
- data/ext/enterprise_script_service/msgpack/example/c/boundary.c +296 -0
- data/ext/enterprise_script_service/msgpack/example/c/jsonconv.c +419 -0
- data/ext/enterprise_script_service/msgpack/example/c/simple_c.c +1 -1
- data/ext/enterprise_script_service/msgpack/example/cpp03/CMakeLists.txt +3 -3
- data/ext/enterprise_script_service/msgpack/example/cpp11/CMakeLists.txt +2 -2
- data/ext/enterprise_script_service/msgpack/example/x3/CMakeLists.txt +2 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/pack.h +24 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +5 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/boost/optional.hpp +4 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp17/vector_byte.hpp +8 -8
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/map.hpp +4 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/vector.hpp +4 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/vector_char.hpp +8 -8
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/vector_unsigned_char.hpp +8 -8
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +4 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/unpack.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +4 -4
- data/ext/enterprise_script_service/msgpack/make_file_list.sh +38 -11
- data/ext/enterprise_script_service/msgpack/src/vrefbuffer.c +6 -0
- data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +86 -64
- data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +4 -1
- data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/buffer.cpp +4 -47
- data/ext/enterprise_script_service/msgpack/test/buffer_c.cpp +148 -0
- data/ext/enterprise_script_service/msgpack/test/carray.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/cases.cpp +8 -4
- data/ext/enterprise_script_service/msgpack/test/convert.cpp +8 -4
- data/ext/enterprise_script_service/msgpack/test/fixint.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/json.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/limit.cpp +8 -4
- data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +159 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +32 -27
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +4 -1
- data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/object.cpp +4 -1
- data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +12 -8
- data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +30 -26
- data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/raw.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/reference.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/streaming.cpp +8 -4
- data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/user_class.cpp +16 -12
- data/ext/enterprise_script_service/msgpack/test/version.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/visitor.cpp +4 -0
- data/ext/enterprise_script_service/msgpack/test/zone.cpp +4 -0
- data/lib/script_core/engine.rb +24 -5
- data/lib/script_core/executable.rb +4 -3
- data/lib/script_core/version.rb +1 -1
- data/lib/tasks/script_core.rake +3 -1
- data/script_core.gemspec +1 -2
- data/spec/dummy/app/lib/script_engine.rb +64 -5
- data/spec/script_core_spec.rb +13 -0
- metadata +123 -61
- data/ext/enterprise_script_service/libseccomp/src/arch-aarch64-syscalls.c +0 -559
- data/ext/enterprise_script_service/libseccomp/src/arch-arm-syscalls.c +0 -570
- data/ext/enterprise_script_service/libseccomp/src/arch-mips-syscalls.c +0 -562
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64-syscalls.c +0 -562
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32-syscalls.c +0 -562
- data/ext/enterprise_script_service/libseccomp/src/arch-parisc-syscalls.c +0 -542
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc-syscalls.c +0 -559
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc64-syscalls.c +0 -559
- data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +0 -626
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +0 -626
- data/ext/enterprise_script_service/libseccomp/src/arch-x32-syscalls.c +0 -558
- data/ext/enterprise_script_service/libseccomp/src/arch-x86-syscalls.c +0 -692
- data/ext/enterprise_script_service/libseccomp/src/arch-x86_64-syscalls.c +0 -559
- data/ext/enterprise_script_service/libseccomp/tests/18-sim-basic_whitelist.tests +0 -32
- data/ext/enterprise_script_service/libseccomp/tests/34-sim-basic_blacklist.tests +0 -32
- data/ext/enterprise_script_service/mruby/TODO +0 -8
- data/ext/enterprise_script_service/mruby/benchmark/build_config_boxing.rb +0 -28
- data/ext/enterprise_script_service/mruby/examples/targets/build_config_android_arm64-v8a.rb +0 -26
- data/ext/enterprise_script_service/mruby/examples/targets/build_config_android_armeabi.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/kernel.c +0 -30
- data/ext/enterprise_script_service/mruby/mrblib/mrblib.rake +0 -18
- data/ext/enterprise_script_service/mruby/src/crc.c +0 -39
- data/ext/enterprise_script_service/mruby/src/mruby_core.rake +0 -19
- data/ext/enterprise_script_service/mruby/travis_config.rb +0 -54
- data/ext/enterprise_script_service/msgpack/.travis.yml +0 -258
@@ -7,13 +7,15 @@
|
|
7
7
|
#ifndef MRB_THROW_H
|
8
8
|
#define MRB_THROW_H
|
9
9
|
|
10
|
-
#if defined(
|
10
|
+
#if defined(MRB_USE_CXX_ABI)
|
11
11
|
# if !defined(__cplusplus)
|
12
12
|
# error Trying to use C++ exception handling in C code
|
13
13
|
# endif
|
14
14
|
#endif
|
15
15
|
|
16
|
-
#if defined(
|
16
|
+
#if defined(MRB_USE_CXX_EXCEPTION)
|
17
|
+
|
18
|
+
# if defined(__cplusplus)
|
17
19
|
|
18
20
|
#define MRB_TRY(buf) try {
|
19
21
|
#define MRB_CATCH(buf) } catch(mrb_jmpbuf_impl e) { if (e != (buf)->impl) { throw e; }
|
@@ -22,6 +24,10 @@
|
|
22
24
|
#define MRB_THROW(buf) throw((buf)->impl)
|
23
25
|
typedef mrb_int mrb_jmpbuf_impl;
|
24
26
|
|
27
|
+
# else
|
28
|
+
# error "need to be compiled with C++ compiler"
|
29
|
+
# endif /* __cplusplus */
|
30
|
+
|
25
31
|
#else
|
26
32
|
|
27
33
|
#include <setjmp.h>
|
@@ -29,6 +35,9 @@ typedef mrb_int mrb_jmpbuf_impl;
|
|
29
35
|
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
30
36
|
#define MRB_SETJMP _setjmp
|
31
37
|
#define MRB_LONGJMP _longjmp
|
38
|
+
#elif defined(__MINGW64__) && defined(__GNUC__) && __GNUC__ >= 4
|
39
|
+
#define MRB_SETJMP __builtin_setjmp
|
40
|
+
#define MRB_LONGJMP __builtin_longjmp
|
32
41
|
#else
|
33
42
|
#define MRB_SETJMP setjmp
|
34
43
|
#define MRB_LONGJMP longjmp
|
@@ -46,9 +55,11 @@ typedef mrb_int mrb_jmpbuf_impl;
|
|
46
55
|
struct mrb_jmpbuf {
|
47
56
|
mrb_jmpbuf_impl impl;
|
48
57
|
|
49
|
-
#if defined(
|
58
|
+
#if defined(MRB_USE_CXX_EXCEPTION)
|
50
59
|
static mrb_int jmpbuf_id;
|
60
|
+
# if defined(__cplusplus)
|
51
61
|
mrb_jmpbuf() : impl(jmpbuf_id++) {}
|
62
|
+
# endif
|
52
63
|
#endif
|
53
64
|
};
|
54
65
|
|
@@ -34,10 +34,6 @@ typedef uint32_t mrb_sym;
|
|
34
34
|
typedef uint8_t mrb_bool;
|
35
35
|
struct mrb_state;
|
36
36
|
|
37
|
-
#if defined(MRB_INT16) && defined(MRB_INT64)
|
38
|
-
# error "You can't define MRB_INT16 and MRB_INT64 at the same time."
|
39
|
-
#endif
|
40
|
-
|
41
37
|
#if defined _MSC_VER && _MSC_VER < 1800
|
42
38
|
# define PRIo64 "llo"
|
43
39
|
# define PRId64 "lld"
|
@@ -57,25 +53,19 @@ struct mrb_state;
|
|
57
53
|
|
58
54
|
#if defined(MRB_INT64)
|
59
55
|
typedef int64_t mrb_int;
|
56
|
+
typedef uint64_t mrb_uint;
|
60
57
|
# define MRB_INT_BIT 64
|
61
|
-
# define MRB_INT_MIN
|
62
|
-
# define MRB_INT_MAX
|
58
|
+
# define MRB_INT_MIN INT64_MIN
|
59
|
+
# define MRB_INT_MAX INT64_MAX
|
63
60
|
# define MRB_PRIo PRIo64
|
64
61
|
# define MRB_PRId PRId64
|
65
62
|
# define MRB_PRIx PRIx64
|
66
|
-
#elif defined(MRB_INT16)
|
67
|
-
typedef int16_t mrb_int;
|
68
|
-
# define MRB_INT_BIT 16
|
69
|
-
# define MRB_INT_MIN (INT16_MIN>>MRB_FIXNUM_SHIFT)
|
70
|
-
# define MRB_INT_MAX (INT16_MAX>>MRB_FIXNUM_SHIFT)
|
71
|
-
# define MRB_PRIo PRIo16
|
72
|
-
# define MRB_PRId PRId16
|
73
|
-
# define MRB_PRIx PRIx16
|
74
63
|
#else
|
75
64
|
typedef int32_t mrb_int;
|
65
|
+
typedef uint32_t mrb_uint;
|
76
66
|
# define MRB_INT_BIT 32
|
77
|
-
# define MRB_INT_MIN
|
78
|
-
# define MRB_INT_MAX
|
67
|
+
# define MRB_INT_MIN INT32_MIN
|
68
|
+
# define MRB_INT_MAX INT32_MAX
|
79
69
|
# define MRB_PRIo PRIo32
|
80
70
|
# define MRB_PRId PRId32
|
81
71
|
# define MRB_PRIx PRIx32
|
@@ -87,9 +77,9 @@ struct mrb_state;
|
|
87
77
|
# define MRB_ENDIAN_LOHI(a,b) b a
|
88
78
|
#endif
|
89
79
|
|
90
|
-
#ifndef
|
80
|
+
#ifndef MRB_NO_FLOAT
|
91
81
|
MRB_API double mrb_float_read(const char*, char**);
|
92
|
-
#ifdef
|
82
|
+
#ifdef MRB_USE_FLOAT32
|
93
83
|
typedef float mrb_float;
|
94
84
|
#else
|
95
85
|
typedef double mrb_float;
|
@@ -102,7 +92,7 @@ MRB_API int mrb_msvc_vsnprintf(char *s, size_t n, const char *format, va_list ar
|
|
102
92
|
MRB_API int mrb_msvc_snprintf(char *s, size_t n, const char *format, ...);
|
103
93
|
# define vsnprintf(s, n, format, arg) mrb_msvc_vsnprintf(s, n, format, arg)
|
104
94
|
# define snprintf(s, n, format, ...) mrb_msvc_snprintf(s, n, format, __VA_ARGS__)
|
105
|
-
# if _MSC_VER < 1800 && !defined
|
95
|
+
# if _MSC_VER < 1800 && !defined MRB_NO_FLOAT
|
106
96
|
# include <float.h>
|
107
97
|
# define isfinite(n) _finite(n)
|
108
98
|
# define isnan _isnan
|
@@ -115,34 +105,36 @@ static const unsigned int IEEE754_INFINITY_BITS_SINGLE = 0x7F800000;
|
|
115
105
|
#endif
|
116
106
|
|
117
107
|
enum mrb_vtype {
|
118
|
-
MRB_TT_FALSE = 0,
|
119
|
-
MRB_TT_TRUE,
|
120
|
-
MRB_TT_FLOAT,
|
121
|
-
|
122
|
-
MRB_TT_SYMBOL,
|
123
|
-
MRB_TT_UNDEF,
|
124
|
-
MRB_TT_CPTR,
|
125
|
-
MRB_TT_FREE,
|
126
|
-
MRB_TT_OBJECT,
|
127
|
-
MRB_TT_CLASS,
|
128
|
-
MRB_TT_MODULE,
|
129
|
-
MRB_TT_ICLASS,
|
130
|
-
MRB_TT_SCLASS,
|
131
|
-
MRB_TT_PROC,
|
132
|
-
MRB_TT_ARRAY,
|
133
|
-
MRB_TT_HASH,
|
134
|
-
MRB_TT_STRING,
|
135
|
-
MRB_TT_RANGE,
|
136
|
-
MRB_TT_EXCEPTION,
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
MRB_TT_MAXDEFINE /* 25 */
|
108
|
+
MRB_TT_FALSE = 0,
|
109
|
+
MRB_TT_TRUE,
|
110
|
+
MRB_TT_FLOAT,
|
111
|
+
MRB_TT_INTEGER,
|
112
|
+
MRB_TT_SYMBOL,
|
113
|
+
MRB_TT_UNDEF,
|
114
|
+
MRB_TT_CPTR,
|
115
|
+
MRB_TT_FREE,
|
116
|
+
MRB_TT_OBJECT,
|
117
|
+
MRB_TT_CLASS,
|
118
|
+
MRB_TT_MODULE,
|
119
|
+
MRB_TT_ICLASS,
|
120
|
+
MRB_TT_SCLASS,
|
121
|
+
MRB_TT_PROC,
|
122
|
+
MRB_TT_ARRAY,
|
123
|
+
MRB_TT_HASH,
|
124
|
+
MRB_TT_STRING,
|
125
|
+
MRB_TT_RANGE,
|
126
|
+
MRB_TT_EXCEPTION,
|
127
|
+
MRB_TT_ENV,
|
128
|
+
MRB_TT_DATA,
|
129
|
+
MRB_TT_FIBER,
|
130
|
+
MRB_TT_ISTRUCT,
|
131
|
+
MRB_TT_BREAK,
|
132
|
+
MRB_TT_MAXDEFINE
|
144
133
|
};
|
145
134
|
|
135
|
+
/* for compatibility */
|
136
|
+
#define MRB_TT_FIXNUM MRB_TT_INTEGER
|
137
|
+
|
146
138
|
#include <mruby/object.h>
|
147
139
|
|
148
140
|
#ifdef MRB_DOCUMENTATION_BLOCK
|
@@ -161,6 +153,13 @@ typedef void mrb_value;
|
|
161
153
|
|
162
154
|
#endif
|
163
155
|
|
156
|
+
#if defined(MRB_WORD_BOXING) || (defined(MRB_NAN_BOXING) && defined(MRB_64BIT))
|
157
|
+
struct RCptr {
|
158
|
+
MRB_OBJECT_HEADER;
|
159
|
+
void *p;
|
160
|
+
};
|
161
|
+
#endif
|
162
|
+
|
164
163
|
#if defined(MRB_NAN_BOXING)
|
165
164
|
#include "boxing_nan.h"
|
166
165
|
#elif defined(MRB_WORD_BOXING)
|
@@ -169,12 +168,9 @@ typedef void mrb_value;
|
|
169
168
|
#include "boxing_no.h"
|
170
169
|
#endif
|
171
170
|
|
172
|
-
#define MRB_SYMBOL_BIT (sizeof(mrb_sym) * CHAR_BIT - MRB_SYMBOL_SHIFT)
|
173
|
-
#define MRB_SYMBOL_MAX (UINT32_MAX >> MRB_SYMBOL_SHIFT)
|
174
|
-
|
175
171
|
#if INTPTR_MAX < MRB_INT_MAX
|
176
172
|
typedef intptr_t mrb_ssize;
|
177
|
-
# define MRB_SSIZE_MAX
|
173
|
+
# define MRB_SSIZE_MAX INTPTR_MAX
|
178
174
|
#else
|
179
175
|
typedef mrb_int mrb_ssize;
|
180
176
|
# define MRB_SSIZE_MAX MRB_INT_MAX
|
@@ -183,8 +179,11 @@ typedef void mrb_value;
|
|
183
179
|
#ifndef mrb_immediate_p
|
184
180
|
#define mrb_immediate_p(o) (mrb_type(o) < MRB_TT_FREE)
|
185
181
|
#endif
|
182
|
+
#ifndef mrb_integer_p
|
183
|
+
#define mrb_integer_p(o) (mrb_type(o) == MRB_TT_INTEGER)
|
184
|
+
#endif
|
186
185
|
#ifndef mrb_fixnum_p
|
187
|
-
#define mrb_fixnum_p(o) (
|
186
|
+
#define mrb_fixnum_p(o) mrb_integer_p(o)
|
188
187
|
#endif
|
189
188
|
#ifndef mrb_symbol_p
|
190
189
|
#define mrb_symbol_p(o) (mrb_type(o) == MRB_TT_SYMBOL)
|
@@ -201,7 +200,7 @@ typedef void mrb_value;
|
|
201
200
|
#ifndef mrb_true_p
|
202
201
|
#define mrb_true_p(o) (mrb_type(o) == MRB_TT_TRUE)
|
203
202
|
#endif
|
204
|
-
#ifndef
|
203
|
+
#ifndef MRB_NO_FLOAT
|
205
204
|
#ifndef mrb_float_p
|
206
205
|
#define mrb_float_p(o) (mrb_type(o) == MRB_TT_FLOAT)
|
207
206
|
#endif
|
@@ -245,9 +244,6 @@ typedef void mrb_value;
|
|
245
244
|
#ifndef mrb_range_p
|
246
245
|
#define mrb_range_p(o) (mrb_type(o) == MRB_TT_RANGE)
|
247
246
|
#endif
|
248
|
-
#ifndef mrb_file_p
|
249
|
-
#define mrb_file_p(o) (mrb_type(o) == MRB_TT_FILE)
|
250
|
-
#endif
|
251
247
|
#ifndef mrb_env_p
|
252
248
|
#define mrb_env_p(o) (mrb_type(o) == MRB_TT_ENV)
|
253
249
|
#endif
|
@@ -273,7 +269,7 @@ typedef void mrb_value;
|
|
273
269
|
*
|
274
270
|
* Takes a float and boxes it into an mrb_value
|
275
271
|
*/
|
276
|
-
#ifndef
|
272
|
+
#ifndef MRB_NO_FLOAT
|
277
273
|
MRB_INLINE mrb_value mrb_float_value(struct mrb_state *mrb, mrb_float f)
|
278
274
|
{
|
279
275
|
mrb_value v;
|
@@ -293,14 +289,19 @@ mrb_cptr_value(struct mrb_state *mrb, void *p)
|
|
293
289
|
}
|
294
290
|
|
295
291
|
/**
|
296
|
-
* Returns
|
297
|
-
*
|
298
|
-
* Takes an integer and boxes it into an mrb_value
|
292
|
+
* Returns an integer in Ruby.
|
299
293
|
*/
|
294
|
+
MRB_INLINE mrb_value mrb_int_value(struct mrb_state *mrb, mrb_int i)
|
295
|
+
{
|
296
|
+
mrb_value v;
|
297
|
+
SET_INT_VALUE(mrb, v, i);
|
298
|
+
return v;
|
299
|
+
}
|
300
|
+
|
300
301
|
MRB_INLINE mrb_value mrb_fixnum_value(mrb_int i)
|
301
302
|
{
|
302
303
|
mrb_value v;
|
303
|
-
|
304
|
+
SET_FIXNUM_VALUE(v, i);
|
304
305
|
return v;
|
305
306
|
}
|
306
307
|
|
@@ -35,6 +35,7 @@ mrb_value mrb_vm_cv_get(mrb_state*, mrb_sym);
|
|
35
35
|
void mrb_vm_cv_set(mrb_state*, mrb_sym, mrb_value);
|
36
36
|
mrb_value mrb_vm_const_get(mrb_state*, mrb_sym);
|
37
37
|
void mrb_vm_const_set(mrb_state*, mrb_sym, mrb_value);
|
38
|
+
size_t mrb_obj_iv_tbl_memsize(mrb_value);
|
38
39
|
MRB_API mrb_value mrb_const_get(mrb_state*, mrb_value, mrb_sym);
|
39
40
|
MRB_API void mrb_const_set(mrb_state*, mrb_value, mrb_sym, mrb_value);
|
40
41
|
MRB_API mrb_bool mrb_const_defined(mrb_state*, mrb_value, mrb_sym);
|
@@ -27,7 +27,7 @@ MRB_BEGIN_DECL
|
|
27
27
|
/*
|
28
28
|
* The version of Ruby used by mruby.
|
29
29
|
*/
|
30
|
-
#define MRUBY_RUBY_VERSION "
|
30
|
+
#define MRUBY_RUBY_VERSION "3.0"
|
31
31
|
|
32
32
|
/*
|
33
33
|
* Ruby engine.
|
@@ -37,18 +37,36 @@ MRB_BEGIN_DECL
|
|
37
37
|
/*
|
38
38
|
* Major release version number.
|
39
39
|
*/
|
40
|
-
#define MRUBY_RELEASE_MAJOR
|
40
|
+
#define MRUBY_RELEASE_MAJOR 3
|
41
41
|
|
42
42
|
/*
|
43
43
|
* Minor release version number.
|
44
44
|
*/
|
45
|
-
#define MRUBY_RELEASE_MINOR
|
45
|
+
#define MRUBY_RELEASE_MINOR 0
|
46
46
|
|
47
47
|
/*
|
48
48
|
* Tiny release version number.
|
49
49
|
*/
|
50
50
|
#define MRUBY_RELEASE_TEENY 0
|
51
51
|
|
52
|
+
/*
|
53
|
+
* Patch level.
|
54
|
+
*/
|
55
|
+
#define MRUBY_PATCHLEVEL -1
|
56
|
+
|
57
|
+
/*
|
58
|
+
* Patch level string. (optional)
|
59
|
+
*/
|
60
|
+
#define MRUBY_PATCHLEVEL_STR ""
|
61
|
+
|
62
|
+
#ifndef MRUBY_PATCHLEVEL_STR
|
63
|
+
# if MRUBY_PATCHLEVEL < 0
|
64
|
+
# define MRUBY_PATCHLEVEL_STR "dev"
|
65
|
+
# else
|
66
|
+
# define MRUBY_PATCHLEVEL_STR "p"MRB_STRINGIZE(MRUBY_PATCHLEVEL)
|
67
|
+
# endif
|
68
|
+
#endif
|
69
|
+
|
52
70
|
/*
|
53
71
|
* The mruby version.
|
54
72
|
*/
|
@@ -62,17 +80,17 @@ MRB_BEGIN_DECL
|
|
62
80
|
/*
|
63
81
|
* Release year.
|
64
82
|
*/
|
65
|
-
#define MRUBY_RELEASE_YEAR
|
83
|
+
#define MRUBY_RELEASE_YEAR 2021
|
66
84
|
|
67
85
|
/*
|
68
86
|
* Release month.
|
69
87
|
*/
|
70
|
-
#define MRUBY_RELEASE_MONTH
|
88
|
+
#define MRUBY_RELEASE_MONTH 3
|
71
89
|
|
72
90
|
/*
|
73
91
|
* Release day.
|
74
92
|
*/
|
75
|
-
#define MRUBY_RELEASE_DAY
|
93
|
+
#define MRUBY_RELEASE_DAY 5
|
76
94
|
|
77
95
|
/*
|
78
96
|
* Release date as a string.
|
@@ -108,6 +126,7 @@ MRB_BEGIN_DECL
|
|
108
126
|
*/
|
109
127
|
#define MRUBY_DESCRIPTION \
|
110
128
|
"mruby " MRUBY_VERSION \
|
129
|
+
MRUBY_PATCHLEVEL_STR \
|
111
130
|
" (" MRUBY_RELEASE_DATE ")" \
|
112
131
|
|
113
132
|
/*
|
@@ -1,10 +1,11 @@
|
|
1
|
-
require "mruby
|
1
|
+
require "mruby/core_ext"
|
2
2
|
require "mruby/build/load_gems"
|
3
3
|
require "mruby/build/command"
|
4
4
|
|
5
5
|
module MRuby
|
6
6
|
autoload :Gem, "mruby/gem"
|
7
7
|
autoload :Lockfile, "mruby/lockfile"
|
8
|
+
autoload :Presym, "mruby/presym"
|
8
9
|
|
9
10
|
class << self
|
10
11
|
def targets
|
@@ -22,6 +23,18 @@ def each_target(&block)
|
|
22
23
|
class Toolchain
|
23
24
|
class << self
|
24
25
|
attr_accessor :toolchains
|
26
|
+
|
27
|
+
def guess
|
28
|
+
if cc = ENV["CC"] || ENV["CXX"]
|
29
|
+
return "clang" if cc.include?("clang")
|
30
|
+
else
|
31
|
+
return "clang" if RUBY_PLATFORM =~ /darwin|(?:free|open)bsd/
|
32
|
+
return "gcc" if RUBY_PLATFORM.include?("cygwin")
|
33
|
+
return "visualcpp" if ENV.include?("VisualStudioVersion")
|
34
|
+
return "visualcpp" if ENV.include?("VSINSTALLDIR")
|
35
|
+
end
|
36
|
+
"gcc"
|
37
|
+
end
|
25
38
|
end
|
26
39
|
|
27
40
|
def initialize(name, &block)
|
@@ -29,7 +42,7 @@ def initialize(name, &block)
|
|
29
42
|
MRuby::Toolchain.toolchains[@name] = self
|
30
43
|
end
|
31
44
|
|
32
|
-
def setup(conf,params={})
|
45
|
+
def setup(conf, params={})
|
33
46
|
conf.instance_exec(conf, params, &@initializer)
|
34
47
|
end
|
35
48
|
|
@@ -39,12 +52,27 @@ def setup(conf,params={})
|
|
39
52
|
class Build
|
40
53
|
class << self
|
41
54
|
attr_accessor :current
|
55
|
+
|
56
|
+
def mruby_config_path
|
57
|
+
path = ENV['MRUBY_CONFIG'] || ENV['CONFIG']
|
58
|
+
if path.nil? || path.empty?
|
59
|
+
path = "#{MRUBY_ROOT}/build_config/default.rb"
|
60
|
+
elsif !File.file?(path) && !Pathname.new(path).absolute?
|
61
|
+
f = "#{MRUBY_ROOT}/build_config/#{path}.rb"
|
62
|
+
path = File.exist?(f) ? f : File.extname(path).empty? ? f : path
|
63
|
+
end
|
64
|
+
path
|
65
|
+
end
|
66
|
+
|
67
|
+
def install_dir
|
68
|
+
@install_dir ||= ENV['INSTALL_DIR'] || "#{MRUBY_ROOT}/bin"
|
69
|
+
end
|
42
70
|
end
|
71
|
+
|
43
72
|
include Rake::DSL
|
44
73
|
include LoadGems
|
45
74
|
attr_accessor :name, :bins, :exts, :file_separator, :build_dir, :gem_clone_dir
|
46
|
-
attr_reader :libmruby_objs, :gems, :toolchains, :gem_dir_to_repo_url
|
47
|
-
attr_writer :enable_bintest, :enable_test
|
75
|
+
attr_reader :products, :libmruby_core_objs, :libmruby_objs, :gems, :toolchains, :presym, :mrbc_build, :gem_dir_to_repo_url
|
48
76
|
|
49
77
|
alias libmruby libmruby_objs
|
50
78
|
|
@@ -52,16 +80,16 @@ class << self
|
|
52
80
|
COMMANDS = COMPILERS + %w(linker archiver yacc gperf git exts mrbc)
|
53
81
|
attr_block MRuby::Build::COMMANDS
|
54
82
|
|
55
|
-
Exts = Struct.new(:object, :executable, :library)
|
83
|
+
Exts = Struct.new(:object, :executable, :library, :presym_preprocessed)
|
56
84
|
|
57
|
-
def initialize(name='host', build_dir=nil, &block)
|
85
|
+
def initialize(name='host', build_dir=nil, internal: false, &block)
|
58
86
|
@name = name.to_s
|
59
87
|
|
60
|
-
unless MRuby.targets[@name]
|
88
|
+
unless current = MRuby.targets[@name]
|
61
89
|
if ENV['OS'] == 'Windows_NT'
|
62
|
-
@exts = Exts.new('.o', '.exe', '.a')
|
90
|
+
@exts = Exts.new('.o', '.exe', '.a', '.pi')
|
63
91
|
else
|
64
|
-
@exts = Exts.new('.o', '', '.a')
|
92
|
+
@exts = Exts.new('.o', '', '.a', '.pi')
|
65
93
|
end
|
66
94
|
|
67
95
|
build_dir = build_dir || ENV['MRUBY_BUILD_DIR'] || "#{MRUBY_ROOT}/build"
|
@@ -69,10 +97,10 @@ def initialize(name='host', build_dir=nil, &block)
|
|
69
97
|
@file_separator = '/'
|
70
98
|
@build_dir = "#{build_dir}/#{@name}"
|
71
99
|
@gem_clone_dir = "#{build_dir}/repos/#{@name}"
|
72
|
-
@cc = Command::Compiler.new(self, %w(.c))
|
73
|
-
@cxx = Command::Compiler.new(self, %w(.cc .cxx .cpp))
|
74
|
-
@objc = Command::Compiler.new(self, %w(.m))
|
75
|
-
@asm = Command::Compiler.new(self, %w(.S .asm))
|
100
|
+
@cc = Command::Compiler.new(self, %w(.c), label: "CC")
|
101
|
+
@cxx = Command::Compiler.new(self, %w(.cc .cxx .cpp), label: "CXX")
|
102
|
+
@objc = Command::Compiler.new(self, %w(.m), label: "OBJC")
|
103
|
+
@asm = Command::Compiler.new(self, %w(.S .asm .s), label: "ASM")
|
76
104
|
@linker = Command::Linker.new(self)
|
77
105
|
@archiver = Command::Archiver.new(self)
|
78
106
|
@yacc = Command::Yacc.new(self)
|
@@ -80,8 +108,12 @@ def initialize(name='host', build_dir=nil, &block)
|
|
80
108
|
@git = Command::Git.new(self)
|
81
109
|
@mrbc = Command::Mrbc.new(self)
|
82
110
|
|
111
|
+
@products = []
|
83
112
|
@bins = []
|
84
|
-
@gems
|
113
|
+
@gems = MRuby::Gem::List.new
|
114
|
+
@libmruby_core_objs = []
|
115
|
+
@libmruby_objs = [@libmruby_core_objs]
|
116
|
+
@enable_libmruby = true
|
85
117
|
@build_mrbtest_lib_only = false
|
86
118
|
@cxx_exception_enabled = false
|
87
119
|
@cxx_exception_disabled = false
|
@@ -89,17 +121,33 @@ def initialize(name='host', build_dir=nil, &block)
|
|
89
121
|
@enable_bintest = false
|
90
122
|
@enable_test = false
|
91
123
|
@enable_lock = true
|
124
|
+
@enable_presym = true
|
125
|
+
@mrbcfile_external = false
|
126
|
+
@internal = internal
|
92
127
|
@toolchains = []
|
93
128
|
@gem_dir_to_repo_url = {}
|
94
129
|
|
95
|
-
MRuby.targets[@name] = self
|
130
|
+
MRuby.targets[@name] = current = self
|
96
131
|
end
|
97
132
|
|
98
|
-
MRuby::Build.current =
|
99
|
-
|
133
|
+
MRuby::Build.current = current
|
134
|
+
current.instance_eval(&block)
|
135
|
+
if current.libmruby_enabled? && !current.mrbcfile_external?
|
136
|
+
if current.presym_enabled?
|
137
|
+
current.create_mrbc_build if current.host? || current.gems["mruby-bin-mrbc"]
|
138
|
+
elsif current.host?
|
139
|
+
current.build_mrbc_exec
|
140
|
+
end
|
141
|
+
end
|
142
|
+
current.presym = Presym.new(current) if current.presym_enabled?
|
143
|
+
end
|
144
|
+
|
145
|
+
def libmruby_enabled?
|
146
|
+
@enable_libmruby
|
147
|
+
end
|
100
148
|
|
101
|
-
|
102
|
-
|
149
|
+
def disable_libmruby
|
150
|
+
@enable_libmruby = false
|
103
151
|
end
|
104
152
|
|
105
153
|
def debug_enabled?
|
@@ -118,6 +166,17 @@ def enable_debug
|
|
118
166
|
@enable_debug = true
|
119
167
|
end
|
120
168
|
|
169
|
+
def presym_enabled?
|
170
|
+
@enable_presym
|
171
|
+
end
|
172
|
+
|
173
|
+
def disable_presym
|
174
|
+
if @enable_presym
|
175
|
+
@enable_presym = false
|
176
|
+
compilers.each{|c| c.defines << "MRB_NO_PRESYM"}
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
121
180
|
def disable_lock
|
122
181
|
@enable_lock = false
|
123
182
|
end
|
@@ -141,7 +200,7 @@ def enable_cxx_exception
|
|
141
200
|
end
|
142
201
|
@cxx_exception_enabled = true
|
143
202
|
compilers.each { |c|
|
144
|
-
c.defines += %w(
|
203
|
+
c.defines += %w(MRB_USE_CXX_EXCEPTION)
|
145
204
|
c.flags << c.cxx_exception_flag
|
146
205
|
}
|
147
206
|
linker.command = cxx.command if toolchains.find { |v| v == 'gcc' }
|
@@ -161,7 +220,7 @@ def enable_cxx_abi
|
|
161
220
|
raise "cxx_exception already enabled"
|
162
221
|
end
|
163
222
|
compilers.each { |c|
|
164
|
-
c.defines += %w(
|
223
|
+
c.defines += %w(MRB_USE_CXX_EXCEPTION MRB_USE_CXX_ABI)
|
165
224
|
c.flags << c.cxx_compile_flag
|
166
225
|
c.flags = c.flags.flatten - c.cxx_invalid_flags.flatten
|
167
226
|
}
|
@@ -169,8 +228,29 @@ def enable_cxx_abi
|
|
169
228
|
@cxx_abi_enabled = true
|
170
229
|
end
|
171
230
|
|
172
|
-
def compile_as_cxx
|
173
|
-
|
231
|
+
def compile_as_cxx(src, cxx_src = nil, obj = nil, includes = [])
|
232
|
+
#
|
233
|
+
# If `cxx_src` is specified, this method behaves the same as before as
|
234
|
+
# compatibility mode, but `.d` file is not read.
|
235
|
+
#
|
236
|
+
# If `cxx_src` is omitted, `.d` file is read by using mruby standard
|
237
|
+
# Rake rule (C++ source name is also changed).
|
238
|
+
#
|
239
|
+
if cxx_src
|
240
|
+
obj ||= cxx_src + @exts.object
|
241
|
+
dsts = [obj]
|
242
|
+
dsts << (cxx_src + @exts.presym_preprocessed) if presym_enabled?
|
243
|
+
defines = []
|
244
|
+
include_paths = ["#{MRUBY_ROOT}/src", *includes]
|
245
|
+
dsts.each do |dst|
|
246
|
+
file dst => cxx_src do |t|
|
247
|
+
cxx.run t.name, t.prerequisites.first, defines, include_paths
|
248
|
+
end
|
249
|
+
end
|
250
|
+
else
|
251
|
+
cxx_src = "#{build_dir}/#{src.relative_path})".ext << "-cxx.cxx"
|
252
|
+
obj = cxx_src.ext(@exts.object)
|
253
|
+
end
|
174
254
|
|
175
255
|
file cxx_src => [src, __FILE__] do |t|
|
176
256
|
mkdir_p File.dirname t.name
|
@@ -178,20 +258,16 @@ def compile_as_cxx src, cxx_src, obj = nil, includes = []
|
|
178
258
|
#define __STDC_CONSTANT_MACROS
|
179
259
|
#define __STDC_LIMIT_MACROS
|
180
260
|
|
181
|
-
#ifndef
|
261
|
+
#ifndef MRB_USE_CXX_ABI
|
182
262
|
extern "C" {
|
183
263
|
#endif
|
184
264
|
#include "#{File.absolute_path src}"
|
185
|
-
#ifndef
|
265
|
+
#ifndef MRB_USE_CXX_ABI
|
186
266
|
}
|
187
267
|
#endif
|
188
268
|
EOS
|
189
269
|
end
|
190
270
|
|
191
|
-
file obj => cxx_src do |t|
|
192
|
-
cxx.run t.name, t.prerequisites.first, [], ["#{MRUBY_ROOT}/src"] + includes
|
193
|
-
end
|
194
|
-
|
195
271
|
obj
|
196
272
|
end
|
197
273
|
|
@@ -203,7 +279,7 @@ def bintest_enabled?
|
|
203
279
|
@enable_bintest
|
204
280
|
end
|
205
281
|
|
206
|
-
def toolchain(name, params={})
|
282
|
+
def toolchain(name=Toolchain.guess, params={})
|
207
283
|
name = name.to_s
|
208
284
|
tc = Toolchain.toolchains[name] || begin
|
209
285
|
path = "#{MRUBY_ROOT}/tasks/toolchains/#{name}.rake"
|
@@ -226,17 +302,14 @@ def root
|
|
226
302
|
def enable_test
|
227
303
|
@enable_test = true
|
228
304
|
end
|
305
|
+
alias build_mrbtest enable_test
|
229
306
|
|
230
307
|
def test_enabled?
|
231
308
|
@enable_test
|
232
309
|
end
|
233
310
|
|
234
|
-
def build_mrbtest
|
235
|
-
gem :core => 'mruby-test'
|
236
|
-
end
|
237
|
-
|
238
311
|
def build_mrbc_exec
|
239
|
-
gem :core => 'mruby-bin-mrbc'
|
312
|
+
gem :core => 'mruby-bin-mrbc' unless @gems['mruby-bin-mrbc']
|
240
313
|
end
|
241
314
|
|
242
315
|
def locks
|
@@ -246,9 +319,22 @@ def locks
|
|
246
319
|
def mrbcfile
|
247
320
|
return @mrbcfile if @mrbcfile
|
248
321
|
|
249
|
-
|
250
|
-
|
251
|
-
|
322
|
+
gem_name = "mruby-bin-mrbc"
|
323
|
+
gem = @gems[gem_name]
|
324
|
+
gem ||= (host = MRuby.targets["host"]) && host.gems[gem_name]
|
325
|
+
unless gem
|
326
|
+
fail "external mrbc or mruby-bin-mrbc gem in current('#{@name}') or 'host' build is required"
|
327
|
+
end
|
328
|
+
@mrbcfile = exefile("#{gem.build.build_dir}/bin/mrbc")
|
329
|
+
end
|
330
|
+
|
331
|
+
def mrbcfile=(path)
|
332
|
+
@mrbcfile = path
|
333
|
+
@mrbcfile_external = true
|
334
|
+
end
|
335
|
+
|
336
|
+
def mrbcfile_external?
|
337
|
+
@mrbcfile_external
|
252
338
|
end
|
253
339
|
|
254
340
|
def compilers
|
@@ -258,29 +344,39 @@ def compilers
|
|
258
344
|
end
|
259
345
|
|
260
346
|
def define_rules
|
347
|
+
use_mrdb = @gems["mruby-bin-debugger"]
|
261
348
|
compilers.each do |compiler|
|
262
349
|
if respond_to?(:enable_gems?) && enable_gems?
|
263
|
-
compiler.defines -= %w(
|
350
|
+
compiler.defines -= %w(MRB_NO_GEMS)
|
264
351
|
else
|
265
|
-
compiler.defines += %w(
|
352
|
+
compiler.defines += %w(MRB_NO_GEMS)
|
266
353
|
end
|
267
|
-
compiler.
|
354
|
+
compiler.defines |= %w(MRB_USE_DEBUG_HOOK) if use_mrdb
|
355
|
+
end
|
356
|
+
[@cc, *(@cxx if cxx_exception_enabled?)].each do |compiler|
|
357
|
+
compiler.define_rules(@build_dir, MRUBY_ROOT, @exts.object)
|
358
|
+
compiler.define_rules(@build_dir, MRUBY_ROOT, @exts.presym_preprocessed) if presym_enabled?
|
268
359
|
end
|
269
360
|
end
|
270
361
|
|
271
|
-
def
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
name.gsub('/', file_separator)
|
362
|
+
def define_installer(src)
|
363
|
+
dst = "#{self.class.install_dir}/#{File.basename(src)}"
|
364
|
+
file dst => src do
|
365
|
+
install_D src, dst
|
276
366
|
end
|
367
|
+
dst
|
277
368
|
end
|
278
369
|
|
279
|
-
def
|
370
|
+
def define_installer_if_needed(bin)
|
371
|
+
exe = exefile("#{build_dir}/bin/#{bin}")
|
372
|
+
host? ? define_installer(exe) : exe
|
373
|
+
end
|
374
|
+
|
375
|
+
def filename(name)
|
280
376
|
if name.is_a?(Array)
|
281
|
-
name.flatten.map { |n|
|
377
|
+
name.flatten.map { |n| filename(n) }
|
282
378
|
else
|
283
|
-
'
|
379
|
+
name.gsub('/', file_separator)
|
284
380
|
end
|
285
381
|
end
|
286
382
|
|
@@ -334,7 +430,9 @@ def run_bintest
|
|
334
430
|
puts ">>> Bintest #{name} <<<"
|
335
431
|
targets = @gems.select { |v| File.directory? "#{v.dir}/bintest" }.map { |v| filename v.dir }
|
336
432
|
targets << filename(".") if File.directory? "./bintest"
|
337
|
-
|
433
|
+
mrbc = @gems["mruby-bin-mrbc"] ? exefile("#{@build_dir}/bin/mrbc") : mrbcfile
|
434
|
+
env = {"BUILD_DIR" => @build_dir, "MRBCFILE" => mrbc}
|
435
|
+
sh env, "ruby test/bintest.rb#{verbose_flag} #{targets.join ' '}"
|
338
436
|
end
|
339
437
|
|
340
438
|
def print_build_summary
|
@@ -344,7 +442,8 @@ def print_build_summary
|
|
344
442
|
puts " Binaries: #{@bins.join(', ')}" unless @bins.empty?
|
345
443
|
unless @gems.empty?
|
346
444
|
puts " Included Gems:"
|
347
|
-
@gems.
|
445
|
+
gems = @gems.sort_by { |gem| gem.name }
|
446
|
+
gems.each do |gem|
|
348
447
|
gem_version = " - #{gem.version}" if gem.version != '0.0.0'
|
349
448
|
gem_summary = " - #{gem.summary}" if gem.summary
|
350
449
|
puts " #{gem.name}#{gem_version}#{gem_summary}"
|
@@ -366,6 +465,42 @@ def libmruby_core_static
|
|
366
465
|
def libraries
|
367
466
|
[libmruby_static]
|
368
467
|
end
|
468
|
+
|
469
|
+
def host?
|
470
|
+
@name == "host"
|
471
|
+
end
|
472
|
+
|
473
|
+
def internal?
|
474
|
+
@internal
|
475
|
+
end
|
476
|
+
|
477
|
+
protected
|
478
|
+
|
479
|
+
attr_writer :presym
|
480
|
+
|
481
|
+
def create_mrbc_build
|
482
|
+
exclusions = %i[@name @build_dir @gems @enable_test @enable_bintest @internal]
|
483
|
+
name = "#{@name}/mrbc"
|
484
|
+
MRuby.targets.delete(name)
|
485
|
+
build = self.class.new(name, internal: true){}
|
486
|
+
build.build_dir = "#{@build_dir}/mrbc"
|
487
|
+
instance_variables.each do |n|
|
488
|
+
next if exclusions.include?(n)
|
489
|
+
v = instance_variable_get(n)
|
490
|
+
v = case v
|
491
|
+
when nil, true, false, Numeric; v
|
492
|
+
when String, Command; v.clone
|
493
|
+
else Marshal.load(Marshal.dump(v)) # deep clone
|
494
|
+
end
|
495
|
+
build.instance_variable_set(n, v)
|
496
|
+
end
|
497
|
+
build.build_mrbc_exec
|
498
|
+
build.disable_libmruby
|
499
|
+
build.disable_presym
|
500
|
+
@mrbc_build = build
|
501
|
+
self.mrbcfile = build.mrbcfile
|
502
|
+
build
|
503
|
+
end
|
369
504
|
end # Build
|
370
505
|
|
371
506
|
class CrossBuild < Build
|
@@ -376,13 +511,21 @@ class CrossBuild < Build
|
|
376
511
|
attr_accessor :host_target, :build_target
|
377
512
|
|
378
513
|
def initialize(name, build_dir=nil, &block)
|
379
|
-
@endian = nil
|
380
514
|
@test_runner = Command::CrossTestRunner.new(self)
|
381
515
|
super
|
516
|
+
unless mrbcfile_external? || MRuby.targets['host']
|
517
|
+
# add minimal 'host'
|
518
|
+
MRuby::Build.new('host') do |conf|
|
519
|
+
conf.toolchain
|
520
|
+
conf.build_mrbc_exec
|
521
|
+
conf.disable_libmruby
|
522
|
+
conf.disable_presym
|
523
|
+
end
|
524
|
+
end
|
382
525
|
end
|
383
526
|
|
384
527
|
def mrbcfile
|
385
|
-
MRuby
|
528
|
+
mrbcfile_external? ? super : MRuby::targets['host'].mrbcfile
|
386
529
|
end
|
387
530
|
|
388
531
|
def run_test
|
@@ -396,25 +539,8 @@ def run_test
|
|
396
539
|
end
|
397
540
|
end
|
398
541
|
|
399
|
-
|
400
|
-
if @endian
|
401
|
-
puts "Endian has already specified as #{@endian}."
|
402
|
-
return
|
403
|
-
end
|
404
|
-
@endian = :big
|
405
|
-
@mrbc.compile_options += ' -E'
|
406
|
-
compilers.each do |c|
|
407
|
-
c.defines += %w(MRB_ENDIAN_BIG)
|
408
|
-
end
|
409
|
-
end
|
542
|
+
protected
|
410
543
|
|
411
|
-
def
|
412
|
-
if @endian
|
413
|
-
puts "Endian has already specified as #{@endian}."
|
414
|
-
return
|
415
|
-
end
|
416
|
-
@endian = :little
|
417
|
-
@mrbc.compile_options += ' -e'
|
418
|
-
end
|
544
|
+
def create_mrbc_build; end
|
419
545
|
end # CrossBuild
|
420
546
|
end # MRuby
|