ZoneAllocator¶
-
final class
ZoneAllocator
¶ Allocates memory zone information.
Fields¶
ambiguousWithoutIndices¶
-
public boolean
ambiguousWithoutIndices
¶ When true, a single variable name is not enough to designate one zone, and therefore the name must be shown with indices.
targetSymbolTable¶
-
public SymbolTable
targetSymbolTable
¶ The SymbolTable that will host the table of all ZoneInfo’s created by this ZoneAllocator
Constructors¶
ZoneAllocator¶
-
public
ZoneAllocator
(SymbolTable targetSymbolTable)¶
Methods¶
addVarDecl¶
-
public void
addVarDecl
(TapList zonesTree, SymbolDecl symbolDecl)¶
allocateOneZone¶
-
public TapList
allocateOneZone
(WrapperTypeSpec type, int accessTypeModifier, TapList<ZoneInfoAccessElements> accesses, WrapperTypeSpec rootType, int accessArgRankOrResultZero, boolean isInt, boolean isReal, boolean isPtr, boolean isAllocatable, ZoneInfo targetZoneOf)¶
allocateZones¶
-
public TapList
allocateZones
(WrapperTypeSpec type, int typeModifier, TapList<String> declExtraInfo, TapList<ZoneInfoAccessElements> accesses, WrapperTypeSpec rootType, int accessArgRankOrResultZero, boolean isInt, boolean isReal, boolean isPtr, ZoneInfo targetZoneOf, SymbolTable declSymbolTable, TapList<TapPair<CompositeTypeSpec, TapList>> dejaVu)¶ Allocates a new set of zones for all objects accessed by the given “accesses”, which must all be of the same type “type+typeModifier+declExtraInfo”. In general, “accesses” is a singleton, containing only one declared symbol. However they may be several in the case of COMMON, BIND(C), EQUIVALENCE…
- Parameters
rootType – the root type, i.e. the type of the root symbol(s) declared
accessArgRankOrResultZero – when the (singleton) accesses is a formal argument, its rank, and zero for function result.
isReal – true to force the allocated zones below to have the real kind.
isInt – true to force the allocated zones below to have the integer kind.
isPtr – true to force the allocated zones below to have the pointer kind.
targetZoneOf – when non-null, all allocated zones below will be marked as initial destinations of this pointer zone.
declSymbolTable – the SymbolTable of the main declaration location. Only used for a dubious last attempt to fix size modifiers, probably too late anyway as COMMON alignements are already fixed.
dejaVu – mechanism to avoid infinite looping in recursive types.
- Returns
the tree of all zone ranks allocated for the given “accesses”.