General

Profile

hasumikin (hitoshi hasumi)

  • Login: hasumikin
  • Registered on: 06/20/2019
  • Last sign in: 12/12/2024

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 2 2

Activity

02/13/2025

08:12 PM Ruby Revision 31162bf4 (git): [ruby/prism] Handle zero-sized allocation in pm_constant_id_list_init_capacity
According to the calloc(3) man page, when nmemb or size is 0, `calloc()` can either return NULL or a unique pointer that can be passed to `free()`.
While gcc and clang typically return a unique pointer, mruby's `mrb_calloc()` returns NUL...
hasumikin (hitoshi hasumi)

04/28/2024

03:08 AM Ruby Revision ddd8da4b (git): [Universal parser] Improve AST structure
This patch moves `ast->node_buffer->config` to `ast->config` aiming to improve readability and maintainability of the source.
## Background
We could not add the `config` field to the `rb_ast_t *` due to the five-word restriction of the...
hasumikin (hitoshi hasumi)

04/27/2024

08:56 AM Ruby Revision 9ea77cb3 (git): Remove unnecessary assignment to ast->body.line_count
This patch removes a code that assigns `-1` to `ast->body.line_count` because, at least as of now, it looks not necessary.
I made this commit atomically revertable if I was wrong.
## Relevant commits
- The preparation for this PR: http...
hasumikin (hitoshi hasumi)
03:08 AM Ruby Revision 55a402bb (git): Add line_count field to rb_ast_body_t
This patch adds `int line_count` field to `rb_ast_body_t` structure.
Instead, we no longer cast `script_lines` to Fixnum.
## Background
Ref https://github.com/ruby/ruby/pull/10618
In the PR above, we have decoupled IMEMO from `rb_ast_...
hasumikin (hitoshi hasumi)

04/26/2024

02:21 AM Ruby Revision 2244c58b (git): [Universal parser] Decouple IMEMO from rb_ast_t
This patch removes the `VALUE flags` member from the `rb_ast_t` structure making `rb_ast_t` no longer an IMEMO object.
## Background
We are trying to make the Ruby parser generated from parse.y a universal parser that can be used by ot...
hasumikin (hitoshi hasumi)

04/15/2024

11:51 AM Ruby Revision 9b1e97b2 (git): [Universal parser] DeVALUE of p->debug_lines and ast->body.script_lines
This patch is part of universal parser work.
## Summary
- Decouple VALUE from members below:
- `(struct parser_params *)->debug_lines`
- `(rb_ast_t *)->body.script_lines`
- Instead, they are now `rb_parser_ary_t *`
- They can also...
hasumikin (hitoshi hasumi)

04/04/2024

09:29 AM Ruby Revision f5e387a3 (git): Separate SCRIPT_LINES__ from ast.c
This patch suggests relocating the code dealing with `SCRIPT_LINES__` from ast.c to ruby_parser.c.
## Background
- I guess `AbstractSyntaxTree.of` method used to use `SCRIPT_LINES__` internally for some reason before
- However, now it ...
hasumikin (hitoshi hasumi)
04:38 AM Ruby Revision 8aa8fce3 (git): Fix return-type warning in compile.c
This patch surppresses the warning below:
```console
compile.c:10314:1: warning: control reaches end of non-void function [-Wreturn-type]
10314 | }
| ^
```
hasumikin (hitoshi hasumi)

03/19/2024

01:30 AM Ruby Revision ce544f8d (git): [ruby/prism] [Compatibility] Improve printf format
For better compatibility, this patch suggests using __MINGW_PRINTF_FORMAT that GCC provides for MINGW environment.
https://github.com/ruby/prism/commit/a3a792b64f
hasumikin (hitoshi hasumi)

03/15/2024

01:14 PM Ruby Revision 40ecad0a (git): [Universal parser] Fix -Wsuggest-attribute=format warnings
Under a configuration including `cppflags=-DUNIVERSAL_PARSER`, warnings listed below show in build time:
```
node.c:396:30: warning: initialization left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format]
...
hasumikin (hitoshi hasumi)

Also available in: Atom