script_core 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -1
  3. data/ext/enterprise_script_service/libseccomp/.travis.yml +3 -5
  4. data/ext/enterprise_script_service/libseccomp/CHANGELOG +10 -0
  5. data/ext/enterprise_script_service/libseccomp/CREDITS +3 -0
  6. data/ext/enterprise_script_service/libseccomp/README.md +18 -0
  7. data/ext/enterprise_script_service/libseccomp/configure.ac +1 -1
  8. data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +7 -0
  9. data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +16 -0
  10. data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +16 -0
  11. data/ext/enterprise_script_service/libseccomp/tests/.gitignore +1 -0
  12. data/ext/enterprise_script_service/libseccomp/tests/15-basic-resolver.c +3 -3
  13. data/ext/enterprise_script_service/libseccomp/tests/52-basic-load.c +48 -0
  14. data/ext/enterprise_script_service/libseccomp/tests/52-basic-load.py +38 -0
  15. data/ext/enterprise_script_service/libseccomp/tests/52-basic-load.tests +11 -0
  16. data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +6 -3
  17. data/ext/enterprise_script_service/libseccomp/tests/regression +4 -0
  18. data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -3
  19. data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
  20. data/ext/enterprise_script_service/mruby/.github/workflows/build.yml +106 -0
  21. data/ext/enterprise_script_service/mruby/.github/workflows/main.yml +24 -0
  22. data/ext/enterprise_script_service/mruby/.gitignore +3 -0
  23. data/ext/enterprise_script_service/mruby/.travis.yml +6 -9
  24. data/ext/enterprise_script_service/mruby/AUTHORS +1 -0
  25. data/ext/enterprise_script_service/mruby/Doxyfile +1 -1
  26. data/ext/enterprise_script_service/mruby/LICENSE +1 -1
  27. data/ext/enterprise_script_service/mruby/README.md +6 -2
  28. data/ext/enterprise_script_service/mruby/appveyor.yml +9 -12
  29. data/ext/enterprise_script_service/mruby/appveyor_config.rb +9 -0
  30. data/ext/enterprise_script_service/mruby/build_config.rb +6 -6
  31. data/ext/enterprise_script_service/mruby/doc/guides/compile.md +6 -2
  32. data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
  33. data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +4 -8
  34. data/ext/enterprise_script_service/mruby/doc/limitations.md +10 -10
  35. data/ext/enterprise_script_service/mruby/doc/opcode.md +108 -95
  36. data/ext/enterprise_script_service/mruby/examples/targets/build_config_ArduinoDue.rb +2 -2
  37. data/ext/enterprise_script_service/mruby/examples/targets/build_config_IntelEdison.rb +2 -2
  38. data/ext/enterprise_script_service/mruby/examples/targets/build_config_IntelGalileo.rb +2 -2
  39. data/ext/enterprise_script_service/mruby/examples/targets/build_config_RX630.rb +2 -2
  40. data/ext/enterprise_script_service/mruby/examples/targets/build_config_chipKITMax32.rb +2 -2
  41. data/ext/enterprise_script_service/mruby/examples/targets/build_config_dreamcast_shelf.rb +108 -0
  42. data/ext/enterprise_script_service/mruby/include/mrbconf.h +10 -7
  43. data/ext/enterprise_script_service/mruby/include/mruby.h +11 -9
  44. data/ext/enterprise_script_service/mruby/include/mruby/array.h +4 -0
  45. data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +11 -2
  46. data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +0 -9
  47. data/ext/enterprise_script_service/mruby/include/mruby/common.h +10 -0
  48. data/ext/enterprise_script_service/mruby/include/mruby/compile.h +11 -3
  49. data/ext/enterprise_script_service/mruby/include/mruby/dump.h +1 -17
  50. data/ext/enterprise_script_service/mruby/include/mruby/irep.h +10 -0
  51. data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -1
  52. data/ext/enterprise_script_service/mruby/include/mruby/khash.h +23 -5
  53. data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +1 -0
  54. data/ext/enterprise_script_service/mruby/include/mruby/ops.h +3 -2
  55. data/ext/enterprise_script_service/mruby/include/mruby/string.h +2 -1
  56. data/ext/enterprise_script_service/mruby/include/mruby/value.h +7 -12
  57. data/ext/enterprise_script_service/mruby/include/mruby/version.h +4 -4
  58. data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +2 -30
  59. data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +21 -46
  60. data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +9 -0
  61. data/ext/enterprise_script_service/mruby/lib/mruby/source.rb +3 -1
  62. data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +7 -0
  63. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +0 -31
  64. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +0 -13
  65. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-config/mrbgem.rake +5 -2
  66. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +0 -1
  67. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +5 -1
  68. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +5 -1
  69. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +7 -11
  70. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/mrbgem.rake +0 -1
  71. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +6 -2
  72. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c +6 -2
  73. data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +6 -1
  74. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +76 -48
  75. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +107 -32
  76. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/y.tab.c +13153 -0
  77. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/mrbgem.rake +13 -15
  78. data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +3 -3
  79. data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +2 -213
  80. data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +21 -0
  81. data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/src/hash-ext.c +1 -3
  82. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/include/mruby/ext/io.h +39 -7
  83. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +2 -8
  84. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file_constants.rb +0 -16
  85. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +7 -12
  86. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +76 -30
  87. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +9 -10
  88. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +323 -120
  89. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +18 -12
  90. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +32 -0
  91. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +57 -49
  92. data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +15 -17
  93. data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +9 -0
  94. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +1 -1
  95. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +3 -12
  96. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +113 -10
  97. data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/src/print.c +5 -1
  98. data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +2 -2
  99. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +9 -9
  100. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/src/mrb_sleep.c +1 -1
  101. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/mrbgem.rake +1 -1
  102. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/test/sockettest.c +3 -2
  103. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +61 -24
  104. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/test/sprintf.rb +5 -23
  105. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +3 -3
  106. data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +1 -1
  107. data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +1 -0
  108. data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +6 -5
  109. data/ext/enterprise_script_service/mruby/mrblib/hash.rb +3 -3
  110. data/ext/enterprise_script_service/mruby/src/array.c +11 -0
  111. data/ext/enterprise_script_service/mruby/src/backtrace.c +2 -2
  112. data/ext/enterprise_script_service/mruby/src/class.c +26 -11
  113. data/ext/enterprise_script_service/mruby/src/codedump.c +4 -0
  114. data/ext/enterprise_script_service/mruby/src/debug.c +8 -5
  115. data/ext/enterprise_script_service/mruby/src/dump.c +3 -65
  116. data/ext/enterprise_script_service/mruby/src/error.c +57 -5
  117. data/ext/enterprise_script_service/mruby/src/etc.c +13 -4
  118. data/ext/enterprise_script_service/mruby/src/fmt_fp.c +98 -21
  119. data/ext/enterprise_script_service/mruby/src/gc.c +10 -275
  120. data/ext/enterprise_script_service/mruby/src/hash.c +5 -6
  121. data/ext/enterprise_script_service/mruby/src/kernel.c +2 -2
  122. data/ext/enterprise_script_service/mruby/src/load.c +56 -30
  123. data/ext/enterprise_script_service/mruby/src/numeric.c +22 -10
  124. data/ext/enterprise_script_service/mruby/src/object.c +12 -4
  125. data/ext/enterprise_script_service/mruby/src/print.c +27 -3
  126. data/ext/enterprise_script_service/mruby/src/proc.c +21 -1
  127. data/ext/enterprise_script_service/mruby/src/state.c +34 -11
  128. data/ext/enterprise_script_service/mruby/src/string.c +69 -35
  129. data/ext/enterprise_script_service/mruby/src/symbol.c +12 -10
  130. data/ext/enterprise_script_service/mruby/src/vm.c +21 -30
  131. data/ext/enterprise_script_service/mruby/tasks/gitlab.rake +19 -22
  132. data/ext/enterprise_script_service/mruby/tasks/mrbgems.rake +1 -1
  133. data/ext/enterprise_script_service/mruby/tasks/toolchains/android.rake +46 -1
  134. data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +3 -3
  135. data/ext/enterprise_script_service/mruby/tasks/toolchains/openwrt.rake +6 -6
  136. data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +8 -8
  137. data/ext/enterprise_script_service/mruby/test/assert.rb +5 -4
  138. data/ext/enterprise_script_service/mruby/test/t/ensure.rb +8 -26
  139. data/ext/enterprise_script_service/mruby/test/t/exception.rb +2 -2
  140. data/ext/enterprise_script_service/mruby/test/t/kernel.rb +8 -24
  141. data/ext/enterprise_script_service/mruby/travis_config.rb +0 -14
  142. data/ext/enterprise_script_service/msgpack/.github/depends/boost.sh +56 -0
  143. data/ext/enterprise_script_service/msgpack/.github/workflows/coverage.yml +62 -0
  144. data/ext/enterprise_script_service/msgpack/.github/workflows/gha.yml +304 -0
  145. data/ext/enterprise_script_service/msgpack/CHANGELOG.md +11 -0
  146. data/ext/enterprise_script_service/msgpack/CMakeLists.txt +82 -39
  147. data/ext/enterprise_script_service/msgpack/Files.cmake +22 -12
  148. data/ext/enterprise_script_service/msgpack/QUICKSTART-C.md +26 -29
  149. data/ext/enterprise_script_service/msgpack/README.md +3 -2
  150. data/ext/enterprise_script_service/msgpack/appveyor.yml +6 -2
  151. data/ext/enterprise_script_service/msgpack/ci/build_cmake.sh +3 -1
  152. data/ext/enterprise_script_service/msgpack/cmake/CodeCoverage.cmake +55 -0
  153. data/ext/enterprise_script_service/msgpack/codecov.yml +36 -0
  154. data/ext/enterprise_script_service/msgpack/example/CMakeLists.txt +9 -5
  155. data/ext/enterprise_script_service/msgpack/example/boost/CMakeLists.txt +1 -1
  156. data/ext/enterprise_script_service/msgpack/example/c/CMakeLists.txt +17 -6
  157. data/ext/enterprise_script_service/msgpack/example/c/boundary.c +296 -0
  158. data/ext/enterprise_script_service/msgpack/example/c/jsonconv.c +419 -0
  159. data/ext/enterprise_script_service/msgpack/example/c/simple_c.c +1 -1
  160. data/ext/enterprise_script_service/msgpack/example/cpp03/CMakeLists.txt +3 -3
  161. data/ext/enterprise_script_service/msgpack/example/cpp11/CMakeLists.txt +2 -2
  162. data/ext/enterprise_script_service/msgpack/example/x3/CMakeLists.txt +2 -2
  163. data/ext/enterprise_script_service/msgpack/include/msgpack/pack.h +24 -1
  164. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +5 -4
  165. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/boost/optional.hpp +4 -4
  166. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp17/vector_byte.hpp +8 -8
  167. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/map.hpp +4 -4
  168. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/vector.hpp +4 -4
  169. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/vector_char.hpp +8 -8
  170. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/vector_unsigned_char.hpp +8 -8
  171. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +4 -4
  172. data/ext/enterprise_script_service/msgpack/include/msgpack/v3/unpack.hpp +6 -6
  173. data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
  174. data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +4 -4
  175. data/ext/enterprise_script_service/msgpack/make_file_list.sh +38 -11
  176. data/ext/enterprise_script_service/msgpack/src/vrefbuffer.c +6 -0
  177. data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +86 -64
  178. data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +4 -0
  179. data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +4 -0
  180. data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +4 -0
  181. data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +4 -1
  182. data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +4 -0
  183. data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +4 -0
  184. data/ext/enterprise_script_service/msgpack/test/buffer.cpp +4 -47
  185. data/ext/enterprise_script_service/msgpack/test/buffer_c.cpp +148 -0
  186. data/ext/enterprise_script_service/msgpack/test/carray.cpp +4 -0
  187. data/ext/enterprise_script_service/msgpack/test/cases.cpp +8 -4
  188. data/ext/enterprise_script_service/msgpack/test/convert.cpp +8 -4
  189. data/ext/enterprise_script_service/msgpack/test/fixint.cpp +4 -0
  190. data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +4 -0
  191. data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +4 -0
  192. data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +4 -0
  193. data/ext/enterprise_script_service/msgpack/test/json.cpp +4 -0
  194. data/ext/enterprise_script_service/msgpack/test/limit.cpp +8 -4
  195. data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +4 -0
  196. data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +159 -0
  197. data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +4 -0
  198. data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +32 -27
  199. data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +4 -0
  200. data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +4 -0
  201. data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +4 -1
  202. data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +4 -0
  203. data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +4 -0
  204. data/ext/enterprise_script_service/msgpack/test/object.cpp +4 -1
  205. data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +12 -8
  206. data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +30 -26
  207. data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +4 -0
  208. data/ext/enterprise_script_service/msgpack/test/raw.cpp +4 -0
  209. data/ext/enterprise_script_service/msgpack/test/reference.cpp +4 -0
  210. data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +4 -0
  211. data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +4 -0
  212. data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +4 -0
  213. data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +4 -0
  214. data/ext/enterprise_script_service/msgpack/test/streaming.cpp +8 -4
  215. data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +4 -0
  216. data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +4 -0
  217. data/ext/enterprise_script_service/msgpack/test/user_class.cpp +16 -12
  218. data/ext/enterprise_script_service/msgpack/test/version.cpp +4 -0
  219. data/ext/enterprise_script_service/msgpack/test/visitor.cpp +4 -0
  220. data/ext/enterprise_script_service/msgpack/test/zone.cpp +4 -0
  221. data/lib/script_core/version.rb +1 -1
  222. data/script_core.gemspec +1 -1
  223. metadata +23 -9
  224. data/ext/enterprise_script_service/msgpack/.travis.yml +0 -258
