dearblue
96d56debc7
mrb_env_unshare() to break the link to fiber
...
Currently `e->cxt` is used exclusively to check for `break` / `return` availability.
In other words, there is no need to maintain a reference to a fiber that has reached its end.
2024-04-03 21:54:53 +09:00
Yukihiro "Matz" Matsumoto
88004e44af
Merge pull request #6223 from mruby/dependabot/bundler/rake-13.2.0
...
build(deps): bump rake from 13.1.0 to 13.2.0
2024-04-03 08:15:45 +09:00
dependabot[bot]
bb7370b59a
build(deps): bump rake from 13.1.0 to 13.2.0
...
Bumps [rake](https://github.com/ruby/rake ) from 13.1.0 to 13.2.0.
- [Release notes](https://github.com/ruby/rake/releases )
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc )
- [Commits](https://github.com/ruby/rake/compare/v13.1.0...v13.2.0 )
---
updated-dependencies:
- dependency-name: rake
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-02 14:38:41 +00:00
Yukihiro "Matz" Matsumoto
aa28f48c3b
string.c (search_nonascii): simplify fallback implementation by SWAR
2024-04-02 19:50:13 +09:00
Yukihiro "Matz" Matsumoto
898d1ff11e
proc.h: simplify method macros; ref #6220
...
- MRB_METHOD_CFUNC_P: reduce ternary; use logical-or instead
- MRB_METHOD_CFUNC: assume MRB_METHOD_CFUNC_P check before call
2024-04-01 07:33:28 +09:00
Yukihiro "Matz" Matsumoto
4982999e07
Merge pull request #6221 from dearblue/arrange-each_backtrace
...
Arranging `each_backtrace()`
2024-03-31 21:44:56 +09:00
Yukihiro "Matz" Matsumoto
586ce04cee
Merge pull request #6222 from dearblue/sync-regs
...
Need to synchronize `dbg->regs` after VM call in `mrdb`
2024-03-31 21:41:16 +09:00
Yukihiro "Matz" Matsumoto
423026353d
Merge pull request #6220 from dearblue/methodcache
...
Reorganize `mrb_cache_entry` and `mrb_method_t` types
2024-03-31 21:36:19 +09:00
dearblue
8dfebe8d12
Need to synchronize dbg->regs after VM call in mrdb
...
VM inrush could invalidate addresses stored in `dbg->regs` by `stack_extend()`.
2024-03-31 11:53:09 +09:00
dearblue
9b8b864be1
Arranging each_backtrace()
...
Highlights are:
- `Integrate the blocks `if (!ci->proc || MRB_PROC_CFUNC_P(ci->proc))` and `if (loc.irep == NULL)`.
- Folding some other conditionals.
- Assertions ensure that procs are not aliases.
2024-03-31 09:53:16 +09:00
Yukihiro "Matz" Matsumoto
2fbd49903b
LEGAL: update memsearch_swar description
2024-03-30 23:06:03 +09:00
Yukihiro "Matz" Matsumoto
cbb31e6a7c
string.c (mrb_utf8_strlen): use SWAR technique for performance
2024-03-30 22:50:12 +09:00
dearblue
328eb71e52
Reorganize mrb_cache_entry and mrb_method_t types
...
The purpose is to remove the `mid` field from the `mrb_cache_entry` structure.
The resulting RAM requirement for the method cache is reduced from 5 words per entry to 4 words per entry for 32-bit CPUs.
The relevant changes are as follows:
- Removed `MRB_USE_METHOD_T_STRUCT`.
The `mrb_method_t` type is now always defined as a structure.
- Include method IDs in `mrb_method_t`
Change the `flags` member to `uint32_t`.
The bitstring structure should be the same as the keys of the `mt` table in `class.c`.
I believe the impact on API compatibility with previous versions is minimal.
2024-03-30 18:19:26 +09:00
Yukihiro "Matz" Matsumoto
61b1a4db8e
Merge pull request #6219 from dearblue/fixed-to-out
...
Avoid assigning a fixed value in the loop
2024-03-29 23:55:05 +09:00
Yukihiro "Matz" Matsumoto
27061e4d58
Merge pull request #6216 from dearblue/shared-class-iv
...
Shared empty `iv_tbl` of module
2024-03-29 23:12:32 +09:00
dearblue
3d91ae28f5
Avoid assigning a fixed value in the loop
2024-03-29 22:26:46 +09:00
Yukihiro "Matz" Matsumoto
f0614a1e0c
vm.c: remove unnecessary update of ci local variable
2024-03-29 21:22:37 +09:00
Yukihiro "Matz" Matsumoto
f54ff74f9b
vm.c: add volatile to a variable across setjmp/longjmp
2024-03-29 21:22:37 +09:00
Yukihiro "Matz" Matsumoto
c54bf673a9
vm.c: remove unused initializations
2024-03-29 21:22:36 +09:00
Yukihiro "Matz" Matsumoto
5b133e42cc
Merge pull request #6217 from dearblue/mrb_istruct_size
...
Strict declaration for `mrb_istruct_size()`
2024-03-28 15:29:25 +09:00
dearblue
1c1c67b878
Strict declaration for mrb_istruct_size()
...
In C, `void` is required if there are no parameters.
2024-03-27 22:01:18 +09:00
dearblue
f1c0752ab8
Shared empty iv_tbl of module
...
This will be a partial merge of #5317 with the following changes.
- Remove `iclass->iv_c` since `iclass->iv_c` is equivalent to `iclass->c`.
- `class_iv_ptr()` returns a single pointer instead of a double pointer.
2024-03-27 21:39:32 +09:00
Yukihiro "Matz" Matsumoto
ef94bfc2e6
proc.c (closure_setup): fix NULL check logic
...
It used to check ci to be non NULL in line 37, but we silently assumed
ci was not NULL in the `else` clause too. So instead of checking NULL,
we add assertion. This incomplete check was found by clang-tidy.
2024-03-26 14:00:00 +09:00
Yukihiro "Matz" Matsumoto
b42b8480d1
vm.c: adjust spacing
2024-03-26 14:00:00 +09:00
Yukihiro "Matz" Matsumoto
a97c27358e
class.c (prepare_name_common): remove unnecessary pointer update
2024-03-26 14:00:00 +09:00
Yukihiro "Matz" Matsumoto
07f9f9b4be
gc.c (mrb_alloca): add const modifier
2024-03-26 13:59:59 +09:00
Yukihiro "Matz" Matsumoto
87b358a342
Including header files in include/* by <>
2024-03-26 13:59:59 +09:00
Yukihiro "Matz" Matsumoto
0786b24528
proc.h: stop including khash.h which is no longer used
...
Instead, we need to include <string.h> explicitly.
2024-03-26 13:59:59 +09:00
Yukihiro "Matz" Matsumoto
81e8617d02
mruby-metaprog: explicitly include khash.h which was included from proc.h
2024-03-26 13:59:59 +09:00
Yukihiro "Matz" Matsumoto
a8977f713d
class.c,variable.c: use mrb_int_hash_func instead of kh_ version
2024-03-26 13:59:59 +09:00
Yukihiro "Matz" Matsumoto
96fa3461f0
mruby.h: move integer hash function from khash.h
2024-03-26 13:59:58 +09:00
Yukihiro "Matz" Matsumoto
3ccc98fa32
Merge pull request #6215 from mruby/dependabot/bundler/rake-13.1.0
...
build(deps): bump rake from 13.0.6 to 13.1.0
2024-03-26 12:05:29 +09:00
dependabot[bot]
86155d8ab4
build(deps): bump rake from 13.0.6 to 13.1.0
...
Bumps [rake](https://github.com/ruby/rake ) from 13.0.6 to 13.1.0.
- [Release notes](https://github.com/ruby/rake/releases )
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc )
- [Commits](https://github.com/ruby/rake/compare/v13.0.6...v13.1.0 )
---
updated-dependencies:
- dependency-name: rake
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-03-26 02:12:45 +00:00
Yukihiro "Matz" Matsumoto
a7aa7a8772
Merge pull request #6205 from jbampton/gha-label-more-files
...
GitHub labeler: label more files
2024-03-26 11:12:40 +09:00
Yukihiro "Matz" Matsumoto
24c60895cd
Merge pull request #6214 from jbampton/add-more-comments
...
Improve the `pre-commit` and `.github` YAML files
2024-03-26 11:12:06 +09:00
Yukihiro "Matz" Matsumoto
4cdbddb3b0
Merge pull request #6213 from jbampton/add-pre-commit-hook-destroyed-symlinks
...
Add `pre-commit` hook `destroyed-symlinks`
2024-03-26 11:11:06 +09:00
John Bampton
e26d33caf5
GitHub labeler: label more files
...
These are some of the config files for the linters/tests that run
2024-03-24 04:36:09 +10:00
John Bampton
cc6d25dc29
Improve the pre-commit and .github YAML files
2024-03-23 22:46:19 +10:00
John Bampton
2e9f79409a
Add pre-commit hook destroyed-symlinks
...
https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#destroyed-symlinks
Another check or test we can have
2024-03-23 20:46:11 +10:00
Yukihiro "Matz" Matsumoto
a810b9bca8
mruby-compiler/codegen.c: stop too aggressive optimization; fix #6210
...
The old code assumes unary minus (`-@`) does not cause any side effect
(including errors). Considering the code like `-nil; nil`, the
assumption was too aggressive.
2024-03-19 13:38:05 +09:00
Yukihiro "Matz" Matsumoto
7404fab8fb
Merge pull request #6211 from jbampton/clean-up-git-ignore
...
Minor `.gitignore` clean up; order entries
2024-03-19 13:13:38 +09:00
John Bampton
0541713b6b
Minor .gitignore clean up; order entries
2024-03-19 12:51:37 +10:00
Yukihiro "Matz" Matsumoto
07fd080321
Merge pull request #6208 from jbampton/clean-up-the-pre-commit-config
...
Clean up the `pre-commit` config
2024-03-18 14:57:32 +09:00
Yukihiro "Matz" Matsumoto
35cf1abd4e
Merge pull request #6209 from jbampton/clean-up-gitignore
...
Minor `.gitignore` clean up
2024-03-17 23:57:33 +09:00
John Bampton
7ac2773a84
Minor .gitignore clean up
2024-03-16 20:40:49 +10:00
John Bampton
f18d8888ba
Clean up the pre-commit config
...
Removal of unneeded files / file types
Clean up the repo root folder by moving `codespell.txt`
2024-03-16 20:03:21 +10:00
Yukihiro "Matz" Matsumoto
4da5d025d3
Merge pull request #6206 from dearblue/table-expansion
...
Simplify expansion of mt and iv a bit
2024-03-16 08:17:42 +09:00
Yukihiro "Matz" Matsumoto
eb57432d03
Bump yard from 0.9.28 to 0.9.36
2024-03-15 23:52:00 +09:00
Yukihiro "Matz" Matsumoto
53c38db2fc
Merge pull request #6200 from jbampton/super-linter-validate-dockerfile
...
super-linter: validate the `Dockerfile` with `hadolint`
2024-03-15 23:38:22 +09:00
Yukihiro "Matz" Matsumoto
b913824d47
range.c (mrb_gc_mark_range): return size
...
If not initialized, size is zero, otherwise two.
2024-03-15 23:36:30 +09:00