<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby.git/ractor_core.h, branch ruby_3_2</title>
<subtitle>github.com: ruby/ruby.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/'/>
<entry>
<title>Let SHAPE_BITS take 32 bits on debug builds</title>
<updated>2022-11-21T16:26:26+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-11-18T15:39:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=09423876f9191a73ab428dc27eb5c436105048db'/>
<id>09423876f9191a73ab428dc27eb5c436105048db</id>
<content type='text'>
The ractor_belonging_id has been moved out of the headers, so object
shapes can take the top 32 bits of the flags on debug builds.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ractor_belonging_id has been moved out of the headers, so object
shapes can take the top 32 bits of the flags on debug builds.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add RVALUE_OVERHEAD and move ractor_belonging_id</title>
<updated>2022-11-21T16:26:26+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-11-18T15:07:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=5f95228c76e6f6994eb4149217fe3e38f9ff8a27'/>
<id>5f95228c76e6f6994eb4149217fe3e38f9ff8a27</id>
<content type='text'>
This commit adds RVALUE_OVERHEAD for storing metadata at the end of the
slot. This commit moves the ractor_belonging_id in debug builds from the
flags to RVALUE_OVERHEAD which frees the 16 bits in the headers for
object shapes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds RVALUE_OVERHEAD for storing metadata at the end of the
slot. This commit moves the ractor_belonging_id in debug builds from the
flags to RVALUE_OVERHEAD which frees the 16 bits in the headers for
object shapes.
</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='http://91.123.203.49/cgit/delta/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>Revert "Revert "This commit implements the Object Shapes technique in CRuby.""</title>
<updated>2022-10-11T15:40:56+00:00</updated>
<author>
<name>Jemma Issroff</name>
<email>jemmaissroff@gmail.com</email>
</author>
<published>2022-10-03T15:14:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=ad63b668e22e21c352b852f3119ae98a7acf99f1'/>
<id>ad63b668e22e21c352b852f3119ae98a7acf99f1</id>
<content type='text'>
This reverts commit 9a6803c90b817f70389cae10d60b50ad752da48f.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9a6803c90b817f70389cae10d60b50ad752da48f.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "This commit implements the Object Shapes technique in CRuby."</title>
<updated>2022-09-30T23:01:50+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2022-09-30T23:01:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=9a6803c90b817f70389cae10d60b50ad752da48f'/>
<id>9a6803c90b817f70389cae10d60b50ad752da48f</id>
<content type='text'>
This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
</pre>
</div>
</content>
</entry>
<entry>
<title>This commit implements the Object Shapes technique in CRuby.</title>
<updated>2022-09-28T15:26:21+00:00</updated>
<author>
<name>Jemma Issroff</name>
<email>jemmaissroff@gmail.com</email>
</author>
<published>2022-09-23T17:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=d594a5a8bd0756f65c078fcf5ce0098250cba141'/>
<id>d594a5a8bd0756f65c078fcf5ce0098250cba141</id>
<content type='text'>
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
Co-Authored-By: Eileen M. Uchitelle &lt;eileencodes@gmail.com&gt;
Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
Co-Authored-By: Eileen M. Uchitelle &lt;eileencodes@gmail.com&gt;
Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert this until we can figure out WB issues or remove shapes from GC</title>
<updated>2022-09-26T23:10:11+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2022-09-26T23:09:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=06abfa5be60e589052eb3bdfdae6c132bea3d20b'/>
<id>06abfa5be60e589052eb3bdfdae6c132bea3d20b</id>
<content type='text'>
Revert "* expand tabs. [ci skip]"

This reverts commit 830b5b5c351c5c6efa5ad461ae4ec5085e5f0275.

Revert "This commit implements the Object Shapes technique in CRuby."

This reverts commit 9ddfd2ca004d1952be79cf1b84c52c79a55978f4.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revert "* expand tabs. [ci skip]"

This reverts commit 830b5b5c351c5c6efa5ad461ae4ec5085e5f0275.

Revert "This commit implements the Object Shapes technique in CRuby."

This reverts commit 9ddfd2ca004d1952be79cf1b84c52c79a55978f4.
</pre>
</div>
</content>
</entry>
<entry>
<title>This commit implements the Object Shapes technique in CRuby.</title>
<updated>2022-09-26T16:21:30+00:00</updated>
<author>
<name>Jemma Issroff</name>
<email>jemmaissroff@gmail.com</email>
</author>
<published>2022-09-23T17:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=9ddfd2ca004d1952be79cf1b84c52c79a55978f4'/>
<id>9ddfd2ca004d1952be79cf1b84c52c79a55978f4</id>
<content type='text'>
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
Co-Authored-By: Eileen M. Uchitelle &lt;eileencodes@gmail.com&gt;
Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
Co-Authored-By: Eileen M. Uchitelle &lt;eileencodes@gmail.com&gt;
Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable Ractor check on 32bit architectures</title>
<updated>2022-08-24T17:54:27+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2022-08-23T20:23:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=28a3434634a0116a6f2b9e2df0bcbbfb0cfbd28b'/>
<id>28a3434634a0116a6f2b9e2df0bcbbfb0cfbd28b</id>
<content type='text'>
Ractor verification requires storing the ractor id in the top 32 bits of
the object header.  Unfortunately 32 bit machines only have 32 bits in
the object header.  The verification code has a 32 bit left shift which
doesn't work on i686 and will clobber existing flags.

This commit disables the verification code on i686 since i686 will crash
if it's enabled.

Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
Co-Authored-By: Jemma Issroff &lt;jemmaissroff@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ractor verification requires storing the ractor id in the top 32 bits of
the object header.  Unfortunately 32 bit machines only have 32 bits in
the object header.  The verification code has a 32 bit left shift which
doesn't work on i686 and will clobber existing flags.

This commit disables the verification code on i686 since i686 will crash
if it's enabled.

Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
Co-Authored-By: Jemma Issroff &lt;jemmaissroff@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix format-pedantic warnings</title>
<updated>2022-07-28T14:46:07+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-07-28T00:10:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=90cf767d158db06312a82c468a2bbf37f63bcb7a'/>
<id>90cf767d158db06312a82c468a2bbf37f63bcb7a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