@@ -0,0 +1,24 @@
1
+ name: CIFuzz
2
+ on: [pull_request]
3
+ jobs:
4
+ Fuzzing:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - name: Build Fuzzers
8
+ uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
9
+ with:
10
+ oss-fuzz-project-name: 'mruby'
11
+ dry-run: false
12
+ - name: Run Fuzzers
13
+ uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
14
+ with:
15
+ oss-fuzz-project-name: 'mruby'
16
+ fuzz-seconds: 600
17
+ dry-run: false
18
+ - name: Upload Crash
19
+ uses: actions/upload-artifact@v1
20
+ if: failure()
21
+ with:
22
+ name: artifacts
23
+ path: ./out/artifacts
24
+
@@ -17,6 +17,9 @@
17
17
  .svn
18
18
  .vscode
19
19
  .yardoc
20
+ .ccls*
21
+ compile_flags.txt
22
+ compile_commands.json
20
23
  cscope.files
21
24
  cscope.out
22
25
  tags
@@ -1,14 +1,11 @@
1
1
  language: c
2
2
 
3
- sudo: false
4
-
5
- matrix:
6
- include:
7
- - os: linux
8
- sudo: false
9
- - os: osx
10
- osx_image: xcode7.1
3
+ jobs:
4
+ - os: linux
5
+ - os: osx
11
6
 
