Skip to content
  • Jemma Issroff's avatar
    5246f402
    Transition shape when object's capacity changes · 5246f402
    Jemma Issroff authored
    
    
    This commit adds a `capacity` field to shapes, and adds shape
    transitions whenever an object's capacity changes. Objects which are
    allocated out of a bigger size pool will also make a transition from the
    root shape to the shape with the correct capacity for their size pool
    when they are allocated.
    
    This commit will allow us to remove numiv from objects completely, and
    will also mean we can guarantee that if two objects share shapes, their
    IVs are in the same positions (an embedded and extended object cannot
    share shapes). This will enable us to implement ivar sets in YJIT using
    object shapes.
    
    Co-Authored-By: default avatarAaron Patterson <tenderlove@ruby-lang.org>
    5246f402
    Transition shape when object's capacity changes
    Jemma Issroff authored
    
    
    This commit adds a `capacity` field to shapes, and adds shape
    transitions whenever an object's capacity changes. Objects which are
    allocated out of a bigger size pool will also make a transition from the
    root shape to the shape with the correct capacity for their size pool
    when they are allocated.
    
    This commit will allow us to remove numiv from objects completely, and
    will also mean we can guarantee that if two objects share shapes, their
    IVs are in the same positions (an embedded and extended object cannot
    share shapes). This will enable us to implement ivar sets in YJIT using
    object shapes.
    
    Co-Authored-By: default avatarAaron Patterson <tenderlove@ruby-lang.org>
Loading