From 083469db95f63355ca1c9093b989fc7946c78c5b Mon Sep 17 00:00:00 2001 From: stepan <stepan.sindelar@oracle.com> Date: Fri, 11 Nov 2016 19:23:38 +0100 Subject: [PATCH] Explanatory comment in ClassHierarchyNode --- .../oracle/truffle/r/nodes/function/ClassHierarchyNode.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java index 31056fa27f..ac47fa6705 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/ClassHierarchyNode.java @@ -124,6 +124,9 @@ public abstract class ClassHierarchyNode extends UnaryNode { RAttributes attributes; if (attrStorageProfile.profile(arg instanceof RAttributeStorage)) { // Note: the seemingly unnecessary cast is here to ensure the method can be inlined + // Note2: the attrStorageProfile and cast is better at helping compiler to inline + // 'getAttributes' than just the ValueProfile in else branch, which degrades when it + // sees two different classes attributes = ((RAttributeStorage) arg).getAttributes(); } else { arg = argProfile.profile(arg); -- GitLab