<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/bootstraptest, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) dd80d9b089e35729d585bae2f8866c845c48f3b7: [Backport #20997]</title>
<updated>2025-01-25T05:51:31+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-01-25T05:51:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7c0c2df9b497dbf9c1376a995eebe6d43a00e21b'/>
<id>7c0c2df9b497dbf9c1376a995eebe6d43a00e21b</id>
<content type='text'>
	YJIT: Filter `&amp;` calls from specialized C method codegen

	Evident with the crash reported in [Bug #20997], the C replacement
	codegen functions aren't authored to handle block arguments (nor
	should they because the extra code from the complexity defeats
	optimization). Filter sites with VM_CALL_ARGS_BLOCKARG.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	YJIT: Filter `&amp;` calls from specialized C method codegen

	Evident with the crash reported in [Bug #20997], the C replacement
	codegen functions aren't authored to handle block arguments (nor
	should they because the extra code from the complexity defeats
	optimization). Filter sites with VM_CALL_ARGS_BLOCKARG.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) a3eb5e5c70eaee12964cdd807b8f19950003141f: [Backport #20573]</title>
<updated>2024-07-20T04:11:29+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-20T04:11:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4f1e047f86b159528055d37ee0da2ad6e5a38c23'/>
<id>4f1e047f86b159528055d37ee0da2ad6e5a38c23</id>
<content type='text'>
	Don't call `Warning.warn` unless the category is enabled (#10981)

	Don't call `Warning.warn` unless the category is enabled

	The warning category should be enabled if we want to call
	`Warning.warn`.

	This commit speeds up the following benchmark:

	```ruby
	eval "def test; " +
	  1000.times.map { "'  '.chomp!" }.join(";") + "; end"

	def run_benchmark count
	  i = 0
	  while i &lt; count
	    start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
	    yield
	    ms = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
	    puts "itr ##{i}: #{(ms * 1000).to_i}ms"
	    i += 1
	  end
	end

	run_benchmark(25) do
	  250.times do
	    test
	  end
	end
	```

	On `master` this runs at about 92ms per iteration. With this patch, it
	is 7ms per iteration.

	[Bug #20573]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Don't call `Warning.warn` unless the category is enabled (#10981)

	Don't call `Warning.warn` unless the category is enabled

	The warning category should be enabled if we want to call
	`Warning.warn`.

	This commit speeds up the following benchmark:

	```ruby
	eval "def test; " +
	  1000.times.map { "'  '.chomp!" }.join(";") + "; end"

	def run_benchmark count
	  i = 0
	  while i &lt; count
	    start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
	    yield
	    ms = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
	    puts "itr ##{i}: #{(ms * 1000).to_i}ms"
	    i += 1
	  end
	end

	run_benchmark(25) do
	  250.times do
	    test
	  end
	end
	```

	On `master` this runs at about 92ms per iteration. With this patch, it
	is 7ms per iteration.

	[Bug #20573]
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 31e67a476f2262e01a0829e8ab5e6d8a97e0724e,0b95cbcbde8875effdbcbb676cb0a7f751a1d4c1: [Backport #19601]</title>
<updated>2023-07-17T08:21:51+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-07-17T08:21:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5fbd72764e020c6b165604e9cdcc932a1c5d2a93'/>
<id>5fbd72764e020c6b165604e9cdcc932a1c5d2a93</id>
<content type='text'>
	YJIT: Fix false object collection when setting ivar

	Previously, setinstancevariable could generate code that calls
	`rb_ensure_iv_list_size()` without first updating `cfp-&gt;sp`. This means
	in the event that a GC start from within said routine the top few
	objects would not be marked, causing them to be falsly collected.

	Call `jit_prepare_routine_call()` first.

	[Bug #19601]
	---
	 bootstraptest/test_yjit.rb | 20 ++++++++++++++++++++
	 yjit/src/codegen.rs        |  5 +++++
	 2 files changed, 25 insertions(+)

	YJIT: Remove duplicate `asm.spill_temps()`

	`jit_prepare_routine_call()` calls it, and there is another call above on line 2302.

	Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;
	---
	 yjit/src/codegen.rs | 1 -
	 1 file changed, 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	YJIT: Fix false object collection when setting ivar

	Previously, setinstancevariable could generate code that calls
	`rb_ensure_iv_list_size()` without first updating `cfp-&gt;sp`. This means
	in the event that a GC start from within said routine the top few
	objects would not be marked, causing them to be falsly collected.

	Call `jit_prepare_routine_call()` first.

	[Bug #19601]
	---
	 bootstraptest/test_yjit.rb | 20 ++++++++++++++++++++
	 yjit/src/codegen.rs        |  5 +++++
	 2 files changed, 25 insertions(+)

	YJIT: Remove duplicate `asm.spill_temps()`

	`jit_prepare_routine_call()` calls it, and there is another call above on line 2302.

	Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;
	---
	 yjit/src/codegen.rs | 1 -
	 1 file changed, 1 deletion(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 0ce2bdc76dd17aa3d42a352a6244c87a51e7606d: [Backport #19595]</title>
<updated>2023-07-17T04:59:25+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-07-17T04:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8852b4b2deea20f488208dc4730ef149f67d7594'/>
<id>8852b4b2deea20f488208dc4730ef149f67d7594</id>
<content type='text'>
	YJIT: Fix missing argc check in known cfuncs

	Previously we were missing a compile-time check that the known cfuncs
	receive the correct number of arguments.

	We noticied this because in particular when using ARGS_SPLAT, which also
	wasn't checked, YJIT would crash on code which was otherwise correct
	(didn't raise exceptions in the VM).

	This still supports vararg (argc == -1) cfuncs. I added an additional
	assertion that when we use the specialized codegen for one of these
	known functions that the argc are popped off the stack correctly, which
	should help ensure they're implemented correctly (previously the crash
	was usually observed on a future `leave` insn).

	[Bug #19595]
	---
	 bootstraptest/test_yjit.rb | 32 ++++++++++++++++++++++++++++++++
	 yjit/src/codegen.rs        |  4 +++-
	 2 files changed, 35 insertions(+), 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	YJIT: Fix missing argc check in known cfuncs

	Previously we were missing a compile-time check that the known cfuncs
	receive the correct number of arguments.

	We noticied this because in particular when using ARGS_SPLAT, which also
	wasn't checked, YJIT would crash on code which was otherwise correct
	(didn't raise exceptions in the VM).

	This still supports vararg (argc == -1) cfuncs. I added an additional
	assertion that when we use the specialized codegen for one of these
	known functions that the argc are popped off the stack correctly, which
	should help ensure they're implemented correctly (previously the crash
	was usually observed on a future `leave` insn).

	[Bug #19595]
	---
	 bootstraptest/test_yjit.rb | 32 ++++++++++++++++++++++++++++++++
	 yjit/src/codegen.rs        |  4 +++-
	 2 files changed, 35 insertions(+), 1 deletion(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>ruby_3_2 backport for #8006 (#8008)</title>
<updated>2023-07-04T15:07:18+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2023-07-04T15:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2f603bc4d750384d57513679ca9db2b4e2e3ec34'/>
<id>2f603bc4d750384d57513679ca9db2b4e2e3ec34</id>
<content type='text'>
YJIT: Fix autosplat miscomp for blocks with optionals

When passing an array as the sole argument to `yield`, and the yieldee
takes more than 1 optional parameter, the array is expanded similar
to `*array` splat calls. This is called "autosplat" in
`setup_parameters_complex()`.

Previously, YJIT did not detect this autosplat condition. It passed the
array without expanding it, deviating from interpreter behavior.
Detect this conditon and refuse to compile it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
YJIT: Fix autosplat miscomp for blocks with optionals

When passing an array as the sole argument to `yield`, and the yieldee
takes more than 1 optional parameter, the array is expanded similar
to `*array` splat calls. This is called "autosplat" in
`setup_parameters_complex()`.

Previously, YJIT did not detect this autosplat condition. It passed the
array without expanding it, deviating from interpreter behavior.
Detect this conditon and refuse to compile it.</pre>
</div>
</content>
</entry>
<entry>
<title>MJIT: Cancel all on disastrous situations (#7019)</title>
<updated>2022-12-24T09:13:40+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-12-24T09:13:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b9332ac8e7126066ac4238443d63eaa4c06789f9'/>
<id>b9332ac8e7126066ac4238443d63eaa4c06789f9</id>
<content type='text'>
I noticed this while running test_yjit with --mjit-call-threshold=1, 
which redefines `Integer#&lt;`. When Ruby is monkey-patched, 
MJIT itself could be broken.

Similarly, Ruby scripts could break MJIT in many different ways. I
prepared the same set of hooks as YJIT so that we could possibly
override it and disable it on those moments. Every constant under
RubyVM::MJIT is private and thus it's an unsupported behavior though.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I noticed this while running test_yjit with --mjit-call-threshold=1, 
which redefines `Integer#&lt;`. When Ruby is monkey-patched, 
MJIT itself could be broken.

Similarly, Ruby scripts could break MJIT in many different ways. I
prepared the same set of hooks as YJIT so that we could possibly
override it and disable it on those moments. Every constant under
RubyVM::MJIT is private and thus it's an unsupported behavior though.</pre>
</div>
</content>
</entry>
<entry>
<title>Skip a flaky Ractor test for mswin</title>
<updated>2022-12-22T00:56:41+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-12-22T00:56:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=67ef3cd3ccdaeb1310a550f62a8a23606fb3bced'/>
<id>67ef3cd3ccdaeb1310a550f62a8a23606fb3bced</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Re-enable test_ractor for YJIT</title>
<updated>2022-12-19T21:59:36+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-12-19T21:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=650a20a3e1205f47224a987676cdbad7d826d597'/>
<id>650a20a3e1205f47224a987676cdbad7d826d597</id>
<content type='text'>
This would be still flaky, but we want to make sure there's no
YJIT-specific issue when Ruby 3.2 is released. We might skip it again
after the release.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This would be still flaky, but we want to make sure there's no
YJIT-specific issue when Ruby 3.2 is released. We might skip it again
after the release.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed encoding table</title>
<updated>2022-12-16T01:04:37+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2022-12-15T08:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ae19ac5b5ba1e613a788addeb6d4d67fa65f6518'/>
<id>ae19ac5b5ba1e613a788addeb6d4d67fa65f6518</id>
<content type='text'>
This reduces global lock acquiring for reading.
https://bugs.ruby-lang.org/issues/18949
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reduces global lock acquiring for reading.
https://bugs.ruby-lang.org/issues/18949
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip yet another flaky Ractor test</title>
<updated>2022-12-14T06:40:13+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-12-14T06:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=307d2e0e91632a61cc492653a47027fbce7332d4'/>
<id>307d2e0e91632a61cc492653a47027fbce7332d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
