|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LocationFactory
The LocationFactory interface provides a means for
the runtime system to get access to some global storage for its
use. For example, the memory manager may might to store pointer
to the current top-of-heap and top-of-memory in some place accessible
by every method. The locations returned may be global registers
(in which case the Generic.LocationFactory must coordinate
with Generic.RegFileInfo to ensure those registers
are not used for other purposes by the register allocator) or
static locations in memory (useful on register-constrained machines).
If static storage is allocated, the makeLocationData()
method will generate an HData containing a label and
the appropriate declaration for the storage; otherwise it will
return an empty HData.
| Nested Class Summary | |
|---|---|
static interface |
LocationFactory.Location
The Locations returned by the
LocationFactory allocation function
are opaque data structures that permit only the creation of
an accessor fragment in Tree form. |
| Method Summary | |
|---|---|
LocationFactory.Location |
allocateLocation(int type)
Allocate a global location of the specified type and return a handle to it. |
HData |
makeLocationData(Frame f)
Create an HData object that allocates static space
for any allocated locations which need it. |
| Method Detail |
|---|
LocationFactory.Location allocateLocation(int type)
makeLocationData() has been invoked. It
is suggested that this constraint is checked in any
implementation using a boolean flag to help ensure correctness.
type - a IR.Tree.Type specifying the type
of location to allocate.HData makeLocationData(Frame f)
HData object that allocates static space
for any allocated locations which need it.
The allocateLocation method may not be
called after this method has been invoked.
f - the Generic.Frame to which the
HData will belong.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||