Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -40,11 +40,15 @@ public LookupMethodNode(RubyContext context, SourceSection sourceSection) {
public abstract InternalMethod executeLookupMethod(VirtualFrame frame, Object self, String name);

@Specialization(
guards = "metaClass(frame, self) == selfMetaClass",
guards = {
"metaClass(frame, self) == selfMetaClass",
"name == cachedName"
},
assumptions = "selfMetaClass.getUnmodifiedAssumption()",
limit = "getCacheLimit()")
protected InternalMethod lookupMethodCached(VirtualFrame frame, Object self, String name,
@Cached("metaClass(frame, self)") RubyClass selfMetaClass,
@Cached("name") String cachedName,
@Cached("doLookup(selfMetaClass, name)") InternalMethod method) {
return method;
}

0 comments on commit ef551ca

Please sign in to comment.