<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/internal/array.h, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Suppress array-bounds warnings from gcc 13</title>
<updated>2023-11-07T14:19:51+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-10-30T12:21:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8becc889dbbacbc774c069f9e3da94f41b81efc2'/>
<id>8becc889dbbacbc774c069f9e3da94f41b81efc2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove RARRAY_CONST_PTR_TRANSIENT</title>
<updated>2023-07-13T18:48:14+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-07-13T13:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=32231812845e5302bd457f7e4a534e7965d89d49'/>
<id>32231812845e5302bd457f7e4a534e7965d89d49</id>
<content type='text'>
RARRAY_CONST_PTR now does the same things as RARRAY_CONST_PTR_TRANSIENT.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RARRAY_CONST_PTR now does the same things as RARRAY_CONST_PTR_TRANSIENT.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Feature #19730] Remove transient heap</title>
<updated>2023-07-13T13:27:33+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-06-13T20:19:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1e7b67f73370056c7521306b9f037b6cbccf640d'/>
<id>1e7b67f73370056c7521306b9f037b6cbccf640d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Emit special instruction for array literal + .(hash|min|max)</title>
<updated>2023-04-19T00:16:22+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2022-06-07T00:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c5fc1ce975ecdf1c6818714e47579c5d3531c4ca'/>
<id>c5fc1ce975ecdf1c6818714e47579c5d3531c4ca</id>
<content type='text'>
This commit introduces a new instruction `opt_newarray_send` which is
used when there is an array literal followed by either the `hash`,
`min`, or `max` method.

```
[a, b, c].hash
```

Will emit an `opt_newarray_send` instruction.  This instruction falls
back to a method call if the "interested" method has been monkey
patched.

Here are some examples of the instructions generated:

```
$ ./miniruby --dump=insns -e '[@a, @b].max'
== disasm: #&lt;ISeq:&lt;main&gt;@-e:1 (1,0)-(1,12)&gt; (catch: FALSE)
0000 getinstancevariable                    :@a, &lt;is:0&gt;               (   1)[Li]
0003 getinstancevariable                    :@b, &lt;is:1&gt;
0006 opt_newarray_send                      2, :max
0009 leave
$ ./miniruby --dump=insns -e '[@a, @b].min'
== disasm: #&lt;ISeq:&lt;main&gt;@-e:1 (1,0)-(1,12)&gt; (catch: FALSE)
0000 getinstancevariable                    :@a, &lt;is:0&gt;               (   1)[Li]
0003 getinstancevariable                    :@b, &lt;is:1&gt;
0006 opt_newarray_send                      2, :min
0009 leave
$ ./miniruby --dump=insns -e '[@a, @b].hash'
== disasm: #&lt;ISeq:&lt;main&gt;@-e:1 (1,0)-(1,13)&gt; (catch: FALSE)
0000 getinstancevariable                    :@a, &lt;is:0&gt;               (   1)[Li]
0003 getinstancevariable                    :@b, &lt;is:1&gt;
0006 opt_newarray_send                      2, :hash
0009 leave
```

[Feature #18897] [ruby-core:109147]

Co-authored-by: John Hawthorn &lt;jhawthorn@github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit introduces a new instruction `opt_newarray_send` which is
used when there is an array literal followed by either the `hash`,
`min`, or `max` method.

```
[a, b, c].hash
```

Will emit an `opt_newarray_send` instruction.  This instruction falls
back to a method call if the "interested" method has been monkey
patched.

Here are some examples of the instructions generated:

```
$ ./miniruby --dump=insns -e '[@a, @b].max'
== disasm: #&lt;ISeq:&lt;main&gt;@-e:1 (1,0)-(1,12)&gt; (catch: FALSE)
0000 getinstancevariable                    :@a, &lt;is:0&gt;               (   1)[Li]
0003 getinstancevariable                    :@b, &lt;is:1&gt;
0006 opt_newarray_send                      2, :max
0009 leave
$ ./miniruby --dump=insns -e '[@a, @b].min'
== disasm: #&lt;ISeq:&lt;main&gt;@-e:1 (1,0)-(1,12)&gt; (catch: FALSE)
0000 getinstancevariable                    :@a, &lt;is:0&gt;               (   1)[Li]
0003 getinstancevariable                    :@b, &lt;is:1&gt;
0006 opt_newarray_send                      2, :min
0009 leave
$ ./miniruby --dump=insns -e '[@a, @b].hash'
== disasm: #&lt;ISeq:&lt;main&gt;@-e:1 (1,0)-(1,13)&gt; (catch: FALSE)
0000 getinstancevariable                    :@a, &lt;is:0&gt;               (   1)[Li]
0003 getinstancevariable                    :@b, &lt;is:1&gt;
0006 opt_newarray_send                      2, :hash
0009 leave
```

[Feature #18897] [ruby-core:109147]

Co-authored-by: John Hawthorn &lt;jhawthorn@github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Stop exporting symbols for MJIT</title>
<updated>2023-03-07T05:59:23+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-03-07T05:34:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=233ddfac541749a0da80ea27913dc1ef4ea700bb'/>
<id>233ddfac541749a0da80ea27913dc1ef4ea700bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Data class implementation: Simple immutable value object</title>
<updated>2022-09-30T09:23:19+00:00</updated>
<author>
<name>Victor Shepelev</name>
<email>zverok.offline@gmail.com</email>
</author>
<published>2022-09-30T09:23:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ad651925e365ca18645f05b5e9b2eca9cd5721bc'/>
<id>ad651925e365ca18645f05b5e9b2eca9cd5721bc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename rb_ary_tmp_new to rb_ary_hidden_new</title>
<updated>2022-07-26T13:12:09+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-07-25T14:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=efb91ff19b739b759f40af2673f942e80d212857'/>
<id>efb91ff19b739b759f40af2673f942e80d212857</id>
<content type='text'>
rb_ary_tmp_new suggests that the array is temporary in some way, but
that's not true, it just creates an array that's hidden and not on the
transient heap. This commit renames it to rb_ary_hidden_new.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rb_ary_tmp_new suggests that the array is temporary in some way, but
that's not true, it just creates an array that's hidden and not on the
transient heap. This commit renames it to rb_ary_hidden_new.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove reference counting for all frozen arrays</title>
<updated>2022-07-22T17:29:21+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-07-22T15:04:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e199ae3edcead0271c6da3410eb02acd927739b7'/>
<id>e199ae3edcead0271c6da3410eb02acd927739b7</id>
<content type='text'>
The RARRAY_LITERAL_FLAG was added in commit
5871ecf956711fcacad7c03f2aef95115ed25bc4 to improve CoW performance for
array literals by not keeping track of reference counts.

This commit reverts that commit and has an alternate implementation that
is more generic for all frozen arrays. Since frozen arrays cannot be
modified, we don't need to set the RARRAY_SHARED_ROOT_FLAG and we don't
need to do reference counting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The RARRAY_LITERAL_FLAG was added in commit
5871ecf956711fcacad7c03f2aef95115ed25bc4 to improve CoW performance for
array literals by not keeping track of reference counts.

This commit reverts that commit and has an alternate implementation that
is more generic for all frozen arrays. Since frozen arrays cannot be
modified, we don't need to set the RARRAY_SHARED_ROOT_FLAG and we don't
need to do reference counting.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add RARRAY_SHARED_FLAG</title>
<updated>2022-07-21T13:02:45+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-07-20T19:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d67fcdcc9fec1b842f0f221d4bada32bdbb7220a'/>
<id>d67fcdcc9fec1b842f0f221d4bada32bdbb7220a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor macros of array.c</title>
<updated>2022-07-21T13:02:45+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-07-20T19:30:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1c9acb6bb1822f9d914b40dcea0b3ead849165cd'/>
<id>1c9acb6bb1822f9d914b40dcea0b3ead849165cd</id>
<content type='text'>
Move some macros in array.c to internal/array.h so that other files
can also access these macros.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move some macros in array.c to internal/array.h so that other files
can also access these macros.
</pre>
</div>
</content>
</entry>
</feed>
