Mercurial > hg > graal-jvmci-8
changeset 18576:487c792de3dc
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sun, 30 Nov 2014 00:17:21 +0000 |
parents | 351cc8ee5e3f (diff) a65c1032f400 (current diff) |
children | c296b906b9eb |
files | |
diffstat | 7 files changed, 28 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotSafepointOp.java Sat Nov 29 06:35:00 2014 +0000 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotSafepointOp.java Sun Nov 30 00:17:21 2014 +0000 @@ -75,7 +75,7 @@ public static void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler asm, HotSpotVMConfig config, boolean atReturn, LIRFrameState state, Register scratch) { assert !atReturn || state == null : "state is unneeded at return"; if (ImmutableCode.getValue()) { - Kind hostWordKind = HotSpotGraalRuntime.getHostWordKind(); + Kind hostWordKind = Kind.Long; int alignment = hostWordKind.getBitCount() / Byte.SIZE; JavaConstant pollingPageAddress = JavaConstant.forIntegerKind(hostWordKind, config.safepointPollingAddress); // This move will be patched to load the safepoint page from a data segment
--- a/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXWrapperBuilder.java Sat Nov 29 06:35:00 2014 +0000 +++ b/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXWrapperBuilder.java Sun Nov 30 00:17:21 2014 +0000 @@ -192,7 +192,7 @@ InvokeNode kernelStart = createInvoke(getClass(), "getKernelStart", ConstantNode.forConstant(kernel.asConstant(), providers.getMetaAccess(), getGraph())); - AllocaNode buf = append(AllocaNode.create(bufSize / wordSize, new BitSet())); + AllocaNode buf = append(AllocaNode.create(bufSize / wordSize, wordKind, new BitSet())); ValueNode objectParametersOffsets; ValueNode pinnedObjects; ConstantNode nullWord = ConstantNode.forIntegerKind(wordKind, 0L, getGraph()); @@ -202,9 +202,9 @@ } else { int intsPerWord = wordSize / intSize; int slots = roundUp(objectSlots.size(), intsPerWord); - objectParametersOffsets = append(AllocaNode.create(slots, new BitSet())); + objectParametersOffsets = append(AllocaNode.create(slots, wordKind, new BitSet())); // No refmap for pinned objects list since kernel execution is (currently) GC unsafe - pinnedObjects = append(AllocaNode.create(objectSlots.size(), new BitSet())); + pinnedObjects = append(AllocaNode.create(objectSlots.size(), wordKind, new BitSet())); // Initialize the object parameter offsets array int index = 0;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantReflectionProvider.java Sat Nov 29 06:35:00 2014 +0000 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantReflectionProvider.java Sun Nov 30 00:17:21 2014 +0000 @@ -249,10 +249,12 @@ public JavaConstant readStableFieldValue(JavaField field, JavaConstant receiver, boolean isDefaultStable) { JavaConstant fieldValue = readNonStableFieldValue(field, receiver); - JavaType declaredType = field.getType(); - if (declaredType.getComponentType() != null) { - int stableDimension = getArrayDimension(declaredType); - return HotSpotObjectConstantImpl.forStableArray(((HotSpotObjectConstantImpl) fieldValue).object(), stableDimension, isDefaultStable); + if (fieldValue.isNonNull()) { + JavaType declaredType = field.getType(); + if (declaredType.getComponentType() != null) { + int stableDimension = getArrayDimension(declaredType); + return HotSpotObjectConstantImpl.forStableArray(((HotSpotObjectConstantImpl) fieldValue).object(), stableDimension, isDefaultStable); + } } return fieldValue; }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotMethodData.java Sat Nov 29 06:35:00 2014 +0000 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotMethodData.java Sun Nov 30 00:17:21 2014 +0000 @@ -28,6 +28,8 @@ import java.util.*; +import sun.misc.*; + import com.oracle.graal.api.meta.*; import com.oracle.graal.api.meta.JavaMethodProfile.ProfiledMethod; import com.oracle.graal.api.meta.JavaTypeProfile.ProfiledType; @@ -171,8 +173,7 @@ /** * Since the values are stored in cells (platform words) this method uses - * {@link HotSpotGraalRuntime#unsafeReadWord} to read the right value on both little and big - * endian machines. + * {@link Unsafe#getAddress} to read the right value on both little and big endian machines. */ private long readUnsignedInt(int position, int offsetInBytes) { long fullOffsetInBytes = computeFullOffset(position, offsetInBytes); @@ -186,8 +187,7 @@ /** * Since the values are stored in cells (platform words) this method uses - * {@link HotSpotGraalRuntime#unsafeReadWord} to read the right value on both little and big - * endian machines. + * {@link Unsafe#getAddress} to read the right value on both little and big endian machines. */ private int readInt(int position, int offsetInBytes) { long fullOffsetInBytes = computeFullOffset(position, offsetInBytes);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/AllocaNode.java Sat Nov 29 06:35:00 2014 +0000 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/AllocaNode.java Sun Nov 30 00:17:21 2014 +0000 @@ -27,7 +27,6 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.common.type.*; -import com.oracle.graal.hotspot.*; import com.oracle.graal.nodeinfo.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -51,12 +50,12 @@ */ protected final BitSet objects; - public static AllocaNode create(int slots, BitSet objects) { - return new AllocaNode(slots, objects); + public static AllocaNode create(int slots, Kind wordKind, BitSet objects) { + return new AllocaNode(slots, wordKind, objects); } - protected AllocaNode(int slots, BitSet objects) { - super(StampFactory.forKind(HotSpotGraalRuntime.getHostWordKind())); + protected AllocaNode(int slots, Kind wordKind, BitSet objects) { + super(StampFactory.forKind(wordKind)); this.slots = slots; this.objects = objects; }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/AESCryptSubstitutions.java Sat Nov 29 06:35:00 2014 +0000 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/AESCryptSubstitutions.java Sun Nov 30 00:17:21 2014 +0000 @@ -44,8 +44,13 @@ public class AESCryptSubstitutions { public static class Guard implements SubstitutionGuard { + private HotSpotVMConfig config; + + public Guard(HotSpotVMConfig config) { + this.config = config; + } + public boolean execute() { - HotSpotVMConfig config = HotSpotGraalRuntime.runtime().getConfig(); if (config.useAESIntrinsics) { assert config.aescryptEncryptBlockStub != 0L; assert config.aescryptDecryptBlockStub != 0L;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CRC32Substitutions.java Sat Nov 29 06:35:00 2014 +0000 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CRC32Substitutions.java Sun Nov 30 00:17:21 2014 +0000 @@ -44,14 +44,14 @@ public static class Guard implements SubstitutionGuard { - private HotSpotGraalRuntimeProvider runtime; + private HotSpotVMConfig config; - public Guard(HotSpotGraalRuntimeProvider runtime) { - this.runtime = runtime; + public Guard(HotSpotVMConfig config) { + this.config = config; } public boolean execute() { - return runtime.getConfig().useCRC32Intrinsics; + return config.useCRC32Intrinsics; } }