Search in sources :

Example 11 with Fold

use of org.graalvm.compiler.api.replacements.Fold in project graal by oracle.

the class UnalignedHeapChunkMemoryWalkerAccessFeature method getCardTableLimitOffset.

/**
 * What is the offset of the limit of the card table?
 */
@Fold
static UnsignedWord getCardTableLimitOffset() {
    final UnsignedWord tableStart = getCardTableStartOffset();
    final UnsignedWord tableSize = getCardTableSize();
    final UnsignedWord tableLimit = tableStart.add(tableSize);
    final UnsignedWord alignment = WordFactory.unsigned(ConfigurationValues.getObjectLayout().getAlignment());
    return UnsignedUtils.roundUp(tableLimit, alignment);
}
Also used : UnsignedWord(org.graalvm.word.UnsignedWord) Fold(org.graalvm.compiler.api.replacements.Fold)

Aggregations

Fold (org.graalvm.compiler.api.replacements.Fold)11 UnsignedWord (org.graalvm.word.UnsignedWord)11