@Override public NodeCycles estimatedNodeCycles() { if (isVolatile()) { return CYCLES_2; } return super.estimatedNodeCycles(); } }
/** Hook for subclasses to instantiate a subclass of {@link NewInstanceNode}. */ protected NewInstanceNode createNewInstanceNode(ResolvedJavaType type) { return new NewInstanceNode(type, fillContents(), stateBefore()); }
@Override public NodeCycles estimatedNodeCycles() { if (isVolatile()) { return CYCLES_8; } return super.estimatedNodeCycles(); } }
/** Hook for subclasses to instantiate a subclass of {@link NewArrayNode}. */ protected NewArrayNode createNewArrayNode(ResolvedJavaType type) { return new NewArrayNode(type, length(), fillContents(), stateBefore()); }
public static ValueNode create(ValueNode forValue, ConstantReflectionProvider constantReflection) { if (forValue instanceof NewArrayNode) { NewArrayNode newArray = (NewArrayNode) forValue; return newArray.length(); } ValueNode length = readArrayLength(forValue, constantReflection); if (length != null) { return length; } return new ArrayLengthNode(forValue); }
protected InstanceOfNode(NodeClass<? extends InstanceOfNode> c, ObjectStamp checkedStamp, ValueNode object, JavaTypeProfile profile, AnchoringNode anchor) { super(c, object); this.checkedStamp = checkedStamp; this.profile = profile; this.anchor = anchor; assert (profile == null) || (anchor != null) : "profiles must be anchored"; assert checkedStamp != null; assert type() != null; }
/** * Checks whether this is an invocation of a static method. * * @return {@code true} if the invocation is a static invocation */ public boolean isStatic() { return invokeKind() == InvokeKind.Static; }
protected AbstractCompareAndSwapNode casOp(JavaKind writeKind, JavaKind returnKind, AddressNode address, LocationIdentity location, ValueNode expectedValue, ValueNode newValue) { boolean isLogic = returnKind == JavaKind.Boolean; assert isLogic || writeKind == returnKind : writeKind + " != " + returnKind; AbstractCompareAndSwapNode cas; if (isLogic) { cas = new LogicCompareAndSwapNode(address, expectedValue, newValue, location); } else { cas = new ValueCompareAndSwapNode(address, expectedValue, newValue, location); } return cas; }
public static LogicNode create(Assumptions assumptions, ConstantReflectionProvider constantReflection, ValueNode mirror, ValueNode object, boolean allowNull, boolean exact) { LogicNode synonym = findSynonym(assumptions, constantReflection, mirror, object, allowNull, exact); if (synonym != null) { return synonym; } return new InstanceOfDynamicNode(mirror, object, allowNull, exact); }
public static LogicNode createHelper(ObjectStamp checkedStamp, ValueNode object, JavaTypeProfile profile, AnchoringNode anchor) { LogicNode synonym = findSynonym(checkedStamp, object, NodeView.DEFAULT); if (synonym != null) { return synonym; } else { return new InstanceOfNode(checkedStamp, object, profile, anchor); } }
@Override public ValueNode findLength(FindLengthMode mode, ConstantReflectionProvider constantReflection) { return dimension(0); } }
@Override public String toString() { return monitorId.getLockDepth() + (next == null ? "" : "," + next); }
public void setObject(ValueNode newObject) { this.updateUsages(object, newObject); this.object = newObject; }
/** * Return value is cleared when a synchronized method graph is inlined. */ public void clearEscapedReturnValue() { updateUsages(escapedReturnValue, null); this.escapedReturnValue = null; }
protected DynamicNewArrayNode(NodeClass<? extends DynamicNewArrayNode> c, ValueNode elementType, ValueNode length, boolean fillContents, JavaKind knownElementKind, FrameState stateBefore, MetaAccessProvider metaAccess) { super(c, computeStamp(knownElementKind, metaAccess), length, fillContents, stateBefore); this.elementType = elementType; this.knownElementKind = knownElementKind; assert knownElementKind != JavaKind.Void && knownElementKind != JavaKind.Illegal; }
public void setProfile(JavaTypeProfile typeProfile, AnchoringNode anchor) { this.profile = typeProfile; updateUsagesInterface(this.anchor, anchor); this.anchor = anchor; assert (profile == null) || (anchor != null) : "profiles must be anchored"; }
public void setArray(ValueNode array) { updateUsages(this.array, array); this.array = array; } }
@Override public Stamp getAccessStamp() { return stamp(NodeView.DEFAULT); } }
/** * The list of node which produce input for this instruction. */ public ValueNode dimension(int index) { assert index == 0; return length(); }
@Override public void setStateBefore(FrameState f) { updateUsages(stateBefore, f); stateBefore = f; }