Skip to content

Commit 427c581

Browse files
committed
Rename getNode to getAdoptedNode
1 parent a5362be commit 427c581

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ public abstract static class BindingNode extends AlwaysInlinedMethodNode {
363363
@Specialization
364364
protected RubyBinding binding(Frame callerFrame, Object self, Object[] rubyArgs, RootCallTarget target,
365365
@Cached(
366-
value = "getNode(this).getEncapsulatingSourceSection()",
366+
value = "getAdoptedNode(this).getEncapsulatingSourceSection()",
367367
allowUncached = true, neverDefault = false) SourceSection sourceSection) {
368368
needCallerFrame(callerFrame, target);
369369
return BindingNodes.createBinding(getContext(), getLanguage(), callerFrame.materialize(), sourceSection);

src/main/java/org/truffleruby/core/module/ModuleNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ protected Object[] generateAccessors(Frame callerFrame, RubyModule module, Objec
481481
@TruffleBoundary
482482
private Object[] createAccessors(RubyModule module, Object[] names, Accessor accessor,
483483
Visibility visibility) {
484-
final Node currentNode = getNode(this);
484+
final Node currentNode = getAdoptedNode(this);
485485
final SourceSection sourceSection;
486486
if (currentNode != null) {
487487
sourceSection = currentNode.getEncapsulatingSourceSection();

src/main/java/org/truffleruby/language/CallStackManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public Backtrace getBacktrace(Node currentNode, int omit, Throwable javaThrowabl
227227
}
228228
}
229229

230-
var adoptableNode = RubyNode.getNode(currentNode);
230+
var adoptableNode = RubyNode.getAdoptedNode(currentNode);
231231
return new Backtrace(adoptableNode, omit, javaThrowable);
232232
}
233233

src/main/java/org/truffleruby/language/RubyBaseNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ protected void reportLongLoopCount(long count) {
117117
LoopNode.reportLoopCount(this, count > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) count);
118118
// Checkstyle: resume
119119
}
120-
121-
protected static Node getNode(Node node) {
120+
121+
protected static Node getAdoptedNode(Node node) {
122122
boolean adoptable = node != null && node.isAdoptable();
123123
CompilerAsserts.partialEvaluationConstant(adoptable);
124124
if (adoptable) {

src/main/java/org/truffleruby/language/constants/LookupConstantBaseNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected static void warnDeprecatedConstant(Node node, WarnNode warnNode, RubyM
4343
@TruffleBoundary
4444
private static SourceSection getSection(Node node) {
4545
return getContext(node).getCallStack()
46-
.getTopMostUserSourceSection(getNode(node).getEncapsulatingSourceSection());
46+
.getTopMostUserSourceSection(getAdoptedNode(node).getEncapsulatingSourceSection());
4747
}
4848

4949
@TruffleBoundary

0 commit comments

Comments
 (0)