summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2021-11-14doc/internal/boxing.md: describe how `mrb_value` represents values.Yukihiro "Matz" Matsumoto
2021-11-13boxing_word.h: fix the error in the comment [ci skip]Yukihiro "Matz" Matsumoto
2021-11-12test/syntax.rb: test argument forwarding without parentheses.Yukihiro "Matz" Matsumoto
2021-11-12parse.y: should allow newline after `...`.Yukihiro "Matz" Matsumoto
2021-11-10parse.y: allow `...` in formal arguments without parentheses.Yukihiro "Matz" Matsumoto
2021-11-09etc.c: improve `mrb_obj_id` with NaN boxing and Word boxing.Yukihiro "Matz" Matsumoto
2021-11-08boxing_nan.h: update `mrb_immediate_p` and related macros.Yukihiro "Matz" Matsumoto
2021-11-08TODO.md: update.Yukihiro "Matz" Matsumoto
2021-11-06Merge pull request #5437 from dearblue/parse.yYukihiro "Matz" Matsumoto
Run the task only once when `parse.y` is updated
2021-11-06mruby3.1.md: update.Yukihiro "Matz" Matsumoto
2021-11-05mruby3.1.md: update new methods description.Yukihiro "Matz" Matsumoto
2021-11-04boxing_nan.h (mrb_float_p): wrap macro argument by parenthesis.Yukihiro "Matz" Matsumoto
2021-11-04hash.c: avoid `mrb_obj_id` to get the hash value if possible.Yukihiro "Matz" Matsumoto
2021-11-04Merge pull request #5570 from dearblue/random-bytesYukihiro "Matz" Matsumoto
Added `Random.#bytes` method
2021-11-04Merge pull request #5569 from dearblue/array-productYukihiro "Matz" Matsumoto
Added `Array#product` method
2021-11-04Merge pull request #5571 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/actions/checkout-2.4.0 build(deps): bump actions/checkout from 2.3.5 to 2.4.0
2021-11-03build(deps): bump actions/checkout from 2.3.5 to 2.4.0dependabot[bot]
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
2021-11-03Merge pull request #5565 from dearblue/class.newYukihiro "Matz" Matsumoto
Improved `Class#new` method
2021-11-01Merge pull request #5568 from dearblue/nan+cxx_abiYukihiro "Matz" Matsumoto
Fix failed build with `MRB_NAN_BOXING` and `enable_cxx_abi`
2021-11-01object.c: fast implementation of `mrb_obj_eq`.Yukihiro "Matz" Matsumoto
For `MRB_NAN_BOXING` and `MRB_WORD_BOXING`.
2021-10-31Added `Random.#bytes` methoddearblue
ref: https://docs.ruby-lang.org/ja/3.0.0/method/Random/i/bytes.html
2021-10-31Added `Array#product` methoddearblue
Ruby-1.9.0 feature. ref: https://docs.ruby-lang.org/ja/3.0.0/method/Array/i/product.html
2021-10-31Fix failed build with `MRB_NAN_BOXING` and `enable_cxx_abi`dearblue
```console % c++ -xc++ -std=c++03 -S -Iinclude -DMRB_NAN_BOXING -DMRB_NO_PRESYM -o- src/array.c > /dev/null In file included from src/array.c:7: In file included from include/mruby.h:115: In file included from include/mruby/value.h:201: include/mruby/boxing_nan.h:95:12: error: cannot initialize return object of type 'enum mrb_vtype' with an rvalue of type 'int' return (enum mrb_vtype)(o.u >> 8) & 0x1f; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ```
2021-10-31Merge pull request #5566 from dearblue/no_float_truncateYukihiro "Matz" Matsumoto
Avoid redefining `MRB_WORDBOX_NO_FLOAT_TRUNCATE`
2021-10-30Merge pull request #5567 from dearblue/mrb_static_assert.1Yukihiro "Matz" Matsumoto
Avoid violations of the `mrb_static_assert()` standard
2021-10-30boxing_nan.h: allow `MRB_INT64` with `MRB_NAN_BOXING`.Yukihiro "Matz" Matsumoto
Integers out of 32 bit range will be allocated in the heap.
2021-10-30boxing_nan.h: implement Favor pointer NaN Boxing.Yukihiro "Matz" Matsumoto
Favor pointer means encode NaN boxed values to keep pointer values unmodified, to reduce the cost of far frequent pointer value retrievals.
2021-10-30Avoid violations of the `mrb_static_assert()` standarddearblue
ref: #5564 ```console % cc -pedantic -S -Iinclude -DMRB_NO_PRESYM -o- src/array.c > /dev/null In file included from src/array.c:7: In file included from include/mruby.h:115: In file included from include/mruby/value.h:204: include/mruby/boxing_word.h:133:1: warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments] mrb_static_assert(sizeof(mrb_value) == sizeof(union mrb_value_)); ^ include/mruby.h:109:108: note: expanded from macro 'mrb_static_assert' mrb_static_assert_expand(mrb_static_assert_selector(__VA_ARGS__, mrb_static_assert2, mrb_static_assert1)(__VA_ARGS__)) ^ include/mruby.h:100:10: note: macro 'mrb_static_assert_selector' defined here # define mrb_static_assert_selector(a, b, name, ...) name ^ 1 warning generated. ```
2021-10-30Avoid redefining `MRB_WORDBOX_NO_FLOAT_TRUNCATE`dearblue
Adding `MRB_WORDBOX_NO_FLOAT_TRUNCATE` to the build configuration in 32-bit CPU mode had a double definition. ```console % cat myconf.rb MRuby::Build.new do toolchain "clang" defines << "MRB_WORDBOX_NO_FLOAT_TRUNCATE" cc.flags << "-m32" linker.flags << "-m32" enable_debug end % rake CONFIG=myconf.rb CPP src/array.c -> build/host/src/array.pi In file included from /var/tmp/mruby/src/array.c:7: In file included from /var/tmp/mruby/include/mruby.h:115: In file included from /var/tmp/mruby/include/mruby/value.h:203: /var/tmp/mruby/include/mruby/boxing_word.h:11:10: warning: 'MRB_WORDBOX_NO_FLOAT_TRUNCATE' macro redefined [-Wmacro-redefined] # define MRB_WORDBOX_NO_FLOAT_TRUNCATE ^ <command line>:3:9: note: previous definition is here #define MRB_WORDBOX_NO_FLOAT_TRUNCATE 1 ^ 1 warning generated. ...SNIP... ```
2021-10-29Improved `Class#new` methoddearblue
The number of registers used is reduced. Also, previously `R6` and` R7` were used, which exceeded the limit of `new_irep.nregs = 6`. This could cause the VM stack to overrun.
2021-10-28boxing_nan.h: refactor NaN Boxing.Yukihiro "Matz" Matsumoto
Preparation for: * 64 bit integer with NaN Boxing * Favor pointer NaN Boxing
2021-10-26boxing_nan.h: revert part of dccd66fYukihiro "Matz" Matsumoto
WIP code was mistakenly committed.
2021-10-25Merge pull request #5564 from dearblue/static_assertYukihiro "Matz" Matsumoto
Make `mrb_static_assert()` a variable argument
2021-10-24Make `mrb_static_assert()` a variable argumentdearblue
`mrb_static_assert()` extends the macro function to take one or two arguments. If the argument is other than that, an error will occur. References: - static_assert のメッセージ省略を許可 - cpprefjp C++日本語リファレンス https://cpprefjp.github.io/lang/cpp17/extending_static_assert.html - c - Overloading Macro on Number of Arguments - Stack Overflow https://stackoverflow.com/a/11763277
2021-10-24doc/mruby3.1.h: separate mruby3.0 changes and mruby3.1 changes.Yukihiro "Matz" Matsumoto
2021-10-23string.c: use FNV1a algorithm for the string hash function.Yukihiro "Matz" Matsumoto
2021-10-22Merge pull request #5563 from suetanvil-misc/project-bintest-emulator-4-flatYukihiro "Matz" Matsumoto
Added testing support for cross-MinGW builds.
2021-10-21Added testing support for cross-MinGW builds.Chris Reuter
This adds a build_config that will cross-build a Windows executable using the MinGW cross-compiler and will also run the unit (i.e. 'rake test') using Wine. For this to work, I made some modifications to the underlying test scripts as well as some minor changes to a couple of the tests themselves.
2021-10-21codedump.c: add indentation for `OP_MOVE`.Yukihiro "Matz" Matsumoto
2021-10-20doc/mruby3.md: updated to the most recent mruby3.1 (to be).Yukihiro "Matz" Matsumoto
2021-10-19dump.h: bump `RITE_BINARY_MAJOR_VER` to `03`.Yukihiro "Matz" Matsumoto
Since we have added several new instructions.
2021-10-19codedump.c: remove `OP_` prefix from disasm output.Yukihiro "Matz" Matsumoto
2021-10-19codegen.c: skip `OP_LOADSELF` using `OP_SSEND`.Yukihiro "Matz" Matsumoto
2021-10-19ops.h: add new instructions `OP_SSEND` and `OP_SSENDB`.Yukihiro "Matz" Matsumoto
These instructions call methods of the receiver.
2021-10-19ops.h: update descriptions for array-like accesses.Yukihiro "Matz" Matsumoto
* `R(a)` -> `R[a]` * `Pool(a)` -> `Pool[a]` * `Syms(a)` -> `Syms[a]` * `Irep(a)` -> `Irep[a]`
2021-10-19ops.h: update `OP_SEND` description.Yukihiro "Matz" Matsumoto
2021-10-19Merge pull request #5560 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/actions/checkout-2.3.5 build(deps): bump actions/checkout from 2.3.4 to 2.3.5
2021-10-18build(deps): bump actions/checkout from 2.3.4 to 2.3.5dependabot[bot]
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
2021-10-18Merge pull request #5559 from igrep/fix-commented-out-exampleYukihiro "Matz" Matsumoto
Fix a syntax error in commented-out code
2021-10-18Fix a syntax error in commented-out codeYAMAMOTO Yuji
By uncommenting the line changed by this commit, `ruby -c build_config/default.rb` complains of a syntax error due to the illegally nested double quotes