<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/tool/mjit, 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>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>Stop transitioning to UNDEF when undefining an instance variable</title>
<updated>2022-12-07T17:57:11+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2022-12-06T00:48:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=edc7af48acd12666a2945f30901d16b62a39f474'/>
<id>edc7af48acd12666a2945f30901d16b62a39f474</id>
<content type='text'>
Cases like this:

```ruby
obj = Object.new
loop do
  obj.instance_variable_set(:@foo, 1)
  obj.remove_instance_variable(:@foo)
end
```

can cause us to use many more shapes than we want (and even run out).
This commit changes the code such that when an instance variable is
removed, we'll walk up the shape tree, find the shape, then rebuild any
child nodes that happened to be below the "targetted for removal" IV.

This also requires moving any instance variables so that indexes derived
from the shape tree will work correctly.

Co-Authored-By: Jemma Issroff &lt;jemmaissroff@gmail.com&gt;
Co-authored-by: John Hawthorn &lt;jhawthorn@github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cases like this:

```ruby
obj = Object.new
loop do
  obj.instance_variable_set(:@foo, 1)
  obj.remove_instance_variable(:@foo)
end
```

can cause us to use many more shapes than we want (and even run out).
This commit changes the code such that when an instance variable is
removed, we'll walk up the shape tree, find the shape, then rebuild any
child nodes that happened to be below the "targetted for removal" IV.

This also requires moving any instance variables so that indexes derived
from the shape tree will work correctly.

Co-Authored-By: Jemma Issroff &lt;jemmaissroff@gmail.com&gt;
Co-authored-by: John Hawthorn &lt;jhawthorn@github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MJIT: Use install = true for bundler/inline</title>
<updated>2022-12-02T07:56:02+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-12-02T07:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=07ac707758395749611e1028ef18127087d198db'/>
<id>07ac707758395749611e1028ef18127087d198db</id>
<content type='text'>
It prints a `bundle install`-like output, which seems more useful than
a silent output.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It prints a `bundle install`-like output, which seems more useful than
a silent output.
</pre>
</div>
</content>
</entry>
<entry>
<title>MJIT: Rename mjit_compiler.h to mjit_c.h</title>
<updated>2022-11-29T05:23:14+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-29T05:22:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=acb76663ba20241e7c2552aafae8b1d883520b9a'/>
<id>acb76663ba20241e7c2552aafae8b1d883520b9a</id>
<content type='text'>
because it exists primarily for generating mjit_c.rb.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
because it exists primarily for generating mjit_c.rb.
</pre>
</div>
</content>
</entry>
<entry>
<title>MJIT: Clear .cache/clangd on bindgen if exists</title>
<updated>2022-11-28T05:04:41+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-27T23:42:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6d26f78f684607a39249882ea686a231f8768bd5'/>
<id>6d26f78f684607a39249882ea686a231f8768bd5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>rename SHAPE_BITS to SHAPE_ID_NUM_BITS</title>
<updated>2022-11-18T20:04:10+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2022-11-18T18:29:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6582f34831cc665b2adcf7d475aceb9b918badb6'/>
<id>6582f34831cc665b2adcf7d475aceb9b918badb6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Let mjit-bindgen use BASERUBY and bundle/inline (#6740)</title>
<updated>2022-11-16T07:42:41+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-16T07:42:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fca50abb7c7e5369fdb8d2d3b6c1750076f3d846'/>
<id>fca50abb7c7e5369fdb8d2d3b6c1750076f3d846</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MJIT: Fix vm_cc_cme(cc).def.type to use bit field</title>
<updated>2022-11-15T08:34:00+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-15T08:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1a9e87fe3a0bb8a4a16e34997371b1823557202d'/>
<id>1a9e87fe3a0bb8a4a16e34997371b1823557202d</id>
<content type='text'>
access properly. Because the libclang node had two children, it wasn't
handled well by the pattern matching for the bit field case.

In addition to that, this bit field has a non-1 width. Because we're
returning true/false for a width-1 bit field, I added another behavior
that works like a char value for bit fields with width 2-8.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
access properly. Because the libclang node had two children, it wasn't
handled well by the pattern matching for the bit field case.

In addition to that, this bit field has a non-1 width. Because we're
returning true/false for a width-1 bit field, I added another behavior
that works like a char value for bit fields with width 2-8.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove USE_RVARGC code</title>
<updated>2022-11-14T23:42:11+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2022-11-14T21:16:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b7d591643ae37a556217a22e1ee9e9c6ab7cfd3e'/>
<id>b7d591643ae37a556217a22e1ee9e9c6ab7cfd3e</id>
<content type='text'>
We don't need this constant to be exposed anymore, so remove it
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need this constant to be exposed anymore, so remove it
</pre>
</div>
</content>
</entry>
<entry>
<title>Import shape constants with mjit-bindgen</title>
<updated>2022-11-14T08:29:28+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-14T08:29:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a8537aa6a5ec6da5261e727943ba267bc422e594'/>
<id>a8537aa6a5ec6da5261e727943ba267bc422e594</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
