script_core 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +8 -6
- data/.ruby-version +1 -1
- data/Gemfile +2 -1
- data/bin/sandbox +1 -1
- data/ext/enterprise_script_service/Rakefile +1 -1
- data/ext/enterprise_script_service/flags.rb +5 -0
- data/ext/enterprise_script_service/libseccomp/CHANGELOG +15 -0
- data/ext/enterprise_script_service/libseccomp/CREDITS +3 -0
- data/ext/enterprise_script_service/libseccomp/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/README.md +1 -1
- data/ext/enterprise_script_service/libseccomp/SECURITY.md +45 -0
- data/ext/enterprise_script_service/libseccomp/configure.ac +3 -3
- data/ext/enterprise_script_service/libseccomp/doc/admin/MAINTAINER_PROCESS.md +95 -0
- data/ext/enterprise_script_service/libseccomp/{RELEASE_PROCESS.md → doc/admin/RELEASE_PROCESS.md} +9 -1
- data/ext/enterprise_script_service/libseccomp/include/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +2292 -0
- data/ext/enterprise_script_service/libseccomp/include/seccomp.h.in +3 -1065
- data/ext/enterprise_script_service/libseccomp/src/arch-aarch64-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-arm-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-mips-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-parisc-syscalls.c +34 -2
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc64-syscalls.c +44 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +46 -14
- data/ext/enterprise_script_service/libseccomp/src/arch-s390.c +142 -18
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +47 -15
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x.c +143 -17
- data/ext/enterprise_script_service/libseccomp/src/arch-x32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-x86-syscalls.c +94 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-x86.c +142 -19
- data/ext/enterprise_script_service/libseccomp/src/arch-x86_64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/db.c +1 -0
- data/ext/enterprise_script_service/libseccomp/src/gen_bpf.c +10 -3
- data/ext/enterprise_script_service/libseccomp/src/python/Makefile.am +4 -4
- data/ext/enterprise_script_service/libseccomp/src/python/seccomp.pyx +2 -0
- data/ext/enterprise_script_service/libseccomp/tests/.gitignore +1 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.c +98 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.py +61 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.tests +18 -0
- data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +6 -3
- data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -2
- data/ext/enterprise_script_service/libseccomp/tools/check-syntax +1 -0
- data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
- data/ext/enterprise_script_service/mruby-mpdecimal/src/ext.c +1 -1
- data/ext/enterprise_script_service/mruby/.gitignore +2 -2
- data/ext/enterprise_script_service/mruby/CONTRIBUTING.md +10 -3
- data/ext/enterprise_script_service/mruby/Doxyfile +2408 -0
- data/ext/enterprise_script_service/mruby/README.md +21 -8
- data/ext/enterprise_script_service/mruby/Rakefile +4 -13
- data/ext/enterprise_script_service/mruby/appveyor_config.rb +1 -1
- data/ext/enterprise_script_service/mruby/build_config.rb +3 -3
- data/ext/enterprise_script_service/mruby/doc/guides/compile.md +42 -42
- data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
- data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +45 -6
- data/ext/enterprise_script_service/mruby/doc/guides/mrbgems.md +5 -0
- data/ext/enterprise_script_service/mruby/doc/limitations.md +88 -38
- data/ext/enterprise_script_service/mruby/doc/mruby_logo_red_icon.png +0 -0
- data/ext/enterprise_script_service/mruby/doc/opcode.md +94 -94
- data/ext/enterprise_script_service/mruby/include/mrbconf.h +74 -11
- data/ext/enterprise_script_service/mruby/include/mruby.h +242 -146
- data/ext/enterprise_script_service/mruby/include/mruby/array.h +7 -7
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +2 -9
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_no.h +11 -10
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +104 -69
- data/ext/enterprise_script_service/mruby/include/mruby/class.h +7 -5
- data/ext/enterprise_script_service/mruby/include/mruby/common.h +9 -7
- data/ext/enterprise_script_service/mruby/include/mruby/compile.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/data.h +5 -5
- data/ext/enterprise_script_service/mruby/include/mruby/debug.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/dump.h +3 -7
- data/ext/enterprise_script_service/mruby/include/mruby/error.h +34 -6
- data/ext/enterprise_script_service/mruby/include/mruby/gc.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/hash.h +4 -11
- data/ext/enterprise_script_service/mruby/include/mruby/irep.h +16 -4
- data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -4
- data/ext/enterprise_script_service/mruby/include/mruby/khash.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +41 -7
- data/ext/enterprise_script_service/mruby/include/mruby/object.h +8 -9
- data/ext/enterprise_script_service/mruby/include/mruby/opcode.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/ops.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/proc.h +19 -13
- data/ext/enterprise_script_service/mruby/include/mruby/range.h +10 -4
- data/ext/enterprise_script_service/mruby/include/mruby/re.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/string.h +130 -107
- data/ext/enterprise_script_service/mruby/include/mruby/throw.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/value.h +137 -49
- data/ext/enterprise_script_service/mruby/include/mruby/variable.h +3 -5
- data/ext/enterprise_script_service/mruby/include/mruby/version.h +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby-core-ext.rb +2 -39
- data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +32 -15
- data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +63 -17
- data/ext/enterprise_script_service/mruby/lib/mruby/build/load_gems.rb +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +11 -7
- data/ext/enterprise_script_service/mruby/lib/mruby/lockfile.rb +81 -0
- data/ext/enterprise_script_service/mruby/minirake +27 -11
- data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +47 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +50 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +28 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +1 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +75 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +134 -90
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +7 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +69 -46
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/keywords +0 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/lex.def +51 -59
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +430 -241
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrbgem.rake +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +122 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +249 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/test/complex.rb +153 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/mrblib/chain.rb +19 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/test/enum_chain.rb +41 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +30 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/test/enum.rb +8 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +46 -14
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +51 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +47 -44
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c +9 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/src/fiber.c +16 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/test/fiber.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/test/hash.rb +3 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/README.md +1 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file.rb +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +24 -38
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/kernel.rb +16 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +19 -18
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +5 -16
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +54 -42
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +24 -20
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file_test.rb +4 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +41 -35
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +9 -36
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +9 -27
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +2 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-math/src/math.c +5 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +39 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +48 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/method.rb +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +134 -101
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/test/method.rb +9 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c +17 -37
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +0 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +15 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +35 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/test/nil.rb +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +28 -23
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/test/pack.rb +43 -49
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/mrblib/print.rb +3 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +6 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/test/proc.rb +21 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.c +157 -124
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/test/random.rb +72 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/mrblib/range.rb +38 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +26 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/test/range.rb +111 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrbgem.rake +5 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +117 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +209 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/test/rational.rb +308 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/README.md +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/src/socket.c +10 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/kernel.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +22 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +8 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +116 -117
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/numeric.rb +29 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/range.rb +26 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/string.rb +32 -50
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/mrblib/struct.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +43 -57
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/test/struct.rb +16 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/driver.c +152 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +4 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/vformat.c +200 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/include/mruby/time.h +2 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +199 -68
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/test/time.rb +81 -46
- data/ext/enterprise_script_service/mruby/mrblib/array.rb +14 -16
- data/ext/enterprise_script_service/mruby/mrblib/enum.rb +13 -9
- data/ext/enterprise_script_service/mruby/mrblib/hash.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrblib/kernel.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/numeric.rb +4 -4
- data/ext/enterprise_script_service/mruby/mrblib/range.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/string.rb +55 -112
- data/ext/enterprise_script_service/mruby/mruby-source.gemspec +1 -1
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby.dict +105 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_fuzzer.options +5 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_proto_fuzzer.options +4 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_fuzzer.c +18 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_proto_fuzzer.cpp +44 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.cpp +455 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h +55 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/ruby.proto +201 -0
- data/ext/enterprise_script_service/mruby/src/array.c +95 -46
- data/ext/enterprise_script_service/mruby/src/backtrace.c +6 -8
- data/ext/enterprise_script_service/mruby/src/class.c +370 -278
- data/ext/enterprise_script_service/mruby/src/codedump.c +34 -34
- data/ext/enterprise_script_service/mruby/src/debug.c +2 -2
- data/ext/enterprise_script_service/mruby/src/dump.c +8 -6
- data/ext/enterprise_script_service/mruby/src/enum.c +1 -1
- data/ext/enterprise_script_service/mruby/src/error.c +157 -55
- data/ext/enterprise_script_service/mruby/src/etc.c +13 -46
- data/ext/enterprise_script_service/mruby/src/fmt_fp.c +2 -2
- data/ext/enterprise_script_service/mruby/src/gc.c +30 -11
- data/ext/enterprise_script_service/mruby/src/hash.c +23 -14
- data/ext/enterprise_script_service/mruby/src/kernel.c +16 -54
- data/ext/enterprise_script_service/mruby/src/load.c +40 -76
- data/ext/enterprise_script_service/mruby/src/numeric.c +164 -94
- data/ext/enterprise_script_service/mruby/src/object.c +16 -39
- data/ext/enterprise_script_service/mruby/src/pool.c +0 -2
- data/ext/enterprise_script_service/mruby/src/proc.c +47 -48
- data/ext/enterprise_script_service/mruby/src/range.c +22 -35
- data/ext/enterprise_script_service/mruby/src/state.c +5 -94
- data/ext/enterprise_script_service/mruby/src/string.c +874 -710
- data/ext/enterprise_script_service/mruby/src/symbol.c +73 -48
- data/ext/enterprise_script_service/mruby/src/variable.c +58 -38
- data/ext/enterprise_script_service/mruby/src/vm.c +133 -304
- data/ext/enterprise_script_service/mruby/tasks/doc.rake +48 -0
- data/ext/enterprise_script_service/mruby/tasks/toolchains/clang.rake +3 -4
- data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +20 -19
- data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +0 -12
- data/ext/enterprise_script_service/mruby/test/assert.rb +186 -25
- data/ext/enterprise_script_service/mruby/test/t/array.rb +34 -6
- data/ext/enterprise_script_service/mruby/test/t/class.rb +26 -0
- data/ext/enterprise_script_service/mruby/test/t/enumerable.rb +2 -2
- data/ext/enterprise_script_service/mruby/test/t/float.rb +17 -17
- data/ext/enterprise_script_service/mruby/test/t/hash.rb +2 -0
- data/ext/enterprise_script_service/mruby/test/t/integer.rb +14 -6
- data/ext/enterprise_script_service/mruby/test/t/kernel.rb +38 -19
- data/ext/enterprise_script_service/mruby/test/t/module.rb +87 -14
- data/ext/enterprise_script_service/mruby/test/t/numeric.rb +65 -23
- data/ext/enterprise_script_service/mruby/test/t/range.rb +4 -4
- data/ext/enterprise_script_service/mruby/test/t/string.rb +211 -49
- data/ext/enterprise_script_service/mruby/test/t/syntax.rb +19 -2
- data/ext/enterprise_script_service/mruby/test/t/vformat.rb +92 -0
- data/ext/enterprise_script_service/mruby/travis_config.rb +2 -2
- data/ext/enterprise_script_service/mruby_config.rb +10 -0
- data/ext/enterprise_script_service/mruby_engine.cpp +2 -2
- data/ext/enterprise_script_service/mruby_engine.gembox +1 -0
- data/ext/enterprise_script_service/msgpack/CHANGELOG.md +14 -0
- data/ext/enterprise_script_service/msgpack/Files.cmake +4 -0
- data/ext/enterprise_script_service/msgpack/README.md +1 -1
- data/ext/enterprise_script_service/msgpack/appveyor.yml +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_zone.hpp.erb +3 -3
- data/ext/enterprise_script_service/msgpack/example/boost/asio_send_recv.cpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/cpp11/timespec.hpp +16 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/wstring.hpp +15 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/object.h +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/pack_template.h +17 -9
- data/ext/enterprise_script_service/msgpack/include/msgpack/sysdep.h +27 -16
- data/ext/enterprise_script_service/msgpack/include/msgpack/type.hpp +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/unpack_template.h +5 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +0 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/check_container_size.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/chrono.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/timespec.hpp +140 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +10 -10
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/ext.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/fixint.hpp +5 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int.hpp +40 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int_decl.hpp +3 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +121 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp03_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp11_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object_fwd.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/pack.hpp +40 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/unpack.hpp +11 -11
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/vrefbuffer.hpp +7 -7
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/zbuffer.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/create_object_visitor.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/x3_parse.hpp +28 -26
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/zone.h +1 -1
- data/ext/enterprise_script_service/msgpack/src/objectc.c +83 -148
- data/ext/enterprise_script_service/msgpack/src/unpack.c +73 -47
- data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +1 -1
- data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +15 -9
- data/ext/enterprise_script_service/msgpack/test/buffer.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/carray.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/cases.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/convert.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/fixint.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +6 -1
- data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +8 -2
- data/ext/enterprise_script_service/msgpack/test/json.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/limit.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +128 -6
- data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +7 -2
- data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +20 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +159 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +8 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +23 -18
- data/ext/enterprise_script_service/msgpack/test/object.cpp +77 -45
- data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +28 -10
- data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +25 -18
- data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/raw.cpp +17 -12
- data/ext/enterprise_script_service/msgpack/test/reference.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +6 -2
- data/ext/enterprise_script_service/msgpack/test/streaming.cpp +10 -3
- data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/user_class.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/version.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/visitor.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/zone.cpp +6 -0
- data/lib/script_core/version.rb +1 -1
- data/lib/tasks/mruby/engine.gembox.example +1 -0
- data/lib/tasks/script_core.rake +21 -3
- data/spec/dummy/app/helpers/fields_helper.rb +2 -2
- data/spec/dummy/mruby/engine.gembox +1 -0
- data/spec/script_core_spec.rb +1 -1
- metadata +38 -22
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.gitignore +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrblib/kernel.rb +0 -15
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/unbound_method.rb +0 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.gitignore +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/packtest.rb +0 -157
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.c +0 -224
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.h +0 -80
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.h +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.gitignore +0 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis.yml +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis_build_config.rb +0 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/Rakefile +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/.travis.yml +0 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/run_test.rb +0 -28
@@ -37,6 +37,11 @@ conf.gem :mgem => 'mruby-yaml'
|
|
37
37
|
conf.gem :mgem => 'yaml' # 'mruby-' prefix could be omitted
|
38
38
|
```
|
39
39
|
|
40
|
+
For specifying commit hash to checkout use `:checksum_hash` option:
|
41
|
+
```ruby
|
42
|
+
conf.gem mgem: 'mruby-redis', checksum_hash: '3446d19fc4a3f9697b5ddbf2a904f301c42f2f4e'
|
43
|
+
```
|
44
|
+
|
40
45
|
If there is missing dependencies, mrbgem dependencies solver will reference
|
41
46
|
mrbgem from core or mgem-list.
|
42
47
|
|
@@ -14,17 +14,17 @@ This document does not contain a complete list of limitations.
|
|
14
14
|
Please help to improve it by submitting your findings.
|
15
15
|
|
16
16
|
|
17
|
-
##
|
17
|
+
## `1/2` gives `0.5`
|
18
18
|
|
19
|
-
Since mruby does not have
|
20
|
-
by
|
21
|
-
and
|
22
|
-
methods for the
|
23
|
-
not
|
19
|
+
Since mruby does not have `Bignum`, bigger integers are represented
|
20
|
+
by `Float` numbers. To enhance interoperability between `Fixnum`
|
21
|
+
and `Float`, mruby provides `Float#upto` and other iterating
|
22
|
+
methods for the `Float` class. As a side effect, `1/2` gives `0.5`
|
23
|
+
not `0`.
|
24
24
|
|
25
|
-
##
|
25
|
+
## `Array` passed to `puts`
|
26
26
|
|
27
|
-
Passing an Array to
|
27
|
+
Passing an Array to `puts` results in different output.
|
28
28
|
|
29
29
|
```ruby
|
30
30
|
puts [1,2,3]
|
@@ -38,15 +38,15 @@ puts [1,2,3]
|
|
38
38
|
3
|
39
39
|
```
|
40
40
|
|
41
|
-
#### mruby [2.0
|
41
|
+
#### mruby [2.1.0 (2019-11-19)]
|
42
42
|
|
43
43
|
```
|
44
44
|
[1, 2, 3]
|
45
45
|
```
|
46
46
|
|
47
|
-
##
|
47
|
+
## `Kernel.raise` in rescue clause
|
48
48
|
|
49
|
-
|
49
|
+
`Kernel.raise` without arguments does not raise the current exception within
|
50
50
|
a rescue clause.
|
51
51
|
|
52
52
|
```ruby
|
@@ -59,21 +59,21 @@ end
|
|
59
59
|
|
60
60
|
#### Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]
|
61
61
|
|
62
|
-
|
62
|
+
`ZeroDivisionError` is raised.
|
63
63
|
|
64
|
-
#### mruby [2.0
|
64
|
+
#### mruby [2.1.0 (2019-11-19)]
|
65
65
|
|
66
66
|
No exception is raised.
|
67
67
|
|
68
68
|
## Fiber execution can't cross C function boundary
|
69
69
|
|
70
|
-
mruby's
|
70
|
+
mruby's `Fiber` is implemented in a similar way to Lua's co-routine. This
|
71
71
|
results in the consequence that you can't switch context within C functions.
|
72
|
-
Only exception is
|
72
|
+
Only exception is `mrb_fiber_yield` at return.
|
73
73
|
|
74
|
-
##
|
74
|
+
## `Array` does not support instance variables
|
75
75
|
|
76
|
-
To reduce memory consumption
|
76
|
+
To reduce memory consumption `Array` does not support instance variables.
|
77
77
|
|
78
78
|
```ruby
|
79
79
|
class Liste < Array
|
@@ -87,16 +87,16 @@ p Liste.new "foobar"
|
|
87
87
|
|
88
88
|
#### Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]
|
89
89
|
|
90
|
-
|
90
|
+
` [] `
|
91
91
|
|
92
|
-
#### mruby [2.0
|
92
|
+
#### mruby [2.1.0 (2019-11-19)]
|
93
93
|
|
94
|
-
|
94
|
+
`ArgumentError` is raised.
|
95
95
|
|
96
96
|
## Method visibility
|
97
97
|
|
98
98
|
For simplicity reasons no method visibility (public/private/protected) is
|
99
|
-
supported.
|
99
|
+
supported. Those methods are defined but they are dummy methods.
|
100
100
|
|
101
101
|
```ruby
|
102
102
|
class VisibleTest
|
@@ -119,17 +119,53 @@ false
|
|
119
119
|
true
|
120
120
|
```
|
121
121
|
|
122
|
-
#### mruby [2.0
|
122
|
+
#### mruby [2.1.0 (2019-11-19)]
|
123
123
|
|
124
124
|
```
|
125
125
|
true
|
126
126
|
true
|
127
127
|
```
|
128
128
|
|
129
|
-
|
129
|
+
### Visibility Declaration
|
130
130
|
|
131
|
-
The
|
132
|
-
|
131
|
+
The declaration form of following visibility methods are not implemented.
|
132
|
+
|
133
|
+
* `public`
|
134
|
+
* `private`
|
135
|
+
* `protected`
|
136
|
+
* `module_function`
|
137
|
+
|
138
|
+
Especially, `module_function` method is not dummy, but no declaration form.
|
139
|
+
|
140
|
+
```
|
141
|
+
module TestModule
|
142
|
+
module_function
|
143
|
+
def test_func
|
144
|
+
p 'test_func called'
|
145
|
+
end
|
146
|
+
|
147
|
+
test_func
|
148
|
+
end
|
149
|
+
|
150
|
+
p 'ok'
|
151
|
+
```
|
152
|
+
|
153
|
+
#### Ruby [ruby 2.5.5p157 (2019-03-15 revision 67260)]
|
154
|
+
|
155
|
+
```
|
156
|
+
ok
|
157
|
+
```
|
158
|
+
|
159
|
+
#### mruby [2.1.0 (2019-11-19)]
|
160
|
+
|
161
|
+
```
|
162
|
+
test.rb:8: undefined method 'test_func' (NoMethodError)
|
163
|
+
```
|
164
|
+
|
165
|
+
## `defined?`
|
166
|
+
|
167
|
+
The `defined?` keyword is considered too complex to be fully
|
168
|
+
implemented. It is recommended to use `const_defined?` and
|
133
169
|
other reflection methods instead.
|
134
170
|
|
135
171
|
```ruby
|
@@ -142,11 +178,11 @@ defined?(Foo)
|
|
142
178
|
nil
|
143
179
|
```
|
144
180
|
|
145
|
-
#### mruby [2.0
|
181
|
+
#### mruby [2.1.0 (2019-11-19)]
|
146
182
|
|
147
|
-
|
183
|
+
`NameError` is raised.
|
148
184
|
|
149
|
-
##
|
185
|
+
## `alias` on global variables
|
150
186
|
|
151
187
|
Aliasing a global variable works in CRuby but is not part
|
152
188
|
of the ISO standard.
|
@@ -157,9 +193,9 @@ alias $a $__a__
|
|
157
193
|
|
158
194
|
#### Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]
|
159
195
|
|
160
|
-
|
196
|
+
` nil `
|
161
197
|
|
162
|
-
#### mruby [2.0
|
198
|
+
#### mruby [2.1.0 (2019-11-19)]
|
163
199
|
|
164
200
|
Syntax error
|
165
201
|
|
@@ -178,15 +214,15 @@ end
|
|
178
214
|
|
179
215
|
#### Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]
|
180
216
|
|
181
|
-
|
182
|
-
The re-defined
|
217
|
+
`ArgumentError` is raised.
|
218
|
+
The re-defined `+` operator does not accept any arguments.
|
183
219
|
|
184
|
-
#### mruby [2.0
|
220
|
+
#### mruby [2.1.0 (2019-11-19)]
|
185
221
|
|
186
|
-
|
222
|
+
` 'ab' `
|
187
223
|
Behavior of the operator wasn't changed.
|
188
224
|
|
189
|
-
## Kernel#binding is not supported
|
225
|
+
## `Kernel#binding` is not supported
|
190
226
|
|
191
227
|
`Kernel#binding` method is not supported.
|
192
228
|
|
@@ -197,7 +233,7 @@ $ ruby -e 'puts Proc.new {}.binding'
|
|
197
233
|
#<Binding:0x00000e9deabb9950>
|
198
234
|
```
|
199
235
|
|
200
|
-
#### mruby [2.0
|
236
|
+
#### mruby [2.1.0 (2019-11-19)]
|
201
237
|
|
202
238
|
```
|
203
239
|
$ ./bin/mruby -e 'puts Proc.new {}.binding'
|
@@ -219,7 +255,7 @@ $ ruby -e 'def m(*r,**k) p [r,k] end; m("a"=>1,:b=>2)'
|
|
219
255
|
[[{"a"=>1}], {:b=>2}]
|
220
256
|
```
|
221
257
|
|
222
|
-
#### mruby [mruby 2.0
|
258
|
+
#### mruby [mruby 2.1.0]
|
223
259
|
|
224
260
|
```
|
225
261
|
$ ./bin/mruby -e 'def m(*r,**k) p [r,k] end; m("a"=>1,:b=>2)'
|
@@ -238,7 +274,7 @@ Destructured arguments (`b` and `c` in above example) cannot be accessed
|
|
238
274
|
from the default expression of optional arguments and keyword arguments,
|
239
275
|
since actual assignment is done after the evaluation of those default
|
240
276
|
expressions. Thus:
|
241
|
-
|
277
|
+
|
242
278
|
```ruby
|
243
279
|
def f(a,(b,c),d=b)
|
244
280
|
p [a,b,c,d]
|
@@ -247,3 +283,17 @@ f(1,[2,3])
|
|
247
283
|
```
|
248
284
|
|
249
285
|
CRuby gives `[1,2,3,nil]`. mruby raises `NoMethodError` for `b`.
|
286
|
+
|
287
|
+
## `nil?` redefinition in conditional expressions
|
288
|
+
|
289
|
+
Redefinition of `nil?` is ignored in conditional expressions.
|
290
|
+
|
291
|
+
```ruby
|
292
|
+
a = "a"
|
293
|
+
def a.nil?
|
294
|
+
true
|
295
|
+
end
|
296
|
+
puts(a.nil? ? "truthy" : "falsy")
|
297
|
+
```
|
298
|
+
|
299
|
+
Ruby outputs `falsy`. mruby outputs `truthy`.
|
Binary file
|
@@ -31,97 +31,97 @@ with `"`, either `OP_EXT1` or `OP_EXT2` or `OP_EXT2` can be prefixed.
|
|
31
31
|
|
32
32
|
## table.1 Instruction Table
|
33
33
|
|
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" |BsB |R(a) = mrb_int(b)
|
40
|
-
|OP_LOADI_0' |B |R(a) = 0
|
41
|
-
|OP_LOADI_1' |B |R(a) = 1
|
42
|
-
|OP_LOADI_2' |B |R(a) = 2
|
43
|
-
|OP_LOADI_3' |B |R(a) = 3
|
44
|
-
|OP_LOADSYM" |BB |R(a) = Syms(b)
|
45
|
-
|OP_LOADNIL' |B |R(a) = nil
|
46
|
-
|OP_LOADSELF' |B |R(a) = self
|
47
|
-
|OP_LOADT' |B |R(a) = true
|
48
|
-
|OP_LOADF' |B |R(a) = false
|
49
|
-
|OP_GETGV" |BB |R(a) = getglobal(Syms(b))
|
50
|
-
|OP_SETGV" |BB |setglobal(Syms(b), R(a))
|
51
|
-
|OP_GETSV" |BB |R(a) = Special[b]
|
52
|
-
|OP_SETSV" |BB |Special[b] = R(a)
|
53
|
-
|OP_GETIV" |BB |R(a) = ivget(Syms(b))
|
54
|
-
|OP_SETIV" |BB |ivset(Syms(b),R(a))
|
55
|
-
|OP_GETCV" |BB |R(a) = cvget(Syms(b))
|
56
|
-
|OP_SETCV" |BB |cvset(Syms(b),R(a))
|
57
|
-
|OP_GETCONST" |BB |R(a) = constget(Syms(b))
|
58
|
-
|OP_SETCONST" |BB |constset(Syms(b),R(a))
|
59
|
-
|OP_GETMCNST" |BB |R(a) = R(a)::Syms(b)
|
60
|
-
|OP_SETMCNST" |BB |R(a+1)::Syms(b) = R(a)
|
61
|
-
|OP_GETUPVAR' |BBB |R(a) = uvget(b,c)
|
62
|
-
|OP_SETUPVAR' |BBB |uvset(b,c,R(a))
|
63
|
-
|OP_JMP |S |pc+=a
|
64
|
-
|OP_JMPIF' |SB |if R(b) pc+=a
|
65
|
-
|OP_JMPNOT' |SB |if !R(b) pc+=a
|
66
|
-
|OP_ONERR |sS |rescue_push(pc+a)
|
67
|
-
|OP_EXCEPT' |B |R(a) = exc
|
68
|
-
|OP_RESCUE" |BB |R(b) = R(a).isa?(R(b))
|
69
|
-
|OP_POPERR |B |a.times{rescue_pop()}
|
70
|
-
|OP_RAISE' |B |raise(R(a))
|
71
|
-
|OP_EPUSH' |B |ensure_push(SEQ[a])
|
72
|
-
|OP_EPOP |B |A.times{ensure_pop().call}
|
73
|
-
|OP_SENDV" |BB |R(a) = call(R(a),Syms(b),*R(a+1))
|
74
|
-
|OP_SENDVB" |BB |R(a) = call(R(a),Syms(b),*R(a+1),&R(a+2))
|
75
|
-
|OP_SEND" |BBB |R(a) = call(R(a),Syms(b),R(a+1),...,R(a+c))
|
76
|
-
|OP_SENDB" |BBB |R(a) = call(R(a),Syms(Bx),R(a+1),...,R(a+c),&R(a+c+1))
|
77
|
-
|OP_CALL' |B |R(a) = self.call(frame.argc, frame.argv)
|
78
|
-
|OP_SUPER' |BB |R(a) = super(R(a+1),... ,R(a+b+1))
|
79
|
-
|OP_ARGARY' |BS |R(a) = argument array (16=5:1:5:1:4)
|
80
|
-
|OP_ENTER |W |arg setup according to flags (23=5:5:1:5:5:1:1)
|
81
|
-
|OP_KARG" |BB |R(a) = kdict[Syms(Bx)] # todo
|
82
|
-
|OP_KARG2" |BB |R(a) = kdict[Syms(Bx)]; kdict.rm(Syms(b)) # todo
|
83
|
-
|OP_RETURN' |B |return R(a) (normal)
|
84
|
-
|OP_RETURN_BLK' |B |return R(a) (in-block return)
|
85
|
-
|OP_BREAK' |B |break R(a)
|
86
|
-
|OP_BLKPUSH' |BS |R(a) = block (16=5:1:5:1:4)
|
87
|
-
|OP_ADD" |BB |R(a) = R(a)+R(a+1)
|
88
|
-
|OP_ADDI" |BBB |R(a) = R(a)+mrb_int(c)
|
89
|
-
|OP_SUB" |BB |R(a) = R(a)-R(a+1)
|
90
|
-
|OP_SUBI" |BB |R(a) = R(a)-C
|
91
|
-
|OP_MUL" |BB |R(a) = R(a)*R(a+1)
|
92
|
-
|OP_DIV" |BB |R(a) = R(a)/R(a+1)
|
93
|
-
|OP_EQ" |BB |R(a) = R(a)==R(a+1)
|
94
|
-
|OP_LT" |BB |R(a) = R(a)<R(a+1)
|
95
|
-
|OP_LE" |BB |R(a) = R(a)<=R(a+1)
|
96
|
-
|OP_GT" |BB |R(a) = R(a)>R(a+1)
|
97
|
-
|OP_GE" |BB |R(a) = R(a)>=R(a+1)
|
98
|
-
|OP_ARRAY' |BB |R(a) = ary_new(R(a),R(a+1)..R(a+b))
|
99
|
-
|OP_ARRAY2" |BB |R(a) = ary_new(R(b),R(b+1)..R(b+c))
|
100
|
-
|OP_ARYCAT' |B |ary_cat(R(a),R(a+1))
|
101
|
-
|OP_ARYPUSH' |B |ary_push(R(a),R(a+1))
|
102
|
-
|OP_AREF' |BB |R(a) = R(a)[b]
|
103
|
-
|OP_ASET' |BB |R(a)[b] = R(a+1)
|
104
|
-
|OP_APOST' |BB
|
105
|
-
|OP_STRING" |BB |R(a) = str_dup(Lit(b))
|
106
|
-
|OP_STRCAT' |B |str_cat(R(a),R(a+1))
|
107
|
-
|OP_HASH' |BB |R(a) = hash_new(R(a),R(a+1)..R(a+b))
|
108
|
-
|OP_HASHADD' |BB |R(a) = hash_push(R(a),R(a+1)..R(a+b))
|
109
|
-
|OP_LAMBDA" |BB |R(a) = lambda(SEQ[b],OP_L_LAMBDA)
|
110
|
-
|OP_BLOCK" |BB |R(a) = lambda(SEQ[b],OP_L_BLOCK)
|
111
|
-
|OP_METHOD" |BB |R(a) = lambda(SEQ[b],OP_L_METHOD)
|
112
|
-
|OP_RANGE_INC' |B |R(a) = range_new(R(a),R(a+1),FALSE)
|
113
|
-
|OP_RANGE_EXC' |B |R(a) = range_new(R(a),R(a+1),TRUE)
|
114
|
-
|OP_OCLASS' |B |R(a) = ::Object
|
115
|
-
|OP_CLASS" |BB |R(a) = newclass(R(a),Syms(b),R(a+1))
|
116
|
-
|OP_MODULE" |BB |R(a) = newmodule(R(a),Syms(b))
|
117
|
-
|OP_EXEC" |BB |R(a) = blockexec(R(a),SEQ[b])
|
118
|
-
|OP_DEF" |BB |R(a).newmethod(Syms(b),R(a+1))
|
119
|
-
|OP_ALIAS' |B |alias_method(R(a),R(a+1),R(a+2))
|
120
|
-
|OP_UNDEF" |BB |undef_method(R(a),Syms(b))
|
121
|
-
|OP_SCLASS' |B |R(a) = R(a).singleton_class
|
122
|
-
|OP_TCLASS' |B |R(a) = target_class
|
123
|
-
|OP_ERR' |B |raise(RuntimeError, Lit(Bx))
|
124
|
-
|OP_EXT1
|
125
|
-
|OP_EXT2
|
126
|
-
|OP_EXT3
|
127
|
-
|OP_STOP
|
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" | BsB | R(a) = mrb_int(b)
|
40
|
+
| OP_LOADI_0' | B | R(a) = 0
|
41
|
+
| OP_LOADI_1' | B | R(a) = 1
|
42
|
+
| OP_LOADI_2' | B | R(a) = 2
|
43
|
+
| OP_LOADI_3' | B | R(a) = 3
|
44
|
+
| OP_LOADSYM" | BB | R(a) = Syms(b)
|
45
|
+
| OP_LOADNIL' | B | R(a) = nil
|
46
|
+
| OP_LOADSELF' | B | R(a) = self
|
47
|
+
| OP_LOADT' | B | R(a) = true
|
48
|
+
| OP_LOADF' | B | R(a) = false
|
49
|
+
| OP_GETGV" | BB | R(a) = getglobal(Syms(b))
|
50
|
+
| OP_SETGV" | BB | setglobal(Syms(b), R(a))
|
51
|
+
| OP_GETSV" | BB | R(a) = Special[b]
|
52
|
+
| OP_SETSV" | BB | Special[b] = R(a)
|
53
|
+
| OP_GETIV" | BB | R(a) = ivget(Syms(b))
|
54
|
+
| OP_SETIV" | BB | ivset(Syms(b),R(a))
|
55
|
+
| OP_GETCV" | BB | R(a) = cvget(Syms(b))
|
56
|
+
| OP_SETCV" | BB | cvset(Syms(b),R(a))
|
57
|
+
| OP_GETCONST" | BB | R(a) = constget(Syms(b))
|
58
|
+
| OP_SETCONST" | BB | constset(Syms(b),R(a))
|
59
|
+
| OP_GETMCNST" | BB | R(a) = R(a)::Syms(b)
|
60
|
+
| OP_SETMCNST" | BB | R(a+1)::Syms(b) = R(a)
|
61
|
+
| OP_GETUPVAR' | BBB | R(a) = uvget(b,c)
|
62
|
+
| OP_SETUPVAR' | BBB | uvset(b,c,R(a))
|
63
|
+
| OP_JMP | S | pc+=a
|
64
|
+
| OP_JMPIF' | SB | if R(b) pc+=a
|
65
|
+
| OP_JMPNOT' | SB | if !R(b) pc+=a
|
66
|
+
| OP_ONERR | sS | rescue_push(pc+a)
|
67
|
+
| OP_EXCEPT' | B | R(a) = exc
|
68
|
+
| OP_RESCUE" | BB | R(b) = R(a).isa?(R(b))
|
69
|
+
| OP_POPERR | B | a.times{rescue_pop()}
|
70
|
+
| OP_RAISE' | B | raise(R(a))
|
71
|
+
| OP_EPUSH' | B | ensure_push(SEQ[a])
|
72
|
+
| OP_EPOP | B | A.times{ensure_pop().call}
|
73
|
+
| OP_SENDV" | BB | R(a) = call(R(a),Syms(b),*R(a+1))
|
74
|
+
| OP_SENDVB" | BB | R(a) = call(R(a),Syms(b),*R(a+1),&R(a+2))
|
75
|
+
| OP_SEND" | BBB | R(a) = call(R(a),Syms(b),R(a+1),...,R(a+c))
|
76
|
+
| OP_SENDB" | BBB | R(a) = call(R(a),Syms(Bx),R(a+1),...,R(a+c),&R(a+c+1))
|
77
|
+
| OP_CALL' | B | R(a) = self.call(frame.argc, frame.argv)
|
78
|
+
| OP_SUPER' | BB | R(a) = super(R(a+1),... ,R(a+b+1))
|
79
|
+
| OP_ARGARY' | BS | R(a) = argument array (16=5:1:5:1:4)
|
80
|
+
| OP_ENTER | W | arg setup according to flags (23=5:5:1:5:5:1:1)
|
81
|
+
| OP_KARG" | BB | R(a) = kdict[Syms(Bx)] # todo
|
82
|
+
| OP_KARG2" | BB | R(a) = kdict[Syms(Bx)]; kdict.rm(Syms(b)) # todo
|
83
|
+
| OP_RETURN' | B | return R(a) (normal)
|
84
|
+
| OP_RETURN_BLK' | B | return R(a) (in-block return)
|
85
|
+
| OP_BREAK' | B | break R(a)
|
86
|
+
| OP_BLKPUSH' | BS | R(a) = block (16=5:1:5:1:4)
|
87
|
+
| OP_ADD" | BB | R(a) = R(a)+R(a+1)
|
88
|
+
| OP_ADDI" | BBB | R(a) = R(a)+mrb_int(c)
|
89
|
+
| OP_SUB" | BB | R(a) = R(a)-R(a+1)
|
90
|
+
| OP_SUBI" | BB | R(a) = R(a)-C
|
91
|
+
| OP_MUL" | BB | R(a) = R(a)*R(a+1)
|
92
|
+
| OP_DIV" | BB | R(a) = R(a)/R(a+1)
|
93
|
+
| OP_EQ" | BB | R(a) = R(a)==R(a+1)
|
94
|
+
| OP_LT" | BB | R(a) = R(a)<R(a+1)
|
95
|
+
| OP_LE" | BB | R(a) = R(a)<=R(a+1)
|
96
|
+
| OP_GT" | BB | R(a) = R(a)>R(a+1)
|
97
|
+
| OP_GE" | BB | R(a) = R(a)>=R(a+1)
|
98
|
+
| OP_ARRAY' | BB | R(a) = ary_new(R(a),R(a+1)..R(a+b))
|
99
|
+
| OP_ARRAY2" | BB | R(a) = ary_new(R(b),R(b+1)..R(b+c))
|
100
|
+
| OP_ARYCAT' | B | ary_cat(R(a),R(a+1))
|
101
|
+
| OP_ARYPUSH' | B | ary_push(R(a),R(a+1))
|
102
|
+
| OP_AREF' | BB | R(a) = R(a)[b]
|
103
|
+
| OP_ASET' | BB | R(a)[b] = R(a+1)
|
104
|
+
| OP_APOST' | BB | *R(a),R(A+1)..R(A+C) = R(a)[B..]
|
105
|
+
| OP_STRING" | BB | R(a) = str_dup(Lit(b))
|
106
|
+
| OP_STRCAT' | B | str_cat(R(a),R(a+1))
|
107
|
+
| OP_HASH' | BB | R(a) = hash_new(R(a),R(a+1)..R(a+b))
|
108
|
+
| OP_HASHADD' | BB | R(a) = hash_push(R(a),R(a+1)..R(a+b))
|
109
|
+
| OP_LAMBDA" | BB | R(a) = lambda(SEQ[b],OP_L_LAMBDA)
|
110
|
+
| OP_BLOCK" | BB | R(a) = lambda(SEQ[b],OP_L_BLOCK)
|
111
|
+
| OP_METHOD" | BB | R(a) = lambda(SEQ[b],OP_L_METHOD)
|
112
|
+
| OP_RANGE_INC' | B | R(a) = range_new(R(a),R(a+1),FALSE)
|
113
|
+
| OP_RANGE_EXC' | B | R(a) = range_new(R(a),R(a+1),TRUE)
|
114
|
+
| OP_OCLASS' | B | R(a) = ::Object
|
115
|
+
| OP_CLASS" | BB | R(a) = newclass(R(a),Syms(b),R(a+1))
|
116
|
+
| OP_MODULE" | BB | R(a) = newmodule(R(a),Syms(b))
|
117
|
+
| OP_EXEC" | BB | R(a) = blockexec(R(a),SEQ[b])
|
118
|
+
| OP_DEF" | BB | R(a).newmethod(Syms(b),R(a+1))
|
119
|
+
| OP_ALIAS' | B | alias_method(R(a),R(a+1),R(a+2))
|
120
|
+
| OP_UNDEF" | BB | undef_method(R(a),Syms(b))
|
121
|
+
| OP_SCLASS' | B | R(a) = R(a).singleton_class
|
122
|
+
| OP_TCLASS' | B | R(a) = target_class
|
123
|
+
| OP_ERR' | B | raise(RuntimeError, Lit(Bx))
|
124
|
+
| OP_EXT1 | - | make 1st operand 16bit
|
125
|
+
| OP_EXT2 | - | make 2nd operand 16bit
|
126
|
+
| OP_EXT3 | - | make 1st and 2nd operands 16bit
|
127
|
+
| OP_STOP | - | stop VM
|
@@ -36,15 +36,19 @@
|
|
36
36
|
/* size of the method cache (need to be the power of 2) */
|
37
37
|
//#define MRB_METHOD_CACHE_SIZE (1<<7)
|
38
38
|
|
39
|
-
/* add -
|
40
|
-
/*
|
41
|
-
|
42
|
-
//#define MRB_METHOD_TABLE_INLINE
|
39
|
+
/* add -DMRB_METHOD_T_STRUCT on machines that use higher bits of pointers */
|
40
|
+
/* no MRB_METHOD_T_STRUCT requires highest 2 bits of function pointers to be zero */
|
41
|
+
//#define MRB_METHOD_T_STRUCT
|
43
42
|
|
44
|
-
/* add -DMRB_INT16 to use 16bit integer for mrb_int; conflict with MRB_INT64 */
|
43
|
+
/* add -DMRB_INT16 to use 16bit integer for mrb_int; conflict with MRB_INT32 and MRB_INT64 */
|
45
44
|
//#define MRB_INT16
|
46
45
|
|
47
|
-
/* add -
|
46
|
+
/* add -DMRB_INT32 to use 32bit integer for mrb_int; conflict with MRB_INT16 and MRB_INT64;
|
47
|
+
Default for 32-bit CPU mode. */
|
48
|
+
//#define MRB_INT32
|
49
|
+
|
50
|
+
/* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT16 and MRB_INT32;
|
51
|
+
Default for 64-bit CPU mode. */
|
48
52
|
//#define MRB_INT64
|
49
53
|
|
50
54
|
/* if no specific integer type is chosen */
|
@@ -81,12 +85,13 @@
|
|
81
85
|
/* number of object per heap page */
|
82
86
|
//#define MRB_HEAP_PAGE_SIZE 1024
|
83
87
|
|
84
|
-
/* if
|
85
|
-
//#define
|
88
|
+
/* if __ehdr_start is available, mruby can reduce memory used by symbols */
|
89
|
+
//#define MRB_USE_LINK_TIME_RO_DATA_P
|
86
90
|
|
87
|
-
/*
|
88
|
-
|
89
|
-
|
91
|
+
/* if MRB_USE_LINK_TIME_RO_DATA_P does not work,
|
92
|
+
you can try mrb_ro_data_p() that you have implemented yourself in any file;
|
93
|
+
prototype is `mrb_bool mrb_ro_data_p(const char *ptr)` */
|
94
|
+
//#define MRB_USE_CUSTOM_RO_DATA_P
|
90
95
|
|
91
96
|
/* turn off generational GC by default */
|
92
97
|
//#define MRB_GC_TURN_OFF_GENERATIONAL
|
@@ -146,4 +151,62 @@
|
|
146
151
|
# define TRUE 1
|
147
152
|
#endif
|
148
153
|
|
154
|
+
/*
|
155
|
+
** mruby tuning profiles
|
156
|
+
**/
|
157
|
+
|
158
|
+
/* A profile for micro controllers */
|
159
|
+
#if defined(MRB_CONSTRAINED_BASELINE_PROFILE)
|
160
|
+
# ifndef KHASH_DEFAULT_SIZE
|
161
|
+
# define KHASH_DEFAULT_SIZE 16
|
162
|
+
# endif
|
163
|
+
|
164
|
+
# ifndef MRB_STR_BUF_MIN_SIZE
|
165
|
+
# define MRB_STR_BUF_MIN_SIZE 32
|
166
|
+
# endif
|
167
|
+
|
168
|
+
# ifndef MRB_HEAP_PAGE_SIZE
|
169
|
+
# define MRB_HEAP_PAGE_SIZE 256
|
170
|
+
# endif
|
171
|
+
|
172
|
+
/* A profile for default mruby */
|
173
|
+
#elif defined(MRB_BASELINE_PROFILE)
|
174
|
+
|
175
|
+
/* A profile for desktop computers or workstations; rich memory! */
|
176
|
+
#elif defined(MRB_MAIN_PROFILE)
|
177
|
+
# ifndef MRB_METHOD_CACHE
|
178
|
+
# define MRB_METHOD_CACHE
|
179
|
+
# endif
|
180
|
+
|
181
|
+
# ifndef MRB_METHOD_CACHE_SIZE
|
182
|
+
# define MRB_METHOD_CACHE_SIZE (1<<10)
|
183
|
+
# endif
|
184
|
+
|
185
|
+
# ifndef MRB_IV_SEGMENT_SIZE
|
186
|
+
# define MRB_IV_SEGMENT_SIZE 32
|
187
|
+
# endif
|
188
|
+
|
189
|
+
# ifndef MRB_HEAP_PAGE_SIZE
|
190
|
+
# define MRB_HEAP_PAGE_SIZE 4096
|
191
|
+
# endif
|
192
|
+
|
193
|
+
/* A profile for server; mruby vm is long life */
|
194
|
+
#elif defined(MRB_HIGH_PROFILE)
|
195
|
+
# ifndef MRB_METHOD_CACHE
|
196
|
+
# define MRB_METHOD_CACHE
|
197
|
+
# endif
|
198
|
+
|
199
|
+
# ifndef MRB_METHOD_CACHE_SIZE
|
200
|
+
# define MRB_METHOD_CACHE_SIZE (1<<12)
|
201
|
+
# endif
|
202
|
+
|
203
|
+
# ifndef MRB_IV_SEGMENT_SIZE
|
204
|
+
# define MRB_IV_SEGMENT_SIZE 64
|
205
|
+
# endif
|
206
|
+
|
207
|
+
# ifndef MRB_HEAP_PAGE_SIZE
|
208
|
+
# define MRB_HEAP_PAGE_SIZE 4096
|
209
|
+
# endif
|
210
|
+
#endif
|
211
|
+
|
149
212
|
#endif /* MRUBYCONF_H */
|