harpoon.Analysis.Maps
Interface AllocationInformation.AllocationProperties

All Known Implementing Classes:
AllocationInformationMap.AllocationPropertiesImpl, MyAP
Enclosing interface:
AllocationInformation

public static interface AllocationInformation.AllocationProperties

AllocationProperties contains tests for the various possibly properties of an allocation site. "Atomic" allocations (of objects not containing interior pointers) can be done, as well as stack allocation, thread-local allocation, and pre-thread-start thread-local allocation. If none of these properties are true, the object must be allocated in a global heap.


Method Summary
 HClass actualClass()
           
 Temp allocationHeap()
           
 boolean canBeStackAllocated()
           
 boolean canBeThreadAllocated()
           
 boolean hasInteriorPointers()
           
 boolean makeHeap()
           
 boolean noSync()
           
 

Method Detail

hasInteriorPointers

public boolean hasInteriorPointers()
Returns:
true if the object allocated at this site has interior pointers; that is, it is not a primitive array, and some field in the allocated object is not primitive.

canBeStackAllocated

public boolean canBeStackAllocated()
Returns:
true if the object can be allocated on the stack; that is, the lifetime of the object does not exceed the execution of the method containing the allocation.

canBeThreadAllocated

public boolean canBeThreadAllocated()
Returns:
true if the object can be allocated on a thread-local heap; that is, the lifetime of the object does not exceed the lifetime of the thread object specified by the allocationHeap method.

makeHeap

public boolean makeHeap()
Returns:
true if a thread-local heap should be associated with this object --- typically this means that the allocation site is a thread creation. If this is true and canBeThreadAllocated() is also true, then the new object will be itself allocated on the created heap; otherwise the new object will be globally allocated.

allocationHeap

public Temp allocationHeap()
Returns:
a Temp which at the allocation site contains a reference to either the thread object of a thread-local allocation, or to another object whose lifetime is correlated with that of the (not-yet-created) thread object. Returns null if the allocation should use the heap associated with the "current" thread. If this returns non-null, then makeHeap() should return false and canBeThreadAllocated() should return true.

actualClass

public HClass actualClass()
Returns:
the HClass representing the "actual" or instantiated class of the object for which memory is being allocated (as opposed to the declared class).

noSync

public boolean noSync()