Skip to content
Snippets Groups Projects
Commit 88f8b42a authored by Florian Angerer's avatar Florian Angerer
Browse files

Cleanup AttribtuesAccessNodes.

parent b5d53587
No related branches found
No related tags found
No related merge requests found
...@@ -47,10 +47,14 @@ import com.oracle.truffle.r.runtime.data.RStringVector; ...@@ -47,10 +47,14 @@ import com.oracle.truffle.r.runtime.data.RStringVector;
public final class AttributesAccessNodes { public final class AttributesAccessNodes {
abstract static class ATTRIB extends FFIUpCallNode.Arg1 { abstract static class ATTRIB extends FFIUpCallNode.Arg1 {
@Child private GetAttributesNode getAttributesNode = GetAttributesNode.create(); @Child private GetAttributesNode getAttributesNode;
@Specialization @Specialization
public Object doAttributable(RAttributable obj) { public Object doAttributable(RAttributable obj) {
if (getAttributesNode == null) {
CompilerDirectives.transferToInterpreterAndInvalidate();
getAttributesNode = GetAttributesNode.create();
}
return getAttributesNode.execute(obj); return getAttributesNode.execute(obj);
} }
...@@ -106,14 +110,14 @@ public final class AttributesAccessNodes { ...@@ -106,14 +110,14 @@ public final class AttributesAccessNodes {
abstract static class CopyMostAttrib extends FFIUpCallNode.Arg2 { abstract static class CopyMostAttrib extends FFIUpCallNode.Arg2 {
@Child protected CopyOfRegAttributesNode copyRegAttributes = CopyOfRegAttributesNode.create(); @Child protected CopyOfRegAttributesNode copyRegAttributes;
@Specialization @Specialization
public Object doList(RAttributeStorage x, RAttributeStorage y) { public Object doList(RAttributeStorage x, RAttributeStorage y) {
// if (copyRegAttributes == null) { if (copyRegAttributes == null) {
// CompilerDirectives.transferToInterpreterAndInvalidate(); CompilerDirectives.transferToInterpreterAndInvalidate();
// copyRegAttributes = CopyOfRegAttributesNode.create(); copyRegAttributes = CopyOfRegAttributesNode.create();
// } }
copyRegAttributes.execute(x, y); copyRegAttributes.execute(x, y);
return null; return null;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment