<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/prism/util/pm_constant_pool.c, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/prism] Correct constant pool bucket type logic</title>
<updated>2025-12-05T20:35:31+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-12-05T20:17:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=786f67393875b0a5089da73504ac57179e8ef829'/>
<id>786f67393875b0a5089da73504ac57179e8ef829</id>
<content type='text'>
When replacing an owned constant by a different type (constant or
shared) replace with the correct type instead of defaulting to
shared.

https://github.com/ruby/prism/commit/fbe9b131a1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When replacing an owned constant by a different type (constant or
shared) replace with the correct type instead of defaulting to
shared.

https://github.com/ruby/prism/commit/fbe9b131a1
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Handle zero-sized allocation in pm_constant_id_list_init_capacity</title>
<updated>2025-02-13T20:12:43+00:00</updated>
<author>
<name>HASUMI Hitoshi</name>
<email>hasumikin@gmail.com</email>
</author>
<published>2025-02-01T05:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=31162bf4261b2e740f6e26f2c2f22c36d3556cf0'/>
<id>31162bf4261b2e740f6e26f2c2f22c36d3556cf0</id>
<content type='text'>
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 NULL in this case.

Since `pm_constant_pool_init()` is commonly called with capacity=0 during normal operation of Prism, explicitly handle this case by setting `list-&gt;ids` to NULL when capacity is 0.
This approach is portable across different calloc implementations and avoids potential issues with mruby's allocation behavior.

This maintains compatibility with `free()` and `realloc()`, as passing NULL pointers to these functions is explicitly allowed by their specifications.

https://github.com/ruby/prism/commit/1c32252df7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 NULL in this case.

Since `pm_constant_pool_init()` is commonly called with capacity=0 during normal operation of Prism, explicitly handle this case by setting `list-&gt;ids` to NULL when capacity is 0.
This approach is portable across different calloc implementations and avoids potential issues with mruby's allocation behavior.

This maintains compatibility with `free()` and `realloc()`, as passing NULL pointers to these functions is explicitly allowed by their specifications.

https://github.com/ruby/prism/commit/1c32252df7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Remove various unused memsize infra</title>
<updated>2024-05-24T17:19:34+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-05-24T15:35:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b04c959621562de18552aa1a002b52f311a7185e'/>
<id>b04c959621562de18552aa1a002b52f311a7185e</id>
<content type='text'>
https://github.com/ruby/prism/commit/283938ed1f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/283938ed1f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Make the locals set switch from list to hash dynamically</title>
<updated>2024-04-05T19:23:57+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-04-05T16:12:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=540cc886b9ca169356ebc4444c6a11c38e2da04b'/>
<id>540cc886b9ca169356ebc4444c6a11c38e2da04b</id>
<content type='text'>
https://github.com/ruby/prism/commit/c977c4c98a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/c977c4c98a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Switch locals to use a hash</title>
<updated>2024-04-05T19:23:57+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-04-05T15:54:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=358aeb103b308957bda1b03b760f08848b454cef'/>
<id>358aeb103b308957bda1b03b760f08848b454cef</id>
<content type='text'>
https://github.com/ruby/prism/commit/f38946021e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/f38946021e
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] fix some comments</title>
<updated>2024-03-05T09:50:47+00:00</updated>
<author>
<name>cui fliter</name>
<email>imcusg@gmail.com</email>
</author>
<published>2024-03-05T09:50:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=226a889dc7688cbd0c96cce1005adbda69b03ec4'/>
<id>226a889dc7688cbd0c96cce1005adbda69b03ec4</id>
<content type='text'>
Signed-off-by: cui fliter &lt;imcusg@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: cui fliter &lt;imcusg@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Additional fix of adding `x` prefix after rebase with main branch</title>
<updated>2024-03-04T16:40:24+00:00</updated>
<author>
<name>HASUMI Hitoshi</name>
<email>hasumikin@gmail.com</email>
</author>
<published>2024-03-03T01:35:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b95e2cdca7355539f5d03f859290e4bc6ec19feb'/>
<id>b95e2cdca7355539f5d03f859290e4bc6ec19feb</id>
<content type='text'>
https://github.com/ruby/prism/commit/08733438bd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/08733438bd
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Make alloc interface replaceable</title>
<updated>2024-03-04T16:40:23+00:00</updated>
<author>
<name>HASUMI Hitoshi</name>
<email>hasumikin@gmail.com</email>
</author>
<published>2024-02-27T05:25:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c4bd6da2988ecdf3e6d00be78e58a4eba6192bed'/>
<id>c4bd6da2988ecdf3e6d00be78e58a4eba6192bed</id>
<content type='text'>
- Add `x` prefix to malloc, calloc, realloc, and free
  (eg: malloc -&gt; xmalloc)
- By default, they are replaced with stdlib's functions at build
- You can use custom functions by defining `PRISM_CUSTOM_ALLOCATOR` macro

https://github.com/ruby/prism/commit/7a878af619
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add `x` prefix to malloc, calloc, realloc, and free
  (eg: malloc -&gt; xmalloc)
- By default, they are replaced with stdlib's functions at build
- You can use custom functions by defining `PRISM_CUSTOM_ALLOCATOR` macro

https://github.com/ruby/prism/commit/7a878af619
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Fix up GCC analyzer</title>
<updated>2024-02-17T21:53:54+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-02-17T20:51:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=00bda2aa3b7de7b8c6c112cbe06e6c95a1b3f918'/>
<id>00bda2aa3b7de7b8c6c112cbe06e6c95a1b3f918</id>
<content type='text'>
https://github.com/ruby/prism/commit/2e8bc17528
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/2e8bc17528
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Compile constant reads using opt_getconstant_path</title>
<updated>2024-02-08T16:53:10+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-02-08T15:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=54295ba5e18818578d9df2ddbec7bebb8c4ec3a7'/>
<id>54295ba5e18818578d9df2ddbec7bebb8c4ec3a7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
