# HG changeset patch # User Thomas Wuerthinger # Date 1359645056 -3600 # Node ID f3fcc94f7120ae8721de3d7db9cc90b9bcc83f55 # Parent 64f41765b3d2ede9cdccb423231abf3f4399f441 Clean up and remove TODO. diff -r 64f41765b3d2 -r f3fcc94f7120 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Assumptions.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Assumptions.java Thu Jan 31 15:56:27 2013 +0100 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Assumptions.java Thu Jan 31 16:10:56 2013 +0100 @@ -237,7 +237,6 @@ * otherwise */ public boolean recordNoFinalizableSubclassAssumption(ResolvedJavaType receiverType) { - // TODO (thomaswue): Record that assumption correctly. assert useOptimisticAssumptions; return false; } diff -r 64f41765b3d2 -r f3fcc94f7120 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/TargetDescription.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/TargetDescription.java Thu Jan 31 15:56:27 2013 +0100 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/TargetDescription.java Thu Jan 31 16:10:56 2013 +0100 @@ -91,18 +91,14 @@ */ public final boolean debugInfoDoubleWordsInSecondSlot; - public TargetDescription(Architecture arch, boolean isMP, int stackAlignment, int pageSize, int cacheAlignment, boolean inlineObjects, boolean debugInfoDoubleWordsInSecondSlot) { + public TargetDescription(Architecture arch, boolean isMP, int stackAlignment, int stackBias, int pageSize, int cacheAlignment, boolean inlineObjects, boolean debugInfoDoubleWordsInSecondSlot) { this.arch = arch; this.pageSize = pageSize; this.isMP = isMP; this.wordSize = arch.getWordSize(); - if (wordSize == 8) { - this.wordKind = Kind.Long; - } else { - this.wordKind = Kind.Int; - } + this.wordKind = Kind.fromWordSize(wordSize); this.stackAlignment = stackAlignment; - this.stackBias = 0; // TODO: configure with param once SPARC port exists + this.stackBias = stackBias; this.cacheAlignment = cacheAlignment; this.inlineObjects = inlineObjects; this.debugInfoDoubleWordsInSecondSlot = debugInfoDoubleWordsInSecondSlot; diff -r 64f41765b3d2 -r f3fcc94f7120 graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Kind.java --- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Kind.java Thu Jan 31 15:56:27 2013 +0100 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Kind.java Thu Jan 31 16:10:56 2013 +0100 @@ -135,6 +135,21 @@ } /** + * Returns the kind of a word given the size of a word in bytes. + * + * @param wordSizeInBytes the size of a word in bytes + * @return the kind representing a word value + */ + public static Kind fromWordSize(int wordSizeInBytes) { + if (wordSizeInBytes == 8) { + return Kind.Long; + } else { + assert wordSizeInBytes == 4 : "Unsupported word size!"; + return Kind.Int; + } + } + + /** * Returns the kind from the character describing a primitive or void. * * @param ch the character diff -r 64f41765b3d2 -r f3fcc94f7120 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotGraalRuntime.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotGraalRuntime.java Thu Jan 31 15:56:27 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotGraalRuntime.java Thu Jan 31 16:10:56 2013 +0100 @@ -49,7 +49,7 @@ protected TargetDescription createTarget() { final int wordSize = 8; final int stackFrameAlignment = 16; - return new TargetDescription(new AMD64(), true, stackFrameAlignment, config.vmPageSize, wordSize, true, true); + return new TargetDescription(new AMD64(), true, stackFrameAlignment, 0, config.vmPageSize, wordSize, true, true); } @Override