< prev index next >

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

Print this page
rev 52509 : [mq]: graal2


 104         return true;
 105     }
 106 
 107     public ValueNode value() {
 108         return value;
 109     }
 110 
 111     @Override
 112     public void lower(LoweringTool tool) {
 113         tool.getLowerer().lower(this, tool);
 114     }
 115 
 116     @Override
 117     public void virtualize(VirtualizerTool tool) {
 118         ValueNode alias = tool.getAlias(object());
 119         if (alias instanceof VirtualObjectNode) {
 120             VirtualObjectNode virtual = (VirtualObjectNode) alias;
 121             ValueNode indexValue = tool.getAlias(offset());
 122             if (indexValue.isConstant()) {
 123                 long off = indexValue.asJavaConstant().asLong();
 124                 int entryIndex = virtual.entryIndexForOffset(tool.getArrayOffsetProvider(), off, accessKind());
 125                 if (entryIndex != -1 && tool.setVirtualEntry(virtual, entryIndex, value(), accessKind(), off)) {
 126                     tool.delete();
 127                 }
 128             }
 129         }
 130     }
 131 
 132     @Override
 133     protected ValueNode cloneAsFieldAccess(Assumptions assumptions, ResolvedJavaField field, boolean volatileAccess) {
 134         return new StoreFieldNode(object(), field, value(), stateAfter(), volatileAccess);
 135     }
 136 
 137     @Override
 138     protected ValueNode cloneAsArrayAccess(ValueNode location, LocationIdentity identity) {
 139         return new RawStoreNode(object(), location, value, accessKind(), identity, needsBarrier, stateAfter(), isAnyLocationForced());
 140     }
 141 
 142     public FrameState getState() {
 143         return stateAfter;
 144     }


 104         return true;
 105     }
 106 
 107     public ValueNode value() {
 108         return value;
 109     }
 110 
 111     @Override
 112     public void lower(LoweringTool tool) {
 113         tool.getLowerer().lower(this, tool);
 114     }
 115 
 116     @Override
 117     public void virtualize(VirtualizerTool tool) {
 118         ValueNode alias = tool.getAlias(object());
 119         if (alias instanceof VirtualObjectNode) {
 120             VirtualObjectNode virtual = (VirtualObjectNode) alias;
 121             ValueNode indexValue = tool.getAlias(offset());
 122             if (indexValue.isConstant()) {
 123                 long off = indexValue.asJavaConstant().asLong();
 124                 int entryIndex = virtual.entryIndexForOffset(tool.getMetaAccess(), off, accessKind());
 125                 if (entryIndex != -1 && tool.setVirtualEntry(virtual, entryIndex, value(), accessKind(), off)) {
 126                     tool.delete();
 127                 }
 128             }
 129         }
 130     }
 131 
 132     @Override
 133     protected ValueNode cloneAsFieldAccess(Assumptions assumptions, ResolvedJavaField field, boolean volatileAccess) {
 134         return new StoreFieldNode(object(), field, value(), stateAfter(), volatileAccess);
 135     }
 136 
 137     @Override
 138     protected ValueNode cloneAsArrayAccess(ValueNode location, LocationIdentity identity) {
 139         return new RawStoreNode(object(), location, value, accessKind(), identity, needsBarrier, stateAfter(), isAnyLocationForced());
 140     }
 141 
 142     public FrameState getState() {
 143         return stateAfter;
 144     }
< prev index next >