Skip to content

Commit 9d4304e

Browse files
committed
Fix: unwrap parent when checking for RootBodyTag
1 parent bf84216 commit 9d4304e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -299,7 +299,7 @@ public boolean isTaggedWith(Node node, Class<?> tag) {
299299
// The only child of the RootBodyNode that is instrumentable should be the body.
300300
// Any other child of RootBodyNode should not be instrumentable, e.g. SaveArgumentsNode,
301301
// etc.
302-
return node.getParent() instanceof RootBodyNode;
302+
return RASTUtils.unwrapParent(node) instanceof RootBodyNode;
303303
}
304304
if (node instanceof RootBodyNode) {
305305
return (tag == RootTag.class);

0 commit comments

Comments
 (0)