# HG changeset patch # User Doug Simon # Date 1417088225 -3600 # Node ID 351cc8ee5e3fc7681f20e32df35530a5dd9c2a43 # Parent 37d88a4af2abb180a7ebdc2d10a5f4822cbf52b3 removed static accesses to HotSpotGraalRuntime diff -r 37d88a4af2ab -r 351cc8ee5e3f graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXWrapperBuilder.java --- 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; diff -r 37d88a4af2ab -r 351cc8ee5e3f graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/AllocaNode.java --- 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; }