12
7
  env:
13
8
  - MRUBY_CONFIG=travis_config.rb
14
- script: "rake -m && rake test"
9
+
10
+ script:
11
+ - rake -m && rake test
@@ -42,3 +42,4 @@ of this list.
42
42
  Masahiro Wakame
43
43
  YAMAMOTO Masaya
44
44
  KOBAYASHI Shuji
45
+ RIZAL Reckordp
@@ -6,7 +6,7 @@
6
6
 
7
7
  DOXYFILE_ENCODING = UTF-8
8
8
  PROJECT_NAME = "mruby"
9
- PROJECT_NUMBER = 2.1.0
9
+ PROJECT_NUMBER = 2.1.1
10
10
 
11
11
  PROJECT_BRIEF = "mruby is the lightweight implementation of the Ruby language"
12
12
 
@@ -1,4 +1,4 @@
1
- Copyright (c) 2019 mruby developers
1
+ Copyright (c) 2020 mruby developers
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a
4
4
  copy of this software and associated documentation files (the "Software"),
@@ -17,7 +17,7 @@ of the Ministry of Economy, Trade and Industry of Japan.
17
17
 
18
18
  ## How to get mruby
19
19
 
20
- The stable version 2.1.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/2.1.0.zip](https://github.com/mruby/mruby/archive/2.1.0.zip)
20
+ The stable version 2.1.1 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/2.1.1.zip](https://github.com/mruby/mruby/archive/2.1.1.zip)
21
21
 
22
22
  The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master)
