< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java

Print this page




  60                     barrierSet.addAtomicReadWriteNodeBarriers(loweredAtomicReadAndWriteNode, graph);
  61                 } else if (n instanceof AbstractCompareAndSwapNode) {
  62                     barrierSet.addCASBarriers((AbstractCompareAndSwapNode) n, graph);
  63                 } else if (n instanceof ArrayRangeWrite) {
  64                     ArrayRangeWrite node = (ArrayRangeWrite) n;
  65                     if (node.writesObjectArray()) {
  66                         barrierSet.addArrayRangeBarriers(node, graph);
  67                     }
  68                 }
  69             }
  70         }
  71     }
  72 
  73     @Override
  74     public boolean checkContract() {
  75         return false;
  76     }
  77 
  78     private BarrierSet createBarrierSet(GraalHotSpotVMConfig config) {
  79         if (config.useG1GC) {
  80             return createG1BarrierSet();
  81         } else {
  82             return createCardTableBarrierSet();
  83         }
  84     }
  85 
  86     protected BarrierSet createCardTableBarrierSet() {
  87         return new CardTableBarrierSet();
  88     }
  89 
  90     protected BarrierSet createG1BarrierSet() {
  91         return new G1BarrierSet();
  92     }
  93 }


  60                     barrierSet.addAtomicReadWriteNodeBarriers(loweredAtomicReadAndWriteNode, graph);
  61                 } else if (n instanceof AbstractCompareAndSwapNode) {
  62                     barrierSet.addCASBarriers((AbstractCompareAndSwapNode) n, graph);
  63                 } else if (n instanceof ArrayRangeWrite) {
  64                     ArrayRangeWrite node = (ArrayRangeWrite) n;
  65                     if (node.writesObjectArray()) {
  66                         barrierSet.addArrayRangeBarriers(node, graph);
  67                     }
  68                 }
  69             }
  70         }
  71     }
  72 
  73     @Override
  74     public boolean checkContract() {
  75         return false;
  76     }
  77 
  78     private BarrierSet createBarrierSet(GraalHotSpotVMConfig config) {
  79         if (config.useG1GC) {
  80             return createG1BarrierSet(config);
  81         } else {
  82             return createCardTableBarrierSet(config);
  83         }
  84     }
  85 
  86     protected BarrierSet createCardTableBarrierSet(GraalHotSpotVMConfig config) {
  87         return new CardTableBarrierSet(config);
  88     }
  89 
  90     protected BarrierSet createG1BarrierSet(GraalHotSpotVMConfig config) {
  91         return new G1BarrierSet(config);
  92     }
  93 }
< prev index next >