script_core 0.2.2 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +41 -45
- data/.travis.yml +2 -1
- data/Gemfile +3 -3
- data/README.md +7 -1
- data/bootstrap.sh +2 -2
- 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 +106 -0
- data/ext/enterprise_script_service/mruby/.github/workflows/codeql-analysis.yml +51 -0
- data/ext/enterprise_script_service/mruby/.github/workflows/main.yml +24 -0
- data/ext/enterprise_script_service/mruby/.gitignore +3 -0
- data/ext/enterprise_script_service/mruby/.travis.yml +6 -9
- data/ext/enterprise_script_service/mruby/AUTHORS +1 -0
- data/ext/enterprise_script_service/mruby/Doxyfile +1 -1
- data/ext/enterprise_script_service/mruby/LICENSE +1 -1
- data/ext/enterprise_script_service/mruby/README.md +6 -2
- data/ext/enterprise_script_service/mruby/appveyor.yml +9 -12
- data/ext/enterprise_script_service/mruby/appveyor_config.rb +9 -0
- data/ext/enterprise_script_service/mruby/build_config.rb +6 -6
- data/ext/enterprise_script_service/mruby/doc/guides/compile.md +6 -2
- data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
- data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +4 -8
- data/ext/enterprise_script_service/mruby/doc/limitations.md +10 -10
- data/ext/enterprise_script_service/mruby/doc/opcode.md +108 -95
- data/ext/enterprise_script_service/mruby/examples/targets/build_config_ArduinoDue.rb +2 -2
- data/ext/enterprise_script_service/mruby/examples/targets/build_config_IntelEdison.rb +2 -2
- data/ext/enterprise_script_service/mruby/examples/targets/build_config_IntelGalileo.rb +2 -2
- data/ext/enterprise_script_service/mruby/examples/targets/build_config_RX630.rb +2 -2
- data/ext/enterprise_script_service/mruby/examples/targets/build_config_chipKITMax32.rb +2 -2
- data/ext/enterprise_script_service/mruby/examples/targets/build_config_dreamcast_shelf.rb +108 -0
- data/ext/enterprise_script_service/mruby/include/mrbconf.h +10 -7
- data/ext/enterprise_script_service/mruby/include/mruby.h +24 -9
- data/ext/enterprise_script_service/mruby/include/mruby/array.h +4 -0
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +11 -2
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +0 -10
- data/ext/enterprise_script_service/mruby/include/mruby/common.h +10 -0
- data/ext/enterprise_script_service/mruby/include/mruby/compile.h +11 -3
- data/ext/enterprise_script_service/mruby/include/mruby/dump.h +1 -17
- data/ext/enterprise_script_service/mruby/include/mruby/irep.h +10 -0
- data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -1
- data/ext/enterprise_script_service/mruby/include/mruby/khash.h +23 -5
- data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +1 -0
- data/ext/enterprise_script_service/mruby/include/mruby/ops.h +3 -2
- data/ext/enterprise_script_service/mruby/include/mruby/proc.h +13 -8
- data/ext/enterprise_script_service/mruby/include/mruby/string.h +2 -1
- data/ext/enterprise_script_service/mruby/include/mruby/value.h +32 -41
- data/ext/enterprise_script_service/mruby/include/mruby/version.h +4 -4
- data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +2 -30
- data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +21 -46
- data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +9 -0
- data/ext/enterprise_script_service/mruby/lib/mruby/source.rb +3 -1
- data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +7 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +0 -31
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +5 -8
- 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 +5 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +5 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +7 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +24 -21
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +6 -2
- 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-class-ext/src/class.c +6 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +76 -48
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +107 -32
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/y.tab.c +13153 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/mrbgem.rake +13 -15
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +1 -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 +3 -214
- 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 +1 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/src/hash-ext.c +1 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-inline-struct/test/inline.c +3 -4
- 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_constants.rb +0 -16
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +7 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +77 -32
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +18 -36
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +324 -122
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +18 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +32 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +57 -49
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +6 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +15 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +9 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +4 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +3 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +113 -10
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/src/print.c +6 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +1 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +1 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +9 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/src/mrb_sleep.c +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/mrbgem.rake +1 -1
- 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 +62 -25
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/test/sprintf.rb +5 -23
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +4 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +5 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +1 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +11 -15
- data/ext/enterprise_script_service/mruby/mrblib/00class.rb +10 -0
- data/ext/enterprise_script_service/mruby/mrblib/hash.rb +3 -3
- data/ext/enterprise_script_service/mruby/src/array.c +25 -11
- data/ext/enterprise_script_service/mruby/src/backtrace.c +2 -2
- data/ext/enterprise_script_service/mruby/src/class.c +48 -32
- data/ext/enterprise_script_service/mruby/src/codedump.c +4 -0
- data/ext/enterprise_script_service/mruby/src/debug.c +8 -5
- data/ext/enterprise_script_service/mruby/src/dump.c +3 -65
- data/ext/enterprise_script_service/mruby/src/error.c +58 -7
- data/ext/enterprise_script_service/mruby/src/etc.c +13 -5
- data/ext/enterprise_script_service/mruby/src/fmt_fp.c +98 -21
- data/ext/enterprise_script_service/mruby/src/gc.c +15 -280
- data/ext/enterprise_script_service/mruby/src/hash.c +13 -21
- data/ext/enterprise_script_service/mruby/src/kernel.c +6 -9
- data/ext/enterprise_script_service/mruby/src/load.c +56 -30
- data/ext/enterprise_script_service/mruby/src/numeric.c +50 -70
- data/ext/enterprise_script_service/mruby/src/object.c +23 -5
- data/ext/enterprise_script_service/mruby/src/print.c +27 -3
- data/ext/enterprise_script_service/mruby/src/proc.c +26 -7
- data/ext/enterprise_script_service/mruby/src/range.c +4 -12
- data/ext/enterprise_script_service/mruby/src/state.c +34 -11
- data/ext/enterprise_script_service/mruby/src/string.c +93 -56
- data/ext/enterprise_script_service/mruby/src/symbol.c +13 -12
- data/ext/enterprise_script_service/mruby/src/vm.c +48 -53
- data/ext/enterprise_script_service/mruby/tasks/gitlab.rake +19 -22
- data/ext/enterprise_script_service/mruby/tasks/mrbgems.rake +1 -1
- data/ext/enterprise_script_service/mruby/tasks/toolchains/android.rake +46 -1
- data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +3 -3
- data/ext/enterprise_script_service/mruby/tasks/toolchains/openwrt.rake +6 -6
- data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +8 -8
- data/ext/enterprise_script_service/mruby/test/assert.rb +5 -4
- 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/kernel.rb +15 -24
- data/ext/enterprise_script_service/mruby/travis_config.rb +0 -14
- 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/result.rb +1 -5
- data/lib/script_core/service_channel.rb +1 -0
- data/lib/script_core/version.rb +1 -1
- data/lib/tasks/script_core.rake +3 -1
- data/script_core.gemspec +2 -2
- data/spec/dummy/app/lib/script_engine.rb +64 -5
- metadata +68 -30
- 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/msgpack/.travis.yml +0 -258
@@ -4,20 +4,23 @@ os: Visual Studio 2017
|
|
4
4
|
|
5
5
|
shallow_clone: true
|
6
6
|
|
7
|
-
|
8
|
-
cache:
|
9
|
-
- win_flex_bison
|
10
|
-
|
11
|
-
|
12
7
|
environment:
|
13
8
|
matrix:
|
14
9
|
# Visual Studio 2017 64bit
|
15
10
|
- visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat
|
16
11
|
|
12
|
+
# Visual Studio 2017 32bit
|
13
|
+
- visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
|
14
|
+
machine: x86
|
15
|
+
|
17
16
|
# Visual Studio 2015 64bit
|
18
17
|
- visualcpp: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
|
19
18
|
machine: amd64
|
20
19
|
|
20
|
+
# Visual Studio 2015 32bit
|
21
|
+
- visualcpp: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
|
22
|
+
machine: x86
|
23
|
+
|
21
24
|
# Visual Studio 2013 64bit
|
22
25
|
- visualcpp: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
|
23
26
|
machine: amd64
|
@@ -30,13 +33,7 @@ init:
|
|
30
33
|
- ruby --version
|
31
34
|
|
32
35
|
|
33
|
-
install:
|
34
|
-
- if not exist win_flex_bison (
|
35
|
-
appveyor DownloadFile "https://github.com/lexxmark/winflexbison/releases/download/v.2.5.10/win_flex_bison-2.5.10.zip" &
|
36
|
-
7z x -y -owin_flex_bison win_flex_bison-2.5.10.zip
|
37
|
-
)
|
38
|
-
|
39
36
|
build_script:
|
40
|
-
- set YACC=.\win_flex_bison\win_bison.exe
|
41
37
|
- set MRUBY_CONFIG=appveyor_config.rb
|
38
|
+
- rake -m
|
42
39
|
- rake -E $stdout.sync=true test
|
@@ -1,3 +1,9 @@
|
|
1
|
+
def setup_option(conf)
|
2
|
+
conf.cc.flags[0].delete("/Zi") unless ENV['CFLAGS']
|
3
|
+
conf.cxx.flags[0].delete("/Zi") unless ENV['CFLAGS'] || ENV['CXXFLAGS']
|
4
|
+
conf.linker.flags << "/DEBUG:NONE" unless ENV['LDFLAGS']
|
5
|
+
end
|
6
|
+
|
1
7
|
MRuby::Build.new('full-debug') do |conf|
|
2
8
|
toolchain :visualcpp
|
3
9
|
enable_debug
|
@@ -5,6 +11,7 @@
|
|
5
11
|
# include all core GEMs
|
6
12
|
conf.gembox 'full-core'
|
7
13
|
conf.cc.defines += %w(MRB_GC_STRESS MRB_METHOD_CACHE MRB_ENABLE_DEBUG_HOOK)
|
14
|
+
setup_option(conf)
|
8
15
|
|
9
16
|
conf.enable_test
|
10
17
|
end
|
@@ -17,6 +24,7 @@
|
|
17
24
|
conf.compilers.each do |c|
|
18
25
|
c.defines += %w(MRB_GC_FIXED_ARENA)
|
19
26
|
end
|
27
|
+
setup_option(conf)
|
20
28
|
conf.enable_bintest
|
21
29
|
conf.enable_test
|
22
30
|
end
|
@@ -28,6 +36,7 @@
|
|
28
36
|
conf.compilers.each do |c|
|
29
37
|
c.defines += %w(MRB_GC_FIXED_ARENA)
|
30
38
|
end
|
39
|
+
setup_option(conf)
|
31
40
|
conf.enable_bintest
|
32
41
|
conf.enable_test
|
33
42
|
|
@@ -30,9 +30,9 @@
|
|
30
30
|
# cc.flags = [ENV['CFLAGS'] || %w()]
|
31
31
|
# cc.include_paths = ["#{root}/include"]
|
32
32
|
# cc.defines = %w()
|
33
|
-
# cc.option_include_path =
|
33
|
+
# cc.option_include_path = %q[-I"%s"]
|
34
34
|
# cc.option_define = '-D%s'
|
35
|
-
# cc.compile_options =
|
35
|
+
# cc.compile_options = %Q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"]
|
36
36
|
# end
|
37
37
|
|
38
38
|
# mrbc settings
|
@@ -50,25 +50,25 @@
|
|
50
50
|
# linker.library_paths = []
|
51
51
|
# linker.option_library = '-l%s'
|
52
52
|
# linker.option_library_path = '-L%s'
|
53
|
-
# linker.link_options = "%{flags} -o %{outfile} %{objs} %{libs}"
|
53
|
+
# linker.link_options = "%{flags} -o "%{outfile}" %{objs} %{libs}"
|
54
54
|
# end
|
55
55
|
|
56
56
|
# Archiver settings
|
57
57
|
# conf.archiver do |archiver|
|
58
58
|
# archiver.command = ENV['AR'] || 'ar'
|
59
|
-
# archiver.archive_options = 'rs %{outfile} %{objs}'
|
59
|
+
# archiver.archive_options = 'rs "%{outfile}" %{objs}'
|
60
60
|
# end
|
61
61
|
|
62
62
|
# Parser generator settings
|
63
63
|
# conf.yacc do |yacc|
|
64
64
|
# yacc.command = ENV['YACC'] || 'bison'
|
65
|
-
# yacc.compile_options =
|
65
|
+
# yacc.compile_options = %q[-o "%{outfile}" "%{infile}"]
|
66
66
|
# end
|
67
67
|
|
68
68
|
# gperf settings
|
69
69
|
# conf.gperf do |gperf|
|
70
70
|
# gperf.command = 'gperf'
|
71
|
-
# gperf.compile_options =
|
71
|
+
# gperf.compile_options = %q[-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" "%{infile}" > "%{outfile}"]
|
72
72
|
# end
|
73
73
|
|
74
74
|
# file extensions
|
@@ -6,12 +6,16 @@ binaries.
|
|
6
6
|
## Prerequisites
|
7
7
|
|
8
8
|
To compile mruby out of the source code you need the following tools:
|
9
|
-
* C Compiler (e.g. `gcc`)
|
10
|
-
* Linker (e.g. `gcc`)
|
9
|
+
* C Compiler (e.g. `gcc` or `clang`)
|
10
|
+
* Linker (e.g. `gcc` or `clang`)
|
11
11
|
* Archive utility (e.g. `ar`)
|
12
12
|
* Parser generator (e.g. `bison`)
|
13
13
|
* Ruby 2.0 or later (e.g. `ruby` or `jruby`)
|
14
14
|
|
15
|
+
Note that `bison` bundled with MacOS is too old to compile `mruby`.
|
16
|
+
Try `brew install bison` and follow the instuction shown to update
|
17
|
+
the `$PATH` to compile `mruby`.
|
18
|
+
|
15
19
|
Optional:
|
16
20
|
* GIT (to update mruby source and integrate mrbgems easier)
|
17
21
|
* C++ compiler (to use GEMs which include \*.cpp, \*.cxx, \*.cc)
|
@@ -54,17 +54,13 @@ You can use mrbconfs with following ways:
|
|
54
54
|
* When defined removes floating point numbers from mruby.
|
55
55
|
* It makes mruby easier to handle in "Microcontroller without FPU" and "Kernel Space".
|
56
56
|
|
57
|
-
`MRB_INT16`
|
58
|
-
* When defined `int16_t` will be defined as `mrb_int`.
|
59
|
-
* Conflicts with `MRB_INT32` and `MRB_INT64`.
|
60
|
-
|
61
57
|
`MRB_INT32`
|
62
|
-
* When defined, or
|
63
|
-
* Conflicts with `
|
58
|
+
* When defined, or `MRB_INT64` are not defined on 32-bit CPU mode, `mrb_int` will be defined as `int32_t`.
|
59
|
+
* Conflicts with `MRB_INT64`.
|
64
60
|
|
65
61
|
`MRB_INT64`
|
66
|
-
* When defined, or
|
67
|
-
* Conflicts with `
|
62
|
+
* When defined, or `MRB_INT32` are not defined on 64-bit CPU mode, `mrb_int` will be defined as `int64_t`.
|
63
|
+
* Conflicts with `MRB_INT32`.
|
68
64
|
|
69
65
|
## Garbage collector configuration.
|
70
66
|
|
@@ -38,7 +38,7 @@ puts [1,2,3]
|
|
38
38
|
3
|
39
39
|
```
|
40
40
|
|
41
|
-
#### mruby [2.1.
|
41
|
+
#### mruby [2.1.2 (2020-08-06)]
|
42
42
|
|
43
43
|
```
|
44
44
|
[1, 2, 3]
|
@@ -61,7 +61,7 @@ end
|
|
61
61
|
|
62
62
|
`ZeroDivisionError` is raised.
|
63
63
|
|
64
|
-
#### mruby [2.1.
|
64
|
+
#### mruby [2.1.2 (2020-08-06)]
|
65
65
|
|
66
66
|
No exception is raised.
|
67
67
|
|
@@ -89,7 +89,7 @@ p Liste.new "foobar"
|
|
89
89
|
|
90
90
|
` [] `
|
91
91
|
|
92
|
-
#### mruby [2.1.
|
92
|
+
#### mruby [2.1.2 (2020-08-06)]
|
93
93
|
|
94
94
|
`ArgumentError` is raised.
|
95
95
|
|
@@ -119,7 +119,7 @@ false
|
|
119
119
|
true
|
120
120
|
```
|
121
121
|
|
122
|
-
#### mruby [2.1.
|
122
|
+
#### mruby [2.1.2 (2020-08-06)]
|
123
123
|
|
124
124
|
```
|
125
125
|
true
|
@@ -156,7 +156,7 @@ p 'ok'
|
|
156
156
|
ok
|
157
157
|
```
|
158
158
|
|
159
|
-
#### mruby [2.1.
|
159
|
+
#### mruby [2.1.2 (2020-08-06)]
|
160
160
|
|
161
161
|
```
|
162
162
|
test.rb:8: undefined method 'test_func' (NoMethodError)
|
@@ -178,7 +178,7 @@ defined?(Foo)
|
|
178
178
|
nil
|
179
179
|
```
|
180
180
|
|
181
|
-
#### mruby [2.1.
|
181
|
+
#### mruby [2.1.2 (2020-08-06)]
|
182
182
|
|
183
183
|
`NameError` is raised.
|
184
184
|
|
@@ -195,7 +195,7 @@ alias $a $__a__
|
|
195
195
|
|
196
196
|
` nil `
|
197
197
|
|
198
|
-
#### mruby [2.1.
|
198
|
+
#### mruby [2.1.2 (2020-08-06)]
|
199
199
|
|
200
200
|
Syntax error
|
201
201
|
|
@@ -217,7 +217,7 @@ end
|
|
217
217
|
`ArgumentError` is raised.
|
218
218
|
The re-defined `+` operator does not accept any arguments.
|
219
219
|
|
220
|
-
#### mruby [2.1.
|
220
|
+
#### mruby [2.1.2 (2020-08-06)]
|
221
221
|
|
222
222
|
` 'ab' `
|
223
223
|
Behavior of the operator wasn't changed.
|
@@ -233,7 +233,7 @@ $ ruby -e 'puts Proc.new {}.binding'
|
|
233
233
|
#<Binding:0x00000e9deabb9950>
|
234
234
|
```
|
235
235
|
|
236
|
-
#### mruby [2.1.
|
236
|
+
#### mruby [2.1.2 (2020-08-06)]
|
237
237
|
|
238
238
|
```
|
239
239
|
$ ./bin/mruby -e 'puts Proc.new {}.binding'
|
@@ -255,7 +255,7 @@ $ ruby -e 'def m(*r,**k) p [r,k] end; m("a"=>1,:b=>2)'
|
|
255
255
|
[[{"a"=>1}], {:b=>2}]
|
256
256
|
```
|
257
257
|
|
258
|
-
#### mruby [mruby 2.1.
|
258
|
+
#### mruby [mruby 2.1.2]
|
259
259
|
|
260
260
|
```
|
261
261
|
$ ./bin/mruby -e 'def m(*r,**k) p [r,k] end; m("a"=>1,:b=>2)'
|
@@ -16,7 +16,6 @@ In the table.1 below, the second field describes the size (and
|
|
16
16
|
sign) of operands.
|
17
17
|
|
18
18
|
* B: 8bit
|
19
|
-
* sB: signed 8bit
|
20
19
|
* S: 16bit
|
21
20
|
* sS: signed 16bit
|
22
21
|
* W: 24bit
|
@@ -31,97 +30,111 @@ with `"`, either `OP_EXT1` or `OP_EXT2` or `OP_EXT2` can be prefixed.
|
|
31
30
|
|
32
31
|
## table.1 Instruction Table
|
33
32
|
|
34
|
-
| Instruction Name | Operand type | Semantics
|
35
|
-
|
36
|
-
| OP_NOP | - |
|
37
|
-
| OP_MOVE" | BB | R(a) = R(b)
|
38
|
-
| OP_LOADL" | BB | R(a) = Pool(b)
|
39
|
-
| OP_LOADI" |
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
33
|
+
| Instruction Name | Operand type | Semantics |
|
34
|
+
|------------------|--------------|--------------------------------------------------------|
|
35
|
+
| OP_NOP | - | no operation |
|
36
|
+
| OP_MOVE" | BB | R(a) = R(b) |
|
37
|
+
| OP_LOADL" | BB | R(a) = Pool(b) |
|
38
|
+
| OP_LOADI" | BB | R(a) = mrb_int(b) |
|
39
|
+
| OP_LOADINEG" | BB | R(a) = mrb_int(-b) |
|
40
|
+
| OP_LOADI__1' | B | R(a) = mrb_int(-1) |
|
41
|
+
| OP_LOADI_0' | B | R(a) = mrb_int(0) |
|
42
|
+
| OP_LOADI_1' | B | R(a) = mrb_int(1) |
|
43
|
+
| OP_LOADI_2' | B | R(a) = mrb_int(2) |
|
44
|
+
| OP_LOADI_3' | B | R(a) = mrb_int(3) |
|
45
|
+
| OP_LOADI_4' | B | R(a) = mrb_int(4) |
|
46
|
+
| OP_LOADI_5' | B | R(a) = mrb_int(5) |
|
47
|
+
| OP_LOADI_6' | B | R(a) = mrb_int(6) |
|
48
|
+
| OP_LOADI_7' | B | R(a) = mrb_int(7) |
|
49
|
+
| OP_LOADI16' | BsS | R(a) = mrb_int(b) |
|
50
|
+
| OP_LOADSYM" | BB | R(a) = Syms(b) |
|
51
|
+
| OP_LOADNIL' | B | R(a) = nil |
|
52
|
+
| OP_LOADSELF' | B | R(a) = self |
|
53
|
+
| OP_LOADT' | B | R(a) = true |
|
54
|
+
| OP_LOADF' | B | R(a) = false |
|
55
|
+
| OP_GETGV" | BB | R(a) = getglobal(Syms(b)) |
|
56
|
+
| OP_SETGV" | BB | setglobal(Syms(b), R(a)) |
|
57
|
+
| OP_GETSV" | BB | R(a) = Special[Syms(b)] |
|
58
|
+
| OP_SETSV" | BB | Special[Syms(b)] = R(a) |
|
59
|
+
| OP_GETIV" | BB | R(a) = ivget(Syms(b)) |
|
60
|
+
| OP_SETIV" | BB | ivset(Syms(b),R(a)) |
|
61
|
+
| OP_GETCV" | BB | R(a) = cvget(Syms(b)) |
|
62
|
+
| OP_SETCV" | BB | cvset(Syms(b),R(a)) |
|
63
|
+
| OP_GETCONST" | BB | R(a) = constget(Syms(b)) |
|
64
|
+
| OP_SETCONST" | BB | constset(Syms(b),R(a)) |
|
65
|
+
| OP_GETMCNST" | BB | R(a) = R(a)::Syms(b) |
|
66
|
+
| OP_SETMCNST" | BB | R(a+1)::Syms(b) = R(a) |
|
67
|
+
| OP_GETUPVAR" | BBB | R(a) = uvget(b,c) |
|
68
|
+
| OP_SETUPVAR" | BBB | uvset(b,c,R(a)) |
|
69
|
+
| OP_JMP | S | pc=a |
|
70
|
+
| OP_JMPIF' | BS | if R(a) pc=b |
|
71
|
+
| OP_JMPNOT' | BS | if !R(a) pc=b |
|
72
|
+
| OP_JMPNIL' | BS | if R(a)==nil pc=b |
|
73
|
+
| OP_ONERR | S | rescue_push(a) |
|
74
|
+
| OP_EXCEPT' | B | R(a) = exc |
|
75
|
+
| OP_RESCUE" | BB | R(b) = R(a).isa?(R(b)) |
|
76
|
+
| OP_POPERR' | B | a.times{rescue_pop()} |
|
77
|
+
| OP_RAISE' | B | raise(R(a)) |
|
78
|
+
| OP_EPUSH' | B | ensure_push(SEQ[a]) |
|
79
|
+
| OP_EPOP' | B | A.times{ensure_pop().call} |
|
80
|
+
| OP_SENDV" | BB | R(a) = call(R(a),Syms(b),*R(a+1)) |
|
81
|
+
| OP_SENDVB" | BB | R(a) = call(R(a),Syms(b),*R(a+1),&R(a+2)) |
|
82
|
+
| OP_SEND" | BBB | R(a) = call(R(a),Syms(b),R(a+1),...,R(a+c)) |
|
83
|
+
| OP_SENDB" | BBB | R(a) = call(R(a),Syms(b),R(a+1),...,R(a+c),&R(a+c+1)) |
|
84
|
+
| OP_CALL | - | R(0) = self.call(frame.argc, frame.argv) |
|
85
|
+
| OP_SUPER" | BB | R(a) = super(R(a+1),... ,R(a+b+1)) |
|
86
|
+
| OP_ARGARY' | BS | R(a) = argument array (16=5:1:5:1:4) |
|
87
|
+
| OP_ENTER | W | arg setup according to flags (23=5:5:1:5:5:1:1) |
|
88
|
+
| OP_KEY_P" | BB | R(a) = kdict.key?(Syms(b)) |
|
89
|
+
| OP_KEYEND | - | raise unless kdict.empty? |
|
90
|
+
| OP_KARG" | BB | R(a) = kdict[Syms(b)]; kdict.delete(Syms(b)) |
|
91
|
+
| OP_RETURN' | B | return R(a) (normal) |
|
92
|
+
| OP_RETURN_BLK' | B | return R(a) (in-block return) |
|
93
|
+
| OP_BREAK' | B | break R(a) |
|
94
|
+
| OP_BLKPUSH' | BS | R(a) = block (16=5:1:5:1:4) |
|
95
|
+
| OP_ADD' | B | R(a) = R(a)+R(a+1) |
|
96
|
+
| OP_ADDI" | BB | R(a) = R(a)+mrb_int(b) |
|
97
|
+
| OP_SUB' | B | R(a) = R(a)-R(a+1) |
|
98
|
+
| OP_SUBI" | BB | R(a) = R(a)-mrb_int(b) |
|
99
|
+
| OP_MUL' | B | R(a) = R(a)*R(a+1) |
|
100
|
+
| OP_DIV' | B | R(a) = R(a)/R(a+1) |
|
101
|
+
| OP_EQ' | B | R(a) = R(a)==R(a+1) |
|
102
|
+
| OP_LT' | B | R(a) = R(a)<R(a+1) |
|
103
|
+
| OP_LE' | B | R(a) = R(a)<=R(a+1) |
|
104
|
+
| OP_GT' | B | R(a) = R(a)>R(a+1) |
|
105
|
+
| OP_GE' | B | R(a) = R(a)>=R(a+1) |
|
106
|
+
| OP_ARRAY" | BB | R(a) = ary_new(R(a),R(a+1)..R(a+b)) |
|
107
|
+
| OP_ARRAY2" | BBB | R(a) = ary_new(R(b),R(b+1)..R(b+c)) |
|
108
|
+
| OP_ARYCAT' | B | ary_cat(R(a),R(a+1)) |
|
109
|
+
| OP_ARYPUSH' | B | ary_push(R(a),R(a+1)) |
|
110
|
+
| OP_ARYDUP' | B | R(a) = ary_dup(R(a)) |
|
111
|
+
| OP_AREF" | BBB | R(a) = R(b)[c] |
|
112
|
+
| OP_ASET" | BBB | R(a)[c] = R(b) |
|
113
|
+
| OP_APOST" | BBB | *R(a),R(a+1)..R(a+c) = R(a)[b..] |
|
114
|
+
| OP_INTERN' | B | R(a) = intern(R(a)) |
|
115
|
+
| OP_STRING" | BB | R(a) = str_dup(Lit(b)) |
|
116
|
+
| OP_STRCAT' | B | str_cat(R(a),R(a+1)) |
|
117
|
+
| OP_HASH" | BB | R(a) = hash_new(R(a),R(a+1)..R(a+b)) |
|
118
|
+
| OP_HASHADD" | BB | R(a) = hash_push(R(a),R(a+1)..R(a+b)) |
|
119
|
+
| OP_HASHCAT' | B | R(a) = hash_cat(R(a),R(a+1)) |
|
120
|
+
| OP_LAMBDA" | BB | R(a) = lambda(SEQ[b],OP_L_LAMBDA) |
|
121
|
+
| OP_BLOCK" | BB | R(a) = lambda(SEQ[b],OP_L_BLOCK) |
|
122
|
+
| OP_METHOD" | BB | R(a) = lambda(SEQ[b],OP_L_METHOD) |
|
123
|
+
| OP_RANGE_INC' | B | R(a) = range_new(R(a),R(a+1),FALSE) |
|
124
|
+
| OP_RANGE_EXC' | B | R(a) = range_new(R(a),R(a+1),TRUE) |
|
125
|
+
| OP_OCLASS' | B | R(a) = ::Object |
|
126
|
+
| OP_CLASS" | BB | R(a) = newclass(R(a),Syms(b),R(a+1)) |
|
127
|
+
| OP_MODULE" | BB | R(a) = newmodule(R(a),Syms(b)) |
|
128
|
+
| OP_EXEC" | BB | R(a) = blockexec(R(a),SEQ[b]) |
|
129
|
+
| OP_DEF" | BB | R(a).newmethod(Syms(b),R(a+1)) |
|
130
|
+
| OP_ALIAS" | BB | alias_method(target_class,Syms(a),Syms(b)) |
|
131
|
+
| OP_UNDEF' | B | undef_method(target_class,Syms(a)) |
|
132
|
+
| OP_SCLASS' | B | R(a) = R(a).singleton_class |
|
133
|
+
| OP_TCLASS' | B | R(a) = target_class |
|
134
|
+
| OP_DEBUG" | BBB | print a,b,c |
|
135
|
+
| OP_ERR' | B | raise(LocalJumpError, Lit(a)) |
|
136
|
+
| OP_EXT1 | - | make 1st operand 16bit |
|
137
|
+
| OP_EXT2 | - | make 2nd operand 16bit |
|
138
|
+
| OP_EXT3 | - | make 1st and 2nd operands 16bit |
|
139
|
+
| OP_STOP | - | stop VM |
|
140
|
+
|------------------|--------------|--------------------------------------------------------|
|