# HG changeset patch # User Christos Kotselidis # Date 1372078624 -7200 # Node ID 590f8f1593094328a119c4b2aa60d9d3a72a58d0 # Parent 3891371b2a3b014aa38bf3fb40a08145c5d1bc1d Static imports in write barrier snippets diff -r 3891371b2a3b -r 590f8f159309 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java --- 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.