Yukihiro "Matz" Matsumoto
bfe2bd4960
pack.c: fix M packing bug.
2021-08-16 10:56:44 +09:00
Yukihiro "Matz" Matsumoto
8d85d4ac9b
AUTHORS: update. [ci skip]
2021-08-15 07:07:08 +09:00
Yukihiro "Matz" Matsumoto
40c4c5d344
random.c: use I specifier for mrb_get_args(); ref #5530
2021-08-14 15:28:38 +09:00
Yukihiro "Matz" Matsumoto
8e5e96239c
pack.c: fixed a overwriting bug in pack_w and pack_M.
2021-08-14 14:58:09 +09:00
Yukihiro "Matz" Matsumoto
ad194bd46b
error.c: the error message may contain NUL character.
2021-08-14 13:01:47 +09:00
Yukihiro "Matz" Matsumoto
73798bff65
Merge pull request #5532 from dantecatalfamo/rhel-doxygen
...
Add instructions for installing doxygen on RHEL/Fedora/CentOS
2021-08-14 08:18:11 +09:00
Dante Catalfamo
89ea8fa34a
Add instructions for installing doxygen on RHEL/Fedora/CentOS
2021-08-13 14:53:20 -04:00
Yukihiro "Matz" Matsumoto
32c30c35b2
Merge pull request #5530 from dearblue/mrb_get_args-I
...
Check the class with `I` specifier of `mrb_get_args()`
2021-08-13 18:11:26 +09:00
dearblue
01da5e1392
Check the class with I specifier of mrb_get_args()
...
Previously, the `I` specifier only checked if the object was `MRB_TT_ISTRUCT`.
So it was at risk of getting pointers to different C structs if multiple classes were to use the `MRB_TT_ISTRUCT` instance.
Change this behavior and change the C argument corresponding to the `I` specifier to `(void *, struct RClass)`.
This change is not compatible with the previous mruby.
Please note that if the user uses the previous specifications, `SIGSEGV` may occur or the machine stack may be destroyed.
resolve #5527
2021-08-13 15:04:19 +09:00
Yukihiro "Matz" Matsumoto
9e74aad43c
codegen.c: fixed a bug in mrb_decode_insn().
2021-08-13 12:38:10 +09:00
Yukihiro "Matz" Matsumoto
7907c184be
codegen.c: add a comment that notice rewind_pc calling convention.
...
`rewind_pc` should not be called when `s->pc` is `0` (top).
2021-08-13 10:11:36 +09:00
Yukihiro "Matz" Matsumoto
9c3d305530
codegen.c: refactor mrb_last_insn().
...
Last commit made `mrb_decode_insn()` to take `NULL` as `pc`.
2021-08-13 10:10:17 +09:00
Yukihiro "Matz" Matsumoto
cbdc4f2c5c
codegen.c: mrb_prev_pc can return NULL at the top of iseq.
2021-08-13 10:02:01 +09:00
Yukihiro "Matz" Matsumoto
013365498d
test/eval.c: add test for #5528
2021-08-12 11:57:56 +09:00
Yukihiro "Matz" Matsumoto
43f9901ec2
Revert "Drop unnecessary upper procs linked from class/module/def syntax"
...
Fix #5528
This reverts commit 59201b59046b9e73c309508350cd3c0fafd20e4d; #5497
2021-08-12 11:42:27 +09:00
Yukihiro "Matz" Matsumoto
80893811c0
class.c: const_missing do not have to be in the backtrace; ref #5528
2021-08-12 08:10:09 +09:00
Yukihiro "Matz" Matsumoto
e1b170160b
codegen.c: avoid signedness warning of int comparison.
2021-08-11 16:10:32 +09:00
Yukihiro "Matz" Matsumoto
a85f2299c0
codegen.c: avoid cross initialization of mrb_insn_data.
2021-08-11 16:09:51 +09:00
Yukihiro "Matz" Matsumoto
fd597d2655
codedump.c: print local variable name for `ADDI/SUBI/ instructions.
...
Recent peephole optimization made `ADDI/SUBI` destinations possibly
local variables.
2021-08-11 10:48:18 +09:00
Yukihiro "Matz" Matsumoto
b1b9b157f8
codegen.c: more peephole optimization.
...
`a=10; a+=1` to generate:
```
1 000 OP_LOADI R1 11 ; R1:a
```
instead of:
```
1 000 OP_LOADI R1 10 ; R1:a
1 003 OP_MOVE R2 R1 ; R1:a
1 006 OP_ADDI R2 1
1 009 OP_MOVE R1 R2 ; R1:a
```
2021-08-11 10:48:18 +09:00
Yukihiro "Matz" Matsumoto
52eb2af7d0
Merge pull request #5526 from mruby/dependabot/github_actions/github/super-linter-4.6.1
...
build(deps): bump github/super-linter from 4.6.0 to 4.6.1
2021-08-11 06:27:53 +09:00
dependabot[bot]
b83eb8dcff
build(deps): bump github/super-linter from 4.6.0 to 4.6.1
...
Bumps [github/super-linter](https://github.com/github/super-linter ) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/github/super-linter/releases )
- [Commits](https://github.com/github/super-linter/compare/v4.6.0...v4.6.1 )
---
updated-dependencies:
- dependency-name: github/super-linter
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-10 14:06:15 +00:00
Yukihiro "Matz" Matsumoto
3909281126
Merge pull request #5524 from dearblue/gem-headers
...
Expose all header files of the gems for small compilation
2021-08-10 06:21:18 +09:00
dearblue
4c25ace8b3
Expose all header files of the gems for small compilation
...
After building mruby, if the user compiles and links to `libmruby.a`, expose the included directory of the captured gems.
This is a change to the `<build-dir> /lib/libmruby.flags.mak` file and will result in being added to `bin/mruby-config --cflags`.
This eliminates the need for the user to look up the path and add the compiler flag if the user wants to take advantage of her gems publishing features.
In the main build with `rake CONFIG=...`, there is no problem because it can only be seen from the gems that depends directly and indirectly as before.
However, when compiling independently by the user using `bin/mruby-config`, a header file name collision may occur if a unique header directory is added.
2021-08-09 21:16:45 +09:00
Yukihiro "Matz" Matsumoto
e8dbf1db9a
Merge pull request #5525 from jbampton/pre-commit-autoupdate
...
pre-commit autoupdate
2021-08-09 11:38:31 +09:00
John
530a91752f
pre-commit autoupdate
...
https://pre-commit.com/#pre-commit-autoupdate
2021-08-09 10:10:09 +10:00
Yukihiro "Matz" Matsumoto
0b2ebf4868
Merge pull request #5522 from dearblue/pack-EOF
...
Fixed compilation error of "mruby-pack" with `MRB_NO_STDIO`
2021-08-09 08:39:12 +09:00
Yukihiro "Matz" Matsumoto
1e1d296497
Merge pull request #5523 from jbampton/patch-1
...
docs: fix case of mruby
2021-08-08 09:25:23 +09:00
John Bampton
0516d94c83
docs: fix case of mruby
2021-08-07 16:51:04 +10:00
dearblue
18ef4e35f3
Fixed compilation error of "mruby-pack" with MRB_NO_STDIO
2021-08-07 14:29:55 +09:00
Yukihiro "Matz" Matsumoto
35d230a669
codedump.c: print two operands R(x) and R(x+1) for clarity.
2021-08-07 12:12:24 +09:00
Yukihiro "Matz" Matsumoto
06f49b3f84
codegen.c: need to push the value when the loop was eliminated.
2021-08-07 12:11:38 +09:00
Yukihiro "Matz" Matsumoto
cd02cef465
array.h: avoid duplicated defined of MRB_ARY_NO_EMBED; fix #5520
2021-08-07 06:48:03 +09:00
Yukihiro "Matz" Matsumoto
ce0b38fb72
Merge pull request #5521 from mruby/dependabot/github_actions/github/super-linter-4.6.0
...
build(deps): bump github/super-linter from 4.5.1 to 4.6.0
2021-08-07 06:46:35 +09:00
dependabot[bot]
d0b214c269
build(deps): bump github/super-linter from 4.5.1 to 4.6.0
...
Bumps [github/super-linter](https://github.com/github/super-linter ) from 4.5.1 to 4.6.0.
- [Release notes](https://github.com/github/super-linter/releases )
- [Commits](https://github.com/github/super-linter/compare/v4.5.1...v4.6.0 )
---
updated-dependencies:
- dependency-name: github/super-linter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-08-06 14:05:46 +00:00
Yukihiro "Matz" Matsumoto
46a1c40fe3
numeric_ext.c: fix a bug regarding MRB_INT_MIN.
2021-08-06 11:16:12 +09:00
Yukihiro "Matz" Matsumoto
ff2da0b66e
numeric.c: fix a bug regarding MRB_INT_MIN.
2021-08-06 11:15:46 +09:00
Yukihiro "Matz" Matsumoto
37dbb91b96
codegen.c: -9223372036854775808 % -1 overflows 64 bit integer.
2021-08-06 10:35:06 +09:00
Yukihiro "Matz" Matsumoto
7ecc16f97a
codegen.c: remove code duplication from NODE_ARRAY.
2021-08-05 16:59:32 +09:00
Yukihiro "Matz" Matsumoto
9cb44f5ae3
codegen.c: detect integer overflow in division.
...
`MRB_INT_MIN / -1` overflows.
2021-08-04 12:25:14 +09:00
Yukihiro "Matz" Matsumoto
9f37733382
numeric.c: fix a bug in left shift of negative integer.
...
`-1 * (1<<63)` causes overflow, but `-1<<63` is a valid value.
2021-08-04 12:05:09 +09:00
Yukihiro "Matz" Matsumoto
9b3b2a4c95
numeric.c: check zero division before modulo.
2021-08-03 16:45:08 +09:00
Yukihiro "Matz" Matsumoto
caaa07f2da
codegen.c: check zero division before constant folding.
2021-08-03 16:43:50 +09:00
Yukihiro "Matz" Matsumoto
c480ac4457
numeric_ext.c: modulo and remainder should handle infinite argument.
2021-08-03 16:35:31 +09:00
Yukihiro "Matz" Matsumoto
e75572af6a
numeric_ext.c: add Float#modulo and #remainder methods.
2021-08-03 16:30:47 +09:00
Yukihiro "Matz" Matsumoto
f4afcbef67
numeric_ext.c: update Integer#remainder method.
...
- need to detect zero division error
- support floating point number argument (as `%`)
2021-08-03 16:28:11 +09:00
Yukihiro "Matz" Matsumoto
b70fd09f47
Revert "numeric.c: simplifies int_mod definition."
...
This reverts commit 3738d62a86 .
The change changed the behavior with floating point numbers.
2021-08-03 16:11:02 +09:00
Yukihiro "Matz" Matsumoto
2092bc7fe8
codegen.c: avoid division by zero in constant folding.
2021-08-03 15:57:01 +09:00
Yukihiro "Matz" Matsumoto
fad47a98a7
numeric_ext.c: use mrb_integer instead of mrb_as_int.
...
`mrb_as_int` implicitly converts the value into the integer, but those
methods are defined for Integer class so that the value should always be
integers.
2021-08-03 13:15:34 +09:00
Yukihiro "Matz" Matsumoto
3738d62a86
numeric.c: simplifies int_mod definition.
2021-08-03 13:14:23 +09:00