Skip to content
Snippets Groups Projects
Commit d9ec63fd authored by Zbynek Slajchrt's avatar Zbynek Slajchrt
Browse files

Unnecessary profiles removed

parent 88c28fc9
No related branches found
No related tags found
No related merge requests found
......@@ -48,9 +48,8 @@ public abstract class GetAttributeNode extends AttributeAccessNode {
protected Object getAttrCached(DynamicObject attrs, String name,
@Cached("name") String cachedName,
@Cached("lookupShape(attrs)") Shape shape,
@Cached("lookupLocation(shape, name)") Location location,
@Cached("createBinaryProfile()") ConditionProfile nullProfile) {
return nullProfile.profile(location == null) ? null : location.get(attrs);
@Cached("lookupLocation(shape, name)") Location location) {
return location == null ? null : location.get(attrs);
}
@TruffleBoundary
......
......@@ -65,9 +65,8 @@ public abstract class GetFixedAttributeNode extends FixedAttributeAccessNode {
@SuppressWarnings("unused")
protected Object getAttrCached(DynamicObject attrs,
@Cached("lookupShape(attrs)") Shape shape,
@Cached("lookupLocation(shape, name)") Location location,
@Cached("createBinaryProfile()") ConditionProfile nullProfile) {
return nullProfile.profile(location == null) ? null : location.get(attrs);
@Cached("lookupLocation(shape, name)") Location location) {
return location == null ? null : location.get(attrs);
}
@Specialization(contains = "getAttrCached")
......
......@@ -64,10 +64,8 @@ public abstract class RemoveFixedAttributeNode extends FixedAttributeAccessNode
assumptions = {"shape.getValidAssumption()"})
protected void removeAttrCached(DynamicObject attrs,
@Cached("lookupShape(attrs)") Shape shape,
@Cached("lookupProperty(shape, name)") Property property,
@Cached("create()") BranchProfile notNullProfile) {
@Cached("lookupProperty(shape, name)") Property property) {
if (property != null) {
notNullProfile.enter();
Shape newShape = attrs.getShape().removeProperty(property);
attrs.setShapeAndResize(shape, newShape);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment