changeset 10520:590f8f159309

Static imports in write barrier snippets
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Mon, 24 Jun 2013 14:57:04 +0200
parents 3891371b2a3b
children 97aa9042965f
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java	Mon Jun 24 14:52:44 2013 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java	Mon Jun 24 14:57:04 2013 +0200
@@ -101,9 +101,9 @@
         Object fixedExpectedObject = FixedValueAnchorNode.getObject(expectedObject);
         Word field = (Word) Word.fromArray(fixedObject, location);
         Word previousOop = (Word) Word.fromObject(fixedExpectedObject);
-        byte markingValue = thread.readByte(HotSpotReplacementsUtil.g1SATBQueueMarkingOffset());
-        Word bufferAddress = thread.readWord(HotSpotReplacementsUtil.g1SATBQueueBufferOffset());
-        Word indexAddress = thread.add(HotSpotReplacementsUtil.g1SATBQueueIndexOffset());
+        byte markingValue = thread.readByte(g1SATBQueueMarkingOffset());
+        Word bufferAddress = thread.readWord(g1SATBQueueBufferOffset());
+        Word indexAddress = thread.add(g1SATBQueueIndexOffset());
         Word indexValue = indexAddress.readWord(0);
 
         // If the concurrent marker is enabled, the barrier is issued.
@@ -118,7 +118,7 @@
                 // If the thread-local SATB buffer is full issue a native call which will
                 // initialize a new one and add the entry.
                 if (indexValue.notEqual(0)) {
-                    Word nextIndex = indexValue.subtract(HotSpotReplacementsUtil.wordSize());
+                    Word nextIndex = indexValue.subtract(wordSize());
                     Word logAddress = bufferAddress.add(nextIndex);
                     // Log the object to be marked as well as update the SATB's buffer next index.
                     logAddress.writeWord(0, previousOop);
@@ -144,12 +144,12 @@
         }
 
         Word writtenValue = (Word) Word.fromObject(fixedValue);
-        Word bufferAddress = thread.readWord(HotSpotReplacementsUtil.g1CardQueueBufferOffset());
-        Word indexAddress = thread.add(HotSpotReplacementsUtil.g1CardQueueIndexOffset());
-        Word indexValue = thread.readWord(HotSpotReplacementsUtil.g1CardQueueIndexOffset());
+        Word bufferAddress = thread.readWord(g1CardQueueBufferOffset());
+        Word indexAddress = thread.add(g1CardQueueIndexOffset());
+        Word indexValue = thread.readWord(g1CardQueueIndexOffset());
         // The result of the xor reveals whether the installed pointer crosses heap regions.
         // In case it does the write barrier has to be issued.
-        Word xorResult = (field.xor(writtenValue)).unsignedShiftRight(HotSpotReplacementsUtil.logOfHeapRegionGrainBytes());
+        Word xorResult = (field.xor(writtenValue)).unsignedShiftRight(logOfHeapRegionGrainBytes());
 
         // Calculate the address of the card to be enqueued to the
         // thread local card queue.
@@ -173,7 +173,7 @@
                     // If the thread local card queue is full, issue a native call which will
                     // initialize a new one and add the card entry.
                     if (indexValue.notEqual(0)) {
-                        Word nextIndex = indexValue.subtract(HotSpotReplacementsUtil.wordSize());
+                        Word nextIndex = indexValue.subtract(wordSize());
                         Word logAddress = bufferAddress.add(nextIndex);
                         // Log the object to be scanned as well as update
                         // the card queue's next index.