7 Commits
Author SHA1 Message Date
Claude Fable 5 5dec40dc5f [DOC] Fix typos in C comments
- vm_eval.c: contant -> constant (RDoc for Module#module_eval;
  the sentence two lines above spells it correctly)
- include/ruby/internal/intern/thread.h: funciton -> function
- include/ruby/st.h, parser_st.h: Optionnally -> Optionally
2026-07-23 12:08:25 +09:00
Jean Boussier 837f684377 st.c: Store st_table->bins at the end of st_table->entries
Same optimization that was applied to `set_table` in
85c52079aa

This saves one pointer per `st_table`.
Now that GC support 64B slots, if we can save another 8B
either in `st_table` or in `struct RHash`, hashes would now
fit in 64B slots.
2026-05-17 23:54:19 +03:00
Peter Zhu f0d08d11dc Fix memory leak when copying ST tables
st_copy allocates a st_table, which is not needed for hashes since it is
allocated by VWA and embedded, so this causes a memory leak.

The following script demonstrates the issue:

```ruby
20.times do
  100_000.times do
    {a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9}
  end

  puts `ps -o rss= -p #{$$}`
end
```
2023-06-29 11:16:50 -04:00
Nobuyoshi Nakada c94b5f121d De-duplicate parse_st.c code from st.c 2023-06-24 19:17:37 +09:00
Nobuyoshi Nakada 3443e43b62 Remove st_functions_t 2023-06-24 19:17:37 +09:00
git a4bb2d7d63 * expand tabs. [ci skip]
Please consider using misc/expand_tabs.rb as a pre-commit hook.
2023-06-12 09:24:00 +00:00
yui-knk b481b673d7 [Feature #19719] Universal Parser
Introduce Universal Parser mode for the parser.
This commit includes these changes:

* Introduce `UNIVERSAL_PARSER` macro. All of CRuby related functions
  are passed via `struct rb_parser_config_struct` when this macro is enabled.
* Add CI task with 'cppflags=-DUNIVERSAL_PARSER' for ubuntu.
2023-06-12 18:23:48 +09:00