Skip to content

Commit fbce4ff

Browse files
committed
removed findRootNode and replaced it with node.getRootNode
1 parent 34afd52 commit fbce4ff

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/util/PFunctionArgsFinder.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,10 @@ public class PFunctionArgsFinder {
2020
private final RootNode rootNode;
2121

2222
public PFunctionArgsFinder(Node node) {
23-
this.rootNode = findRootNode(node);
23+
this.rootNode = node.getRootNode();
2424
assert rootNode instanceof PRootNode;
2525
}
2626

27-
private static RootNode findRootNode(Node node) {
28-
Node n = node;
29-
while (!(n instanceof RootNode) && (n != null)) {
30-
n = n.getParent();
31-
}
32-
return (RootNode) n;
33-
}
34-
3527
public ArgumentListObject collectArgs() {
3628
List<String> arguments = new LinkedList<>();
3729

0 commit comments

Comments
 (0)