rubyx/lib/parfait/cache_entry.rb
Torsten Ruger 4cc04787e9 remove Risc.resolve_to_index
mostly by using better typed registers,
which cleans up the code where it was used
2018-07-16 19:00:04 +03:00

24 lines
646 B
Ruby

# For dynamic calls (ie method calls where the method can not be determined at compile time)
# we resolve the method at runtime, and then cache it. Aaron has shown that over 99%
# of call sites are type stable, so one cache entry at the moment
#
# A cache entry stores the type of the object and the CallableMethod that is to be called
# This is used in DynamicCall, see there
#
module Parfait
class CacheEntry < Object
attr :cached_type
attr :cached_method
def initialize(type , method)
@cached_type = type
@cached_method = method
end
def to_s
"CacheEntry" + "#{cached_method&.name}"
end
end
end