<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/builtin.c, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Gather code for builtin loading to miniinit.c</title>
<updated>2024-09-08T14:16:46+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-09-08T12:02:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=be84abffbaf315c7534ec4c76edc7b30c3ec8111'/>
<id>be84abffbaf315c7534ec4c76edc7b30c3ec8111</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use line numbers as builtin-index</title>
<updated>2024-01-22T10:39:34+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-01-17T07:45:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=127b19ab561b5365884b465d50356a1e4019713c'/>
<id>127b19ab561b5365884b465d50356a1e4019713c</id>
<content type='text'>
The order of iseq may differ from the order of tokens, typically
`while`/`until` conditions are put after the body.

These orders can match by using line numbers as builtin-indexes, but
at the same time, it introduces the restriction that multiple `cexpr!`
and `cstmt!` cannot appear in the same line.

Another possible idea is to use `RubyVM::AbstractSyntaxTree` and
`node_id` instead of ripper, with making BASERUBY 3.1 or later.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The order of iseq may differ from the order of tokens, typically
`while`/`until` conditions are put after the body.

These orders can match by using line numbers as builtin-indexes, but
at the same time, it introduces the restriction that multiple `cexpr!`
and `cstmt!` cannot appear in the same line.

Another possible idea is to use `RubyVM::AbstractSyntaxTree` and
`node_id` instead of ripper, with making BASERUBY 3.1 or later.
</pre>
</div>
</content>
</entry>
<entry>
<title>Free everything at shutdown</title>
<updated>2023-12-07T20:52:35+00:00</updated>
<author>
<name>Adam Hess</name>
<email>adamhess1991@gmail.com</email>
</author>
<published>2023-10-12T18:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6816e8efcff3be75f8020cd1b0ea57d3cd664bbc'/>
<id>6816e8efcff3be75f8020cd1b0ea57d3cd664bbc</id>
<content type='text'>
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown.

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown.

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #18286] Make builtin binary if sharable in universal binaries</title>
<updated>2023-11-09T07:01:01+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-10-19T11:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=22939382a897af32d9899fafedd5be807b0d555b'/>
<id>22939382a897af32d9899fafedd5be807b0d555b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Disable iseq-dumped builtin module for universal x86_64/arm64 binaries"</title>
<updated>2023-11-09T07:01:01+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-11-09T04:40:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=40d40a651ef8d9cd150503fc264b1c922f63fe61'/>
<id>40d40a651ef8d9cd150503fc264b1c922f63fe61</id>
<content type='text'>
This reverts commit 1d5598fe0d3470e7cab06a756d40a9221fcd501b.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 1d5598fe0d3470e7cab06a756d40a9221fcd501b.
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable iseq-dumped builtin module for universal x86_64/arm64 binaries</title>
<updated>2023-11-09T03:24:01+00:00</updated>
<author>
<name>Ben Hamilton</name>
<email>benhamilton@google.com</email>
</author>
<published>2023-02-23T20:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1d5598fe0d3470e7cab06a756d40a9221fcd501b'/>
<id>1d5598fe0d3470e7cab06a756d40a9221fcd501b</id>
<content type='text'>
During the build, Ruby has special logic to serialize its own builtin
module to disk using the binary iseq format during the build (I assume
for speed so it doesn't have to parse builtin every time it starts
up).

However, since iseq format is architecture-specific, when building on
x86_64 for universal x86_64 + arm64, the serialized builtin module is
written with the x86_64 architecture of the build machine, which fails
this check whenever ruby imports the builtin module on arm64:

https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/compile.c#L13243

Thankfully, there's logic to disable this feature for cross-compiled builds:

https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/builtin.c#L6

This disables the iseq logic for universal builds as well.

Fixes [Bug #18286]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During the build, Ruby has special logic to serialize its own builtin
module to disk using the binary iseq format during the build (I assume
for speed so it doesn't have to parse builtin every time it starts
up).

However, since iseq format is architecture-specific, when building on
x86_64 for universal x86_64 + arm64, the serialized builtin module is
written with the x86_64 architecture of the build machine, which fails
this check whenever ruby imports the builtin module on arm64:

https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/compile.c#L13243

Thankfully, there's logic to disable this feature for cross-compiled builds:

https://github.com/ruby/ruby/blob/1fdaa0666086529b3aae2d509a2e71c4247c3a12/builtin.c#L6

This disables the iseq logic for universal builds as well.

Fixes [Bug #18286]
</pre>
</div>
</content>
</entry>
<entry>
<title>`rb_bug` prints a newline after the message</title>
<updated>2023-05-20T12:43:30+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-05-20T05:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8d242a33af19672977dcdcb8d32e9ad547bc0141'/>
<id>8d242a33af19672977dcdcb8d32e9ad547bc0141</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Check loading built-in binaries</title>
<updated>2023-03-08T04:59:21+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-03-08T03:16:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=677c3228d09eaeaa57ad18396f52841f31411b6a'/>
<id>677c3228d09eaeaa57ad18396f52841f31411b6a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix trivial -Wundef warnings</title>
<updated>2021-05-04T12:56:55+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2021-04-29T12:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=68d6bd0873557c12bec6f8e0f8db622f1499d8a7'/>
<id>68d6bd0873557c12bec6f8e0f8db622f1499d8a7</id>
<content type='text'>
* See [Feature #17752]

Co-authored-by: xtkoba (Tee KOBAYASHI) &lt;xtkoba+ruby@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* See [Feature #17752]

Co-authored-by: xtkoba (Tee KOBAYASHI) &lt;xtkoba+ruby@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>builtin_lookup: do not goto into a branch</title>
<updated>2020-06-29T02:05:41+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2020-06-11T04:23:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8d182b04ed04378877e743535658be41a05aef74'/>
<id>8d182b04ed04378877e743535658be41a05aef74</id>
<content type='text'>
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea.  Better refactor.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea.  Better refactor.
</pre>
</div>
</content>
</entry>
</feed>
