/** * Gets the instruction that produces the receiver object for this invocation, if any. * * @return the instruction that produces the receiver object for this invocation if any, * {@code null} if this invocation does not take a receiver object */ public ValueNode receiver() { return isStatic() ? null : arguments().get(0); }
assert !invokeNode.graph().isAfterFloatingReadPhase() : "inline isn't handled correctly after floating reads phase"; if (receiverNullCheck && !((MethodCallTargetNode) invoke.callTarget()).isStatic()) { nonNullReceiver(invoke);
try (DebugCloseable position = invoke.asNode().withNodeSourcePosition()) { MethodCallTargetNode callTarget = (MethodCallTargetNode) invoke.callTarget(); assert !callTarget.isStatic() : callTarget.targetMethod(); StructuredGraph graph = callTarget.graph(); ValueNode oldReceiver = callTarget.arguments().get(0);
NodeInputList<ValueNode> parameters = callTarget.arguments(); ValueNode receiver = parameters.size() <= 0 ? null : parameters.get(0); if (!callTarget.isStatic() && receiver.stamp(NodeView.DEFAULT) instanceof ObjectStamp && !StampTool.isPointerNonNull(receiver)) { ValueNode nonNullReceiver = createNullCheckedValue(receiver, invoke.asNode(), tool); parameters.set(0, nonNullReceiver); receiver = nonNullReceiver; JavaType[] signature = callTarget.targetMethod().getSignature().toParameterTypes(callTarget.isStatic() ? null : callTarget.targetMethod().getDeclaringClass());
ValueNode receiver = parameters.size() <= 0 ? null : parameters.get(0); FixedGuardNode nullCheck = null; if (!callTarget.isStatic() && receiver.getStackKind() == JavaKind.Object && !StampTool.isPointerNonNull(receiver)) { LogicNode isNull = graph.unique(IsNullNode.create(receiver)); nullCheck = graph.add(new FixedGuardNode(isNull, DeoptimizationReason.NullCheckException, DeoptimizationAction.None, true)); JavaType[] signature = method.getSignature().toParameterTypes(callTarget.isStatic() ? null : method.getDeclaringClass()); CallingConvention.Type callType = SubstrateCallingConventionType.JavaCall;