57
58 /**
59 * The indexes of the object pointer slots in the block. Each such object pointer slot must be
60 * initialized before any safepoint in the method otherwise the garbage collector will see
61 * garbage values when processing these slots.
62 */
63 protected final BitSet objects;
64
65 public AllocaNode(@InjectedNodeParameter WordTypes wordTypes, int slots) {
66 this(slots, wordTypes.getWordKind(), new BitSet());
67 }
68
69 public AllocaNode(int slots, JavaKind wordKind, BitSet objects) {
70 super(TYPE, StampFactory.forKind(wordKind));
71 this.slots = slots;
72 this.objects = objects;
73 }
74
75 @Override
76 public void generate(NodeLIRBuilderTool gen) {
77 VirtualStackSlot array = gen.getLIRGeneratorTool().getResult().getFrameMapBuilder().allocateStackSlots(slots, objects, null);
78 Value result = gen.getLIRGeneratorTool().emitAddress(array);
79 gen.setResult(this, result);
80 }
81
82 @NodeIntrinsic
83 public static native Word alloca(@ConstantNodeParameter int slots);
84 }
|
57
58 /**
59 * The indexes of the object pointer slots in the block. Each such object pointer slot must be
60 * initialized before any safepoint in the method otherwise the garbage collector will see
61 * garbage values when processing these slots.
62 */
63 protected final BitSet objects;
64
65 public AllocaNode(@InjectedNodeParameter WordTypes wordTypes, int slots) {
66 this(slots, wordTypes.getWordKind(), new BitSet());
67 }
68
69 public AllocaNode(int slots, JavaKind wordKind, BitSet objects) {
70 super(TYPE, StampFactory.forKind(wordKind));
71 this.slots = slots;
72 this.objects = objects;
73 }
74
75 @Override
76 public void generate(NodeLIRBuilderTool gen) {
77 VirtualStackSlot array = gen.getLIRGeneratorTool().allocateStackSlots(slots, objects, null);
78 Value result = gen.getLIRGeneratorTool().emitAddress(array);
79 gen.setResult(this, result);
80 }
81
82 @NodeIntrinsic
83 public static native Word alloca(@ConstantNodeParameter int slots);
84 }
|