Skip to content
  • Peter Zhu's avatar
    12e3b074
    Re-embed when removing Object instance variables · 12e3b074
    Peter Zhu authored
    Objects with the same shape must always have the same "embeddedness"
    (either embedded or heap allocated) because YJIT assumes so. However,
    using remove_instance_variable, it's possible that some objects are
    embedded and some are heap allocated because it does not re-embed heap
    allocated objects.
    
    This commit changes remove_instance_variable to re-embed Object
    instance variables when it becomes small enough.
    12e3b074
    Re-embed when removing Object instance variables
    Peter Zhu authored
    Objects with the same shape must always have the same "embeddedness"
    (either embedded or heap allocated) because YJIT assumes so. However,
    using remove_instance_variable, it's possible that some objects are
    embedded and some are heap allocated because it does not re-embed heap
    allocated objects.
    
    This commit changes remove_instance_variable to re-embed Object
    instance variables when it becomes small enough.
Loading