< prev index next >

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

Print this page

        

@@ -27,20 +27,18 @@
 import org.graalvm.compiler.core.common.type.StampFactory;
 import org.graalvm.compiler.graph.NodeClass;
 import org.graalvm.compiler.nodeinfo.InputType;
 import org.graalvm.compiler.nodeinfo.NodeCycles;
 import org.graalvm.compiler.nodeinfo.NodeInfo;
-import org.graalvm.compiler.nodes.ConstantNode;
 import org.graalvm.compiler.nodes.FrameState;
 import org.graalvm.compiler.nodes.StateSplit;
 import org.graalvm.compiler.nodes.ValueNode;
 import org.graalvm.compiler.nodes.spi.Virtualizable;
 import org.graalvm.compiler.nodes.spi.VirtualizerTool;
 import org.graalvm.compiler.nodes.virtual.VirtualInstanceNode;
 import org.graalvm.compiler.nodes.virtual.VirtualObjectNode;
 
-import jdk.vm.ci.meta.JavaConstant;
 import jdk.vm.ci.meta.ResolvedJavaField;
 
 /**
  * The {@code StoreFieldNode} represents a write to a static or instance field.
  */

@@ -88,19 +86,12 @@
         ValueNode alias = tool.getAlias(object());
         if (alias instanceof VirtualObjectNode) {
             VirtualInstanceNode virtual = (VirtualInstanceNode) alias;
             int fieldIndex = virtual.fieldIndex(field());
             if (fieldIndex != -1) {
-                ValueNode existing = tool.getEntry((VirtualObjectNode) alias, fieldIndex);
-                if (existing.stamp().isCompatible(value().stamp())) {
-                    tool.setVirtualEntry(virtual, fieldIndex, value(), false);
+                tool.setVirtualEntry(virtual, fieldIndex, value());
                     tool.delete();
-                } else {
-                    // stamp of the value is not compatible with the value in the virtualizer
-                    // can only happen with unsafe two slot writes on one slot fields
-                    assert existing instanceof ConstantNode && ((ConstantNode) existing).asConstant().equals(JavaConstant.forIllegal()) : value.stamp() + " vs " + existing.stamp();
-                }
             }
         }
     }
 
     public FrameState getState() {
< prev index next >