John Bampton
7fb6fdd4e2
Add more details to the pre-commit config
2024-11-25 22:49:30 +10:00
Yukihiro "Matz" Matsumoto
3ececd4f1f
mruby-catch: fixed typo
2024-11-25 16:51:46 +09:00
Yukihiro "Matz" Matsumoto
1c317cf79e
mruby-catch (throw_m): small refactoring
2024-11-25 12:28:50 +09:00
Yukihiro "Matz" Matsumoto
79dda053a5
mruby-numeric-ext: add test for Integer#digits
2024-11-23 23:16:47 +09:00
Yukihiro "Matz" Matsumoto
781359a1d1
Merge pull request #6432 from dearblue/hash
2024-11-22 09:53:10 +09:00
dearblue
fd97241cd6
Moving code in macro arguments out of macros
...
In `src/hash.c`, there are code blocks that are passed as macro arguments.
These code blocks are interpreted as part of the macro function, so breakpoints cannot be set in the debugger.
Also, the gcov command will aggregate them to the caller, and the code in the block will not be counted.
This patch will prevent them from being interpreted as part of a macro, and thus the aforementioned problems will no longer occur.
2024-11-21 22:52:29 +09:00
Yukihiro "Matz" Matsumoto
87bd5c7abc
Merge pull request #6409 from jbampton/add-prettier-config
2024-11-21 14:01:41 +09:00
Yukihiro "Matz" Matsumoto
1e41c47ebf
Merge pull request #6429 from hoshiumiarata/fix_num_params_as_hash_key
2024-11-21 11:47:00 +09:00
Yukihiro "Matz" Matsumoto
4a54b551e8
hash.c (ht_set): inline ht_set_without_ib_adjustment()
2024-11-21 07:59:11 +09:00
Yukihiro "Matz" Matsumoto
3ad85e6038
Merge pull request #6431 from dearblue/typo
2024-11-21 07:58:55 +09:00
dearblue
de494796ac
Fixed typo
2024-11-20 21:14:55 +09:00
John Bampton
a7c947360e
[CI] Add prettier to pre-commit
...
Add `.prettierignore` and the `.prettierrc` config file. Prettier is currently targeting the `JSON`, `Markdown` and `YAML` files in the mruby repo.
Additional file types can be targetted with prettier via additional community plugins.
https://prettier.io/docs/en/
You can see all the languages that are supported on the homepage:
https://prettier.io/
This PR references a few other issues and PRs
We did have prettier running with pre-commit before that method was removed from prettier.
https://github.com/mruby/mruby/pull/6292
https://github.com/mruby/mruby/issues/6291
https://github.com/mruby/mruby/issues/6138
https://github.com/mruby/mruby/pull/5490
Perhaps we could add more npm software to pre-commit in future using new the `local` repo approach.
https://pre-commit.com/#repository-local-hooks
The best part is that it runs with pre-commit on our local machines on `git commit` and also when running `pre-commit run --all-files` or for example when running `make check`.
There were also some minor fixes / style changes in the pre-commit config to standardize casing.
https://www.npmjs.com/package/prettier?activeTab=readme
2024-11-20 14:51:11 +10:00
Yukihiro "Matz" Matsumoto
dc5566e560
mruby-bigint (int_fit_limb_p): fix the logic to check mrb_int size
...
`int_fit_limb_p()` checks if `mrb_int` fits in `mp_limb`. Previous logic
did not work well with negative integers.
2024-11-20 11:27:54 +09:00
Yukihiro "Matz" Matsumoto
33357d4f35
hash.c (ht_set_without_ib_adjustment): need to skip tombstone; #6421
...
If a tombstone (a deleted entry slot) is found in searching the entry,
it should be skipped, but we had added the new entry even if the entry
to be replaced might be found in the further search. #6414 and #6421
tried to rehash the table to remove tombstone. But rehashing consumes
memory. So for the time being, we just skip tombstones in the search.
Maybe we will add some heuristics to rehash when the table has too many
tombstones. close #6414
2024-11-20 10:52:39 +09:00
Yukihiro "Matz" Matsumoto
9ea6bda781
Merge pull request #6427 from dearblue/vm-recursive
2024-11-20 07:22:12 +09:00
Yukihiro "Matz" Matsumoto
4953dcd81f
Merge pull request #6428 from hoshiumiarata/change_limits_of_addi_and_subi
2024-11-20 06:37:19 +09:00
Hoshiumi Arata
386cd771e7
Fix numbered parameters when used as hash keys
2024-11-20 00:31:44 +09:00
Hoshiumi Arata
d5823623ed
Change the limits of OP_ADDI and OP_SUBI from 0-127 to 0-255.
2024-11-19 23:36:22 +09:00
Yukihiro "Matz" Matsumoto
9546207047
Merge pull request #6426 from hoshiumiarata/coverage
...
Add GitHub Actions workflow for coverage reporting
2024-11-19 22:55:37 +09:00
dearblue
0337e0e0f1
Need to update ci variable after re-entry to VM
...
Some functions called by `mrb_vm_exec()` involve re-entry into the mruby VM.
If the `ci` variable is not updated after re-entry, use-after-free is caused.
This patch makes the following after-call fixes.
| called | might call methods
| ----------------------- | ----------------
| `mrb_ary_splat()` | `#to_a`
| `hash_new_from_regs()` | `#eql?` `#hash`
| `mrb_hash_delete_key()` | `#eql?` `#hash`
| `mrb_hash_get()` | `#eql?` `#hash` `#default`
| `mrb_hash_key_p()` | `#eql?` `#hash`
| `mrb_hash_merge()` | `#eql?` `#hash`
| `mrb_hash_set()` | `#eql?` `#hash`
| `mrb_range_new()` | `#<=>`
2024-11-19 22:47:04 +09:00
Hoshiumi Arata
0947dd64d0
Update coverage workflow to use Clang 18 for compilation
2024-11-19 18:24:40 +09:00
Hoshiumi Arata
abca6549d8
Update coverage workflow to use Clang for compilation
2024-11-19 18:12:57 +09:00
Hoshiumi Arata
593cda570f
Update retention days for coverage report in GitHub Actions workflow
2024-11-19 18:11:08 +09:00
Yukihiro "Matz" Matsumoto
dbb1d2342f
Merge pull request #6425 from mruby/dependabot/github_actions/super-linter/super-linter-7.2.0
2024-11-19 06:41:07 +09:00
Hoshiumi Arata
1fbcd4a39b
Fix lint errors
2024-11-19 00:06:37 +09:00
Hoshiumi Arata
f7b2ec1408
Fix formatting of coverage report in GitHub Actions workflow
2024-11-19 00:00:49 +09:00
Hoshiumi Arata
7cf5e9b0af
Refactor coverage report generation in GitHub Actions workflow
2024-11-18 23:56:55 +09:00
dependabot[bot]
cc76dda8a5
Bump super-linter/super-linter from 7.1.0 to 7.2.0
...
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter ) from 7.1.0 to 7.2.0.
- [Release notes](https://github.com/super-linter/super-linter/releases )
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/super-linter/super-linter/compare/v7.1.0...v7.2.0 )
---
updated-dependencies:
- dependency-name: super-linter/super-linter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-18 14:45:49 +00:00
Hoshiumi Arata
fbcc6cf255
Update coverage workflow to trigger on pull requests
2024-11-18 23:29:17 +09:00
Hoshiumi Arata
6028be193c
Add GitHub Actions workflow for coverage reporting
2024-11-18 23:19:28 +09:00
Yukihiro "Matz" Matsumoto
b437b1da24
Merge pull request #6424 from MaxFork/max-add-check_command
2024-11-18 23:15:40 +09:00
Max Base
f6106f62c7
Update Makefile - Add check_command
2024-11-17 14:43:21 +03:30
Yukihiro "Matz" Matsumoto
f27bc6ab32
Merge pull request #6423 from dearblue/task/test
2024-11-17 07:52:50 +09:00
Yukihiro "Matz" Matsumoto
6663f1072c
Merge pull request #6422 from dearblue/hash
2024-11-17 00:05:20 +09:00
dearblue
cf91cbf090
Adding a serialized test task
...
Under normal circumstances, `rake -m test` will parallelize not only the build task, but also the test task.
With this patch, `rake -m test:run:serial` will parallelize the build tasks, but the test tasks will be done one by one in sequence.
The name of the task to be added is as follows:
| tasks to be added | corresponding exist tasks
| --------------------- | ----------------
| `test:run:serial` | `test:run`
| `test:run:serial:bin` | `test:run:bin`
| `test:run:serial:lib` | `test:run:lib`
2024-11-16 21:21:51 +09:00
dearblue
9501c3f58c
Add annotations for function names defined in the preprocessor
2024-11-16 20:50:49 +09:00
Yukihiro "Matz" Matsumoto
013bcb9221
Merge pull request #6420 from jbampton/patch-2
2024-11-16 04:52:15 +09:00
Yukihiro "Matz" Matsumoto
628f057482
Merge pull request #6419 from hoshiumiarata/fix_numparams_in_lambda
2024-11-15 16:17:03 +09:00
Yukihiro "Matz" Matsumoto
e0d9bce8b6
Merge pull request #6415 from hoshiumiarata/fix_numbered_parameters_in_singleton
2024-11-15 16:10:34 +09:00
Yukihiro "Matz" Matsumoto
a00267c802
Merge pull request #6417 from hoshiumiarata/fix_email_lint
2024-11-15 16:03:41 +09:00
Yukihiro "Matz" Matsumoto
a247f48cf6
Merge pull request #6416 from hoshiumiarata/optimize_class_new_iseq
2024-11-15 15:42:57 +09:00
Yukihiro "Matz" Matsumoto
ab3bc12fcb
class.c: remove 'class' prefix from error messages
2024-11-15 15:33:14 +09:00
Yukihiro "Matz" Matsumoto
a109599d53
vm.c (prepare_missing): add receiver's class in superclass calls
2024-11-15 15:15:08 +09:00
Yukihiro "Matz" Matsumoto
65e0e5bbd3
class.c (mrb_method_missing): add receiver's class to clarify
...
We needed to modify a lot of test code that expected the old style.
2024-11-15 15:13:24 +09:00
John Bampton
d506ed08da
Update .github/labeler.yml
2024-11-13 23:46:22 +10:00
John Bampton
33ba77fb00
Update labeler.yml: add label for the tools directory
2024-11-13 23:39:51 +10:00
Hoshiumi Arata
9fe2a5c46a
parser: setup numbered parameters in new_lambda and adjust dump_prefix offset
2024-11-13 22:19:27 +09:00
Hoshiumi Arata
3be0e6b24f
Update mlc_config.json to ignore mailto links in linting
2024-11-13 20:45:28 +09:00
Hoshiumi Arata
0b1d55a088
class.c: replace OP_SEND with OP_SSEND in "new" method's iseq
2024-11-13 18:34:16 +09:00
Hoshiumi Arata
cc2ec53807
parser: support numbered parameters when used as a singleton
2024-11-13 00:22:49 +09:00