Skip to content

Commit 2bd75dc

Browse files
committed
Inlining metaClass#execute function
1 parent 1d923d5 commit 2bd75dc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main/java/org/truffleruby/language/supercall/LookupSuperMethodNode.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ public abstract class LookupSuperMethodNode extends RubyBaseNode {
3838
guards = {
3939
"isSingleContext()",
4040
"getCurrentMethod(frame) == currentMethod",
41-
"metaClass(metaClassNode, self) == selfMetaClass" },
41+
"metaClassNode.execute(this, self) == selfMetaClass" },
4242
assumptions = "superMethod.getAssumptions()",
4343
limit = "getCacheLimit()")
4444
protected InternalMethod lookupSuperMethodCached(VirtualFrame frame, Object self,
4545
@Cached("getCurrentMethod(frame)") InternalMethod currentMethod,
4646
@Cached @Shared MetaClassNode metaClassNode,
47-
@Cached("metaClass(metaClassNode, self)") RubyClass selfMetaClass,
47+
@Cached("metaClassNode.execute(this, self)") RubyClass selfMetaClass,
4848
@Cached("doLookup(currentMethod, selfMetaClass)") MethodLookupResult superMethod) {
4949
return superMethod.getMethod();
5050
}
@@ -53,17 +53,14 @@ protected InternalMethod lookupSuperMethodCached(VirtualFrame frame, Object self
5353
protected InternalMethod lookupSuperMethodUncached(VirtualFrame frame, Object self,
5454
@Cached @Shared MetaClassNode metaClassNode) {
5555
final InternalMethod currentMethod = getCurrentMethod(frame);
56-
final RubyClass selfMetaClass = metaClass(metaClassNode, self);
56+
final RubyClass selfMetaClass = metaClassNode.execute(this, self);
5757
return doLookup(currentMethod, selfMetaClass).getMethod();
5858
}
5959

6060
protected InternalMethod getCurrentMethod(VirtualFrame frame) {
6161
return RubyArguments.getMethod(frame);
6262
}
6363

64-
protected RubyClass metaClass(MetaClassNode metaClassNode, Object object) {
65-
return metaClassNode.execute(this, object);
66-
}
6764

6865
@TruffleBoundary
6966
protected MethodLookupResult doLookup(InternalMethod currentMethod, RubyClass selfMetaClass) {

0 commit comments

Comments
 (0)