summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2022-01-03Merge pull request #5625 from dearblue/proc_newYukihiro "Matz" Matsumoto
Assign after `mrb_irep_incref()` in `mrb_proc_new()`
2022-01-02Merge pull request #5622 from dearblue/to_fYukihiro "Matz" Matsumoto
Call functions directly from `mrb_ensure_float_type()`
2022-01-02Merge pull request #5620 from dearblue/adjust-stacksYukihiro "Matz" Matsumoto
Adjusting the stack for after it enters the virtual machine
2022-01-02Assign after `mrb_irep_incref()` in `mrb_proc_new()`dearblue
ref. 28ccc664e5dcd3f9d55173e9afde77c4705a9ab6
2022-01-01proc.c: should not reference `irep` when copying failed.Yukihiro "Matz" Matsumoto
It may cause broken reference count numbers.
2021-12-31Call functions directly from `mrb_ensure_float_type()`dearblue
ref. commit 7f40b645d2773c8f50c48ae4adf90488e164da55 Currently, the build configurations `MRB_USE_COMPLEX` and `MRB_USE_RATIONAL` are not listed in the documentation. In other words, they are hidden settings. They are defined in `mrbgems/mruby-{complex,rational}/mrbgem.rake`. So this patch assumes that it is safe to refer to these functions in core-gems directly from core functions. However, applications that link with `libmruby_core.a` will have compatibility issues. In fact, `mrbgems/mruby-bin-mrbc` links with `libmruby_core.a`, so I had to prepare a dummy function.
2021-12-31vm.c: use `prepare_missing` in `mrb_funcall_with_block`Yukihiro "Matz" Matsumoto
Remove code duplication.
2021-12-31Merge pull request #5621 from dearblue/ci-cygwinYukihiro "Matz" Matsumoto
Extend the Cygwin CI time limit to 15 minutes.
2021-12-31Merge pull request #5619 from dearblue/propertiesYukihiro "Matz" Matsumoto
Get object properties after `mrb_get_args()`
2021-12-31numeric.c: merge `mrb_as_float` implementation to `mrb_ensure_float_type`.Yukihiro "Matz" Matsumoto
Since they are basically duplicated functionality. `mrb_as_float` is now a macro defined using `mrb_ensure_float_type`; #5620
2021-12-31object.c: add conversion to Float from Rational, Complex; #5620Yukihiro "Matz" Matsumoto
2021-12-31numeric.c: `mrb_as_float` should not call `to_f` for generic objects.Yukihiro "Matz" Matsumoto
It should only call `to_f` for Rational and Complex numbers. Ref #5540 #5613 #5620
2021-12-31class.c, variable,c: replace `size_t` by `int`.Yukihiro "Matz" Matsumoto
That reduce memory consumption by iv/mt tables.
2021-12-30Extend the Cygwin CI time limit to 15 minutes.dearblue
The main reason for failure is to exceed the time limit, and even when it succeeds, there is less than a minute left. The 10-minute time limit seems to be too short.
2021-12-30Adjusting the stack for after it enters the virtual machinedearblue
ref. #5613. I mentioned in #5540 that there was no reentrant to the virtual machine, but in fact it was still a possibility at that point. Also, the variable `ci` needs to be recalculated at the same time.
2021-12-30Get object properties after `mrb_get_args()`dearblue
ref. #5613 I checked with Valgrind, and the methods that can cause use-after-free are `Array#rotate`, `Array#rotate!`, and `String#byteslice`. Since `String#rindex` uses `RSTRING_LEN()` indirectly inside the function, no reference to the out-of-bounds range is generated.
2021-12-29object.c: move string to float conversion to `mrb_f_float`.Yukihiro "Matz" Matsumoto
2021-12-29string.c: reorganize `str_convert_range` using `mrb_ensure_int_type`Yukihiro "Matz" Matsumoto
2021-12-29string.c: use `mrb_as_int` macro.Yukihiro "Matz" Matsumoto
2021-12-29object.c: introduce `mrb_ensure_{int,float}_type`.Yukihiro "Matz" Matsumoto
Since `mrb_to_integer` and `mrb_to_float` does not convert the object but checks types, they are named so by historical reason. We introduced properly named functions. This commit obsoletes the following functions: * mrb_to_integer() * mrb_to_int() * mrb_to_float() Use `mrb_ensure_int_type()` instead for the first 2 functions. Use `mrb_ensure_float_type()` for the last.
2021-12-29object.c: avoid implicit `to_i` and `to_f` calls.Yukihiro "Matz" Matsumoto
mruby have removed `to_int` implicit conversion, so `mrb_to_integer` should not call `to_i` for conversion.
2021-12-29common.h: include `<sys/types.h>` for `ssize_t`; #5617Yukihiro "Matz" Matsumoto
2021-12-29array.c: fix `mrb_ary_shift_m` initialization bug.Yukihiro "Matz" Matsumoto
The `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.
2021-12-29Merge pull request #5616 from mimaki/refine-ssize_t-on-msvcYukihiro "Matz" Matsumoto
Fix build error and refine definition of `ssize_t` on MSVC.
2021-12-28Fix build error and refine definition of `ssize_t` on MSVC.mimaki
2021-12-28Merge pull request #5614 from jbampton/patch-1Yukihiro "Matz" Matsumoto
Fix word casing in the README
2021-12-28Merge pull request #5615 from jbampton/pre-commit-autoupdateYukihiro "Matz" Matsumoto
pre-commit autoupdate
2021-12-28pre-commit autoupdateJohn Bampton
https://pre-commit.com/#pre-commit-autoupdate
2021-12-28Fix word casing in the READMEJohn Bampton
Changed `Actual` to `actual` mid sentence
2021-12-27class.c: remove `mt_elem` structure to avoid alignment gaps.Yukihiro "Matz" Matsumoto
2021-12-27variable.c: need to initialize `size` of iv table.Yukihiro "Matz" Matsumoto
2021-12-27parse.y: prohibit numbered parameters as arguments; fix #5605Yukihiro "Matz" Matsumoto
2021-12-26Merge pull request #5612 from dearblue/compar-extYukihiro "Matz" Matsumoto
Fix summary typo for `mrbgems/mruby-compar-ext`
2021-12-25Fix summary typo for `mrbgems/mruby-compar-ext`dearblue
2021-12-24parse.y: allow arguments start with `_` to appear multiple times; fix #5604Yukihiro "Matz" Matsumoto
2021-12-23pack.c: check integer overflow in unpacking BER; fix #5611Yukihiro "Matz" Matsumoto
2021-12-22parse.y: adjust `void_expr_error()`; fix #5606Yukihiro "Matz" Matsumoto
Allow void expression on some places e.g. right hand of `rescue` modifier. In addition, checks added on some places, e.g. left hand of logical operators.
2021-12-21Merge pull request #5610 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/github/super-linter-4.8.5 build(deps): bump github/super-linter from 4.8.4 to 4.8.5
2021-12-21build(deps): bump github/super-linter from 4.8.4 to 4.8.5dependabot[bot]
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.8.4 to 4.8.5. - [Release notes](https://github.com/github/super-linter/releases) - [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md) - [Commits](https://github.com/github/super-linter/compare/v4.8.4...v4.8.5) --- updated-dependencies: - dependency-name: github/super-linter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
2021-12-20codegen.c: generate `OP_SETIDX`; close #5608Yukihiro "Matz" Matsumoto
Note that the current implantation only calls `[]=` method. No performance improvement. Just 2 bytes less byte code per assignment.
2021-12-20vm.c: fix a half-baked implementation of `OP_SETIDX`; ref #5608Yukihiro "Matz" Matsumoto
2021-12-20codedump.c: adjust the position of local variable labels.Yukihiro "Matz" Matsumoto
2021-12-19Merge pull request #5602 from dearblue/no-ext-opsYukihiro "Matz" Matsumoto
Add `bin/mrbc --no-ext-ops` switch
2021-12-18Merge pull request #5603 from dearblue/codegen_errorYukihiro "Matz" Matsumoto
Print error before cleanup in `codegen_error()`
2021-12-17Print error before cleanup in `codegen_error()`dearblue
Previously, it always pointed to the highest scope as the location of the error. - example code `code.rb` ```ruby huge_num = "1" + "0" * 300; eval <<CODE, nil, "test.rb", 1 class Object module A #{huge_num} end end CODE ``` - Before this patch ```console % bin/mruby code.rb test.rb:1: integer too big trace (most recent call last): [1] code.rb:1 code.rb:1:in eval: codegen error (ScriptError) ``` - After this patch ```console % bin/mruby code.rb test.rb:3: integer too big trace (most recent call last): [1] code.rb:1 code.rb:1:in eval: codegen error (ScriptError) ```
2021-12-17Add `bin/mrbc --no-ext-ops` switchdearblue
Print an error if `OP_EXT[123]` is needed when generating mruby binary. This may be useful for mruby/c. Inspired by #5590.
2021-12-17Merge pull request #5601 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/actions/upload-artifact-2.3.1 build(deps): bump actions/upload-artifact from 2.2.4 to 2.3.1
2021-12-16build(deps): bump actions/upload-artifact from 2.2.4 to 2.3.1dependabot[bot]
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.2.4 to 2.3.1. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2.2.4...v2.3.1) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
2021-12-16string-ext.c: fix memory leak in `tr_parse_pattern`.Yukihiro "Matz" Matsumoto
2021-12-15boxing_nan.h: remove false description in the comment [ci skip]Yukihiro "Matz" Matsumoto
Ref #5597