use of cz.cuni.mff.d3s.trupple.language.runtime.heap.HeapSlot in project TrufflePascal by Aspect26.
the class StrAllocNode method strAlloc.
@Specialization
PointerValue strAlloc(long size) {
PCharValue pchar = new PCharValue(size);
HeapSlot heapSlot = PascalHeap.getInstance().allocateNewObject(pchar);
PointerValue pointer = new PointerValue(PCharDesriptor.getInstance());
pointer.setHeapSlot(heapSlot);
return pointer;
}
use of cz.cuni.mff.d3s.trupple.language.runtime.heap.HeapSlot in project TrufflePascal by Aspect26.
the class NewBuiltinNode method allocate.
@Specialization
void allocate(PointerValue pointerValue) {
Object newObject = pointerValue.getType().getDefaultValue();
HeapSlot heapSlot = PascalHeap.getInstance().allocateNewObject(newObject);
pointerValue.setHeapSlot(heapSlot);
}
Aggregations