Mercurial > hg > truffle
changeset 18575:351cc8ee5e3f
removed static accesses to HotSpotGraalRuntime
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 27 Nov 2014 12:37:05 +0100 |
parents | 37d88a4af2ab |
children | 487c792de3dc |
files | graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXWrapperBuilder.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/AllocaNode.java |
diffstat | 2 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXWrapperBuilder.java Thu Nov 27 11:59:56 2014 +0100 +++ b/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXWrapperBuilder.java Thu Nov 27 12:37:05 2014 +0100 @@ -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/nodes/AllocaNode.java Thu Nov 27 11:59:56 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/AllocaNode.java Thu Nov 27 12:37:05 2014 +0100 @@ -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; }