23
23
 
@@ -34,7 +34,7 @@ The URL of the mruby home-page is: https://mruby.org.
34
34
 
35
35
  ## Mailing list
36
36
 
37
- We don't have a mailing list, but you can use [GitHub issues](https://github.com/mruby/mruby).
37
+ We don't have a mailing list, but you can use [GitHub issues](https://github.com/mruby/mruby/issues).
38
38
 
39
39
  ## How to compile and install (mruby and gems)
40
40
 
@@ -46,6 +46,10 @@ To run the tests, execute the following from the project's root directory.
46
46
 
47
47
  $ rake test
48
48
 
49
+ Note: `bison` bundled with MacOS is too old to compile `mruby`.
50
+ Try `brew install bison` and follow the instuction shown to update
51
+ the `$PATH` to compile `mruby`.
52
+
49
53
  ## Building documentation
50
54
 
51
55
  There are two sets of documentation in mruby: the mruby API (generated by yard) and C API (Doxygen)
@@ -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 = '-I%s'
33
+ # cc.option_include_path = %q[-I"%s"]
34
34
  # cc.option_define = '-D%s'
35
- # cc.compile_options = "%{flags} -MMD -o %{outfile} -c %{infile}"
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 = '-o %{outfile} %{infile}'
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 = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}'
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)
@@ -38,7 +38,7 @@ To confirm mrdb was installed properly, run mrdb with the `--version` option:
38
38
 
