Skip to content

ZJIT: Don't invalidate unrelated class's method CMEs when we do module include #996

Description

@tekknolagi
def uses_object_eq(a, b)
  a == b
end

a = Object.new
b = Object.new

500.times { uses_object_eq(a, b) }

class C
  include Comparable
  def <=>(other) = 0
end

N = 2000
N.times { uses_object_eq(a, b) }

the include Comparable blows away the CME for C#==. This is a reduced version of something from ActiveRecord that appears in Lobsters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions