< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java

Print this page




 278         if (!StampTool.isPointerNonNull(value)) {
 279             LogicNode condition = getGraph().unique(IsNullNode.create(value));
 280             ObjectStamp receiverStamp = (ObjectStamp) value.stamp();
 281             Stamp stamp = receiverStamp.join(objectNonNull());
 282             FixedGuardNode fixedGuard = append(new FixedGuardNode(condition, NullCheckException, action, true));
 283             ValueNode nonNullReceiver = getGraph().addOrUnique(PiNode.create(value, stamp, fixedGuard));
 284             // TODO: Propogating the non-null into the frame state would
 285             // remove subsequent null-checks on the same value. However,
 286             // it currently causes an assertion failure when merging states.
 287             //
 288             // frameState.replace(value, nonNullReceiver);
 289             return nonNullReceiver;
 290         }
 291         return value;
 292     }
 293 
 294     @SuppressWarnings("unused")
 295     default void notifyReplacedCall(ResolvedJavaMethod targetMethod, ConstantNode node) {
 296 
 297     }
















 298 }


 278         if (!StampTool.isPointerNonNull(value)) {
 279             LogicNode condition = getGraph().unique(IsNullNode.create(value));
 280             ObjectStamp receiverStamp = (ObjectStamp) value.stamp();
 281             Stamp stamp = receiverStamp.join(objectNonNull());
 282             FixedGuardNode fixedGuard = append(new FixedGuardNode(condition, NullCheckException, action, true));
 283             ValueNode nonNullReceiver = getGraph().addOrUnique(PiNode.create(value, stamp, fixedGuard));
 284             // TODO: Propogating the non-null into the frame state would
 285             // remove subsequent null-checks on the same value. However,
 286             // it currently causes an assertion failure when merging states.
 287             //
 288             // frameState.replace(value, nonNullReceiver);
 289             return nonNullReceiver;
 290         }
 291         return value;
 292     }
 293 
 294     @SuppressWarnings("unused")
 295     default void notifyReplacedCall(ResolvedJavaMethod targetMethod, ConstantNode node) {
 296 
 297     }
 298 
 299     /**
 300      * Interface whose instances hold inlining information about the current context, in a wider
 301      * sense. The wider sense in this case concerns graph building approaches that don't necessarily
 302      * keep a chain of {@link GraphBuilderContext} instances normally available through
 303      * {@linkplain #getParent()}. Examples of such approaches are partial evaluation and incremental
 304      * inlining.
 305      */
 306     interface ExternalInliningContext {
 307         int getInlinedDepth();
 308     }
 309 
 310     default ExternalInliningContext getExternalInliningContext() {
 311         return null;
 312     }
 313 
 314 }
< prev index next >