summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2021-09-20codegen.c: check `no_peephole(s)` before `mrb_last_insn(s)`.Yukihiro "Matz" Matsumoto
2021-09-20codegen.c (mrb_last_insn): no previous instruction on top.Yukihiro "Matz" Matsumoto
2021-09-19vm.c: add array assertions.Yukihiro "Matz" Matsumoto
2021-09-19codegen.c: unify `OP_ARYPUSH` and `OP_ARYPUSH_N`.Yukihiro "Matz" Matsumoto
- `OP_ARYPUSH` now takes operand for the number of pushing elements - the code generator consume the stack no more than `64` for `mruby/c`
2021-09-17ops.h: add `OP_ARYPUSH_N` instruction.Yukihiro "Matz" Matsumoto
Add n elements at once. Reduces instructions for huge array initialization. In addition, `gen_value` function in `codegen.c` was refactored and clarified.
2021-09-17AUTHORS: update. [ci skip]Yukihiro "Matz" Matsumoto
2021-09-16AUTHORS: update. [ci skip]Yukihiro "Matz" Matsumoto
2021-09-15Use `struct` initializer instead of `memset`.Yukihiro "Matz" Matsumoto
2021-09-14sprintf.c: `width` may have been `INT_MAX`.Yukihiro "Matz" Matsumoto
Now `width` is limited to `INT16_MIN..INT16_MAX`.
2021-09-13parse.y: `cons_free` unused node (empty string node).Yukihiro "Matz" Matsumoto
2021-09-13parse.y: allow non-local variable access from hash value omission.Yukihiro "Matz" Matsumoto
For example, `{p:}` (means `{p:p}`) and `{String:}` (`{String:String}`) should be allowed like CRuby.
2021-09-13parse.y: allow value omission in Hash literals introduced in Ruby3.1.Yukihiro "Matz" Matsumoto
`{x:, y:}` now is a syntax sugar of `{x: x, y: y}`. This fix also includes the update of #4815 fix.
2021-09-12parse.y: fix `nint` (int to node) and `intn` (node to int).Yukihiro "Matz" Matsumoto
2021-09-12parse.y: avoid adding zero length strings.Yukihiro "Matz" Matsumoto
2021-09-11codedump.c: avoid printing `OP_EXT?` prefix.Yukihiro "Matz" Matsumoto
2021-09-10ops.h: update `OP_HASHADD` description.Yukihiro "Matz" Matsumoto
2021-09-10array.c: forgot to adjust tail position in `mrb_ary_splice`.Yukihiro "Matz" Matsumoto
2021-09-10codegen.c: fixed `gen_setxv` bug with taking assignment value; fix #5550Yukihiro "Matz" Matsumoto
2021-09-10codegen.c: `gen_move` refactoring.Yukihiro "Matz" Matsumoto
2021-09-10mruby.h: remove `acc` from `callinfo`; add `cci` instead.Yukihiro "Matz" Matsumoto
`acc` was used as an index of the receiver (if positive), or a flag for methods implemented in C. We replace `regs[ci->acc]` by `ci[1].stack[0]`. And renamed `acc` (originally meant accumulator position) to `cci` (means callinfo for C implemented method).
2021-09-10vm.c, codedump.c: add `IREP_TT_NFLAG` assertions.Yukihiro "Matz" Matsumoto
The pool specified by `OP_STRING` (and `OP_SYMBOL`) should represent a string, so that `IREP_TT_NFLAG` should be zero.
2021-09-10ops.h: add `OP_SYMBOL` instruction.Yukihiro "Matz" Matsumoto
It generates a symbol by interning from the pool string.
2021-09-10fixup! codegen.c: resurrect `s->lastpc` to reduce `iseq` scans.Yukihiro "Matz" Matsumoto
2021-09-10codegen.c: resurrect `s->lastpc` to reduce `iseq` scans.Yukihiro "Matz" Matsumoto
When parsing scripts frequent scans could cost too much.
2021-09-10vm.c: `ci->acc` (`int16_t`) may overflow.Yukihiro "Matz" Matsumoto
2021-09-10Merge pull request #5549 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/github/super-linter-4.7.3 build(deps): bump github/super-linter from 4.7.2 to 4.7.3
2021-09-09build(deps): bump github/super-linter from 4.7.2 to 4.7.3dependabot[bot]
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.7.2 to 4.7.3. - [Release notes](https://github.com/github/super-linter/releases) - [Changelog](https://github.com/github/super-linter/blob/master/docs/release-process.md) - [Commits](https://github.com/github/super-linter/compare/v4.7.2...v4.7.3) --- 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-09-09string.c: check integer overflow in `str_replace_partial`.Yukihiro "Matz" Matsumoto
2021-09-09string.c: check integer overflow in `mrb_str_aset()`.Yukihiro "Matz" Matsumoto
2021-09-09doc/guides/mrbconf.rb: add `RO_DATA` configuration description; #5547Yukihiro "Matz" Matsumoto
2021-09-09value.h: add configuration macros around `mrb_ro_data_p()`; close #5547Yukihiro "Matz" Matsumoto
- `MRB_USE_ETEXT_RO_DATA_P`: use `etext` and `edata` - `MRB_NO_DEFAULT_RO_DATA_P`: not use the default `mrb_ro_data_p()`
2021-09-09load.c: no need for conditional compilation; #5547Yukihiro "Matz" Matsumoto
`mrb_ro_data_p()` is available anyway.
2021-09-09value.h: use `etext` and `edata` which are more widely available; #5547Yukihiro "Matz" Matsumoto
2021-09-09Merge pull request #5548 from ↵Yukihiro "Matz" Matsumoto
mruby/dependabot/github_actions/github/super-linter-4.7.2 build(deps): bump github/super-linter from 4.7.1 to 4.7.2
2021-09-08build(deps): bump github/super-linter from 4.7.1 to 4.7.2dependabot[bot]
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.7.1 to 4.7.2. - [Release notes](https://github.com/github/super-linter/releases) - [Changelog](https://github.com/github/super-linter/blob/master/docs/release-process.md) - [Commits](https://github.com/github/super-linter/compare/v4.7.1...v4.7.2) --- 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-09-08array.c: refactor `mrb_ary_splice`.Yukihiro "Matz" Matsumoto
2021-09-07value.h: fixed address comparison on macOS.Yukihiro "Matz" Matsumoto
2021-09-07object.c: rename `mrb_to_int` to `mrb_to_integer`.Yukihiro "Matz" Matsumoto
Consistent naming: `integer` to represent integer packed in `mrb_value` instead of `int`.
2021-09-07string.h: rename `mrb_str_to_inum` to `mrb_str_to_integer`.Yukihiro "Matz" Matsumoto
Consistent naming: `integer` to represent integer packed in `mrb_value` instead of `inum`.
2021-09-07eval.c: if the parser raises an exception without an error messageYukihiro "Matz" Matsumoto
`eval` would have crashed in formatting.
2021-09-07eval.c: check length of the file name.Yukihiro "Matz" Matsumoto
It should be lexx than `UINT16_MAX`. If you don't check here, the parser would raise an exception.
2021-09-07codegen.c: improve exception handling in `generate_code`.Yukihiro "Matz" Matsumoto
- remove `mrb_jmpbuf` from `codegen_scope` - unify exception handling of `mrb_state` and `codegen_scope`
2021-09-07parse.y: refactor `mrb_parser_parse()`.Yukihiro "Matz" Matsumoto
- remove `mrb_jmpbuf` from `truct mrb_parser_state` - unify exception handling of `mrb_state` and `mrb_parser_state`.
2021-09-06parse.y: refactoring `mrb_parser_parser()`.Yukihiro "Matz" Matsumoto
2021-09-06numeric.c: shortcut overflowing operation when `ndigit` is too small.Yukihiro "Matz" Matsumoto
2021-09-05boxing_word.h: avoid `mrb_float_p()` when `MRB_NO_FLOAT` is on; fix #5546Yukihiro "Matz" Matsumoto
2021-09-05array.c: check integer overflow before addition.Yukihiro "Matz" Matsumoto
2021-09-05codegen.c: avoid integer overflow.Yukihiro "Matz" Matsumoto
2021-09-04kernel.c: add `__method__`; ref #4468Yukihiro "Matz" Matsumoto
2021-09-04Merge branch 'shuujii-rename-Kernel-__method__-to-Kernel-__callee__'Yukihiro "Matz" Matsumoto