@Specialization protected Object getDimNames(RAbstractContainer container) { controlVisibility(); RList names; if (container instanceof RDataFrame) { dataframeProfile.enter(); names = ((RDataFrame) container).getVector().getDimNames(); } else if (container instanceof RFactor) { factorProfile.enter(); names = ((RFactor) container).getVector().getDimNames(); } else { otherProfile.enter(); names = container.getDimNames(attrProfiles); } return nullProfile.profile(names == null) ? RNull.instance : names; }
@Specialization(guards = "isLengthOne(lengthVector)") protected RAbstractContainer updateLength( RAbstractContainer container, RAbstractIntVector lengthVector) { controlVisibility(); return container.resize(lengthVector.getDataAt(0)); }