Skip to content

Commit c2edba7

Browse files
author
Nicolas Laurent
committed
rename LookupMethodOnselfNode#lookup methods
1 parent fcf60ad commit c2edba7

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

src/main/java/org/truffleruby/core/exception/ExceptionNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public abstract static class BacktraceQueryPrimitiveNode extends PrimitiveArrayA
202202
* returning `FAILURE` in the fallback specialization. */
203203
@Specialization(
204204
guards = {
205-
"lookupNode.lookup(frame, exception, METHOD) == getContext().getCoreMethods().EXCEPTION_BACKTRACE", },
205+
"lookupNode.lookupProtected(frame, exception, METHOD) == getContext().getCoreMethods().EXCEPTION_BACKTRACE", },
206206
limit = "1")
207207
protected boolean backtraceQuery(VirtualFrame frame, RubyException exception,
208208
@Cached LookupMethodOnSelfNode lookupNode) {

src/main/java/org/truffleruby/core/inlined/InlinedByteSizeNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public InlinedByteSizeNode(RubyContext context, RubyCallNodeParameters callNodeP
2727
}
2828

2929
@Specialization(
30-
guards = { "lookupNode.lookup(frame, self, METHOD) == coreMethods().STRING_BYTESIZE", },
30+
guards = { "lookupNode.lookupProtected(frame, self, METHOD) == coreMethods().STRING_BYTESIZE", },
3131
assumptions = "assumptions",
3232
limit = "1")
3333
protected int byteSize(VirtualFrame frame, RubyString self,

src/main/java/org/truffleruby/core/inlined/InlinedCaseEqualNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected boolean longCaseEqual(long a, long b) {
4444

4545
@Specialization(
4646
guards = {
47-
"lookupNode.lookup(frame, self, METHOD) == coreMethods().MODULE_CASE_EQUAL"
47+
"lookupNode.lookupProtected(frame, self, METHOD) == coreMethods().MODULE_CASE_EQUAL"
4848
},
4949
assumptions = "assumptions",
5050
limit = "1")

src/main/java/org/truffleruby/core/inlined/InlinedEqualNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected boolean longEqual(long a, long b) {
4343

4444
@Specialization(
4545
guards = {
46-
"lookupNode.lookup(frame, self, METHOD) == coreMethods().STRING_EQUAL"
46+
"lookupNode.lookupProtected(frame, self, METHOD) == coreMethods().STRING_EQUAL"
4747
},
4848
assumptions = "assumptions",
4949
limit = "1")

src/main/java/org/truffleruby/core/inlined/InlinedIsANode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public InlinedIsANode(RubyContext context, RubyCallNodeParameters callNodeParame
3030
@Specialization(
3131
guards = {
3232
"isRubyValue(self)",
33-
"lookupNode.lookup(frame, self, METHOD) == coreMethods().KERNEL_IS_A",
33+
"lookupNode.lookupProtected(frame, self, METHOD) == coreMethods().KERNEL_IS_A",
3434
},
3535
assumptions = "assumptions",
3636
limit = "1")

src/main/java/org/truffleruby/core/inlined/InlinedIsNilNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected boolean nil(Nil self) {
3737
@Specialization(
3838
guards = {
3939
"isRubyValue(self)",
40-
"lookup.lookup(frame, self, METHOD) == coreMethods().KERNEL_IS_NIL", },
40+
"lookup.lookupProtected(frame, self, METHOD) == coreMethods().KERNEL_IS_NIL", },
4141
assumptions = "assumptions",
4242
limit = "1")
4343
protected boolean notNil(VirtualFrame frame, Object self,

src/main/java/org/truffleruby/core/inlined/InlinedKindOfNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public InlinedKindOfNode(RubyContext context, RubyCallNodeParameters callNodePar
3030
@Specialization(
3131
guards = {
3232
"isRubyValue(self)",
33-
"lookupNode.lookup(frame, self, METHOD) == coreMethods().KERNEL_KIND_OF",
33+
"lookupNode.lookupProtected(frame, self, METHOD) == coreMethods().KERNEL_KIND_OF",
3434
},
3535
assumptions = "assumptions",
3636
limit = "1")

src/main/java/org/truffleruby/core/inlined/InlinedNotNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public InlinedNotNode(RubyContext context, RubyCallNodeParameters callNodeParame
2727
}
2828

2929
@Specialization(
30-
guards = { "lookupNode.lookup(frame, self, METHOD) == coreMethods().NOT", },
30+
guards = { "lookupNode.lookupProtected(frame, self, METHOD) == coreMethods().NOT", },
3131
assumptions = "assumptions",
3232
limit = "1")
3333
protected boolean not(VirtualFrame frame, Object self,

src/main/java/org/truffleruby/core/kernel/KernelNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,14 +1243,14 @@ protected RubyMethod method(VirtualFrame frame, Object self, Object name,
12431243
@Cached ConditionProfile respondToMissingProfile) {
12441244
final String normalizedName = nameToJavaStringNode.execute(name);
12451245
InternalMethod method = lookupMethodNode
1246-
.lookup(frame, self, normalizedName, dispatchConfig);
1246+
.lookupPrivate(frame, self, normalizedName, dispatchConfig);
12471247

12481248
if (notFoundProfile.profile(method == null)) {
12491249
final Object respondToMissing = respondToMissingNode
12501250
.call(self, "respond_to_missing?", name, dispatchConfig.ignoreVisibility);
12511251
if (respondToMissingProfile.profile(booleanCastNode.executeToBoolean(respondToMissing))) {
12521252
final InternalMethod methodMissing = lookupMethodNode
1253-
.lookup(frame, self, "method_missing", dispatchConfig);
1253+
.lookupPrivate(frame, self, "method_missing", dispatchConfig);
12541254
method = createMissingMethod(self, name, normalizedName, methodMissing);
12551255
} else {
12561256
throw new RaiseException(

src/main/java/org/truffleruby/language/methods/LookupMethodOnSelfNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ public static LookupMethodOnSelfNode create() {
2626
return LookupMethodOnSelfNodeGen.create();
2727
}
2828

29-
public InternalMethod lookup(VirtualFrame frame, Object self, String name) {
29+
public InternalMethod lookupProtected(VirtualFrame frame, Object self, String name) {
3030
return execute(frame, self, name, DispatchConfiguration.PROTECTED);
3131
}
3232

33-
public InternalMethod lookup(
33+
public InternalMethod lookupPrivate(
3434
VirtualFrame frame, Object self, String name, DispatchConfiguration config) {
3535
return execute(frame, self, name, config);
3636
}

0 commit comments

Comments
 (0)