39
39
  ```bash
40
40
  $ mrdb --version
41
- mruby 2.1.0 (2019-11-19)
41
+ mruby 2.1.1 (2020-06-04)
42
42
  ```
43
43
 
44
44
  ## 2.2 Basic Operation
@@ -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 both `MRB_INT16` and `MRB_INT64` are not defined on 32-bit CPU mode, `int32_t` will be defined as `mrb_int`.
63
- * Conflicts with `MRB_INT16` and `MRB_INT64`.
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 both `MRB_INT16` and `MRB_INT32` are not defined on 64-bit CPU mode, `int64_t` will be defined as `mrb_int`.
67
- * Conflicts with `MRB_INT16` and `MRB_INT32`.
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.0 (2019-11-19)]
41
+ #### mruby [2.1.1 (2020-06-04)]
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.0 (2019-11-19)]
64
+ #### mruby [2.1.1 (2020-06-04)]
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.0 (2019-11-19)]
92
+ #### mruby [2.1.1 (2020-06-04)]
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.0 (2019-11-19)]
122
+ #### mruby [2.1.1 (2020-06-04)]
123
123
 
124
124
  ```
125
125
  true
@@ -156,7 +156,7 @@ p 'ok'
156
156
  ok
157
157
  ```
158
158
 
159
- #### mruby [2.1.0 (2019-11-19)]
159
+ #### mruby [2.1.1 (2020-06-04)]
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.0 (2019-11-19)]
181
+ #### mruby [2.1.1 (2020-06-04)]
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.0 (2019-11-19)]
198
+ #### mruby [2.1.1 (2020-06-04)]
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.0 (2019-11-19)]
220
+ #### mruby [2.1.1 (2020-06-04)]
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.0 (2019-11-19)]
236
+ #### mruby [2.1.1 (2020-06-04)]
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.0]
258
+ #### mruby [mruby 2.1.1]
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" | 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
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
+ |------------------|--------------|--------------------------------------------------------|