< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java

Print this page

        

*** 28,37 **** --- 28,38 ---- import static jdk.vm.ci.code.MemoryBarriers.JMM_PRE_VOLATILE_WRITE; import static jdk.vm.ci.code.MemoryBarriers.LOAD_LOAD; import static jdk.vm.ci.code.MemoryBarriers.LOAD_STORE; import static jdk.vm.ci.code.MemoryBarriers.STORE_LOAD; import static jdk.vm.ci.code.MemoryBarriers.STORE_STORE; + import static org.graalvm.compiler.nodes.NamedLocationIdentity.OFF_HEAP_LOCATION; import static org.graalvm.compiler.serviceprovider.JDK9Method.Java8OrEarlier; import java.lang.reflect.Array; import java.lang.reflect.Field; import java.util.Arrays;
*** 648,658 **** @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver unsafe, ValueNode address) { // Emits a null-check for the otherwise unused receiver unsafe.get(); ! b.addPush(returnKind, new UnsafeMemoryLoadNode(address, returnKind, LocationIdentity.any())); b.getGraph().markUnsafeAccess(); return true; } @Override --- 649,659 ---- @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver unsafe, ValueNode address) { // Emits a null-check for the otherwise unused receiver unsafe.get(); ! b.addPush(returnKind, new UnsafeMemoryLoadNode(address, returnKind, OFF_HEAP_LOCATION)); b.getGraph().markUnsafeAccess(); return true; } @Override
*** 660,670 **** // Emits a null-check for the otherwise unused receiver unsafe.get(); if (isVolatile) { b.add(new MembarNode(JMM_PRE_VOLATILE_READ)); } ! b.addPush(returnKind, new RawLoadNode(object, offset, returnKind, LocationIdentity.any())); if (isVolatile) { b.add(new MembarNode(JMM_POST_VOLATILE_READ)); } b.getGraph().markUnsafeAccess(); return true; --- 661,672 ---- // Emits a null-check for the otherwise unused receiver unsafe.get(); if (isVolatile) { b.add(new MembarNode(JMM_PRE_VOLATILE_READ)); } ! LocationIdentity locationIdentity = object.isNullConstant() ? OFF_HEAP_LOCATION : LocationIdentity.any(); ! b.addPush(returnKind, new RawLoadNode(object, offset, returnKind, locationIdentity)); if (isVolatile) { b.add(new MembarNode(JMM_POST_VOLATILE_READ)); } b.getGraph().markUnsafeAccess(); return true;
*** 683,693 **** @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver unsafe, ValueNode address, ValueNode value) { // Emits a null-check for the otherwise unused receiver unsafe.get(); ! b.add(new UnsafeMemoryStoreNode(address, value, kind, LocationIdentity.any())); b.getGraph().markUnsafeAccess(); return true; } @Override --- 685,695 ---- @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver unsafe, ValueNode address, ValueNode value) { // Emits a null-check for the otherwise unused receiver unsafe.get(); ! b.add(new UnsafeMemoryStoreNode(address, value, kind, OFF_HEAP_LOCATION)); b.getGraph().markUnsafeAccess(); return true; } @Override
*** 695,705 **** // Emits a null-check for the otherwise unused receiver unsafe.get(); if (isVolatile) { b.add(new MembarNode(JMM_PRE_VOLATILE_WRITE)); } ! b.add(new RawStoreNode(object, offset, value, kind, LocationIdentity.any())); if (isVolatile) { b.add(new MembarNode(JMM_POST_VOLATILE_WRITE)); } b.getGraph().markUnsafeAccess(); return true; --- 697,708 ---- // Emits a null-check for the otherwise unused receiver unsafe.get(); if (isVolatile) { b.add(new MembarNode(JMM_PRE_VOLATILE_WRITE)); } ! LocationIdentity locationIdentity = object.isNullConstant() ? OFF_HEAP_LOCATION : LocationIdentity.any(); ! b.add(new RawStoreNode(object, offset, value, kind, locationIdentity)); if (isVolatile) { b.add(new MembarNode(JMM_POST_VOLATILE_WRITE)); } b.getGraph().markUnsafeAccess(); return true;
< prev index next >